Made foam/boron sand work for all sides of RBMK debris

This commit is contained in:
Vaern 2022-06-04 11:32:19 -07:00
parent 48c8ab84db
commit e2df83d638
2 changed files with 8 additions and 10 deletions

View File

@ -37,15 +37,14 @@ public class RBMKDebrisBurning extends RBMKDebris {
}
ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6));
Block block = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
if(rand.nextInt(10) == 0 && world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) == Blocks.air) {
if(rand.nextInt(10) == 0 && block == Blocks.air) {
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_meltdown);
}
Block block = world.getBlock(x, y + 1, z);
//Foam helps stop the fire.
int chance = block == ModBlocks.foam_layer || block == ModBlocks.block_foam ? 20 : 100;
//Foam helps stop the fire; ~5+ minutes to extinguish with one side exposed to foam.
int chance = block == ModBlocks.foam_layer || block == ModBlocks.block_foam ? 10 : 100;
if(rand.nextInt(chance) == 0) {
world.setBlock(x, y, z, ModBlocks.pribris);

View File

@ -50,14 +50,13 @@ public class RBMKDebrisRadiating extends RBMKDebrisBurning {
}
ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6));
if(rand.nextInt(10) == 0 && world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) == Blocks.air) {
Block block = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
if(rand.nextInt(10) == 0 && block == Blocks.air) {
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_meltdown);
}
Block block = world.getBlock(x, y + 1, z);
//Boron sand helps stop the fission reaction.
//Boron sand helps stop the fission reaction; ~5+ minutes to halt with one side exposed to boron sand.
int chance = block == ModBlocks.sand_boron_layer || block == ModBlocks.sand_boron ? 50 : 1000;
if(rand.nextInt(chance) == 0) {