Migrate Carpet Mixin names to mojang mappings

This commit is contained in:
FX - PR0CESS committed 2022-01-28 16:47:18 -05:00
1 parent 2c3871b90e
commit a547677597
154 files changed
+422 -501

No files matched your search

@@ -0,0 +1,32 @@
package carpet.mixins;
import carpet.CarpetSettings;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.InfestedBlock;
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 InfestedBlock_gravelMixin extends Block
{
public InfestedBlock_gravelMixin(Properties block$Settings_1)
{
super(block$Settings_1);
}
@Inject(method = "spawnInfestation", at = @At(value = "INVOKE", shift = At.Shift.AFTER,
target = "Lnet/minecraft/world/entity/monster/Silverfish;spawnAnim()V"))
private void onOnStacksDropped(ServerLevel serverWorld, BlockPos pos, CallbackInfo ci)
{
if (CarpetSettings.silverFishDropGravel)
{
popResource(serverWorld, pos, new ItemStack(Blocks.GRAVEL));
}
}
}