Backport fix for closing SilentChest not dropping cursor item
This commit is contained in:
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_4_5;
|
|||||||
import net.minecraft.server.v1_4_5.ContainerChest;
|
import net.minecraft.server.v1_4_5.ContainerChest;
|
||||||
import net.minecraft.server.v1_4_5.EntityHuman;
|
import net.minecraft.server.v1_4_5.EntityHuman;
|
||||||
import net.minecraft.server.v1_4_5.IInventory;
|
import net.minecraft.server.v1_4_5.IInventory;
|
||||||
|
import net.minecraft.server.v1_4_5.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried());
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_4_6;
|
|||||||
import net.minecraft.server.v1_4_6.ContainerChest;
|
import net.minecraft.server.v1_4_6.ContainerChest;
|
||||||
import net.minecraft.server.v1_4_6.EntityHuman;
|
import net.minecraft.server.v1_4_6.EntityHuman;
|
||||||
import net.minecraft.server.v1_4_6.IInventory;
|
import net.minecraft.server.v1_4_6.IInventory;
|
||||||
|
import net.minecraft.server.v1_4_6.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried());
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_4_R1;
|
|||||||
import net.minecraft.server.v1_4_R1.ContainerChest;
|
import net.minecraft.server.v1_4_R1.ContainerChest;
|
||||||
import net.minecraft.server.v1_4_R1.EntityHuman;
|
import net.minecraft.server.v1_4_R1.EntityHuman;
|
||||||
import net.minecraft.server.v1_4_R1.IInventory;
|
import net.minecraft.server.v1_4_R1.IInventory;
|
||||||
|
import net.minecraft.server.v1_4_R1.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried());
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_5_R2;
|
|||||||
import net.minecraft.server.v1_5_R2.ContainerChest;
|
import net.minecraft.server.v1_5_R2.ContainerChest;
|
||||||
import net.minecraft.server.v1_5_R2.EntityHuman;
|
import net.minecraft.server.v1_5_R2.EntityHuman;
|
||||||
import net.minecraft.server.v1_5_R2.IInventory;
|
import net.minecraft.server.v1_5_R2.IInventory;
|
||||||
|
import net.minecraft.server.v1_5_R2.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried());
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_5_R3;
|
|||||||
import net.minecraft.server.v1_5_R3.ContainerChest;
|
import net.minecraft.server.v1_5_R3.ContainerChest;
|
||||||
import net.minecraft.server.v1_5_R3.EntityHuman;
|
import net.minecraft.server.v1_5_R3.EntityHuman;
|
||||||
import net.minecraft.server.v1_5_R3.IInventory;
|
import net.minecraft.server.v1_5_R3.IInventory;
|
||||||
|
import net.minecraft.server.v1_5_R3.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried());
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_6_R1;
|
|||||||
import net.minecraft.server.v1_6_R1.ContainerChest;
|
import net.minecraft.server.v1_6_R1.ContainerChest;
|
||||||
import net.minecraft.server.v1_6_R1.EntityHuman;
|
import net.minecraft.server.v1_6_R1.EntityHuman;
|
||||||
import net.minecraft.server.v1_6_R1.IInventory;
|
import net.minecraft.server.v1_6_R1.IInventory;
|
||||||
|
import net.minecraft.server.v1_6_R1.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried());
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_6_R2;
|
|||||||
import net.minecraft.server.v1_6_R2.ContainerChest;
|
import net.minecraft.server.v1_6_R2.ContainerChest;
|
||||||
import net.minecraft.server.v1_6_R2.EntityHuman;
|
import net.minecraft.server.v1_6_R2.EntityHuman;
|
||||||
import net.minecraft.server.v1_6_R2.IInventory;
|
import net.minecraft.server.v1_6_R2.IInventory;
|
||||||
|
import net.minecraft.server.v1_6_R2.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried());
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_6_R3;
|
|||||||
import net.minecraft.server.v1_6_R3.ContainerChest;
|
import net.minecraft.server.v1_6_R3.ContainerChest;
|
||||||
import net.minecraft.server.v1_6_R3.EntityHuman;
|
import net.minecraft.server.v1_6_R3.EntityHuman;
|
||||||
import net.minecraft.server.v1_6_R3.IInventory;
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
|
import net.minecraft.server.v1_6_R3.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried());
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_7_R1;
|
|||||||
import net.minecraft.server.v1_7_R1.ContainerChest;
|
import net.minecraft.server.v1_7_R1.ContainerChest;
|
||||||
import net.minecraft.server.v1_7_R1.EntityHuman;
|
import net.minecraft.server.v1_7_R1.EntityHuman;
|
||||||
import net.minecraft.server.v1_7_R1.IInventory;
|
import net.minecraft.server.v1_7_R1.IInventory;
|
||||||
|
import net.minecraft.server.v1_7_R1.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried(), false);
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_7_R2;
|
|||||||
import net.minecraft.server.v1_7_R2.ContainerChest;
|
import net.minecraft.server.v1_7_R2.ContainerChest;
|
||||||
import net.minecraft.server.v1_7_R2.EntityHuman;
|
import net.minecraft.server.v1_7_R2.EntityHuman;
|
||||||
import net.minecraft.server.v1_7_R2.IInventory;
|
import net.minecraft.server.v1_7_R2.IInventory;
|
||||||
|
import net.minecraft.server.v1_7_R2.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried(), false);
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_7_R3;
|
|||||||
import net.minecraft.server.v1_7_R3.ContainerChest;
|
import net.minecraft.server.v1_7_R3.ContainerChest;
|
||||||
import net.minecraft.server.v1_7_R3.EntityHuman;
|
import net.minecraft.server.v1_7_R3.EntityHuman;
|
||||||
import net.minecraft.server.v1_7_R3.IInventory;
|
import net.minecraft.server.v1_7_R3.IInventory;
|
||||||
|
import net.minecraft.server.v1_7_R3.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried(), false);
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_7_R4;
|
|||||||
import net.minecraft.server.v1_7_R4.ContainerChest;
|
import net.minecraft.server.v1_7_R4.ContainerChest;
|
||||||
import net.minecraft.server.v1_7_R4.EntityHuman;
|
import net.minecraft.server.v1_7_R4.EntityHuman;
|
||||||
import net.minecraft.server.v1_7_R4.IInventory;
|
import net.minecraft.server.v1_7_R4.IInventory;
|
||||||
|
import net.minecraft.server.v1_7_R4.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried(), false);
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_8_R1;
|
|||||||
import net.minecraft.server.v1_8_R1.ContainerChest;
|
import net.minecraft.server.v1_8_R1.ContainerChest;
|
||||||
import net.minecraft.server.v1_8_R1.EntityHuman;
|
import net.minecraft.server.v1_8_R1.EntityHuman;
|
||||||
import net.minecraft.server.v1_8_R1.IInventory;
|
import net.minecraft.server.v1_8_R1.IInventory;
|
||||||
|
import net.minecraft.server.v1_8_R1.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried(), false);
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_8_R2;
|
|||||||
import net.minecraft.server.v1_8_R2.ContainerChest;
|
import net.minecraft.server.v1_8_R2.ContainerChest;
|
||||||
import net.minecraft.server.v1_8_R2.EntityHuman;
|
import net.minecraft.server.v1_8_R2.EntityHuman;
|
||||||
import net.minecraft.server.v1_8_R2.IInventory;
|
import net.minecraft.server.v1_8_R2.IInventory;
|
||||||
|
import net.minecraft.server.v1_8_R2.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried(), false);
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_8_R3;
|
|||||||
import net.minecraft.server.v1_8_R3.ContainerChest;
|
import net.minecraft.server.v1_8_R3.ContainerChest;
|
||||||
import net.minecraft.server.v1_8_R3.EntityHuman;
|
import net.minecraft.server.v1_8_R3.EntityHuman;
|
||||||
import net.minecraft.server.v1_8_R3.IInventory;
|
import net.minecraft.server.v1_8_R3.IInventory;
|
||||||
|
import net.minecraft.server.v1_8_R3.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried(), false);
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_9_R1;
|
|||||||
import net.minecraft.server.v1_9_R1.ContainerChest;
|
import net.minecraft.server.v1_9_R1.ContainerChest;
|
||||||
import net.minecraft.server.v1_9_R1.EntityHuman;
|
import net.minecraft.server.v1_9_R1.EntityHuman;
|
||||||
import net.minecraft.server.v1_9_R1.IInventory;
|
import net.minecraft.server.v1_9_R1.IInventory;
|
||||||
|
import net.minecraft.server.v1_9_R1.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried(), false);
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package com.lishid.openinv.internal.v1_9_R2;
|
|||||||
import net.minecraft.server.v1_9_R2.ContainerChest;
|
import net.minecraft.server.v1_9_R2.ContainerChest;
|
||||||
import net.minecraft.server.v1_9_R2.EntityHuman;
|
import net.minecraft.server.v1_9_R2.EntityHuman;
|
||||||
import net.minecraft.server.v1_9_R2.IInventory;
|
import net.minecraft.server.v1_9_R2.IInventory;
|
||||||
|
import net.minecraft.server.v1_9_R2.PlayerInventory;
|
||||||
|
|
||||||
public class SilentContainerChest extends ContainerChest {
|
public class SilentContainerChest extends ContainerChest {
|
||||||
public IInventory inv;
|
public IInventory inv;
|
||||||
@@ -32,7 +33,13 @@ public class SilentContainerChest extends ContainerChest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(EntityHuman paramEntityHuman) {
|
public void b(EntityHuman entityHuman) {
|
||||||
// Don't send close signal twice, might screw up
|
// Don't send close signal twice, might screw up
|
||||||
|
PlayerInventory playerinventory = entityHuman.inventory;
|
||||||
|
|
||||||
|
if (playerinventory.getCarried() != null) {
|
||||||
|
entityHuman.drop(playerinventory.getCarried(), false);
|
||||||
|
playerinventory.setCarried(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
name: OpenInv
|
name: OpenInv
|
||||||
main: com.lishid.openinv.OpenInv
|
main: com.lishid.openinv.OpenInv
|
||||||
version: 2.4.6
|
version: 2.4.7
|
||||||
author: lishid
|
author: lishid
|
||||||
authors: [Jikoo]
|
authors: [Jikoo]
|
||||||
description: >
|
description: >
|
||||||
|
Reference in New Issue
Block a user