Interface ISchematicProvider
- All Superinterfaces:
net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
- All Known Subinterfaces:
IBuilding,IBuildingContainer,IBuildingDeliveryman,IBuildingWorker,IGuardBuilding,IMysticalSite,ITownHall,IWareHouse
- All Known Implementing Classes:
AbstractBuilding,AbstractBuildingContainer,AbstractBuildingGuards,AbstractBuildingStructureBuilder,AbstractSchematicProvider,BuildingAlchemist,BuildingArchery,BuildingBaker,BuildingBarracks,BuildingBarracksTower,BuildingBeekeeper,BuildingBlacksmith,BuildingBuilder,BuildingChickenHerder,BuildingCombatAcademy,BuildingComposter,BuildingConcreteMixer,BuildingCook,BuildingCowboy,BuildingCrusher,BuildingDeliveryman,BuildingDyer,BuildingEnchanter,BuildingFarmer,BuildingFisherman,BuildingFletcher,BuildingFlorist,BuildingGateHouse,BuildingGlassblower,BuildingGraveyard,BuildingGuardTower,BuildingHospital,BuildingKitchen,BuildingLibrary,BuildingLumberjack,BuildingMechanic,BuildingMiner,BuildingMysticalSite,BuildingNetherWorker,BuildingPlantation,BuildingRabbitHutch,BuildingSawmill,BuildingSchool,BuildingShepherd,BuildingSifter,BuildingSmeltery,BuildingStable,BuildingStonemason,BuildingStoneSmeltery,BuildingSwineHerder,BuildingTownHall,BuildingUniversity,BuildingWareHouse,DefaultBuildingInstance,PostBox,Stash
public interface ISchematicProvider
extends net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
-
Method Summary
Modifier and TypeMethodDescriptionvoidSets#dirtyto false, meaning that the instance is up to date.Returns the blueprint path of the current building.Set<net.minecraft.core.BlockPos>Get the child building positionsnet.minecraft.util.Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos> Get all the corners of the building based on the schematic.net.minecraft.core.BlockPosgetID()Returns theBlockPosof the current object, also used as ID.intChildren must return their max building level.net.minecraft.core.BlockPosGet the parent building positionintReturns the rotation of the current building.Children must return the name of their structure.Returns the style of the current building.booleanWhether we have a parentbooleanCheck if the building was deconstructed.booleanisDirty()Returns whether the instance is dirty or not.booleanReturns the mirror of the current building.voidMarks the instance and the building dirty.voidonUpgradeSchematicTo(String oldSchematic, String newSchematic, com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE blueprintDataProvider) Called when the old schematic is updated to a new onevoidsetBlueprintPath(String path) Sets the blueprint path of the building.voidsetBuildingLevel(int level) Sets the current level of the building.voidsetCorners(net.minecraft.core.BlockPos corner1, net.minecraft.core.BlockPos corner2) Sets the corners of the building based on the schematic.voidSet the building as deconstructed.voidsetIsMirrored(boolean isMirrored) Sets the mirror of the current building.voidsetParent(net.minecraft.core.BlockPos pos) Set the parent building positionvoidsetStructurePack(String style) Sets the style of the building.Methods inherited from interface net.minecraftforge.common.util.INBTSerializable
deserializeNBT, serializeNBT
-
Method Details
-
setCorners
void setCorners(net.minecraft.core.BlockPos corner1, net.minecraft.core.BlockPos corner2) Sets the corners of the building based on the schematic.- Parameters:
corner1- the first corner.corner2- the second corner.
-
getCorners
net.minecraft.util.Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos> getCorners()Get all the corners of the building based on the schematic. This is the lowest corner (x,y,z) and the highest corner (x,y,z).- Returns:
- the corners.
-
getID
net.minecraft.core.BlockPos getID()Returns theBlockPosof the current object, also used as ID.- Returns:
BlockPosof the current object.
-
getParent
net.minecraft.core.BlockPos getParent()Get the parent building position- Returns:
-
hasParent
boolean hasParent()Whether we have a parent- Returns:
- true if there is a parent building
-
setParent
void setParent(net.minecraft.core.BlockPos pos) Set the parent building position- Parameters:
pos-
-
getChildren
Set<net.minecraft.core.BlockPos> getChildren()Get the child building positions- Returns:
-
getRotation
int getRotation()Returns the rotation of the current building.- Returns:
- integer value of the rotation.
-
getStructurePack
String getStructurePack()Returns the style of the current building.- Returns:
- String representation of the current building-style
-
setStructurePack
Sets the style of the building.- Parameters:
style- String value of the style.
-
getBlueprintPath
String getBlueprintPath()Returns the blueprint path of the current building.- Returns:
- String representation of the current blueprint-path
-
setBlueprintPath
Sets the blueprint path of the building.- Parameters:
path- String value of the blueprint-path.
-
setBuildingLevel
void setBuildingLevel(int level) Sets the current level of the building.- Parameters:
level- Level of the building.
-
isDirty
boolean isDirty()Returns whether the instance is dirty or not.- Returns:
- true if dirty, false if not.
-
clearDirty
void clearDirty()Sets#dirtyto false, meaning that the instance is up to date. -
markDirty
void markDirty()Marks the instance and the building dirty. -
setIsMirrored
void setIsMirrored(boolean isMirrored) Sets the mirror of the current building. -
isMirrored
boolean isMirrored()Returns the mirror of the current building.- Returns:
- boolean value of the mirror.
-
getSchematicName
String getSchematicName()Children must return the name of their structure.- Returns:
- StructureProxy name.
-
getMaxBuildingLevel
int getMaxBuildingLevel()Children must return their max building level.- Returns:
- Max building level.
-
isDeconstructed
boolean isDeconstructed()Check if the building was deconstructed.- Returns:
- true if so.
-
setDeconstructed
void setDeconstructed()Set the building as deconstructed. -
onUpgradeSchematicTo
void onUpgradeSchematicTo(String oldSchematic, String newSchematic, com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE blueprintDataProvider) Called when the old schematic is updated to a new one- Parameters:
oldSchematic-newSchematic-
-