类 ModifiableStructureInfo
java.lang.Object
net.minecraftforge.common.world.ModifiableStructureInfo
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.
-
嵌套类概要
嵌套类修饰符和类型类说明static final record
Record containing raw structure data. -
字段概要
字段修饰符和类型字段说明private @Nullable ModifiableStructureInfo.StructureInfo
private final @NotNull ModifiableStructureInfo.StructureInfo
-
构造器概要
构造器构造器说明ModifiableStructureInfo
(@NotNull ModifiableStructureInfo.StructureInfo originalStructureInfo) -
方法概要
修饰符和类型方法说明void
applyStructureModifiers
(Holder<Structure> structure, List<StructureModifier> structureModifiers) Internal forge method; the game will crash if mods invoke this.get()
返回 The modified structure info if modified structure info has been generated, otherwise gets original structure info。@Nullable ModifiableStructureInfo.StructureInfo
返回 Modified structure info; null if it hasn't been set yet。返回 The original structure info that the associated structure was created with。
-
字段详细资料
-
originalStructureInfo
-
modifiedStructureInfo
-
-
构造器详细资料
-
ModifiableStructureInfo
public ModifiableStructureInfo(@NotNull @NotNull 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
返回 The original structure info that the associated structure was created with。- 返回:
- The original structure info that the associated structure was created with
-
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 forge method; the game will crash if mods invoke this. Creates and caches the modified structure info.- 参数:
structure
- named structure with original data.structureModifiers
- structure modifiers to apply.- 抛出:
IllegalStateException
- if invoked more than once.
-