mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-28 07:56:26 +01:00
parent
60c85ec4f6
commit
0e7a61cfcc
1 changed files with 3 additions and 1 deletions
|
@ -16,11 +16,13 @@ import javax.annotation.Nullable;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.backend.Backend;
|
import com.jozufozu.flywheel.backend.Backend;
|
||||||
import com.jozufozu.flywheel.backend.material.MaterialManager;
|
import com.jozufozu.flywheel.backend.material.MaterialManager;
|
||||||
|
import com.jozufozu.flywheel.util.RenderMath;
|
||||||
|
|
||||||
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
||||||
import it.unimi.dsi.fastutil.objects.ObjectArraySet;
|
import it.unimi.dsi.fastutil.objects.ObjectArraySet;
|
||||||
import net.minecraft.client.renderer.ActiveRenderInfo;
|
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.vector.Vector3f;
|
import net.minecraft.util.math.vector.Vector3f;
|
||||||
|
|
||||||
public abstract class InstanceManager<T> implements MaterialManager.OriginShiftListener {
|
public abstract class InstanceManager<T> implements MaterialManager.OriginShiftListener {
|
||||||
|
@ -281,7 +283,7 @@ public abstract class InstanceManager<T> implements MaterialManager.OriginShiftL
|
||||||
|
|
||||||
int i = (dSq / 2048);
|
int i = (dSq / 2048);
|
||||||
|
|
||||||
return divisorSequence[Math.min(i, divisorSequence.length - 1)];
|
return divisorSequence[MathHelper.clamp(i, 0, divisorSequence.length - 1)];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addInternal(T tile) {
|
protected void addInternal(T tile) {
|
||||||
|
|
Loading…
Reference in a new issue