public class RarmorModuleContainer
extends java.lang.Object
This is similar to Minecraft's Container as it overrides some of its methods, however, the actual container this is contained inside of can be accessed.
| Modifier and Type | Field and Description |
|---|---|
net.minecraft.inventory.Container |
actualContainer |
IRarmorData |
currentData |
ActiveRarmorModule |
module |
| Constructor and Description |
|---|
RarmorModuleContainer(net.minecraft.inventory.Container container,
ActiveRarmorModule module) |
| Modifier and Type | Method and Description |
|---|---|
void |
addArmorSlotsAt(net.minecraft.entity.player.EntityPlayer player,
java.util.List<net.minecraft.inventory.Slot> slots,
int x,
int y) |
void |
addListener(net.minecraft.inventory.IContainerListener listener) |
void |
addSecondHandSlot(net.minecraft.entity.player.EntityPlayer player,
java.util.List<net.minecraft.inventory.Slot> slots,
int x,
int y) |
void |
detectAndSendChanges() |
java.util.List<net.minecraft.inventory.Slot> |
getSlots()
Gets all of the slots that should be displayed in this Container.
|
boolean |
mergeItemStack(net.minecraft.item.ItemStack stack,
int startIndexIncl,
int endIndexExcl,
boolean reverseDirection)
This is a helper to merge two stacks inside of transferStackInSlot, as the one in Container is protected
and not accessible.
|
void |
onContainerClosed(net.minecraft.entity.player.EntityPlayer player) |
void |
onCraftMatrixChanged(net.minecraft.inventory.IInventory inventory) |
void |
removeListener(net.minecraft.inventory.IContainerListener listener) |
net.minecraft.item.ItemStack |
slotClick(int slotId,
int dragType,
net.minecraft.inventory.ClickType clickType,
net.minecraft.entity.player.EntityPlayer player) |
net.minecraft.item.ItemStack |
transferStackInSlot(net.minecraft.entity.player.EntityPlayer player,
int index) |
void |
updateProgressBar(int id,
int data) |
public final IRarmorData currentData
public final net.minecraft.inventory.Container actualContainer
public final ActiveRarmorModule module
public RarmorModuleContainer(net.minecraft.inventory.Container container,
ActiveRarmorModule module)
public java.util.List<net.minecraft.inventory.Slot> getSlots()
public void detectAndSendChanges()
public net.minecraft.item.ItemStack transferStackInSlot(net.minecraft.entity.player.EntityPlayer player,
int index)
public void onContainerClosed(net.minecraft.entity.player.EntityPlayer player)
public void onCraftMatrixChanged(net.minecraft.inventory.IInventory inventory)
public void updateProgressBar(int id,
int data)
public void addListener(net.minecraft.inventory.IContainerListener listener)
public void removeListener(net.minecraft.inventory.IContainerListener listener)
public net.minecraft.item.ItemStack slotClick(int slotId,
int dragType,
net.minecraft.inventory.ClickType clickType,
net.minecraft.entity.player.EntityPlayer player)
public boolean mergeItemStack(net.minecraft.item.ItemStack stack,
int startIndexIncl,
int endIndexExcl,
boolean reverseDirection)
stack - The itemstack to merge into the slotsstartIndexIncl - The index this should start at, includedendIndexExcl - The index this should end at, excludedreverseDirection - If this should happen in the opposite directionpublic void addArmorSlotsAt(net.minecraft.entity.player.EntityPlayer player,
java.util.List<net.minecraft.inventory.Slot> slots,
int x,
int y)
public void addSecondHandSlot(net.minecraft.entity.player.EntityPlayer player,
java.util.List<net.minecraft.inventory.Slot> slots,
int x,
int y)