Fixes 889 possible dupe bug

Adds a hotfix to prevent duping with portable cells.
Should possibly fix the NPE crash with switching slots on laggy servers.
This commit is contained in:
yueh
2015-03-03 11:51:05 +01:00
parent a081a4f066
commit 5416ea2365
8 changed files with 104 additions and 24 deletions
+4 -2
View File
@@ -326,8 +326,10 @@ public class Platform
if( ( type.getType().isItem() && tile == null ) || type.hasPermissions( tile, x, y, z, side, p ) )
{
if( tile == null || type.getType() == GuiHostType.ITEM )
p.openGui( AppEng.instance, type.ordinal() << 4 | ( 1 << 3 ), p.getEntityWorld(), x, y, z );
if( tile != null && type.getType() == GuiHostType.ITEM )
p.openGui( AppEng.instance, type.ordinal() << 4 | (1 << 3) , p.getEntityWorld(), x, y, z );
else if ( tile == null && type.getType() == GuiHostType.ITEM )
p.openGui( AppEng.instance, type.ordinal() << 4 | (0 << 3), p.getEntityWorld(), p.inventory.currentItem, 0, 0 );
else
p.openGui( AppEng.instance, type.ordinal() << 4 | ( side.ordinal() ), tile.getWorldObj(), x, y, z );
}