Fork of the Trinity mod because ICBM nukes aren't fun enough and the release version is broken ;(
Find a file
Quantum aad46297f4
Initial attempt at chunkloading explosions
This fixes a bug where leaving the chunk shortly after an explosion will
cause the explosion to either not happen, or do very little.

Currently this functionality only applies to nuclear explosions.

When the EntityNuclearExplosion does its first tick we grab a ticket
from ForgeChunkManager and use it to load the chunk that will contain
the EntityFalloutRain. The ticket is then passed to the
EntityFalloutRain which will unload the chunk when it finishes its work.

Doing it this way will almost certianly add race conditions but it works
as a proof of concept. Ideally I imagine we would wnat to have some
class that will keep track of loaded explosions and make sure that they
are unloaded properly even if the entity somehow despawns.

I also did not impliment anything in the chunk loading callback. As far
as I understand, we would need to store the loaded chunks there so if
the server dies in the middle of an explosion, it will be reloaded when
the server comes back up.
2021-10-21 21:04:52 -04:00
gradle/wrapper Given source 2021-10-21 20:24:45 -04:00
src/main Initial attempt at chunkloading explosions 2021-10-21 21:04:52 -04:00
.gitattributes Given source 2021-10-21 20:24:45 -04:00
build.gradle Given source 2021-10-21 20:24:45 -04:00
gradle.properties Given source 2021-10-21 20:24:45 -04:00
gradlew Given source 2021-10-21 20:24:45 -04:00
gradlew.bat Given source 2021-10-21 20:24:45 -04:00