Package codechicken.lib.model
Class Quad
java.lang.Object
codechicken.lib.model.Quad
A mutable
BakedQuad.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionboolean@Nullable net.minecraft.core.Directionintboolean@Nullable net.minecraft.client.renderer.texture.TextureAtlasSpriteint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.renderer.block.model.BakedQuadbake()Bakes thisQuadto aBakedQuad.voidcalculateOrientation(boolean setNormal) Re-calculates the Orientation of this quad, optionally the normal vector.voidClamps the Quad inside the box.voidclamp(net.minecraft.world.phys.AABB bb) Clamps the Quad inside the box.copy()Copies the data from the givenQuadinto this quad.copyFrom(net.minecraft.client.renderer.block.model.BakedQuad quad) Copy the data from the givenBakedQuadinto this quad.voidreinterpolate(InterpHelper interp) Reinterpolate this quad's UV's and Colors after some transformation.resetInterp(InterpHelper helper, int s) Used to reset the interpolation values inside the provided helper.
-
Field Details
-
vertices
-
tintIndex
public int tintIndex -
direction
@Nullable public @Nullable net.minecraft.core.Direction direction -
sprite
@Nullable public @Nullable net.minecraft.client.renderer.texture.TextureAtlasSprite sprite -
shade
public boolean shade -
lightEmission
public int lightEmission -
ambientOcclusion
public boolean ambientOcclusion
-
-
Constructor Details
-
Quad
public Quad() -
Quad
-
Quad
public Quad(net.minecraft.client.renderer.block.model.BakedQuad quad)
-
-
Method Details
-
resetInterp
Used to reset the interpolation values inside the provided helper.- Parameters:
helper- The helper.s- The axis. side >> 1;- Returns:
- The same helper.
-
clamp
public void clamp(net.minecraft.world.phys.AABB bb) Clamps the Quad inside the box.- Parameters:
bb- The box.
-
clamp
Clamps the Quad inside the box.- Parameters:
cuboid- The box.
-
reinterpolate
Reinterpolate this quad's UV's and Colors after some transformation.You will have needed to use
resetInterp(InterpHelper, int)prior to your transformations in order for reinterpolation to not output garbage.- Parameters:
interp- Your interpolation helper.
-
calculateOrientation
public void calculateOrientation(boolean setNormal) Re-calculates the Orientation of this quad, optionally the normal vector.- Parameters:
setNormal- If the normal vector should be updated.
-
copy
- Returns:
- A complete copy of this quad.
-
copyFrom
Copy the data from the givenBakedQuadinto this quad.- Parameters:
quad- TheBakedQuadto copy from.- Returns:
- This quad.
-
copyFrom
Copies the data from the givenQuadinto this quad.- Parameters:
quad- TheQuadto copy from.- Returns:
- This quad.
-
bake
public net.minecraft.client.renderer.block.model.BakedQuad bake()Bakes thisQuadto aBakedQuad.- Returns:
- The
BakedQuad.
-