Added spotless back and reformatted
This commit is contained in:
Vendored
+2
-4
@@ -67,11 +67,9 @@ public class QuadClamper implements RenderContext.QuadTransform {
|
||||
private void clamp(MutableQuadView quad, Box bb) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
quad.copyPos(i, pos);
|
||||
pos.set(
|
||||
(float) MathHelper.clamp(pos.getX(), bb.minX, bb.maxX),
|
||||
pos.set((float) MathHelper.clamp(pos.getX(), bb.minX, bb.maxX),
|
||||
(float) MathHelper.clamp(pos.getY(), bb.minY, bb.maxY),
|
||||
(float) MathHelper.clamp(pos.getZ(), bb.minZ, bb.maxZ)
|
||||
);
|
||||
(float) MathHelper.clamp(pos.getZ(), bb.minZ, bb.maxZ));
|
||||
quad.pos(i, pos);
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+11
-11
@@ -18,6 +18,9 @@
|
||||
|
||||
package appeng.thirdparty.codechicken.lib.model.pipeline.transformers;
|
||||
|
||||
import static net.minecraft.util.math.Direction.AxisDirection.NEGATIVE;
|
||||
import static net.minecraft.util.math.Direction.AxisDirection.POSITIVE;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView;
|
||||
import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;
|
||||
import net.minecraft.util.math.Box;
|
||||
@@ -25,9 +28,6 @@ import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.Direction.AxisDirection;
|
||||
import net.minecraft.util.math.Vec3i;
|
||||
|
||||
import static net.minecraft.util.math.Direction.AxisDirection.NEGATIVE;
|
||||
import static net.minecraft.util.math.Direction.AxisDirection.POSITIVE;
|
||||
|
||||
/**
|
||||
* This transformer is a little complicated. Basically a Facade / Cover can use
|
||||
* this to 'kick' the edges in of quads to fix z-Fighting in the corners. Use it
|
||||
@@ -43,18 +43,18 @@ public class QuadCornerKicker implements RenderContext.QuadTransform {
|
||||
public static final QuadCornerKicker INSTANCE = new QuadCornerKicker();
|
||||
|
||||
// Simple horizonal lookups.
|
||||
public static int[][] horizonals = new int[][]{
|
||||
public static int[][] horizonals = new int[][] {
|
||||
// Around Y axis, NSWE.
|
||||
{2, 3, 4, 5}, //
|
||||
{2, 3, 4, 5}, //
|
||||
{ 2, 3, 4, 5 }, //
|
||||
{ 2, 3, 4, 5 }, //
|
||||
|
||||
// Around Z axis, DUWE.
|
||||
{0, 1, 4, 5}, //
|
||||
{0, 1, 4, 5}, //
|
||||
{ 0, 1, 4, 5 }, //
|
||||
{ 0, 1, 4, 5 }, //
|
||||
|
||||
// Around X axis, DUNS.
|
||||
{0, 1, 2, 3}, //
|
||||
{0, 1, 2, 3}};
|
||||
{ 0, 1, 2, 3 }, //
|
||||
{ 0, 1, 2, 3 } };
|
||||
|
||||
private int mySide;
|
||||
private int facadeMask;
|
||||
@@ -144,7 +144,7 @@ public class QuadCornerKicker implements RenderContext.QuadTransform {
|
||||
private AxisDirection yAxis;
|
||||
private AxisDirection zAxis;
|
||||
|
||||
private static final int[] sideMask = {0, 2, 0, 1, 0, 4};
|
||||
private static final int[] sideMask = { 0, 2, 0, 1, 0, 4 };
|
||||
|
||||
Corner(AxisDirection xAxis, AxisDirection yAxis, AxisDirection zAxis) {
|
||||
this.xAxis = xAxis;
|
||||
|
||||
Vendored
+2
-2
@@ -18,14 +18,14 @@
|
||||
|
||||
package appeng.thirdparty.codechicken.lib.model.pipeline.transformers;
|
||||
|
||||
import static net.minecraft.util.math.Direction.AxisDirection.POSITIVE;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView;
|
||||
import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;
|
||||
import net.minecraft.util.math.Box;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.Direction.AxisDirection;
|
||||
|
||||
import static net.minecraft.util.math.Direction.AxisDirection.POSITIVE;
|
||||
|
||||
/**
|
||||
* This transformer strips quads that are on faces. Simply set the bounds for
|
||||
* the faces, and the strip mask.
|
||||
|
||||
Vendored
+2
-1
@@ -18,7 +18,6 @@
|
||||
|
||||
package appeng.thirdparty.codechicken.lib.model.pipeline.transformers;
|
||||
|
||||
import appeng.thirdparty.codechicken.lib.math.InterpHelper;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.QuadEmitter;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.QuadView;
|
||||
@@ -26,6 +25,8 @@ import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;
|
||||
import net.fabricmc.fabric.impl.client.indigo.renderer.mesh.EncodingFormat;
|
||||
import net.fabricmc.fabric.impl.client.indigo.renderer.mesh.MutableQuadViewImpl;
|
||||
|
||||
import appeng.thirdparty.codechicken.lib.math.InterpHelper;
|
||||
|
||||
/**
|
||||
* This transformer Re-Interpolates the Color, UV's and LightMaps. Use this
|
||||
* after all transformations that translate vertices in the pipeline.
|
||||
|
||||
Reference in New Issue
Block a user