Interface BlockEvents.Place
- Record Components:
state- the block it would placeplacer- who places it, or null for a dispenser or another machinestack- the item placing it, orItemStack.EMPTYfor an enderman
- Enclosing class:
- BlockEvents
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A block is about to be placed, on the server; interrupting stops it, and the item isn't used up. Fired for block
items, whoever uses them (players, dispensers, other mods' machines), and for endermen setting down the block
they carry.
BlockEvents.PLACED follows once it is in the level.-
Method Summary
Modifier and TypeMethodDescriptiononPlace(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, @Nullable net.minecraft.world.entity.Entity placer, net.minecraft.world.item.ItemStack stack)
-
Method Details
-
onPlace
EventResult onPlace(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, @Nullable @Nullable net.minecraft.world.entity.Entity placer, net.minecraft.world.item.ItemStack stack)
-