Class TumblestoneBlockEvent.PostCooldownEnd
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.blocks.TumblestoneBlockEvent
com.pixelmonmod.pixelmon.api.events.blocks.TumblestoneBlockEvent.PostCooldownEnd
- Enclosing class:
- TumblestoneBlockEvent
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 state
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.blocks.TumblestoneBlockEvent
TumblestoneBlockEvent.PostBlockBroke, TumblestoneBlockEvent.PostBlockDestroy, TumblestoneBlockEvent.PostCooldownEnd, TumblestoneBlockEvent.PostGrow, TumblestoneBlockEvent.PreBlockBroke, TumblestoneBlockEvent.PreBlockDestroy, TumblestoneBlockEvent.PreCooldownEnd, TumblestoneBlockEvent.PreGrow
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Constructor Summary
ConstructorDescriptionPostCooldownEnd
(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, boolean success, float chance) -
Method Summary
Modifier and TypeMethodDescriptionfloat
Chance of it returning to the base stateboolean
If the block successfully returned to the "base" state or notMethods inherited from class com.pixelmonmod.pixelmon.api.events.blocks.TumblestoneBlockEvent
getPos, getState, getWorld
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
PostCooldownEnd
public PostCooldownEnd(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, boolean success, float chance)
-
-
Method Details
-
getChance
public float getChance()Chance of it returning to the base state- Returns:
- The chance of it returning to base state default to the config value
-
wasSuccessful
public boolean wasSuccessful()If the block successfully returned to the "base" state or not- Returns:
- True if it changed
-