Commit graph

10 commits

Author SHA1 Message Date
4472b68eca
"Optimized" EntityShockwave
Do less shit per onUpdate(), its good for your tps

Split explosion into a bunch of phases that run every onUpdate, code is
ass but stopped the server from crashing

Will need to do the same to EntityFalloutRain too but that's tomorrows
problem

Also tomorrows problem: make this less ass

Also vim fixed a lot of whitespace things and I dont feel like dealing
with that right now
2021-11-15 02:43:01 -05:00
f351d614d6
gradlew +x 2021-11-15 02:42:04 -05:00
1131b22447
"Fixed" Thermonuclear explosions
Looks like the devs were in the middle of rewriting this class

Thermonukes would cause a crash because setScale tries to set a
dataManager thing that was never registered

Once that bug was fixed the crash stopped happening but the explosion
didnt do much so I readded a lot of commented out code

Works for now, will have to see what the devs were planning to do with
this so I can impliment it right or just steal what they did
2021-11-15 01:05:09 -05:00
43915e43f0
Merge branch 'master' of ssh://play.qtechofficial.com:9940/QTechIndustries/Trinity 2021-11-15 01:03:14 -05:00
f61b166f77
Updated for ICBM dev/1.12-4.0.2
icbm.classic.api.ExplosiveRefs -> icbm.classic.api.refs.ICBMExplosives
2021-11-15 01:01:29 -05:00
4938dbac5c
Added matching license as per https://www.curseforge.com/minecraft/mc-mods/trinity 2021-10-21 19:22:29 -06:00
95cb00efb6
Added language files
They were missing from the source I got so I stole them from the
production jar file, no clue if this is where they go but it worked well
enough for testing.
2021-10-21 21:05:15 -04:00
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
d8d09ec90c
Fixed ICBM integration
This commit fixes a bug where ICBM explosions would not trigger Trinity
explosions on servers.

Event handlers were only being registered on the client side which means
that integration would only work in singleplayer. Also most of the ICBM
code was commented out so I assume this was mid rewrite or it was
causing build errors.

Event handlers have been split into 3 classes:
    ClientEvents - Events that are only clientside, currently used
for the TextureSwitchEvent handler
    CommonEvents - Events that occur on both the server and client,
currently handles player tick events
    ICBMEvents - Events related to ICBM integration, handles adding the
warning tooltip and the Explosion.Start hook

Explosion code has been updated to use the new Explosion api, most
fields being used were made private.

The ICBMEvents handler is only registered if ICBM is acually enabled,
removing the need to check in the event itself
2021-10-21 20:32:38 -04:00
71dddda6cb
Given source 2021-10-21 20:24:45 -04:00