RFTools

RFTools

74M Downloads

World Freezing Potential Issue

natedogith1 opened this issue ยท 4 comments

commented

First, I haven't actually tested this, but looking at the code it seems like something that could be an issue. When a dimension runs out of energy, it freezes the world. However, that doesn't mean I can't load new chunks (entering the world with a phased field generator, sending other entities into the world). These newly loaded chunks wouldn't be frozen, therefore I could still abuse things.
That's how I think things would work anyways, haven't tested it yet though.

commented

No this is no problem. New chunks will also be frozen because every time the power remains 0 (2 times per second) this check is done again and all things that came active will be frozen. So this is not an issue

commented

Yeah, I definitely misread something somewhere.

commented

Line 64 in DimensionStorage. That line fires if energyLevel == 0. And freezeDimension will just go over all loaded entities and if there are any it will freeze them. It doesn't matter if it previously already froze them. Any new entities will be frozen.

In addition DimensionTickEvent will call setEnergyLevel() for every dimension every 10 ticks. Even if the energy level didn't change.

commented

I think what I missed was probably the fact that setEnergyLevel is called frequently.