missing stuff from quickcarpet
This commit is contained in:
1 parent
c4276b2bd4
commit
24e70ba9ed
8 files changed
+280
-1
No files matched your search
@@ -0,0 +1,34 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.InfestedBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
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.CallbackInfo;
|
||||
|
||||
@Mixin(InfestedBlock.class)
|
||||
public abstract class InfestedBlockMixin extends Block
|
||||
{
|
||||
public InfestedBlockMixin(Settings block$Settings_1)
|
||||
{
|
||||
super(block$Settings_1);
|
||||
}
|
||||
|
||||
@Inject(method = "onStacksDropped", at = @At(value = "INVOKE", shift = At.Shift.AFTER,
|
||||
target = "Lnet/minecraft/entity/mob/SilverfishEntity;playSpawnEffects()V"))
|
||||
private void onOnStacksDropped(BlockState blockState_1, World world_1, BlockPos blockPos_1,
|
||||
ItemStack itemStack_1, CallbackInfo ci)
|
||||
{
|
||||
if (CarpetSettings.getBool("silverFishDropGravel"))
|
||||
{
|
||||
dropStack(world_1, blockPos_1, new ItemStack(Blocks.GRAVEL));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user