类 SaplingGrowTreeEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.level.LevelEvent
net.minecraftforge.event.level.SaplingGrowTreeEvent
已过时, 待删除: 此 API 元素将从以后的版本中删除。
This event is fired whenever a sapling, fungus, mushroom or azalea grows into a tree.
This event is not cancellable but does have a result. ALLOW and DEFAULT will allow the sapling to grow using the features set on the event. DENY will prevent the sapling from growing.
This event is fired on the main Forge event bus only on the logical server.
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraftforge.event.level.LevelEvent
LevelEvent.CreateSpawnPosition, LevelEvent.Load, LevelEvent.PotentialSpawns, LevelEvent.Save, LevelEvent.Unload
从类继承的嵌套类/接口 net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
字段概要
字段修饰符和类型字段说明private @Nullable Holder
<ConfiguredFeature<?, ?>> 已过时, 待删除: 此 API 元素将从以后的版本中删除。private final BlockPos
已过时, 待删除: 此 API 元素将从以后的版本中删除。private final RandomSource
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
构造器概要
构造器构造器说明SaplingGrowTreeEvent
(LevelAccessor level, RandomSource randomSource, BlockPos pos, @Nullable Holder<ConfiguredFeature<?, ?>> feature) 已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
方法概要
修饰符和类型方法说明@Nullable Holder
<ConfiguredFeature<?, ?>> 已过时, 待删除: 此 API 元素将从以后的版本中删除。返回 the holder of the feature which will be placed, possibly null。getPos()
已过时, 待删除: 此 API 元素将从以后的版本中删除。返回 the coordinates of the sapling attempting to grow。已过时, 待删除: 此 API 元素将从以后的版本中删除。返回 the random source which initiated the sapling growth。void
setFeature
(@Nullable Holder<ConfiguredFeature<?, ?>> feature) 已过时, 待删除: 此 API 元素将从以后的版本中删除。void
setFeature
(ResourceKey<ConfiguredFeature<?, ?>> featureKey) 已过时, 待删除: 此 API 元素将从以后的版本中删除。从类继承的方法 net.minecraftforge.event.level.LevelEvent
getLevel
从类继承的方法 net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
字段详细资料
-
randomSource
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
pos
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
feature
已过时, 待删除: 此 API 元素将从以后的版本中删除。
-
-
构造器详细资料
-
SaplingGrowTreeEvent
public SaplingGrowTreeEvent(LevelAccessor level, RandomSource randomSource, BlockPos pos, @Nullable @Nullable Holder<ConfiguredFeature<?, ?>> feature) 已过时, 待删除: 此 API 元素将从以后的版本中删除。
-
-
方法详细资料
-
getRandomSource
已过时, 待删除: 此 API 元素将从以后的版本中删除。返回 the random source which initiated the sapling growth。- 返回:
- the random source which initiated the sapling growth
-
getPos
已过时, 待删除: 此 API 元素将从以后的版本中删除。返回 the coordinates of the sapling attempting to grow。- 返回:
- the coordinates of the sapling attempting to grow
-
getFeature
已过时, 待删除: 此 API 元素将从以后的版本中删除。返回 the holder of the feature which will be placed, possibly null。- 返回:
- the holder of the feature which will be placed, possibly null
-
setFeature
已过时, 待删除: 此 API 元素将从以后的版本中删除。- 参数:
feature
- a Holder referencing a tree feature to be placed instead of the current feature.
-
setFeature
已过时, 待删除: 此 API 元素将从以后的版本中删除。- 参数:
featureKey
- a ResourceKey referencing a tree feature to be placed instead of the current feature.
-