Fixed Bug: #0839 - Wireless terminal activate after Crafting Plan window
This commit is contained in:
parent
bbad15d2e8
commit
596b3818e3
2 changed files with 8 additions and 6 deletions
|
@ -307,9 +307,10 @@ public enum GuiBridge implements IGuiHandler
|
||||||
public Object getServerGuiElement(int ID_ORDINAL, EntityPlayer player, World w, int x, int y, int z)
|
public Object getServerGuiElement(int ID_ORDINAL, EntityPlayer player, World w, int x, int y, int z)
|
||||||
{
|
{
|
||||||
ForgeDirection side = ForgeDirection.getOrientation( ID_ORDINAL & 0x07 );
|
ForgeDirection side = ForgeDirection.getOrientation( ID_ORDINAL & 0x07 );
|
||||||
GuiBridge ID = values()[ID_ORDINAL >> 3];
|
GuiBridge ID = values()[ID_ORDINAL >> 4];
|
||||||
|
boolean istem = ((ID_ORDINAL >> 3) & 1) == 1;
|
||||||
|
|
||||||
if ( ID.type.isItem() )
|
if ( ID.type.isItem() && istem )
|
||||||
{
|
{
|
||||||
ItemStack it = player.inventory.getCurrentItem();
|
ItemStack it = player.inventory.getCurrentItem();
|
||||||
Object myItem = getGuiObject( it, player, w, x, y, z );
|
Object myItem = getGuiObject( it, player, w, x, y, z );
|
||||||
|
@ -358,9 +359,10 @@ public enum GuiBridge implements IGuiHandler
|
||||||
public Object getClientGuiElement(int ID_ORDINAL, EntityPlayer player, World w, int x, int y, int z)
|
public Object getClientGuiElement(int ID_ORDINAL, EntityPlayer player, World w, int x, int y, int z)
|
||||||
{
|
{
|
||||||
ForgeDirection side = ForgeDirection.getOrientation( ID_ORDINAL & 0x07 );
|
ForgeDirection side = ForgeDirection.getOrientation( ID_ORDINAL & 0x07 );
|
||||||
GuiBridge ID = values()[ID_ORDINAL >> 3];
|
GuiBridge ID = values()[ID_ORDINAL >> 4];
|
||||||
|
boolean istem = ((ID_ORDINAL >> 3) & 1) == 1;
|
||||||
|
|
||||||
if ( ID.type.isItem() )
|
if ( ID.type.isItem() && istem )
|
||||||
{
|
{
|
||||||
ItemStack it = player.inventory.getCurrentItem();
|
ItemStack it = player.inventory.getCurrentItem();
|
||||||
Object myItem = getGuiObject( it, player, w, x, y, z );
|
Object myItem = getGuiObject( it, player, w, x, y, z );
|
||||||
|
|
|
@ -308,9 +308,9 @@ public class Platform
|
||||||
if ( (type.getType().isItem() && tile == null) || type.hasPermissions( tile, x, y, z, side, p ) )
|
if ( (type.getType().isItem() && tile == null) || type.hasPermissions( tile, x, y, z, side, p ) )
|
||||||
{
|
{
|
||||||
if ( tile == null )
|
if ( tile == null )
|
||||||
p.openGui( AppEng.instance, type.ordinal() << 3, p.getEntityWorld(), x, y, z );
|
p.openGui( AppEng.instance, type.ordinal() << 4 | (1 << 3), p.getEntityWorld(), x, y, z );
|
||||||
else
|
else
|
||||||
p.openGui( AppEng.instance, type.ordinal() << 3 | (side.ordinal()), tile.getWorldObj(), x, y, z );
|
p.openGui( AppEng.instance, type.ordinal() << 4 | (side.ordinal()), tile.getWorldObj(), x, y, z );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue