Class AbstractTileEntityWareHouse

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<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>
Direct Known Subclasses:
TileEntityWareHouse

public abstract class AbstractTileEntityWareHouse extends TileEntityColonyBuilding
  • 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