Class TumblestoneBlockEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.blocks.TumblestoneBlockEvent
- Direct Known Subclasses:
TumblestoneBlockEvent.PostBlockBroke
,TumblestoneBlockEvent.PostBlockDestroy
,TumblestoneBlockEvent.PostCooldownEnd
,TumblestoneBlockEvent.PostGrow
,TumblestoneBlockEvent.PreBlockBroke
,TumblestoneBlockEvent.PreBlockDestroy
,TumblestoneBlockEvent.PreCooldownEnd
,TumblestoneBlockEvent.PreGrow
public class TumblestoneBlockEvent
extends net.minecraftforge.eventbus.api.Event
All relevant events for the Tumblestone blocks
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fires after the block drops the items after brokenstatic class
Fired after the destroy happens (when the tumblestone block receives damage from a player)static class
Fires after the block takes a chance at returning to the "base" state after being broken and dropping items Cancelling prevents the block from returning to the base statestatic class
Fired in the random tick before the tumblestone attempts to increase in age (grow) Cancelling will prevent it from attempting to growstatic class
Fires before the block drops the items after broken Cancelling prevents the dropsstatic class
Fired before the destroy happens Cancelling will prevent the destroy (when the tumblestone block receives damage from a player)static class
Fires before the block takes a chance at returning to the "base" state after being broken and dropping items Cancelling prevents the block from returning to the base statestatic class
Fired in the random tick before the tumblestone attempts to increase in age (grow) Cancelling will prevent it from attempting to growNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Constructor Summary
ModifierConstructorDescriptionprotected
TumblestoneBlockEvent
(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos) Basic constructor -
Method Summary
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
TumblestoneBlockEvent
protected TumblestoneBlockEvent(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos) Basic constructor- Parameters:
level
- The worldstate
- The block statepos
- The position of the tumblestone
-
-
Method Details
-
getWorld
public net.minecraft.world.level.Level getWorld()Gets the world this occurred in- Returns:
- The world
-
getState
public net.minecraft.world.level.block.state.BlockState getState()Gets the state of the block- Returns:
- The state of the block
-
getPos
public net.minecraft.core.BlockPos getPos()Gets the position of the block- Returns:
- The position
-