Merge pull request #964 from yueh/fix-889

Fixes #889 possible dupe bug
This commit is contained in:
yueh
2015-04-06 15:54:23 +02:00
8 changed files with 104 additions and 24 deletions
+4 -2
View File
@@ -334,8 +334,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 );
}