Class ExpandBlockToolModificationEvent

java.lang.Object
com.blamejared.crafttweaker.natives.event.block.ExpandBlockToolModificationEvent

@ZenRegister public class ExpandBlockToolModificationEvent extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final IEventBus<net.minecraftforge.event.level.BlockEvent.BlockToolModificationEvent>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.item.context.UseOnContext
    getContext(net.minecraftforge.event.level.BlockEvent.BlockToolModificationEvent internal)
     
    static net.minecraft.world.level.block.state.BlockState
    getFinalState(net.minecraftforge.event.level.BlockEvent.BlockToolModificationEvent internal)
    Gets the transformed state after tool use.
    static IItemStack
    getHeldItemStack(net.minecraftforge.event.level.BlockEvent.BlockToolModificationEvent internal)
     
    static net.minecraft.world.entity.player.Player
    getPlayer(net.minecraftforge.event.level.BlockEvent.BlockToolModificationEvent internal)
     
    static net.minecraftforge.common.ToolAction
    getToolAction(net.minecraftforge.event.level.BlockEvent.BlockToolModificationEvent internal)
     
    static boolean
    isSimulated(net.minecraftforge.event.level.BlockEvent.BlockToolModificationEvent internal)
     
    static void
    setFinalState(net.minecraftforge.event.level.BlockEvent.BlockToolModificationEvent internal, net.minecraft.world.level.block.state.BlockState state)
    Sets the transformed state after tool use.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • BUS

      public static final IEventBus<net.minecraftforge.event.level.BlockEvent.BlockToolModificationEvent> BUS
  • Constructor Details

    • ExpandBlockToolModificationEvent

      public ExpandBlockToolModificationEvent()
  • Method Details

    • getPlayer

      public static net.minecraft.world.entity.player.Player getPlayer(net.minecraftforge.event.level.BlockEvent.BlockToolModificationEvent internal)
    • getHeldItemStack

      public static IItemStack getHeldItemStack(net.minecraftforge.event.level.BlockEvent.BlockToolModificationEvent internal)
    • getToolAction

      public static net.minecraftforge.common.ToolAction getToolAction(net.minecraftforge.event.level.BlockEvent.BlockToolModificationEvent internal)
    • isSimulated

      public static boolean isSimulated(net.minecraftforge.event.level.BlockEvent.BlockToolModificationEvent internal)
    • getContext

      public static net.minecraft.world.item.context.UseOnContext getContext(net.minecraftforge.event.level.BlockEvent.BlockToolModificationEvent internal)
    • setFinalState

      public static void setFinalState(net.minecraftforge.event.level.BlockEvent.BlockToolModificationEvent internal, net.minecraft.world.level.block.state.BlockState state)
      Sets the transformed state after tool use. If not set, will return the original state. This will be bypassed if canceled, returning null instead.
    • getFinalState

      public static net.minecraft.world.level.block.state.BlockState getFinalState(net.minecraftforge.event.level.BlockEvent.BlockToolModificationEvent internal)
      Gets the transformed state after tool use. If setFinalState is not called, it will return the original state. This will be bypassed if canceled, returning null instead.