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