Added offhand slot display and manipulation
This commit is contained in:
		@@ -130,12 +130,19 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if (i >= is.length) {
 | 
					        if (i >= is.length) {
 | 
				
			||||||
            i -= is.length;
 | 
					            i -= is.length;
 | 
				
			||||||
            is = this.extra;
 | 
					            is = this.extraSlots;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else if (is == this.armor) {
 | 
					        else if (is == this.armor) {
 | 
				
			||||||
            i = getReversedArmorSlotNum(i);
 | 
					            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];
 | 
					        return is[i];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -153,12 +160,17 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if (i >= is.length) {
 | 
					        if (i >= is.length) {
 | 
				
			||||||
            i -= is.length;
 | 
					            i -= is.length;
 | 
				
			||||||
            is = this.extra;
 | 
					            is = this.extraSlots;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else if (is == this.armor) {
 | 
					        else if (is == this.armor) {
 | 
				
			||||||
            i = getReversedArmorSlotNum(i);
 | 
					            i = getReversedArmorSlotNum(i);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (i >= is.length) {
 | 
				
			||||||
 | 
					            i -= is.length;
 | 
				
			||||||
 | 
					            is = this.extra;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (is[i] != null) {
 | 
					        if (is[i] != null) {
 | 
				
			||||||
            ItemStack itemstack;
 | 
					            ItemStack itemstack;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -195,12 +207,17 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if (i >= is.length) {
 | 
					        if (i >= is.length) {
 | 
				
			||||||
            i -= is.length;
 | 
					            i -= is.length;
 | 
				
			||||||
            is = this.extra;
 | 
					            is = this.extraSlots;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else if (is == this.armor) {
 | 
					        else if (is == this.armor) {
 | 
				
			||||||
            i = getReversedArmorSlotNum(i);
 | 
					            i = getReversedArmorSlotNum(i);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (i >= is.length) {
 | 
				
			||||||
 | 
					            i -= is.length;
 | 
				
			||||||
 | 
					            is = this.extra;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (is[i] != null) {
 | 
					        if (is[i] != null) {
 | 
				
			||||||
            ItemStack itemstack = is[i];
 | 
					            ItemStack itemstack = is[i];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -226,12 +243,17 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if (i >= is.length) {
 | 
					        if (i >= is.length) {
 | 
				
			||||||
            i -= is.length;
 | 
					            i -= is.length;
 | 
				
			||||||
            is = this.extra;
 | 
					            is = this.extraSlots;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else if (is == this.armor) {
 | 
					        else if (is == this.armor) {
 | 
				
			||||||
            i = getReversedArmorSlotNum(i);
 | 
					            i = getReversedArmorSlotNum(i);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (i >= is.length) {
 | 
				
			||||||
 | 
					            i -= is.length;
 | 
				
			||||||
 | 
					            is = this.extra;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Effects
 | 
					        // Effects
 | 
				
			||||||
        if (is == this.extra) {
 | 
					        if (is == this.extra) {
 | 
				
			||||||
            owner.getHandle().drop(itemstack, true);
 | 
					            owner.getHandle().drop(itemstack, true);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user