Interface IBuildingDataManager
- All Known Implementing Classes:
BuildingDataManager
public interface IBuildingDataManager
Helper manager to analyse and process the registry for
BuildingEntry.-
Method Summary
Modifier and TypeMethodDescriptioncreateFrom(IColony colony, AbstractTileEntityColonyBuilding tileEntityColonyBuilding) Creates a new entry from a givenIColonyand the data passed in asAbstractTileEntityColonyBuilding.createFrom(IColony colony, net.minecraft.core.BlockPos position, net.minecraft.resources.ResourceLocation buildingName) Creates a new entry from a givenIColonyand the data passed in asAbstractTileEntityColonyBuilding.createFrom(IColony colony, net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider provider) Creates a new entry from a givenIColonyand the data passed in asCompoundTag.createViewFrom(IColonyView colony, net.minecraft.core.BlockPos position, net.minecraft.network.RegistryFriendlyByteBuf networkBuffer) Creates a new entry from a givenIColonyView, the position asBlockPosand the data passed in asByteBuf.static IBuildingDataManagervoidopenBuildingBrowser(net.minecraft.world.level.block.Block block) Opens the building browser window for the specific building type.
-
Method Details
-
getInstance
-
createFrom
IBuilding createFrom(IColony colony, net.minecraft.nbt.CompoundTag compound, @NotNull net.minecraft.core.HolderLookup.Provider provider) Creates a new entry from a givenIColonyand the data passed in asCompoundTag. -
createFrom
Creates a new entry from a givenIColonyand the data passed in asAbstractTileEntityColonyBuilding.- Parameters:
colony- TheIColonyto which the newIBuildingbelongs.tileEntityColonyBuilding- The data from which to load newIBuildingstored in aAbstractTileEntityColonyBuilding.- Returns:
- The
IBuildingwith the data loaded fromAbstractTileEntityColonyBuilding.
-
createFrom
IBuilding createFrom(IColony colony, net.minecraft.core.BlockPos position, net.minecraft.resources.ResourceLocation buildingName) Creates a new entry from a givenIColonyand the data passed in asAbstractTileEntityColonyBuilding. -
createViewFrom
IBuildingView createViewFrom(IColonyView colony, net.minecraft.core.BlockPos position, net.minecraft.network.RegistryFriendlyByteBuf networkBuffer) Creates a new entry from a givenIColonyView, the position asBlockPosand the data passed in asByteBuf.- Parameters:
colony- TheIColonyViewto which the newIBuildingViewbelongs.position- The position of the newIBuildingView.networkBuffer- The data from which to load the newIBuildingViewstored in the networksByteBuf.- Returns:
- The
IBuildingViewwith the data loaded from theByteBuf.
-
openBuildingBrowser
void openBuildingBrowser(net.minecraft.world.level.block.Block block) Opens the building browser window for the specific building type. Client side only.- Parameters:
block- The building block.
-