Possible fix for super rare stack overflow.

This commit is contained in:
Flanks255 2024-11-30 09:14:16 -06:00
parent e62fb634d1
commit c197f653ac

View file

@ -154,13 +154,10 @@ public abstract class BlockContainerBase extends Block implements EntityBlock {
boolean powered = world.getBestNeighborSignal(pos) > 0; boolean powered = world.getBestNeighborSignal(pos) > 0;
boolean wasPowered = base.isRedstonePowered; boolean wasPowered = base.isRedstonePowered;
if (powered && !wasPowered) { if (powered && !wasPowered) {
base.setRedstonePowered(true);
if (base.respondsToPulses()) { if (base.respondsToPulses()) {
// TODO: [port] eval what this does? :D
// world.scheduleUpdate(pos, this, this.tickRate(world));
// Who knows -Flanks
base.activateOnPulse(); base.activateOnPulse();
} }
base.setRedstonePowered(true);
} else if (!powered && wasPowered) { } else if (!powered && wasPowered) {
base.setRedstonePowered(false); base.setRedstonePowered(false);
} }