From 9e58492165bfd8c78bd3d29a8ebd721b7304ca35 Mon Sep 17 00:00:00 2001 From: Bob Date: Sun, 11 Feb 2024 20:58:32 +0100 Subject: [PATCH] yeah sure why not --- changelog | 4 +++- src/main/java/com/hbm/config/FalloutConfigJSON.java | 8 +++++++- .../java/com/hbm/entity/effect/EntityFalloutRain.java | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/changelog b/changelog index 4e0725dbb..eb4e10426 100644 --- a/changelog +++ b/changelog @@ -34,7 +34,9 @@ * PWRs on the edge of unloaded chunks now additionally reset their internal heat value to further reduce the time until they can potentially melt down * Removed the assembly recipe for the radial engine since it will be retired soon * Removed the endo and exothermal missiles -* Doomsday missiles are no longer laggy cluster missiles, instead they are now near-identical to thermonuclear missiles but with an added fallout radius of 100 +* Doomsday missiles are no longer laggy cluster missiles, instead they are now near-identical to thermonuclear missiles but with an added fallout radius of 100# +* Fallout rain now uses the same variable length code that the MK5 uses for optimal tick utilization, making it a lot faster +* Lighter sellafite variants should no longer replace darker ones in overlapping craters, making bombed-out landscapes look more natural ## Fixed * Fixed dupe caused by shift-clicking ashes out of the bricked furnace diff --git a/src/main/java/com/hbm/config/FalloutConfigJSON.java b/src/main/java/com/hbm/config/FalloutConfigJSON.java index b962781da..9d0a69c52 100644 --- a/src/main/java/com/hbm/config/FalloutConfigJSON.java +++ b/src/main/java/com/hbm/config/FalloutConfigJSON.java @@ -197,7 +197,7 @@ public class FalloutConfigJSON { public FalloutEntry max(double max) { this.maxDist = max; return this; } public FalloutEntry sol(boolean solid) { this.isSolid = solid; return this; } - public boolean eval(World world, int x, int y, int z, Block b, int meta, double dist) { + public boolean eval(World world, int x, int y, int z, Block b, int meta, double dist, Block originalBlock, int originalMeta) { if(matchesBlock != null && b != matchesBlock) return false; if(matchesMaterial != null && b.getMaterial() != matchesMaterial) return false; @@ -210,6 +210,9 @@ public class FalloutConfigJSON { if(primaryBlocks == null) return false; MetaBlock block = chooseRandomOutcome(primaryBlocks); + if(block.block == ModBlocks.sellafield_slaked && originalBlock == ModBlocks.sellafield_slaked) { + if(block.meta <= originalMeta) return false; + } world.setBlock(x, y, z, block.block, block.meta, 3); return true; @@ -218,6 +221,9 @@ public class FalloutConfigJSON { if(secondaryBlocks == null) return false; MetaBlock block = chooseRandomOutcome(secondaryBlocks); + if(block.block == ModBlocks.sellafield_slaked && originalBlock == ModBlocks.sellafield_slaked) { + if(block.meta <= originalMeta) return false; + } world.setBlock(x, y, z, block.block, block.meta, 3); return true; } diff --git a/src/main/java/com/hbm/entity/effect/EntityFalloutRain.java b/src/main/java/com/hbm/entity/effect/EntityFalloutRain.java index 6c589034a..abddcb261 100644 --- a/src/main/java/com/hbm/entity/effect/EntityFalloutRain.java +++ b/src/main/java/com/hbm/entity/effect/EntityFalloutRain.java @@ -199,7 +199,7 @@ public class EntityFalloutRain extends Entity { for(FalloutEntry entry : FalloutConfigJSON.entries) { - if(entry.eval(worldObj, x, y, z, b, meta, dist)) { + if(entry.eval(worldObj, x, y, z, b, meta, dist, b, meta)) { if(entry.isSolid()) { depth++; }