Rift spread fixed
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -344,8 +344,15 @@ public class TileEntityRift extends TileEntity
|
||||
Vec3 spreadTarget = worldObj.getWorldVec3Pool().getVecFromPool(x, y, z);
|
||||
MovingObjectPosition hit = worldObj.clip(position, spreadTarget, false);
|
||||
if (hit == null || !mod_pocketDim.blockRift.isBlockImmune(worldObj, hit.blockX, hit.blockY, hit.blockZ))
|
||||
{
|
||||
if(hit!=null)
|
||||
{
|
||||
dimension.createChildLink(hit.blockX, hit.blockY, hit.blockZ, link);
|
||||
}
|
||||
else
|
||||
{
|
||||
dimension.createChildLink(x,y,z,link);
|
||||
}
|
||||
hasGrownRifts = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user