Skip to content

Commit abf0ba3

Browse files
committed
did better syncing of reactor heat
1 parent 3e89136 commit abf0ba3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ public void resetHullHeatCache() {
266266

267267
private void doHeatTick() {
268268
this.addedHeat = 0;
269+
int oldStoredHeat = storedHeat;
269270

270271
// a component could change their hull heat increase each tick, so we have to invalidate this here and not when
271272
// components change
@@ -284,6 +285,9 @@ private void doHeatTick() {
284285
reactorBlock.onHeatTick(this);
285286
}
286287

288+
if (oldStoredHeat != storedHeat) {
289+
sidedSync(true);
290+
}
287291
heatRatio = ((double) storedHeat) / ((double) this.getMaxHullHeat());
288292

289293
doHeatDamage();
@@ -348,7 +352,6 @@ private void doHeatDamage() {
348352

349353
// flames
350354
if (heatRatio >= 0.4) {
351-
sidedSync(true);
352355
for (int i = 0; i < 10; i++) {
353356
int x = xCoord + (int) map(Math.random(), 0, 1, -DAMAGE_RADIUS, DAMAGE_RADIUS);
354357
int y = yCoord + (int) map(Math.random(), 0, 1, -DAMAGE_RADIUS, DAMAGE_RADIUS);

0 commit comments

Comments
 (0)