Class BandedPrimeLimiter
java.lang.Object
com.jozufozu.flywheel.backend.instancing.ratelimit.BandedPrimeLimiter
- All Implemented Interfaces:
DistanceUpdateLimiter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intgetUpdateDivisor(int dX, int dY, int dZ) booleanshouldUpdate(int dX, int dY, int dZ) Check to see if an object at the given position relative to the camera should be updated.voidtick()Call this before every update.
-
Constructor Details
-
BandedPrimeLimiter
public BandedPrimeLimiter()
-
-
Method Details
-
tick
public void tick()Description copied from interface:DistanceUpdateLimiterCall this before every update.- Specified by:
tickin interfaceDistanceUpdateLimiter
-
shouldUpdate
public boolean shouldUpdate(int dX, int dY, int dZ) Description copied from interface:DistanceUpdateLimiterCheck to see if an object at the given position relative to the camera should be updated.- Specified by:
shouldUpdatein interfaceDistanceUpdateLimiter- Parameters:
dX- The X distance from the camera.dY- The Y distance from the camera.dZ- The Z distance from the camera.- Returns:
trueif the object should be updated,falseotherwise.
-
getUpdateDivisor
protected int getUpdateDivisor(int dX, int dY, int dZ)
-