Light refactors
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package org.saturnclient.common.feature;
|
||||
|
||||
/**
|
||||
* EntityModule provides queries about entities in the current world.
|
||||
* EntityFeature provides queries about entities in the current world.
|
||||
*
|
||||
* Designed to be thin so that feature logic is not polluted with
|
||||
* engine-specific entity types.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.saturnclient.common.feature;
|
||||
|
||||
/**
|
||||
* NetworkModule provides access to the current server connection.
|
||||
* NetworkFeature provides access to the current server connection.
|
||||
*
|
||||
* Methods return safe defaults (false / -1) when not connected.
|
||||
*/
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.saturnclient.common.ref.game.EffectRef;
|
||||
import org.saturnclient.common.ref.game.ItemStackRef;
|
||||
|
||||
/**
|
||||
* PlayerModule provides access to the state of the local player.
|
||||
* PlayerFeature provides access to the state of the local player.
|
||||
*
|
||||
* All methods return safe defaults (false / 0 / empty) when no player
|
||||
* is present so that features do not need to null-check everywhere.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.saturnclient.common.feature;
|
||||
|
||||
/**
|
||||
* RenderModule provides access to render-time information that does
|
||||
* RenderFeature provides access to render-time information that does
|
||||
* not belong to the player or world, such as the current window
|
||||
* dimensions, camera perspective, and the frame's FPS counter.
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.saturnclient.common.feature;
|
||||
|
||||
/**
|
||||
* WorldModule provides access to world-level information that is not
|
||||
* WorldFeature provides access to world-level information that is not
|
||||
* tied to the local player (time of day, total age, etc.).
|
||||
*
|
||||
* All methods return safe defaults when no world is loaded.
|
||||
|
||||
@@ -7,11 +7,11 @@ import org.saturnclient.common.feature.RenderFeature;
|
||||
import org.saturnclient.common.feature.WorldFeature;
|
||||
|
||||
/**
|
||||
* ModuleProvider is the single entry point for features to access
|
||||
* FeatureProvider is the single entry point for features to access
|
||||
* all common engine abstractions. Implementations are supplied by
|
||||
* the platform-specific client bootstrap (e.g. the Fabric/Forge mod).
|
||||
*
|
||||
* Mods should receive a ModuleProvider in their constructor and
|
||||
* Mods should receive a FeatureProvider in their constructor and
|
||||
* store it; they must NOT cache individual sub-modules across ticks
|
||||
* because the provider may swap implementations at runtime (e.g. on
|
||||
* world change).
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.saturnclient.mod.ModSpec;
|
||||
* Actual brightness injection happens in a mixin; this class owns only
|
||||
* the configuration and the two static query methods the mixin calls.
|
||||
*
|
||||
* No ModuleProvider is needed — this feature has no per-tick engine
|
||||
* No FeatureProvider is needed — this feature has no per-tick engine
|
||||
* interaction; the mixin polls the static helpers directly.
|
||||
*/
|
||||
public class FullbrightMod extends Mod {
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.saturnclient.mod.ModSpec;
|
||||
* {@link #shouldReplaceName()} and
|
||||
* {@link #getNametagString(EntityFeature.EntityState)}.
|
||||
*
|
||||
* No ModuleProvider is required here because the mixin passes the
|
||||
* No FeatureProvider is required here because the mixin passes the
|
||||
* already-resolved {@link EntityFeature.EntityState} directly.
|
||||
*/
|
||||
public class NametagsMod extends Mod {
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.saturnclient.ui.RenderScope;
|
||||
* a HUD overlay.
|
||||
*
|
||||
* The effect list is supplied by the platform through an interface
|
||||
* returned by a future {@code PlayerModule#getActiveEffects()} call.
|
||||
* returned by a future {@code PlayerFeature#getActiveEffects()} call.
|
||||
* Until that is wired up, the existing {@link StatusEffectsInterface}
|
||||
* bridge is used, accessed via {@link FeatureProvider}.
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.saturnclient.mod.ModSpec;
|
||||
*
|
||||
* TPS calculation is event-driven: the networking layer (or mixin)
|
||||
* calls {@link #onTimePacket(long)} whenever a time-update packet
|
||||
* arrives. No ModuleProvider is required because there is no
|
||||
* arrives. No FeatureProvider is required because there is no
|
||||
* per-frame polling of the engine.
|
||||
*/
|
||||
public class TpsMod extends Mod implements HudMod {
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.saturnclient.mod.ModSpec;
|
||||
*
|
||||
* The FOV override is applied inside a mixin that polls
|
||||
* {@link #shouldZoom()} and {@link #getZoomLevel()} each frame.
|
||||
* No ModuleProvider is needed — there is no per-tick engine query.
|
||||
* No FeatureProvider is needed — there is no per-tick engine query.
|
||||
*/
|
||||
public class ZoomMod extends Mod {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user