Fixed crash on placing Armbot
This commit is contained in:
parent
ddc983cd40
commit
a20592178f
2 changed files with 15 additions and 11 deletions
|
@ -105,7 +105,7 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
|
|||
|
||||
if (this.isRunning())
|
||||
{
|
||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER)
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
if (this.disk == null && this.computersAttached == 0)
|
||||
{
|
||||
|
@ -130,7 +130,9 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
|
|||
}
|
||||
}
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
this.commandManager.onUpdate();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -589,7 +591,10 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
|
|||
@Override
|
||||
public void onCreate(Vector3 placedPosition)
|
||||
{
|
||||
DarkMain.blockMulti.makeFakeBlock(this.worldObj, Vector3.add(placedPosition, new Vector3(0, 1, 0)), placedPosition);
|
||||
if (DarkMain.blockMulti != null)
|
||||
{
|
||||
DarkMain.blockMulti.makeFakeBlock(this.worldObj, Vector3.add(placedPosition, new Vector3(0, 1, 0)), placedPosition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -85,21 +85,20 @@ public abstract class TileEntityAssembly extends TileEntityMachine implements IN
|
|||
this.onUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canRun()
|
||||
{
|
||||
//TODO add check for network power
|
||||
return super.canRun() || AssemblyLine.REQUIRE_NO_POWER;
|
||||
}
|
||||
|
||||
/** Same as updateEntity */
|
||||
public abstract void onUpdate();
|
||||
|
||||
/** Checks to see if this assembly tile can run using several methods */
|
||||
public boolean isRunning()
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
return this.running || AssemblyLine.REQUIRE_NO_POWER;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.running;
|
||||
}
|
||||
|
||||
return this.running;
|
||||
}
|
||||
|
||||
/** Amount of energy this tile runs on per tick */
|
||||
|
|
Loading…
Add table
Reference in a new issue