1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-04 23:53:01 +00:00

Document some of our client classes

This is mostly aiming to give an overview rather than be anything
comprehensive (there's another 230+ undocumented classes to go :p), but
it's a start.

Mostly just an excuse for me to procrastinate working on the nasty bugs
though!
This commit is contained in:
Jonathan Coates
2023-06-02 21:47:52 +01:00
parent 12ca8583f4
commit 4d064d1552
36 changed files with 181 additions and 53 deletions

View File

@@ -18,6 +18,9 @@ import net.minecraftforge.client.model.data.ModelData;
import javax.annotation.Nullable;
import java.util.List;
/**
* A {@link BakedModel} which applies a transformation matrix to its underlying quads.
*/
public class TransformedBakedModel extends BakedModelWrapper<BakedModel> {
private final Transformation transformation;
private final boolean invert;

View File

@@ -15,6 +15,11 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* The custom model for turtle items, which renders tools and overlays as part of the model.
*
* @see TurtleModelParts
*/
public class TurtleModel extends BakedModelWrapper<BakedModel> {
private final TurtleModelParts parts;
private final Map<TurtleModelParts.Combination, List<BakedModel>> cachedModels = new HashMap<>();

View File

@@ -21,6 +21,12 @@ import net.minecraftforge.client.model.geometry.IUnbakedGeometry;
import java.util.function.Function;
/**
* A model loader for turtle item models.
* <p>
* This reads in the associated model file (typically {@code computercraft:block/turtle_xxx}) and wraps it in a
* {@link TurtleModel}.
*/
public final class TurtleModelLoader implements IGeometryLoader<TurtleModelLoader.Unbaked> {
private static final ResourceLocation COLOUR_TURTLE_MODEL = new ResourceLocation(ComputerCraftAPI.MOD_ID, "block/turtle_colour");