- All Superinterfaces:
IItemHandlerCapProvider, net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>, ISchematicProvider
- All Known Subinterfaces:
IBuilding, 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
-
Method Summary
void
Add a new container to the building.
void
Increase or decrease the current pickup priority.
void
deserializeNBT(net.minecraft.core.HolderLookup.Provider provider,
net.minecraft.nbt.CompoundTag compound)
List<net.minecraft.core.BlockPos>
Get all containers which belong to the building (including hutblock).
int
Get the pick up priority of the building.
Returns the tile entity that belongs to the colony building.
void
registerBlockPosition(@NotNull net.minecraft.world.level.block.Block block,
@NotNull net.minecraft.core.BlockPos pos,
@NotNull net.minecraft.world.level.Level world)
Register a block and position.
void
registerBlockPosition(@NotNull net.minecraft.world.level.block.state.BlockState blockState,
@NotNull net.minecraft.core.BlockPos pos,
@NotNull net.minecraft.world.level.Level world)
Register a blockState and position.
void
Remove a container from the building.
net.minecraft.nbt.CompoundTag
serializeNBT(net.minecraft.core.HolderLookup.Provider provider)
void
Sets the tile entity for the building.
Methods inherited from interface com.minecolonies.api.colony.buildings.ISchematicProvider
clearDirty, getBlueprintPath, getChildren, getCorners, getID, getMaxBuildingLevel, getParent, getRotationMirror, getSchematicName, getStructurePack, hasParent, isDeconstructed, isDirty, markDirty, onUpgradeSchematicTo, setBlueprintPath, setBuildingLevel, setCorners, setDeconstructed, setParent, setRotationMirror, setStructurePack
-
Method Details
-
deserializeNBT
void deserializeNBT(@NotNull
net.minecraft.core.HolderLookup.Provider provider,
net.minecraft.nbt.CompoundTag compound)
- Specified by:
deserializeNBT in interface net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
-
serializeNBT
net.minecraft.nbt.CompoundTag serializeNBT(@NotNull
net.minecraft.core.HolderLookup.Provider provider)
- Specified by:
serializeNBT in interface net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
-
getPickUpPriority
int getPickUpPriority()
Get the pick up priority of the building.
- Returns:
- the priority, an integer.
-
alterPickUpPriority
void alterPickUpPriority(int value)
Increase or decrease the current pickup priority.
- Parameters:
value - the new prio to add to.
-
addContainerPosition
void addContainerPosition(@NotNull
@NotNull net.minecraft.core.BlockPos pos)
Add a new container to the building.
- Parameters:
pos - position to add.
-
removeContainerPosition
void removeContainerPosition(net.minecraft.core.BlockPos pos)
Remove a container from the building.
- Parameters:
pos - position to remove.
-
getContainers
List<net.minecraft.core.BlockPos> getContainers()
Get all containers which belong to the building (including hutblock).
- Returns:
- a copy of the list to avoid currentModification exception.
-
registerBlockPosition
void registerBlockPosition(@NotNull
@NotNull net.minecraft.world.level.block.state.BlockState blockState,
@NotNull
@NotNull net.minecraft.core.BlockPos pos,
@NotNull
@NotNull net.minecraft.world.level.Level world)
Register a blockState and position. We suppress this warning since this parameter will be used in child classes which override this method.
- Parameters:
blockState - to be registered
pos - of the blockState
world - world to register it at.
-
registerBlockPosition
void registerBlockPosition(@NotNull
@NotNull net.minecraft.world.level.block.Block block,
@NotNull
@NotNull net.minecraft.core.BlockPos pos,
@NotNull
@NotNull net.minecraft.world.level.Level world)
Register a block and position. We suppress this warning since this parameter will be used in child classes which override this method.
- Parameters:
block - to be registered
pos - of the block
world - world to register it at.
-
-
setTileEntity
Sets the tile entity for the building.
- Parameters:
te - The tileentity