Class AnvilRepairEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.entity.EntityEvent
-
- net.minecraftforge.event.entity.living.LivingEvent
-
- net.minecraftforge.event.entity.player.PlayerEvent
-
- net.minecraftforge.event.entity.player.AnvilRepairEvent
-
public class AnvilRepairEvent extends PlayerEvent
Fired when the player removes a "repaired" item from the Anvil's Output slot. breakChance specifies as a percentage the chance that the anvil will be "damaged" when used. ItemStacks are the inputs/output from the anvil. They cannot be edited.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.player.PlayerEvent
PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.ItemCraftedEvent, PlayerEvent.ItemPickupEvent, PlayerEvent.ItemSmeltedEvent, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.PlayerChangedDimensionEvent, PlayerEvent.PlayerChangeGameModeEvent, PlayerEvent.PlayerLoggedInEvent, PlayerEvent.PlayerLoggedOutEvent, PlayerEvent.PlayerRespawnEvent, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.TabListNameFormat, PlayerEvent.Visibility
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent, LivingEvent.LivingVisibilityEvent
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.Size
-
-
Constructor Summary
Constructors Constructor Description AnvilRepairEvent(PlayerEntity player, ItemStack left, ItemStack right, ItemStack output)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getBreakChance()
ItemStack
getIngredientInput()
Get the second item input into the anvilItemStack
getItemInput()
Get the first item input into the anvilItemStack
getItemResult()
Get the output result from the anvilvoid
setBreakChance(float breakChance)
-
Methods inherited from class net.minecraftforge.event.entity.player.PlayerEvent
getPlayer
-
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Constructor Detail
-
AnvilRepairEvent
public AnvilRepairEvent(PlayerEntity player, @Nonnull ItemStack left, @Nonnull ItemStack right, @Nonnull ItemStack output)
-
-
Method Detail
-
getItemResult
@Nonnull public ItemStack getItemResult()
Get the output result from the anvil- Returns:
- the output
-
getItemInput
@Nonnull public ItemStack getItemInput()
Get the first item input into the anvil- Returns:
- the first input slot
-
getIngredientInput
@Nonnull public ItemStack getIngredientInput()
Get the second item input into the anvil- Returns:
- the second input slot
-
getBreakChance
public float getBreakChance()
-
setBreakChance
public void setBreakChance(float breakChance)
-
-