类 SaplingGrowTreeEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.level.LevelEvent
net.minecraftforge.event.level.SaplingGrowTreeEvent

@Deprecated(forRemoval=true, since="1.21.1") public class SaplingGrowTreeEvent extends LevelEvent
已过时, 待删除: 此 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.

  • 字段详细资料

    • randomSource

      private final RandomSource randomSource
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
    • pos

      private final BlockPos pos
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
    • feature

      @Nullable private @Nullable Holder<ConfiguredFeature<?,?>> feature
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
  • 构造器详细资料

  • 方法详细资料

    • getRandomSource

      public RandomSource getRandomSource()
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      返回 the random source which initiated the sapling growth。
      返回:
      the random source which initiated the sapling growth
    • getPos

      public BlockPos getPos()
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      返回 the coordinates of the sapling attempting to grow。
      返回:
      the coordinates of the sapling attempting to grow
    • getFeature

      @Nullable public @Nullable Holder<ConfiguredFeature<?,?>> 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

      public void setFeature(@Nullable @Nullable Holder<ConfiguredFeature<?,?>> feature)
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      参数:
      feature - a Holder referencing a tree feature to be placed instead of the current feature.
    • setFeature

      public void setFeature(ResourceKey<ConfiguredFeature<?,?>> featureKey)
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      参数:
      featureKey - a ResourceKey referencing a tree feature to be placed instead of the current feature.