Closed DarthSharkie closed 2 months ago
Let's not merge this until I can update it after https://github.com/GitBrincie212/Apel-Mod/pull/24 is merged. The refactor of the renderers might work, but it will be a cleaner, easier read/merge.
This should be good to go now.
ApelRenderer's default methods are useful for multiple implementations, but they are inefficient because they don't cache anything. Caching is difficult within an interface unless using static caches defined elsewhere. To prevent that awkward approach, extract a
BaseApelRenderer
that can cache and provide good implementations for thedraw...
methods.Second, since
DefaultApelRenderer
andApelNetworkRenderer
both must run server side due to needing theServerWorld
, create a subinterfaceApelServerRenderer
that exposes the server world instance. Move their factory methods to that subinterface.This winds up touching a lot of particle objects and animators, but they all run server side, too, so having them reference
ApelServerRenderer
is correct and will prevent interfaces without a server world from being used.Clean up some unnecessary parameters and methods, too.