That's what I mean: I want the server to run updateBools() because the methods called inside are server-only, and won't run clientside without crashing.
When checking for isRemote() to be false in updateEntity(), the code never runs, so I need a way of making the server run the updateBools() method.
My code:
Boolean tileup = false;
Boolean tiledown = false;
Boolean tileleft = false;
Boolean tileright = false;
Boolean tilefront = false;
Boolean tileback = false;
public void updateBools(){
tileup = EnergyNet.instance.getTileEntity(this.worldObj, xCoord, yCoord+1, zCoord) != null;
tiledown = EnergyNet.instance.getTileEntity(this.worldObj, xCoord, yCoord-1, zCoord) != null;
tileleft = EnergyNet.instance.getTileEntity(this.worldObj, xCoord-1, yCoord, zCoord) != null;;
tileright = EnergyNet.instance.getTileEntity(this.worldObj, xCoord+1, yCoord, zCoord) != null;
tilefront = EnergyNet.instance.getTileEntity(this.worldObj, xCoord, yCoord, zCoord+1) != null;
tileback = EnergyNet.instance.getTileEntity(this.worldObj, xCoord, yCoord, zCoord-1) != null;
}
public void updateEntity(){
if(!FMLCommonHandler.instance().getEffectiveSide().isClient()){
updateBools();
}
}
(Spoiler wouldn't work )
If that makes sense...