Skip to content

Commit a0d143b

Browse files
committed
fixed reactor voiding itself since it didn't make sure the fluidstate to void was empty
1 parent 5520a0b commit a0d143b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/gtreimagined/gt4r/blockentity/multi/BlockEntityReactorCore.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ private void doHeatDamage() {
342342

343343
// flames
344344
if (heatRatio >= 0.4) {
345+
sidedSync(true);
345346
for (int i = 0; i < 10; i++) {
346347
int x = xCoord + (int) map(Math.random(), 0, 1, -DAMAGE_RADIUS, DAMAGE_RADIUS);
347348
int y = yCoord + (int) map(Math.random(), 0, 1, -DAMAGE_RADIUS, DAMAGE_RADIUS);
@@ -367,7 +368,7 @@ private void doHeatDamage() {
367368
BlockPos pos = new BlockPos(x, y, z);
368369
var fluid = level.getFluidState(pos);
369370

370-
if (FluidUtils.getFluidTemperature(fluid.getType()) < 375){
371+
if (!fluid.isEmpty() && fluid.isSource() && FluidUtils.getFluidTemperature(fluid.getType()) < 375){
371372
level.setBlock(pos, Blocks.AIR.defaultBlockState(), 3);
372373
level.playSound(null, pos, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 1.0F, 1.0F);
373374
break;

0 commit comments

Comments
 (0)