mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-13 16:54:08 +00:00
PR comment fixes.
This commit is contained in:
1 parent
2b1e179eeb
commit
e24a94f0ba
8 files changed
+132
-157
No files matched your search
@@ -9,24 +9,10 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class ContainerEffectRing extends Container {
|
||||
|
||||
InventoryBeeRing IBR;
|
||||
public class ContainerEffectRing extends effectContainer {
|
||||
|
||||
public ContainerEffectRing(InventoryBeeRing IBR, EntityPlayer player) {
|
||||
this.IBR = IBR;
|
||||
this.addSlotToContainer(
|
||||
new SlotCustomItems(this.IBR, 0, 80, 22, GameRegistry.findItemStack("Forestry", "beeDroneGE", 1)));
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
for (int j = 0; j < 9; ++j) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 74 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 132));
|
||||
}
|
||||
super(IBR, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -34,31 +20,6 @@ public class ContainerEffectRing extends Container {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot) {
|
||||
Slot itemSlot = this.getSlot(slot);
|
||||
boolean clearSlot = false;
|
||||
|
||||
if (itemSlot != null && itemSlot.getHasStack()) {
|
||||
ItemStack srcStack = itemSlot.getStack();
|
||||
if (slot == 0 && srcStack != null) {
|
||||
clearSlot = this.mergeItemStack(srcStack, 1, 36 + 1, false);
|
||||
} else {
|
||||
if (this.getSlot(0).isItemValid(srcStack)) {
|
||||
clearSlot = this.mergeItemStack(srcStack, 0, 1, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (clearSlot) {
|
||||
itemSlot.putStack(null);
|
||||
}
|
||||
itemSlot.onSlotChanged();
|
||||
player.inventory.markDirty();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
|
||||
Reference in new issue
Block a user