Class TumblestoneBlockEvent.PreCooldownEnd
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.blocks.TumblestoneBlockEvent
com.pixelmonmod.pixelmon.api.events.blocks.TumblestoneBlockEvent.PreCooldownEnd
- Enclosing class:
- TumblestoneBlockEvent
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
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
ConstructorDescriptionPreCooldownEnd
(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 net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
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
-