Open hammy275 opened 2 months ago
With the new BottleAndBucketTracker
, this situation is actually even worse now, since I needed that tracker to be available on both logical sides.
Given everything in the codebase, here's everything that should be changed:
AbstractTracker
should have inbuilt cooldown support. Nearly every tracker uses cooldowns, and it's only one empty HashMap
if we don't end up using it.AbstractVRHandsTracker
should be rewritten to be based directly on AbstractTracker
, and should be moved to common
. The LastTickData
can be filled as it already is by the server, and can be taken from LastClientVRData
on the client.AbstractVRHandTracker
should be rewritten to extend AbstractVRHandsTracker
, and should be moved to common
. ServerTrackerInit#globalTrackers
should be killed off.RangedGrabTrackerServer
should find the info for the provided ticked player. There have been crashes before where I've accidentally used the player
parameter, and it's downright stupid that I built a system where it's unused anyways.BottleAndBucketTracker
to be a AbstractVRHandTracker
.AbstractTracker
.LastVRDataTracker
, and put its logic directly into ClientLogicSubscriber
. Since it's not directly gameplay-related, nor an abstraction for trackers to build off of, it shouldn't be some form of AbstractTracker
.
The different types of trackers in ImmersiveMC's codebase are a mess. This needs to be cleaned up, mainly by having
AbstractVRHandsTracker
andAbstractVRHandTracker
both extendAbstractTracker
and use that system, rather than the former extending the latter, which is itself especially atrocious.There should also be an
AbstractTrackerWithCooldown
or similar that handles all the cooldown-related tasks, so I don't have to replicate that code a dozen times.