Package net.minecraftforge.common.world
Class 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.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final recordRecord containing raw structure data.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate @Nullable ModifiableStructureInfo.StructureInfoprivate final @NotNull ModifiableStructureInfo.StructureInfo
- 
Constructor SummaryConstructorsConstructorDescriptionModifiableStructureInfo(@NotNull ModifiableStructureInfo.StructureInfo originalStructureInfo) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidapplyStructureModifiers(Holder<Structure> structure, List<StructureModifier> structureModifiers) Internal forge method; the game will crash if mods invoke this.get()Returns The modified structure info if modified structure info has been generated, otherwise gets original structure info.@Nullable ModifiableStructureInfo.StructureInfoReturns Modified structure info; null if it hasn't been set yet.Returns The original structure info that the associated structure was created with.
- 
Field Details- 
originalStructureInfo
- 
modifiedStructureInfo
 
- 
- 
Constructor Details- 
ModifiableStructureInfopublic ModifiableStructureInfo(@NotNull @NotNull ModifiableStructureInfo.StructureInfo originalStructureInfo) - Parameters:
- originalStructureInfo- StructureInfo representing the original state of a structure when the structure was constructed.
 
 
- 
- 
Method Details- 
getReturns The modified structure info if modified structure info has been generated, otherwise gets original structure info.- Returns:
- The modified structure info if modified structure info has been generated, otherwise gets original structure info
 
- 
getOriginalStructureInfoReturns The original structure info that the associated structure was created with.- Returns:
- The original structure info that the associated structure was created with
 
- 
getModifiedStructureInfoReturns Modified structure info; null if it hasn't been set yet.- Returns:
- 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.- Parameters:
- structure- named structure with original data.
- structureModifiers- structure modifiers to apply.
- Throws:
- IllegalStateException- if invoked more than once.
 
 
-