content: package me.alexdevs.solstice.modules.kit;
  
  import net.minecraft.core.NonNullList;
  import net.minecraft.world.Container;
  import net.minecraft.world.entity.player.Player;
  import net.minecraft.world.item.ItemStack;
  
  public class KitInventory implements Container {
      public static final int SIZE = 27;
  
      private final NonNullList<ItemStack> items = NonNullList.withSize(SIZE, ItemStack.EMPTY);
  
      @Override
      public int getContainerSize() {
          return SIZE;
      }
  
      @Override
      public boolean isEmpty() {
          return items.isEmpty();
      }
  
      @Override
      public ItemStack getItem(int slot) {
          return items.get(slot);
      }
  
      @Override
      public ItemStack removeItem(int slot, int amount) {
          var stack = getItem(slot);
          var taken = stack.copyWithCount(amount);
          stack.shrink(amount);
          return taken;
      }
  
      @Override
      public ItemStack removeItemNoUpdate(int slot) {
          var stack = items.get(slot);
          return stack.copyAndClear();
      }
  
      @Override
      public void setItem(int slot, ItemStack stack) {
          items.set(slot, stack);
      }
  
      @Override
      public void setChanged() {
  
      }
  
      @Override
      public boolean stillValid(Player player) {
          return false;
      }
  
      @Override
      public void clearContent() {
          items.clear();
      }
  }
  