Added beta support for minecraft 1.11
This commit is contained in:
@@ -17,6 +17,8 @@ import org.lwjgl.input.Keyboard;
|
|||||||
*/
|
*/
|
||||||
public abstract class ContainerManager {
|
public abstract class ContainerManager {
|
||||||
|
|
||||||
|
// NEW_1_11 stackSize is private. Use: func_190916_E()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Container to work with.
|
* The Container to work with.
|
||||||
*/
|
*/
|
||||||
@@ -354,6 +356,16 @@ public abstract class ContainerManager {
|
|||||||
if (index >= 0 && index < container.inventorySlots.size()) {
|
if (index >= 0 && index < container.inventorySlots.size()) {
|
||||||
|
|
||||||
Slot slot = (Slot) (container.inventorySlots.get(index));
|
Slot slot = (Slot) (container.inventorySlots.get(index));
|
||||||
|
|
||||||
|
// NEW_1_11 No Null-Stacks anymore. Empty Stacks with air...
|
||||||
|
/*ItemStack returnStack = (slot == null) ? null : slot.getStack();
|
||||||
|
|
||||||
|
if(returnStack.func_190916_E() == 0 && returnStack.getItem() == Item.getItemFromBlock(Blocks.AIR)) {
|
||||||
|
returnStack = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnStack;*/
|
||||||
|
|
||||||
return (slot == null) ? null : slot.getStack();
|
return (slot == null) ? null : slot.getStack();
|
||||||
|
|
||||||
} else if (index == -1 && Util.isHoldingStack()) {
|
} else if (index == -1 && Util.isHoldingStack()) {
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ public class Util {
|
|||||||
* @return True, if held stack != null
|
* @return True, if held stack != null
|
||||||
*/
|
*/
|
||||||
public static boolean isHoldingStack() {
|
public static boolean isHoldingStack() {
|
||||||
|
// NEW_1_11 return (getHeldStack().func_190916_E() != 0);
|
||||||
return (getHeldStack() != null);
|
return (getHeldStack() != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user