public static class AnvilEvent.MaterialChanged extends AnvilEvent
AnvilEvent
subclass event fired when a material is placed on or taken from an anvil. For example,
swapping a completed item with a new one would fire this event twice, once for the removal and once for the placing.
Cancelling this event will prevent the material from being placed/taken
AnvilEvent.BeatAnvil, AnvilEvent.FinishedSmith, AnvilEvent.HammerDamage, AnvilEvent.MaterialChanged
Modifier and Type | Field and Description |
---|---|
boolean |
isCollecting
Whether or not the change is the user collecting from the anvil or placing onto the anvil
|
net.minecraft.item.ItemStack |
material
The
ItemStack representing the material being placed on/taken off the anvil |
anvil, player
Constructor and Description |
---|
MaterialChanged(net.minecraft.entity.player.EntityPlayerMP player,
TileEntityAnvil anvil,
net.minecraft.item.ItemStack material,
boolean isCollecting) |
public final net.minecraft.item.ItemStack material
ItemStack
representing the material being placed on/taken off the anvilpublic final boolean isCollecting
public MaterialChanged(net.minecraft.entity.player.EntityPlayerMP player, TileEntityAnvil anvil, net.minecraft.item.ItemStack material, boolean isCollecting)