类 ModifiableStructureInfo

java.lang.Object
net.neoforged.neoforge.common.world.ModifiableStructureInfo

public class ModifiableStructureInfo extends Object
Holds lazy-evaluable modified structure info. Memoizers are not used because it's important to return null without evaluating the structure info if it's accessed outside of a server context.
  • 字段详细资料

  • 构造器详细资料

    • ModifiableStructureInfo

      public ModifiableStructureInfo(ModifiableStructureInfo.StructureInfo originalStructureInfo)
      参数:
      originalStructureInfo - StructureInfo representing the original state of a structure when the structure was constructed.
  • 方法详细资料

    • get

      返回 The modified structure info if modified structure info has been generated, otherwise gets original structure info。
      返回:
      The modified structure info if modified structure info has been generated, otherwise gets original structure info
    • getOriginalStructureInfo

      public ModifiableStructureInfo.StructureInfo getOriginalStructureInfo()
      返回 The original structure info that the associated structure was created with。
      返回:
      The original structure info that the associated structure was created with
    • getModifiedStructureInfo

      @Nullable public @Nullable ModifiableStructureInfo.StructureInfo getModifiedStructureInfo()
      返回 Modified structure info; null if it hasn't been set yet。
      返回:
      Modified structure info; null if it hasn't been set yet
    • applyStructureModifiers

      @Internal public void applyStructureModifiers(Holder<Structure> structure, List<StructureModifier> structureModifiers)
      Internal NeoForge method. Will do nothing if this modifier had already been applied. Creates and caches the modified structure info.
      参数:
      structure - named structure with original data.
      structureModifiers - structure modifiers to apply.