Class TumblestoneBlockEvent.PreCooldownEnd
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.blocks.TumblestoneBlockEvent
com.pixelmonmod.pixelmon.api.events.blocks.TumblestoneBlockEvent.PreCooldownEnd
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
TumblestoneBlockEvent
public static class TumblestoneBlockEvent.PreCooldownEnd
extends TumblestoneBlockEvent
implements net.neoforged.bus.api.ICancellableEvent
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 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
-
Constructor Summary
ConstructorsConstructorDescriptionPreCooldownEnd
(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, float chance) -
Method Summary
Methods inherited from class com.pixelmonmod.pixelmon.api.events.blocks.TumblestoneBlockEvent
getPos, getState, getWorld
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Constructor Details
-
PreCooldownEnd
public PreCooldownEnd(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, 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
-
setChance
public void setChance(float chance) Updates the chance to a new value- Parameters:
chance
- The new chance
-