mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-14 01:04:12 +00:00
Cleanup
This commit is contained in:
1 parent
c6baca7116
commit
04caed5baa
2 files changed
+2
-24
No files matched your search
@@ -21,7 +21,6 @@ import forestry.core.gui.tooltips.ToolTip;
|
||||
public class SlotForestry extends Slot implements IToolTipProvider {
|
||||
|
||||
private boolean isPhantom;
|
||||
private boolean isInfinite;
|
||||
private boolean canAdjustPhantom = true;
|
||||
private boolean canShift = true;
|
||||
private int stackLimit;
|
||||
@@ -35,11 +34,6 @@ public class SlotForestry extends Slot implements IToolTipProvider {
|
||||
this.stackLimit = -1;
|
||||
}
|
||||
|
||||
public SlotForestry setInfinite() {
|
||||
this.isInfinite = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SlotForestry setPhantom() {
|
||||
isPhantom = true;
|
||||
return this;
|
||||
@@ -93,22 +87,6 @@ public class SlotForestry extends Slot implements IToolTipProvider {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i) {
|
||||
if (!isInfinite) {
|
||||
return super.decrStackSize(i);
|
||||
}
|
||||
|
||||
ItemStack stack = inventory.getStackInSlot(getSlotIndex());
|
||||
if (stack == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ItemStack result = stack.copy();
|
||||
result.stackSize = i;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param toolTips the tooltips to set
|
||||
*/
|
||||
|
||||
@@ -16,8 +16,8 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class SlotLocked extends SlotForestry {
|
||||
|
||||
public SlotLocked(IInventory par1iInventory, int par2, int par3, int par4) {
|
||||
super(par1iInventory, par2, par3, par4);
|
||||
public SlotLocked(IInventory inventory, int slotIndex, int xPos, int yPos) {
|
||||
super(inventory, slotIndex, xPos, yPos);
|
||||
setCanAdjustPhantom(false);
|
||||
blockShift();
|
||||
setPhantom();
|
||||
|
||||
Reference in new issue
Block a user