Class TileEntityWareHouse

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

public class TileEntityWareHouse extends AbstractTileEntityWareHouse
Class which handles the tileEntity of our colony warehouse.
  • 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: AbstractTileEntityWareHouse
      Method to get the first matching ItemStack in the Warehouse.
      Specified by:
      hasMatchingItemStackInWarehouse in class AbstractTileEntityWareHouse
      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: AbstractTileEntityWareHouse
      Method used to check if this warehouse holds any of the requested itemstacks.
      Specified by:
      hasMatchingItemStackInWarehouse in class AbstractTileEntityWareHouse
      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: AbstractTileEntityWareHouse
      Method used to check if this warehouse holds any of the requested itemstacks.
      Specified by:
      hasMatchingItemStackInWarehouse in class AbstractTileEntityWareHouse
      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: AbstractTileEntityWareHouse
      Method used to check if this warehouse holds any of the requested itemstacks.
      Specified by:
      hasMatchingItemStackInWarehouse in class AbstractTileEntityWareHouse
      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: AbstractTileEntityWareHouse
      Method used to check if this warehouse holds any of the requested itemstacks.
      Specified by:
      getMatchingItemStacksInWarehouse in class AbstractTileEntityWareHouse
      Parameters:
      itemStackSelectionPredicate - The predicate to check with.
      Returns:
      True when the warehouse holds a stack, false when not.
    • dumpInventoryIntoWareHouse

      public void dumpInventoryIntoWareHouse(@NotNull @NotNull InventoryCitizen inventoryCitizen)
      Description copied from class: AbstractTileEntityWareHouse
      Dump the inventory of a citizen into the warehouse. Go through all items and search the right chest to dump it in.
      Specified by:
      dumpInventoryIntoWareHouse in class AbstractTileEntityWareHouse
      Parameters:
      inventoryCitizen - the inventory of the citizen
    • getRackForStack

      public AbstractTileEntityRack getRackForStack(net.minecraft.world.item.ItemStack stack)
      Get a rack for a stack.
      Parameters:
      stack - the stack to insert.
      Returns:
      the matching rack.