Merge branch 'development' into 1.8
Conflicts: src/main/java/mekanism/common/tile/TileEntityAdvancedBoundingBlock.java src/main/java/mekanism/common/tile/TileEntityDigitalMiner.java
This commit is contained in:
commit
775e1fbd6d
4 changed files with 24 additions and 11 deletions
|
@ -258,7 +258,11 @@ public class RenderDynamicTank extends TileEntitySpecialRenderer
|
|||
}
|
||||
}
|
||||
|
||||
MekanismRenderer.renderObject(toReturn);
|
||||
if(fluid.getFlowingIcon() != null)
|
||||
{
|
||||
MekanismRenderer.renderObject(toReturn);
|
||||
}
|
||||
|
||||
display.endList();
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
|
|
@ -5,7 +5,6 @@ import mekanism.api.Coord4D;
|
|||
import mekanism.api.IConfigurable;
|
||||
import mekanism.api.IFilterAccess;
|
||||
import mekanism.api.energy.IStrictEnergyAcceptor;
|
||||
import mekanism.api.energy.IStrictEnergyStorage;
|
||||
import mekanism.common.base.IAdvancedBoundingBlock;
|
||||
import mekanism.common.util.InventoryUtils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -32,7 +31,7 @@ import dan200.computercraft.api.peripheral.IPeripheral;
|
|||
@Interface(iface = "cofh.api.energy.IEnergyHandler", modid = "CoFHAPI|energy"),
|
||||
@Interface(iface = "dan200.computercraft.api.peripheral.IPeripheral", modid = "ComputerCraft")
|
||||
})
|
||||
public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock implements ISidedInventory, IEnergySink, IStrictEnergyAcceptor, IPowerReceptor, IStrictEnergyStorage, IEnergyHandler, IPeripheral, IFilterAccess, IConfigurable
|
||||
public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock implements ISidedInventory, IEnergySink, IPowerReceptor, IStrictEnergyAcceptor, IEnergyHandler, IPeripheral, IFilterAccess, IConfigurable
|
||||
{
|
||||
@Override
|
||||
public int getSizeInventory()
|
||||
|
@ -94,7 +93,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
|||
{
|
||||
if(getInv() == null)
|
||||
{
|
||||
return null;
|
||||
return "null";
|
||||
}
|
||||
|
||||
return getInv().getInventoryName();
|
||||
|
@ -305,7 +304,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
|||
{
|
||||
if(getInv() == null)
|
||||
{
|
||||
return null;
|
||||
return new PowerHandler(this, PowerHandler.Type.STORAGE).getPowerReceiver();
|
||||
}
|
||||
|
||||
return getInv().getPowerReceiver(side);
|
||||
|
@ -329,7 +328,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
|||
{
|
||||
if(getInv() == null)
|
||||
{
|
||||
return null;
|
||||
return worldObj;
|
||||
}
|
||||
|
||||
return getInv().getWorld();
|
||||
|
@ -395,6 +394,11 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
|||
|
||||
public IAdvancedBoundingBlock getInv()
|
||||
{
|
||||
if(!receivedCoords)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
TileEntity tile = new Coord4D(mainX, mainY, mainZ, worldObj.provider.dimensionId).getTileEntity(worldObj);
|
||||
|
||||
if(!(tile instanceof IAdvancedBoundingBlock))
|
||||
|
@ -446,7 +450,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
|||
{
|
||||
if(getInv() == null)
|
||||
{
|
||||
return null;
|
||||
return new String[] {"null"};
|
||||
}
|
||||
|
||||
return getInv().getMethodNames();
|
||||
|
@ -458,7 +462,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
|||
{
|
||||
if(getInv() == null)
|
||||
{
|
||||
return null;
|
||||
return new Object[] {};
|
||||
}
|
||||
|
||||
return getInv().callMethod(computer, context, method, arguments);
|
||||
|
@ -500,7 +504,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
|||
{
|
||||
if(getInv() == null)
|
||||
{
|
||||
return null;
|
||||
return new NBTTagCompound();
|
||||
}
|
||||
|
||||
return getInv().getFilterData(nbtTags);
|
||||
|
|
|
@ -19,11 +19,15 @@ public class TileEntityBoundingBlock extends TileEntity implements ITileNetwork
|
|||
public int mainX;
|
||||
public int mainY;
|
||||
public int mainZ;
|
||||
|
||||
public boolean receivedCoords;
|
||||
|
||||
public boolean prevPower;
|
||||
|
||||
public void setMainLocation(int x, int y, int z)
|
||||
{
|
||||
receivedCoords = true;
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
mainX = x;
|
||||
|
@ -99,6 +103,7 @@ public class TileEntityBoundingBlock extends TileEntity implements ITileNetwork
|
|||
mainY = nbtTags.getInteger("mainY");
|
||||
mainZ = nbtTags.getInteger("mainZ");
|
||||
prevPower = nbtTags.getBoolean("prevPower");
|
||||
receivedCoords = nbtTags.getBoolean("receivedCoords");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -110,6 +115,7 @@ public class TileEntityBoundingBlock extends TileEntity implements ITileNetwork
|
|||
nbtTags.setInteger("mainY", mainY);
|
||||
nbtTags.setInteger("mainZ", mainZ);
|
||||
nbtTags.setBoolean("prevPower", prevPower);
|
||||
nbtTags.setBoolean("receivedCoords", receivedCoords);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,7 +17,6 @@ import mekanism.api.MekanismConfig.usage;
|
|||
import mekanism.api.Range4D;
|
||||
import mekanism.common.HashList;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.MekanismBlocks;
|
||||
import mekanism.common.base.IActiveState;
|
||||
import mekanism.common.base.IAdvancedBoundingBlock;
|
||||
import mekanism.common.base.ILogisticalTransporter;
|
||||
|
@ -1070,7 +1069,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
}
|
||||
|
||||
MekanismUtils.makeAdvancedBoundingBlock(worldObj, x, y, z, Coord4D.get(this));
|
||||
worldObj.notifyBlocksOfNeighborChange(x, y, z, MekanismBlocks.BoundingBlock);
|
||||
worldObj.func_147453_f(x, y, z, getBlockType());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue