Class InventorySlotMasked
java.lang.Object
org.cyclops.cyclopscore.inventory.InventorySlotMasked
- All Implemented Interfaces:
net.minecraft.world.Clearable
,net.minecraft.world.Container
An inventory that only exposes a given number of slots.
-
Field Summary
Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canPlaceItem
(int index, net.minecraft.world.item.ItemStack stack) void
protected int
externalToInternalSlot
(int externalSlot) int
net.minecraft.world.item.ItemStack
getItem
(int index) int
boolean
isEmpty()
net.minecraft.world.item.ItemStack
removeItem
(int index, int count) net.minecraft.world.item.ItemStack
removeItemNoUpdate
(int index) void
void
setItem
(int index, net.minecraft.world.item.ItemStack stack) void
startOpen
(net.minecraft.world.entity.player.Player player) boolean
stillValid
(net.minecraft.world.entity.player.Player player) void
stopOpen
(net.minecraft.world.entity.player.Player player) protected void
validateSlot
(int slot) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.Container
canTakeItem, countItem, hasAnyMatching, hasAnyOf
-
Constructor Details
-
InventorySlotMasked
public InventorySlotMasked(net.minecraft.world.Container inventory, int... slots)
-
-
Method Details
-
validateSlot
protected void validateSlot(int slot) -
externalToInternalSlot
protected int externalToInternalSlot(int externalSlot) -
getContainerSize
public int getContainerSize()- Specified by:
getContainerSize
in interfacenet.minecraft.world.Container
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfacenet.minecraft.world.Container
-
getItem
public net.minecraft.world.item.ItemStack getItem(int index) - Specified by:
getItem
in interfacenet.minecraft.world.Container
-
removeItem
public net.minecraft.world.item.ItemStack removeItem(int index, int count) - Specified by:
removeItem
in interfacenet.minecraft.world.Container
-
removeItemNoUpdate
public net.minecraft.world.item.ItemStack removeItemNoUpdate(int index) - Specified by:
removeItemNoUpdate
in interfacenet.minecraft.world.Container
-
setItem
public void setItem(int index, net.minecraft.world.item.ItemStack stack) - Specified by:
setItem
in interfacenet.minecraft.world.Container
-
getMaxStackSize
public int getMaxStackSize()- Specified by:
getMaxStackSize
in interfacenet.minecraft.world.Container
-
setChanged
public void setChanged()- Specified by:
setChanged
in interfacenet.minecraft.world.Container
-
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player player) - Specified by:
stillValid
in interfacenet.minecraft.world.Container
-
startOpen
public void startOpen(net.minecraft.world.entity.player.Player player) - Specified by:
startOpen
in interfacenet.minecraft.world.Container
-
stopOpen
public void stopOpen(net.minecraft.world.entity.player.Player player) - Specified by:
stopOpen
in interfacenet.minecraft.world.Container
-
canPlaceItem
public boolean canPlaceItem(int index, net.minecraft.world.item.ItemStack stack) - Specified by:
canPlaceItem
in interfacenet.minecraft.world.Container
-
clearContent
public void clearContent()- Specified by:
clearContent
in interfacenet.minecraft.world.Clearable
-