Added offhand slot display and manipulation

This commit is contained in:
Jikoo
2016-03-01 11:44:38 -05:00
parent a623af5119
commit 131f874329

View File

@@ -130,12 +130,19 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
if (i >= is.length) {
i -= is.length;
is = this.extra;
is = this.extraSlots;
}
else if (is == this.armor) {
i = getReversedArmorSlotNum(i);
}
if (i >= is.length) {
i -= is.length;
is = this.extra;
}
// extraSlots is, for now, just an array with length 1. No need for special handling.
return is[i];
}
@@ -153,12 +160,17 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
if (i >= is.length) {
i -= is.length;
is = this.extra;
is = this.extraSlots;
}
else if (is == this.armor) {
i = getReversedArmorSlotNum(i);
}
if (i >= is.length) {
i -= is.length;
is = this.extra;
}
if (is[i] != null) {
ItemStack itemstack;
@@ -195,12 +207,17 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
if (i >= is.length) {
i -= is.length;
is = this.extra;
is = this.extraSlots;
}
else if (is == this.armor) {
i = getReversedArmorSlotNum(i);
}
if (i >= is.length) {
i -= is.length;
is = this.extra;
}
if (is[i] != null) {
ItemStack itemstack = is[i];
@@ -226,12 +243,17 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
if (i >= is.length) {
i -= is.length;
is = this.extra;
is = this.extraSlots;
}
else if (is == this.armor) {
i = getReversedArmorSlotNum(i);
}
if (i >= is.length) {
i -= is.length;
is = this.extra;
}
// Effects
if (is == this.extra) {
owner.getHandle().drop(itemstack, true);