Class AbstractTileEntityWareHouse
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
com.minecolonies.api.tileentities.AbstractTileEntityRack
com.minecolonies.core.tileentities.TileEntityRack
com.minecolonies.api.tileentities.AbstractTileEntityColonyBuilding
com.minecolonies.core.tileentities.TileEntityColonyBuilding
com.minecolonies.api.tileentities.AbstractTileEntityWareHouse
- All Implemented Interfaces:
com.ldtteam.domumornamentum.entity.block.IMateriallyTexturedBlockEntity,com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE,ITickable,IItemHandlerCapProvider,net.minecraft.world.Clearable,net.minecraft.world.inventory.MenuConstructor,net.minecraft.world.MenuProvider,net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.client.extensions.IMenuProviderExtension,net.neoforged.neoforge.common.extensions.IBlockEntityExtension
- Direct Known Subclasses:
TileEntityWareHouse
-
Nested Class Summary
Nested classes/interfaces inherited from class com.minecolonies.api.tileentities.AbstractTileEntityRack
AbstractTileEntityRack.RackInventoryNested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BlockEntity.DataComponentInputNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsField -
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 class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEYFields 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_POS -
Constructor Summary
ConstructorsConstructorDescriptionAbstractTileEntityWareHouse(net.minecraft.world.level.block.entity.BlockEntityType<? extends AbstractTileEntityWareHouse> warehouse, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionabstract voiddumpInventoryIntoWareHouse(@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.abstract booleanhasMatchingItemStackInWarehouse(@NotNull Predicate<net.minecraft.world.item.ItemStack> itemStackSelectionPredicate, int count) Method to get the first matching ItemStack in the Warehouse.abstract 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.abstract 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.abstract 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, getColony, getColonyId, getDisplayName, getItemHandlerCap, getPackName, getPosition, getPositionOfChestWithItemStack, getRotationMirror, getStructurePack, getUpdatePacket, getUpdateTag, handleUpdateTag, hasAccessPermission, isUsableByPlayer, loadAdditional, onDataPacket, onLoad, reactivate, saveAdditional, setBlueprintPath, setBuilding, setChanged, setColony, setPackName, setRotationMirror, setStructurePack, tick, updateBlockState, writeColonyToItemStackMethods 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
clearContent, 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, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setComponents, setData, setLevel, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, requestModelDataUpdateMethods inherited from interface com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE
addTag, getInWorldCorners, getRealWorldPos, getWorldTagPosMap, removeTag, writeSchematicDataToNBTMethods inherited from interface com.minecolonies.api.util.IItemHandlerCapProvider
getItemHandlerCap, getItemHandlerCapMethods inherited from interface net.neoforged.neoforge.client.extensions.IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpen
-
Constructor Details
-
AbstractTileEntityWareHouse
public AbstractTileEntityWareHouse(net.minecraft.world.level.block.entity.BlockEntityType<? extends AbstractTileEntityWareHouse> warehouse, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
hasMatchingItemStackInWarehouse
public abstract boolean hasMatchingItemStackInWarehouse(@NotNull @NotNull Predicate<net.minecraft.world.item.ItemStack> itemStackSelectionPredicate, int count) Method to get the first matching ItemStack in the Warehouse.- Parameters:
itemStackSelectionPredicate- The predicate to select the ItemStack with.- Returns:
- The first matching ItemStack.
-
hasMatchingItemStackInWarehouse
public abstract boolean hasMatchingItemStackInWarehouse(@NotNull @NotNull net.minecraft.world.item.ItemStack itemStack, int count, boolean ignoreNBT) Method used to check if this warehouse holds any of the requested itemstacks.- 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 abstract boolean hasMatchingItemStackInWarehouse(@NotNull @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.- 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.
-
hasMatchingItemStackInWarehouse
public abstract boolean hasMatchingItemStackInWarehouse(@NotNull @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.- 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.
-
getMatchingItemStacksInWarehouse
@NotNull public abstract @NotNull List<Tuple<net.minecraft.world.item.ItemStack,net.minecraft.core.BlockPos>> getMatchingItemStacksInWarehouse(@NotNull @NotNull Predicate<net.minecraft.world.item.ItemStack> itemStackSelectionPredicate) Method used to check if this warehouse holds any of the requested itemstacks.- Parameters:
itemStackSelectionPredicate- The predicate to check with.- Returns:
- True when the warehouse holds a stack, false when not.
-
dumpInventoryIntoWareHouse
public abstract void dumpInventoryIntoWareHouse(@NotNull @NotNull InventoryCitizen inventoryCitizen) Dump the inventory of a citizen into the warehouse. Go through all items and search the right chest to dump it in.- Parameters:
inventoryCitizen- the inventory of the citizen
-