Fixed serversided issue. Forgot to check for uses of isEnabled before changing it to a clientside only method.
This commit is contained in:
@@ -251,7 +251,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
final OptionalSlotFake fs = (OptionalSlotFake) slot;
|
final OptionalSlotFake fs = (OptionalSlotFake) slot;
|
||||||
if( fs.renderDisabled() )
|
if( fs.renderDisabled() )
|
||||||
{
|
{
|
||||||
if( fs.isEnabled() )
|
if( fs.isSlotEnabled() )
|
||||||
{
|
{
|
||||||
this.drawTexturedModalRect( ox + fs.xPos - 1, oy + fs.yPos - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18,
|
this.drawTexturedModalRect( ox + fs.xPos - 1, oy + fs.yPos - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18,
|
||||||
18 );
|
18 );
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
|||||||
if( o instanceof OptionalSlotFake )
|
if( o instanceof OptionalSlotFake )
|
||||||
{
|
{
|
||||||
final OptionalSlotFake fs = (OptionalSlotFake) o;
|
final OptionalSlotFake fs = (OptionalSlotFake) o;
|
||||||
if( !fs.isEnabled() && !fs.getDisplayStack().isEmpty() )
|
if( !fs.isSlotEnabled() && !fs.getDisplayStack().isEmpty() )
|
||||||
{
|
{
|
||||||
fs.clearStack();
|
fs.clearStack();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ import net.minecraft.item.ItemStack;
|
|||||||
|
|
||||||
import appeng.container.AEBaseContainer;
|
import appeng.container.AEBaseContainer;
|
||||||
import appeng.tile.inventory.AppEngInternalInventory;
|
import appeng.tile.inventory.AppEngInternalInventory;
|
||||||
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
@@ -75,7 +77,7 @@ public class AppEngSlot extends Slot
|
|||||||
@Override
|
@Override
|
||||||
public boolean isItemValid( final ItemStack par1ItemStack )
|
public boolean isItemValid( final ItemStack par1ItemStack )
|
||||||
{
|
{
|
||||||
if( this.isEnabled() )
|
if( this.isSlotEnabled() )
|
||||||
{
|
{
|
||||||
return super.isItemValid( par1ItemStack );
|
return super.isItemValid( par1ItemStack );
|
||||||
}
|
}
|
||||||
@@ -86,7 +88,7 @@ public class AppEngSlot extends Slot
|
|||||||
@Nonnull
|
@Nonnull
|
||||||
public ItemStack getStack()
|
public ItemStack getStack()
|
||||||
{
|
{
|
||||||
if( !this.isEnabled() )
|
if( !this.isSlotEnabled() )
|
||||||
{
|
{
|
||||||
return ItemStack.EMPTY;
|
return ItemStack.EMPTY;
|
||||||
}
|
}
|
||||||
@@ -107,7 +109,7 @@ public class AppEngSlot extends Slot
|
|||||||
@Override
|
@Override
|
||||||
public void putStack( final ItemStack par1ItemStack )
|
public void putStack( final ItemStack par1ItemStack )
|
||||||
{
|
{
|
||||||
if( this.isEnabled() )
|
if( this.isSlotEnabled() )
|
||||||
{
|
{
|
||||||
super.putStack( par1ItemStack );
|
super.putStack( par1ItemStack );
|
||||||
|
|
||||||
@@ -136,7 +138,7 @@ public class AppEngSlot extends Slot
|
|||||||
@Override
|
@Override
|
||||||
public boolean canTakeStack( final EntityPlayer par1EntityPlayer )
|
public boolean canTakeStack( final EntityPlayer par1EntityPlayer )
|
||||||
{
|
{
|
||||||
if( this.isEnabled() )
|
if( this.isSlotEnabled() )
|
||||||
{
|
{
|
||||||
return super.canTakeStack( par1EntityPlayer );
|
return super.canTakeStack( par1EntityPlayer );
|
||||||
}
|
}
|
||||||
@@ -144,11 +146,17 @@ public class AppEngSlot extends Slot
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SideOnly( Side.CLIENT )
|
||||||
public boolean isEnabled()
|
public boolean isEnabled()
|
||||||
{
|
{
|
||||||
return super.isEnabled();
|
return super.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isSlotEnabled()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public ItemStack getDisplayStack()
|
public ItemStack getDisplayStack()
|
||||||
{
|
{
|
||||||
return super.getStack();
|
return super.getStack();
|
||||||
@@ -176,7 +184,7 @@ public class AppEngSlot extends Slot
|
|||||||
|
|
||||||
public boolean shouldDisplay()
|
public boolean shouldDisplay()
|
||||||
{
|
{
|
||||||
return this.isEnabled();
|
return this.isSlotEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getX()
|
public int getX()
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class OptionalSlotFake extends SlotFake
|
|||||||
@Nonnull
|
@Nonnull
|
||||||
public ItemStack getStack()
|
public ItemStack getStack()
|
||||||
{
|
{
|
||||||
if( !this.isEnabled() )
|
if( !this.isSlotEnabled() )
|
||||||
{
|
{
|
||||||
if( !this.getDisplayStack().isEmpty() )
|
if( !this.getDisplayStack().isEmpty() )
|
||||||
{
|
{
|
||||||
@@ -59,7 +59,7 @@ public class OptionalSlotFake extends SlotFake
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled()
|
public boolean isSlotEnabled()
|
||||||
{
|
{
|
||||||
if( this.host == null )
|
if( this.host == null )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class OptionalSlotNormal extends AppEngSlot
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled()
|
public boolean isSlotEnabled()
|
||||||
{
|
{
|
||||||
if( this.host == null )
|
if( this.host == null )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class OptionalSlotRestrictedInput extends SlotRestrictedInput
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled()
|
public boolean isSlotEnabled()
|
||||||
{
|
{
|
||||||
if( this.host == null )
|
if( this.host == null )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class SlotPatternOutputs extends OptionalSlotFake
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled()
|
public boolean isSlotEnabled()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -39,6 +39,6 @@ public class SlotPatternOutputs extends OptionalSlotFake
|
|||||||
@Override
|
@Override
|
||||||
public boolean shouldDisplay()
|
public boolean shouldDisplay()
|
||||||
{
|
{
|
||||||
return super.isEnabled();
|
return super.isSlotEnabled();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class SlotPatternTerm extends SlotCraftingTerm
|
|||||||
@Override
|
@Override
|
||||||
public ItemStack getStack()
|
public ItemStack getStack()
|
||||||
{
|
{
|
||||||
if( !this.isEnabled() )
|
if( !this.isSlotEnabled() )
|
||||||
{
|
{
|
||||||
if( !this.getDisplayStack().isEmpty() )
|
if( !this.getDisplayStack().isEmpty() )
|
||||||
{
|
{
|
||||||
@@ -68,7 +68,7 @@ public class SlotPatternTerm extends SlotCraftingTerm
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled()
|
public boolean isSlotEnabled()
|
||||||
{
|
{
|
||||||
if( this.host == null )
|
if( this.host == null )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user