why didn't it do that to begin with?

This commit is contained in:
Bob 2024-02-11 20:47:34 +01:00
parent 2c6d5f9fde
commit a57a284d1c
2 changed files with 39 additions and 34 deletions

View File

@ -47,15 +47,18 @@ public class EntityFalloutRain extends Entity {
if(!worldObj.isRemote) { if(!worldObj.isRemote) {
long start = System.currentTimeMillis();
if(firstTick) { if(firstTick) {
if (chunksToProcess.isEmpty() && outerChunksToProcess.isEmpty()) gatherChunks(); if(chunksToProcess.isEmpty() && outerChunksToProcess.isEmpty()) gatherChunks();
firstTick = false; firstTick = false;
} }
if(tickDelay == 0) { if(tickDelay == 0) {
tickDelay = BombConfig.fDelay; tickDelay = BombConfig.fDelay;
if (!chunksToProcess.isEmpty()) { while(System.currentTimeMillis() < start + BombConfig.mk5) {
if(!chunksToProcess.isEmpty()) {
long chunkPos = chunksToProcess.remove(chunksToProcess.size() - 1); // Just so it doesn't shift the whole list every time long chunkPos = chunksToProcess.remove(chunksToProcess.size() - 1); // Just so it doesn't shift the whole list every time
int chunkPosX = (int) (chunkPos & Integer.MAX_VALUE); int chunkPosX = (int) (chunkPos & Integer.MAX_VALUE);
int chunkPosZ = (int) (chunkPos >> 32 & Integer.MAX_VALUE); int chunkPosZ = (int) (chunkPos >> 32 & Integer.MAX_VALUE);
@ -96,6 +99,8 @@ public class EntityFalloutRain extends Entity {
} else { } else {
setDead(); setDead();
break;
}
} }
} }

View File

@ -81,7 +81,7 @@ public class ExplosionNukeRayBatched {
int amountProcessed = 0; int amountProcessed = 0;
while (this.gspNumMax >= this.gspNum){ while(this.gspNumMax >= this.gspNum){
// Get Cartesian coordinates for spherical coordinates // Get Cartesian coordinates for spherical coordinates
Vec3 vec = this.getSpherical2cartesian(); Vec3 vec = this.getSpherical2cartesian();