Class ContainerCache

java.lang.Object
ac.boar.anticheat.compensated.cache.container.ContainerCache
Direct Known Subclasses:
ArmorContainerCache, CraftingGridContainerCache, PlayerContainerCache, TradeContainerCache

public class ContainerCache extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final CompensatedInventory
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    ContainerCache(CompensatedInventory inventory, byte id, org.cloudburstmc.protocol.bedrock.data.inventory.ContainerType type, org.cloudburstmc.math.vector.Vector3i blockPosition, long uniqueEntityId)
     
    protected
    ContainerCache(CompensatedInventory inventory, byte id, org.cloudburstmc.protocol.bedrock.data.inventory.ContainerType type, org.cloudburstmc.math.vector.Vector3i blockPosition, long uniqueEntityId, int offset, int containerSize)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    ensureSlots(int slots)
     
    get(int slot)
     
    int
     
    boolean
    holdsSlot(int slot)
     
    void
    set(int slot, ItemCache raw)
     
    void
    set(int slot, ItemCache cache, boolean offset)
     
    void
    set(int slot, org.cloudburstmc.protocol.bedrock.data.inventory.ItemData raw)
     
    void
    set(int slot, org.cloudburstmc.protocol.bedrock.data.inventory.ItemData raw, boolean offset)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ContainerCache

      public ContainerCache(CompensatedInventory inventory, byte id, org.cloudburstmc.protocol.bedrock.data.inventory.ContainerType type, org.cloudburstmc.math.vector.Vector3i blockPosition, long uniqueEntityId)
    • ContainerCache

      protected ContainerCache(CompensatedInventory inventory, byte id, org.cloudburstmc.protocol.bedrock.data.inventory.ContainerType type, org.cloudburstmc.math.vector.Vector3i blockPosition, long uniqueEntityId, int offset, int containerSize)
  • Method Details

    • getContainerSize

      public int getContainerSize()
    • holdsSlot

      public boolean holdsSlot(int slot)
    • ensureSlots

      public void ensureSlots(int slots)
    • get

      public ItemCache get(int slot)
    • set

      public void set(int slot, org.cloudburstmc.protocol.bedrock.data.inventory.ItemData raw)
    • set

      public void set(int slot, ItemCache raw)
    • set

      public void set(int slot, org.cloudburstmc.protocol.bedrock.data.inventory.ItemData raw, boolean offset)
    • set

      public void set(int slot, ItemCache cache, boolean offset)