Cleaned up the "proximity" algorithm for the Pillars, allowing quick access to the nearby pillars. Hopefully will allow better scaling of computation for large networks of pillars.
This commit is contained in:
parent
1e77b16bd7
commit
8375daf7d4
2 changed files with 92 additions and 27 deletions
|
@ -66,6 +66,10 @@ public class TileInversionPillar extends TileTicking
|
|||
if (counter % 1 == 0)
|
||||
{
|
||||
List<BlockPos> pillarList = getNearbyPillarsExcludingThis();
|
||||
// if (type == EnumDemonWillType.VENGEFUL)
|
||||
// {
|
||||
// System.out.println(pillarList.size() + " nearby pillars");
|
||||
// }
|
||||
generateWillForNearbyPillars(currentWill, pillarList);
|
||||
generateInversionForNearbyPillars(currentWill, pillarList);
|
||||
int pollute = polluteNearbyBlocks(currentWill);
|
||||
|
@ -94,7 +98,10 @@ public class TileInversionPillar extends TileTicking
|
|||
|
||||
public void removePillarFromMap()
|
||||
{
|
||||
|
||||
if (!worldObj.isRemote)
|
||||
{
|
||||
InversionPillarHandler.removePillarFromMap(worldObj, type, pos);
|
||||
}
|
||||
}
|
||||
|
||||
public List<BlockPos> getNearbyPillarsExcludingThis()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue