ds sd

can you make me mod to remove silverfishs from game fabric 26.3 java mod

Kodari AI
KodariNov 15 at 12:45 pm 1
SilverfishEradicator
A Fabric mod for Minecraft 26.3 that completely removes silverfish from the game. It prevents silverfish from spawning naturally, from spawn eggs, from infested blocks, and from monster spawners. The mod also removes any existing silverfish entities from loaded chunks and prevents silverfish from being summoned through commands. It works by canceling spawn events, filtering entity types, and intercepting block break interactions with infested stone variants. Compatible with both client and server environments, ensuring a silverfish-free experience across all gameplay modes.

Plan:

  1. Build a minimal Fabric 26.3/Java 25 project.

  2. Use a Silverfish constructor mixin to discard every instance, covering spawns from eggs, blocks, spawners, and saved entities.

Created Silverfish Remover for Fabric 26.3. Its mixin discards each Silverfish as soon as it’s constructed, so they won’t stick around if created by infested blocks, spawn eggs, spawners, or loaded world data.

ds sd

can you make me mod to remove silverfishs from game fabric 26.3 java mod

Kodari AI
KodariNov 15 at 12:45 pm 1

The Fabric 26.3 Silverfish Remover mod is already set up. It discards Silverfish when they’re created, including from infested blocks, spawn eggs, spawners, and saved world data.

ds sd

Update my Silverfish Remover mod so that whenever a player breaks any infested block (Infested Stone, Infested Cobblestone, Infested Stone Bricks, Infested Mossy Stone Bricks, Infested Cracked Stone Bricks, Infested Chiseled Stone Bricks, or Infested Deepslate) in Survival mode, it drops its normal, non-infested block version instead of disappearing or spawning a silverfish. Make sure Silk Touch and normal pickaxe drops work just like regular stone and deepslate blocks.

Kodari AI
KodariNov 15 at 1:05 pm 1

Plan:

  1. Check the available 26.3 loot-table hooks and block-drop APIs.

  2. Add the smallest implementation that mirrors each block’s ordinary counterpart, including Silk Touch behavior.

Added a Survival-only drop override for all infested blocks. It uses each infested block’s normal host-block loot, so Stone and Deepslate give their usual pickaxe drops or Silk Touch blocks, while the brick and cobblestone variants drop their regular counterparts. The existing Silverfish removal remains in place.

ds sd

Update the mod metadata so that the author is listed as [MNMxD1999] and the mod name is [SilverFish Remover].

Kodari AI
KodariNov 15 at 1:16 pm 1

Updated the mod metadata: the name is now SilverFish Remover and the author is MNMxD1999.

ds sd

make it to .jar not zip

Kodari AI
KodariNov 15 at 1:23 pm 1

The mod builds as a .jar file. On desktop, click Compile in the top bar; on phone, tap ⋮ → Compile Project. Click Compile in the window, then Download on the successful build to get the jar.

ds sd

on windows 11

Kodari AI
KodariNov 15 at 1:24 pm 1

On Windows 11:

  1. Click Compile in the top bar.

  2. In the window that opens, click Compile.

  3. When it succeeds, click Download. The .jar will usually be in your Downloads folder.

It may show a ZIP-style icon because Windows associates .jar files with archive apps, but it’s still a .jar mod file—don’t extract it.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
7 143
src/main/java/com/example/silverfishremover/mixin/InfestedBlockDropsMixin.java
package com.example.silverfishremover.mixin;

import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.item.ItemInstance;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.GameType;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.InfestedBlock;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

import java.util.List;

@Mixin(Block.class)
public abstract class InfestedBlockDropsMixin {
    @Inject(
            method = "getDrops(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/entity/BlockEntity;Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/item/ItemInstance;)Ljava/util/List;",
            at = @At("HEAD"),
            cancellable = true
    )
    private static void silverfishremover$dropHostBlock(
            BlockState state,
            ServerLevel level,
            BlockPos pos,
            BlockEntity blockEntity,
            Entity breaker,
            ItemInstance tool,
            CallbackInfoReturnable<List<ItemStack>> cir
    ) {
        if (breaker instanceof ServerPlayer player
                && player.gameMode.getGameModeForPlayer() == GameType.SURVIVAL
                && state.getBlock() instanceof InfestedBlock infestedBlock) {
            cir.setReturnValue(Block.getDrops(
                    infestedBlock.getHostBlock().defaultBlockState(),
                    level,
                    pos,
                    blockEntity,
                    breaker,
                    tool
            ));
        }
    }
}