Class TileEntityWareHouse
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
- All Implemented Interfaces:
com.ldtteam.domumornamentum.entity.block.IMateriallyTexturedBlockEntity,com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE,ITickable,net.minecraft.world.inventory.MenuConstructor,net.minecraft.world.MenuProvider,net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>,net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>,net.minecraftforge.common.extensions.IForgeBlockEntity,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Class which handles the tileEntity of our colony warehouse.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.minecolonies.api.tileentities.AbstractTileEntityRack
AbstractTileEntityRack.RackInventoryNested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>> -
Field Summary
Fields inherited from class com.minecolonies.core.tileentities.TileEntityColonyBuilding
registryNameFields inherited from class com.minecolonies.api.tileentities.AbstractTileEntityRack
buildingPos, inventory, inWarehouseFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE
TAG_BLUEPRINTDATA, TAG_CORNER_ONE, TAG_CORNER_TWO, TAG_POS_TAG_MAP, TAG_SCHEMATIC_NAME, TAG_TAG_NAME, TAG_TAG_NAME_LIST, TAG_TAG_POSFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
ConstructorsConstructorDescriptionTileEntityWareHouse(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionvoiddumpInventoryIntoWareHouse(@NotNull InventoryCitizen inventoryCitizen) Dump the inventory of a citizen into the warehouse.getMatchingItemStacksInWarehouse(@NotNull Predicate<net.minecraft.world.item.ItemStack> itemStackSelectionPredicate) Method used to check if this warehouse holds any of the requested itemstacks.net.minecraft.world.level.block.entity.BlockEntitygetRackForStack(net.minecraft.world.item.ItemStack stack) Get a rack for a stack.booleanhasMatchingItemStackInWarehouse(@NotNull Predicate<net.minecraft.world.item.ItemStack> itemStackSelectionPredicate, int count) Method to get the first matching ItemStack in the Warehouse.booleanhasMatchingItemStackInWarehouse(@NotNull net.minecraft.world.item.ItemStack itemStack, int count, boolean ignoreNBT) Method used to check if this warehouse holds any of the requested itemstacks.booleanhasMatchingItemStackInWarehouse(@NotNull net.minecraft.world.item.ItemStack itemStack, int count, boolean ignoreNBT, boolean ignoreDamage, int leftOver) Method used to check if this warehouse holds any of the requested itemstacks.booleanhasMatchingItemStackInWarehouse(@NotNull net.minecraft.world.item.ItemStack itemStack, int count, boolean ignoreNBT, int leftOver) Method used to check if this warehouse holds any of the requested itemstacks.Methods inherited from class com.minecolonies.core.tileentities.TileEntityColonyBuilding
createMenu, getBlueprintPath, getBuilding, getBuildingName, getBuildingView, getCapability, getColony, getColonyId, getDisplayName, getPackName, getPosition, getPositionOfChestWithItemStack, getStructurePack, getUpdatePacket, getUpdateTag, handleUpdateTag, hasAccessPermission, isMirrored, isUsableByPlayer, load, onDataPacket, onLoad, reactivate, saveAdditional, setBlueprintPath, setBuilding, setChanged, setColony, setMirror, setPackName, setStructurePack, tick, updateBlockStateMethods inherited from class com.minecolonies.api.tileentities.AbstractTileEntityColonyBuilding
getCachedWorldTagNamePosMap, getPositionedTags, getSchematicCorners, getSchematicName, getTilePos, getWorldTagNamePosMap, isInTileEntity, isOutdated, readSchematicDataFromNBT, setPositionedTags, setSchematicCorners, setSchematicNameMethods inherited from class com.minecolonies.core.tileentities.TileEntityRack
createInventory, getAllContent, getCount, getCount, getFreeSlots, getItemCount, getModelData, getOtherChest, getTextureData, getUpgradeSize, hasItemStack, hasItemStack, hasItemStorage, hasSimilarStack, isEmpty, setInWarehouse, setRemoved, updateItemStorage, updateTextureDataWith, upgradeRackSizeMethods inherited from class com.minecolonies.api.tileentities.AbstractTileEntityRack
getInventory, setBuildingPos, updateWarehouseIfAvailableMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setLevel, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE
addTag, getInWorldCorners, getRealWorldPos, getWorldTagPosMap, removeTag, writeSchematicDataToNBTMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getRenderBoundingBox, hasCustomOutlineRendering, requestModelDataUpdate, serializeNBT
-
Constructor Details
-
TileEntityWareHouse
public TileEntityWareHouse(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
hasMatchingItemStackInWarehouse
public boolean hasMatchingItemStackInWarehouse(@NotNull @NotNull Predicate<net.minecraft.world.item.ItemStack> itemStackSelectionPredicate, int count) Description copied from class:AbstractTileEntityWareHouseMethod to get the first matching ItemStack in the Warehouse.- Specified by:
hasMatchingItemStackInWarehousein classAbstractTileEntityWareHouse- Parameters:
itemStackSelectionPredicate- The predicate to select the ItemStack with.- Returns:
- The first matching ItemStack.
-
hasMatchingItemStackInWarehouse
public boolean hasMatchingItemStackInWarehouse(@NotNull @NotNull net.minecraft.world.item.ItemStack itemStack, int count, boolean ignoreNBT) Description copied from class:AbstractTileEntityWareHouseMethod used to check if this warehouse holds any of the requested itemstacks.- Specified by:
hasMatchingItemStackInWarehousein classAbstractTileEntityWareHouse- Parameters:
itemStack- The stack to check with to check with.count- the min count.ignoreNBT- if the nbt value should be ignored.- Returns:
- True when the warehouse holds a stack, false when not.
-
hasMatchingItemStackInWarehouse
public boolean hasMatchingItemStackInWarehouse(@NotNull @NotNull net.minecraft.world.item.ItemStack itemStack, int count, boolean ignoreNBT, boolean ignoreDamage, int leftOver) Description copied from class:AbstractTileEntityWareHouseMethod used to check if this warehouse holds any of the requested itemstacks.- Specified by:
hasMatchingItemStackInWarehousein classAbstractTileEntityWareHouse- Parameters:
itemStack- The stack to check with to check with.count- the min count.ignoreNBT- if the nbt value should be ignored.ignoreDamage- the ignore damage.leftOver- the leftover to keep at the warehouse at all times.- Returns:
- True when the warehouse holds a stack, false when not.
-
hasMatchingItemStackInWarehouse
public boolean hasMatchingItemStackInWarehouse(@NotNull @NotNull net.minecraft.world.item.ItemStack itemStack, int count, boolean ignoreNBT, int leftOver) Description copied from class:AbstractTileEntityWareHouseMethod used to check if this warehouse holds any of the requested itemstacks.- Specified by:
hasMatchingItemStackInWarehousein classAbstractTileEntityWareHouse- Parameters:
itemStack- The stack to check with to check with.count- the min count.ignoreNBT- if the nbt value should be ignored.leftOver- the leftover to keep at the warehouse at all times.- Returns:
- True when the warehouse holds a stack, false when not.
-
getMatchingItemStacksInWarehouse
@NotNull public @NotNull List<Tuple<net.minecraft.world.item.ItemStack,net.minecraft.core.BlockPos>> getMatchingItemStacksInWarehouse(@NotNull @NotNull Predicate<net.minecraft.world.item.ItemStack> itemStackSelectionPredicate) Description copied from class:AbstractTileEntityWareHouseMethod used to check if this warehouse holds any of the requested itemstacks.- Specified by:
getMatchingItemStacksInWarehousein classAbstractTileEntityWareHouse- Parameters:
itemStackSelectionPredicate- The predicate to check with.- Returns:
- True when the warehouse holds a stack, false when not.
-
dumpInventoryIntoWareHouse
Description copied from class:AbstractTileEntityWareHouseDump the inventory of a citizen into the warehouse. Go through all items and search the right chest to dump it in.- Specified by:
dumpInventoryIntoWareHousein classAbstractTileEntityWareHouse- Parameters:
inventoryCitizen- the inventory of the citizen
-
getRackForStack
public net.minecraft.world.level.block.entity.BlockEntity getRackForStack(net.minecraft.world.item.ItemStack stack) Get a rack for a stack.- Parameters:
stack- the stack to insert.- Returns:
- the matching rack.
-