Fixed Indentation in TileEntityRift
Fixed indentation in TileEntityRift
This commit is contained in:
@@ -307,57 +307,57 @@ public class TileEntityRift extends TileEntity
|
||||
int growCount=0;
|
||||
DimLink link = dimension.getLink(xCoord, yCoord, zCoord);
|
||||
|
||||
int x=0,y=0,z=0;
|
||||
while(growCount<100)
|
||||
int x=0,y=0,z=0;
|
||||
while(growCount<100)
|
||||
{
|
||||
growCount++;
|
||||
x=xCoord+(1-(random.nextInt(2)*2)*random.nextInt(6));
|
||||
y=yCoord+(1-(random.nextInt(2)*2)*random.nextInt(4));
|
||||
z=zCoord+(1-(random.nextInt(2)*2)*random.nextInt(6));
|
||||
if(worldObj.isAirBlock(x, y, z))
|
||||
{
|
||||
growCount++;
|
||||
x=xCoord+(1-(random.nextInt(2)*2)*random.nextInt(6));
|
||||
y=yCoord+(1-(random.nextInt(2)*2)*random.nextInt(4));
|
||||
z=zCoord+(1-(random.nextInt(2)*2)*random.nextInt(6));
|
||||
if(worldObj.isAirBlock(x, y, z))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
if (growCount < 100)
|
||||
|
||||
}
|
||||
if (growCount < 100)
|
||||
{
|
||||
|
||||
|
||||
|
||||
//look to see if there is a block inbetween the rift and the spread location that should interrupt the spread. With this change,
|
||||
//rifts cannot spread if there are any blocks nearby that are invularble to rift destruction
|
||||
//TODO- make this look for blocks breaking line of sight with the rift
|
||||
if (link != null)
|
||||
{
|
||||
|
||||
|
||||
|
||||
//look to see if there is a block inbetween the rift and the spread location that should interrupt the spread. With this change,
|
||||
//rifts cannot spread if there are any blocks nearby that are invularble to rift destruction
|
||||
//TODO- make this look for blocks breaking line of sight with the rift
|
||||
if (link != null)
|
||||
if ((this.countParents(link)<4))
|
||||
{
|
||||
if ((this.countParents(link)<4))
|
||||
MovingObjectPosition hit = this.worldObj.clip(this.worldObj.getWorldVec3Pool().getVecFromPool(this.xCoord,this.yCoord,this.zCoord), this.worldObj.getWorldVec3Pool().getVecFromPool(x,y,z),false);
|
||||
if(hit!=null)
|
||||
{
|
||||
MovingObjectPosition hit = this.worldObj.clip(this.worldObj.getWorldVec3Pool().getVecFromPool(this.xCoord,this.yCoord,this.zCoord), this.worldObj.getWorldVec3Pool().getVecFromPool(x,y,z),false);
|
||||
if(hit!=null)
|
||||
|
||||
if(mod_pocketDim.blockRift.isBlockImmune(this.worldObj,hit.blockX,hit.blockY,hit.blockZ))
|
||||
{
|
||||
System.out.println(Block.blocksList[this.worldObj.getBlockId(hit.blockX,hit.blockY,hit.blockZ)].getLocalizedName()+" HIT");
|
||||
|
||||
if(mod_pocketDim.blockRift.isBlockImmune(this.worldObj,hit.blockX,hit.blockY,hit.blockZ))
|
||||
{
|
||||
System.out.println(Block.blocksList[this.worldObj.getBlockId(hit.blockX,hit.blockY,hit.blockZ)].getLocalizedName()+" HIT");
|
||||
|
||||
return;
|
||||
}
|
||||
System.out.println(Block.blocksList[this.worldObj.getBlockId(hit.blockX,hit.blockY,hit.blockZ)].getLocalizedName());
|
||||
hit = this.worldObj.clip(this.worldObj.getWorldVec3Pool().getVecFromPool(this.xCoord,this.yCoord,this.zCoord), this.worldObj.getWorldVec3Pool().getVecFromPool(x,y,z),false);
|
||||
System.out.println(Block.blocksList[this.worldObj.getBlockId(hit.blockX,hit.blockY,hit.blockZ)].getLocalizedName());
|
||||
|
||||
return;
|
||||
}
|
||||
System.out.println(Block.blocksList[this.worldObj.getBlockId(hit.blockX,hit.blockY,hit.blockZ)].getLocalizedName());
|
||||
hit = this.worldObj.clip(this.worldObj.getWorldVec3Pool().getVecFromPool(this.xCoord,this.yCoord,this.zCoord), this.worldObj.getWorldVec3Pool().getVecFromPool(x,y,z),false);
|
||||
System.out.println(Block.blocksList[this.worldObj.getBlockId(hit.blockX,hit.blockY,hit.blockZ)].getLocalizedName());
|
||||
|
||||
dimension.createChildLink(x, y, z, link);
|
||||
this.hasGrownRifts=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.println("allDone");
|
||||
this.hasGrownRifts=true;
|
||||
}
|
||||
|
||||
dimension.createChildLink(x, y, z, link);
|
||||
this.hasGrownRifts=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.println("allDone");
|
||||
this.hasGrownRifts=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -393,14 +393,14 @@ public class TileEntityRift extends TileEntity
|
||||
nbt.setInteger("spawnedEndermenID", this.spawnedEndermenID);
|
||||
}
|
||||
|
||||
public Packet getDescriptionPacket()
|
||||
{
|
||||
if(PocketManager.getLink(xCoord, yCoord, zCoord, worldObj)!=null)
|
||||
{
|
||||
return ServerPacketHandler.createLinkPacket(PocketManager.getLink(xCoord, yCoord, zCoord, worldObj).link());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public Packet getDescriptionPacket()
|
||||
{
|
||||
if(PocketManager.getLink(xCoord, yCoord, zCoord, worldObj)!=null)
|
||||
{
|
||||
return ServerPacketHandler.createLinkPacket(PocketManager.getLink(xCoord, yCoord, zCoord, worldObj).link());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt)
|
||||
|
||||
Reference in New Issue
Block a user