Rift spread fixed

This commit is contained in:
StevenRS11
2014-01-21 14:10:00 -05:00
parent 876e3eb4e6
commit 47f9048d44
2 changed files with 17 additions and 2 deletions

View File

@@ -223,7 +223,7 @@ public class BlockRift extends Block implements ITileEntityProvider
{
return;
}
if(worldObj.rand.nextBoolean())
if(worldObj.rand.nextInt(7)==0)
{
ItemStack thread = new ItemStack(mod_pocketDim.itemWorldThread,1);
@@ -251,6 +251,14 @@ public class BlockRift extends Block implements ITileEntityProvider
}
}
/**
* Lets pistons push through rifts, destroying them
*/
@Override
public int getMobilityFlag()
{
return 1;
}
/**
* regulates the render effect, especially when multiple rifts start to link up. Has 3 main parts- Grows toward and away from nearest rft, bends toward it, and a randomization function

View File

@@ -345,7 +345,14 @@ public class TileEntityRift extends TileEntity
MovingObjectPosition hit = worldObj.clip(position, spreadTarget, false);
if (hit == null || !mod_pocketDim.blockRift.isBlockImmune(worldObj, hit.blockX, hit.blockY, hit.blockZ))
{
dimension.createChildLink(x, y, z, link);
if(hit!=null)
{
dimension.createChildLink(hit.blockX, hit.blockY, hit.blockZ, link);
}
else
{
dimension.createChildLink(x,y,z,link);
}
hasGrownRifts = true;
break;
}