类 AlterGroundEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.level.AlterGroundEvent
public class AlterGroundEvent
extends net.minecraftforge.eventbus.api.Event
This event is fired when
AlterGroundDecorator.placeBlockAt(TreeDecorator.Context, BlockPos)
attempts to alter a ground block when generating a feature. An example of this would be large spruce trees converting grass blocks into podzol.
This event is not cancellable.
This event is fired on the main Forge event bus only on the logical server.
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
字段概要
字段修饰符和类型字段说明private final LevelSimulatedReader
private BlockState
private final BlockState
private final BlockPos
private final RandomSource
-
构造器概要
构造器构造器说明AlterGroundEvent
(LevelSimulatedReader level, RandomSource random, BlockPos pos, BlockState altered) -
方法概要
修饰符和类型方法说明getLevel()
返回 the new block state to be placed by the ground decorator。返回 the original block state that would be placed by the ground decorator。getPos()
返回 the position of the block that will be altered。void
setNewAlteredState
(BlockState newAltered) 从类继承的方法 net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
字段详细资料
-
level
-
random
-
pos
-
originalAltered
-
newAltered
-
-
构造器详细资料
-
AlterGroundEvent
@Internal public AlterGroundEvent(LevelSimulatedReader level, RandomSource random, BlockPos pos, BlockState altered)
-
-
方法详细资料
-
getLevel
-
getRandom
-
getPos
返回 the position of the block that will be altered。- 返回:
- the position of the block that will be altered
-
getOriginalAlteredState
返回 the original block state that would be placed by the ground decorator。- 返回:
- the original block state that would be placed by the ground decorator
-
getNewAlteredState
返回 the new block state to be placed by the ground decorator。- 返回:
- the new block state to be placed by the ground decorator
-
setNewAlteredState
- 参数:
newAltered
- the new block state to be placed by the ground decorator
-