This commit is contained in:
Boblet 2024-08-14 16:40:42 +02:00
parent 6011e9df98
commit 9707c4c961
2 changed files with 5 additions and 4 deletions

View File

@ -228,6 +228,7 @@ public class FalloutConfigJSON {
}
private MetaBlock chooseRandomOutcome(Triplet<Block, Integer, Integer>[] blocks) {
if(blocks == null) return null;
int weight = 0;

View File

@ -64,8 +64,8 @@ public class EntityFalloutRain extends EntityExplosionChunkloading {
int chunkPosX = (int) (chunkPos & Integer.MAX_VALUE);
int chunkPosZ = (int) (chunkPos >> 32 & Integer.MAX_VALUE);
boolean biomeModified = false;
for(int x = chunkPosX << 4; x <= (chunkPosX << 4) + 16; x++) {
for(int z = chunkPosZ << 4; z <= (chunkPosZ << 4) + 16; z++) {
for(int x = chunkPosX << 4; x < (chunkPosX << 4) + 16; x++) {
for(int z = chunkPosZ << 4; z < (chunkPosZ << 4) + 16; z++) {
double percent = Math.hypot(x - posX, z - posZ) * 100 / getScale();
stomp(x, z, percent);
BiomeGenBase biome = getBiomeChange(percent, getScale(), worldObj.getBiomeGenForCoords(x, z));
@ -82,8 +82,8 @@ public class EntityFalloutRain extends EntityExplosionChunkloading {
int chunkPosX = (int) (chunkPos & Integer.MAX_VALUE);
int chunkPosZ = (int) (chunkPos >> 32 & Integer.MAX_VALUE);
boolean biomeModified = false;
for(int x = chunkPosX << 4; x <= (chunkPosX << 4) + 16; x++) {
for(int z = chunkPosZ << 4; z <= (chunkPosZ << 4) + 16; z++) {
for(int x = chunkPosX << 4; x < (chunkPosX << 4) + 16; x++) {
for(int z = chunkPosZ << 4; z < (chunkPosZ << 4) + 16; z++) {
double distance = Math.hypot(x - posX, z - posZ);
if(distance <= getScale()) {
double percent = distance * 100 / getScale();