Fixed Turbines unable to be formed in other dimensions
This commit is contained in:
parent
02d2aa1550
commit
985e5afbfc
11 changed files with 16 additions and 16 deletions
|
@ -86,9 +86,9 @@ public class Chunk3D
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Coord4D clone()
|
public Chunk3D clone()
|
||||||
{
|
{
|
||||||
return new Coord4D(xCoord, zCoord, dimensionId);
|
return new Chunk3D(xCoord, zCoord, dimensionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class LaserManager
|
||||||
if(mop != null)
|
if(mop != null)
|
||||||
{
|
{
|
||||||
to = new Pos3D(mop.hitVec);
|
to = new Pos3D(mop.hitVec);
|
||||||
Coord4D toCoord = new Coord4D(mop.blockX, mop.blockY, mop.blockZ);
|
Coord4D toCoord = new Coord4D(mop.blockX, mop.blockY, mop.blockZ, world.provider.dimensionId);
|
||||||
TileEntity tile = toCoord.getTileEntity(world);
|
TileEntity tile = toCoord.getTileEntity(world);
|
||||||
|
|
||||||
if(tile instanceof ILaserReceptor)
|
if(tile instanceof ILaserReceptor)
|
||||||
|
|
|
@ -169,7 +169,7 @@ public class BoilerUpdateProtocol extends UpdateProtocol<SynchronizedBoilerData>
|
||||||
int steamHeight = (structure.renderLocation.yCoord+structure.volHeight-2)-initDisperser.yCoord;
|
int steamHeight = (structure.renderLocation.yCoord+structure.volHeight-2)-initDisperser.yCoord;
|
||||||
structure.steamVolume = structure.volWidth*structure.volLength*steamHeight;
|
structure.steamVolume = structure.volWidth*structure.volLength*steamHeight;
|
||||||
|
|
||||||
structure.upperRenderLocation = new Coord4D(structure.renderLocation.xCoord, initDisperser.yCoord+1, structure.renderLocation.zCoord);
|
structure.upperRenderLocation = new Coord4D(structure.renderLocation.xCoord, initDisperser.yCoord+1, structure.renderLocation.zCoord, pointer.getWorldObj().provider.dimensionId);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,7 +189,7 @@ public class EntityFlame extends Entity implements IEntityAdditionalSpawnData
|
||||||
|
|
||||||
if(general.aestheticWorldDamage && !fluid && (sideCoord.isAirBlock(worldObj) || sideCoord.isReplaceable(worldObj)))
|
if(general.aestheticWorldDamage && !fluid && (sideCoord.isAirBlock(worldObj) || sideCoord.isReplaceable(worldObj)))
|
||||||
{
|
{
|
||||||
if(mode != ItemFlamethrower.FlamethrowerMode.COMBAT && !smeltBlock(new Coord4D(mop.blockX, mop.blockY, mop.blockZ)))
|
if(mode != ItemFlamethrower.FlamethrowerMode.COMBAT && !smeltBlock(new Coord4D(mop.blockX, mop.blockY, mop.blockZ, worldObj.provider.dimensionId)))
|
||||||
{
|
{
|
||||||
if(mode == ItemFlamethrower.FlamethrowerMode.INFERNO && !worldObj.isRemote)
|
if(mode == ItemFlamethrower.FlamethrowerMode.INFERNO && !worldObj.isRemote)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1127,7 +1127,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
MekanismUtils.makeAdvancedBoundingBlock(worldObj, new Coord4D(x, y, z), Coord4D.get(this));
|
MekanismUtils.makeAdvancedBoundingBlock(worldObj, new Coord4D(x, y, z, worldObj.provider.dimensionId), Coord4D.get(this));
|
||||||
worldObj.func_147453_f(x, y, z, getBlockType());
|
worldObj.func_147453_f(x, y, z, getBlockType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class TileEntityLaser extends TileEntityNoisyElectricBlock implements IAc
|
||||||
if(isActive)
|
if(isActive)
|
||||||
{
|
{
|
||||||
MovingObjectPosition mop = LaserManager.fireLaserClient(this, ForgeDirection.getOrientation(facing), usage.laserUsage, worldObj);
|
MovingObjectPosition mop = LaserManager.fireLaserClient(this, ForgeDirection.getOrientation(facing), usage.laserUsage, worldObj);
|
||||||
Coord4D hitCoord = mop == null ? null : new Coord4D(mop.blockX, mop.blockY, mop.blockZ);
|
Coord4D hitCoord = mop == null ? null : new Coord4D(mop.blockX, mop.blockY, mop.blockZ, worldObj.provider.dimensionId);
|
||||||
|
|
||||||
if(hitCoord == null || !hitCoord.equals(digging))
|
if(hitCoord == null || !hitCoord.equals(digging))
|
||||||
{
|
{
|
||||||
|
@ -80,7 +80,7 @@ public class TileEntityLaser extends TileEntityNoisyElectricBlock implements IAc
|
||||||
setActive(true);
|
setActive(true);
|
||||||
|
|
||||||
LaserInfo info = LaserManager.fireLaser(this, ForgeDirection.getOrientation(facing), usage.laserUsage, worldObj);
|
LaserInfo info = LaserManager.fireLaser(this, ForgeDirection.getOrientation(facing), usage.laserUsage, worldObj);
|
||||||
Coord4D hitCoord = info.movingPos == null ? null : new Coord4D(info.movingPos.blockX, info.movingPos.blockY, info.movingPos.blockZ);
|
Coord4D hitCoord = info.movingPos == null ? null : new Coord4D(info.movingPos.blockX, info.movingPos.blockY, info.movingPos.blockZ, worldObj.provider.dimensionId);
|
||||||
|
|
||||||
if(hitCoord == null || !hitCoord.equals(digging))
|
if(hitCoord == null || !hitCoord.equals(digging))
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class TileEntityLaserAmplifier extends TileEntityContainerBlock implement
|
||||||
if(on)
|
if(on)
|
||||||
{
|
{
|
||||||
MovingObjectPosition mop = LaserManager.fireLaserClient(this, ForgeDirection.getOrientation(facing), lastFired, worldObj);
|
MovingObjectPosition mop = LaserManager.fireLaserClient(this, ForgeDirection.getOrientation(facing), lastFired, worldObj);
|
||||||
Coord4D hitCoord = mop == null ? null : new Coord4D(mop.blockX, mop.blockY, mop.blockZ);
|
Coord4D hitCoord = mop == null ? null : new Coord4D(mop.blockX, mop.blockY, mop.blockZ, worldObj.provider.dimensionId);
|
||||||
|
|
||||||
if(hitCoord == null || !hitCoord.equals(digging))
|
if(hitCoord == null || !hitCoord.equals(digging))
|
||||||
{
|
{
|
||||||
|
@ -126,7 +126,7 @@ public class TileEntityLaserAmplifier extends TileEntityContainerBlock implement
|
||||||
}
|
}
|
||||||
|
|
||||||
LaserInfo info = LaserManager.fireLaser(this, ForgeDirection.getOrientation(facing), firing, worldObj);
|
LaserInfo info = LaserManager.fireLaser(this, ForgeDirection.getOrientation(facing), firing, worldObj);
|
||||||
Coord4D hitCoord = info.movingPos == null ? null : new Coord4D(info.movingPos.blockX, info.movingPos.blockY, info.movingPos.blockZ);
|
Coord4D hitCoord = info.movingPos == null ? null : new Coord4D(info.movingPos.blockX, info.movingPos.blockY, info.movingPos.blockZ, worldObj.provider.dimensionId);
|
||||||
|
|
||||||
if(hitCoord == null || !hitCoord.equals(digging))
|
if(hitCoord == null || !hitCoord.equals(digging))
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class TileEntityLaserTractorBeam extends TileEntityContainerBlock impleme
|
||||||
if(on)
|
if(on)
|
||||||
{
|
{
|
||||||
MovingObjectPosition mop = LaserManager.fireLaserClient(this, ForgeDirection.getOrientation(facing), lastFired, worldObj);
|
MovingObjectPosition mop = LaserManager.fireLaserClient(this, ForgeDirection.getOrientation(facing), lastFired, worldObj);
|
||||||
Coord4D hitCoord = mop == null ? null : new Coord4D(mop.blockX, mop.blockY, mop.blockZ);
|
Coord4D hitCoord = mop == null ? null : new Coord4D(mop.blockX, mop.blockY, mop.blockZ, worldObj.provider.dimensionId);
|
||||||
|
|
||||||
if(hitCoord == null || !hitCoord.equals(digging))
|
if(hitCoord == null || !hitCoord.equals(digging))
|
||||||
{
|
{
|
||||||
|
@ -103,7 +103,7 @@ public class TileEntityLaserTractorBeam extends TileEntityContainerBlock impleme
|
||||||
}
|
}
|
||||||
|
|
||||||
LaserInfo info = LaserManager.fireLaser(this, ForgeDirection.getOrientation(facing), firing, worldObj);
|
LaserInfo info = LaserManager.fireLaser(this, ForgeDirection.getOrientation(facing), firing, worldObj);
|
||||||
Coord4D hitCoord = info.movingPos == null ? null : new Coord4D(info.movingPos.blockX, info.movingPos.blockY, info.movingPos.blockZ);
|
Coord4D hitCoord = info.movingPos == null ? null : new Coord4D(info.movingPos.blockX, info.movingPos.blockY, info.movingPos.blockZ, worldObj.provider.dimensionId);
|
||||||
|
|
||||||
if(hitCoord == null || !hitCoord.equals(digging))
|
if(hitCoord == null || !hitCoord.equals(digging))
|
||||||
{
|
{
|
||||||
|
|
|
@ -854,7 +854,7 @@ public final class MekanismUtils
|
||||||
*/
|
*/
|
||||||
public static void updateBlock(World world, int x, int y, int z)
|
public static void updateBlock(World world, int x, int y, int z)
|
||||||
{
|
{
|
||||||
Coord4D pos = new Coord4D(x, y, z);
|
Coord4D pos = new Coord4D(x, y, z, world.provider.dimensionId);
|
||||||
if(!(pos.getTileEntity(world) instanceof IActiveState) || ((IActiveState)pos.getTileEntity(world)).renderUpdate())
|
if(!(pos.getTileEntity(world) instanceof IActiveState) || ((IActiveState)pos.getTileEntity(world)).renderUpdate())
|
||||||
{
|
{
|
||||||
world.func_147479_m(pos.xCoord, pos.yCoord, pos.zCoord);
|
world.func_147479_m(pos.xCoord, pos.yCoord, pos.zCoord);
|
||||||
|
|
|
@ -129,7 +129,7 @@ public class TurbineUpdateProtocol extends UpdateProtocol<SynchronizedTurbineDat
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
dispersers.remove(new Coord4D(x, complex.yCoord, z));
|
dispersers.remove(new Coord4D(x, complex.yCoord, z, pointer.getWorldObj().provider.dimensionId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,13 +26,13 @@ public class TileEntityAdvancedSolarGenerator extends TileEntitySolarGenerator i
|
||||||
@Override
|
@Override
|
||||||
public void onPlace()
|
public void onPlace()
|
||||||
{
|
{
|
||||||
MekanismUtils.makeBoundingBlock(worldObj, new Coord4D(xCoord, yCoord+1, zCoord), Coord4D.get(this));
|
MekanismUtils.makeBoundingBlock(worldObj, new Coord4D(xCoord, yCoord+1, zCoord, worldObj.provider.dimensionId), Coord4D.get(this));
|
||||||
|
|
||||||
for(int x = -1; x <= 1; x++)
|
for(int x = -1; x <= 1; x++)
|
||||||
{
|
{
|
||||||
for(int z = -1; z <= 1; z++)
|
for(int z = -1; z <= 1; z++)
|
||||||
{
|
{
|
||||||
MekanismUtils.makeBoundingBlock(worldObj, new Coord4D(xCoord+x, yCoord+2, zCoord+z), Coord4D.get(this));
|
MekanismUtils.makeBoundingBlock(worldObj, new Coord4D(xCoord+x, yCoord+2, zCoord+z, worldObj.provider.dimensionId), Coord4D.get(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue