io.github.kosmx.bendylib.ModelPartAccessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bendy-lib Show documentation
Show all versions of bendy-lib Show documentation
Minecraft FabricMC model render library
package io.github.kosmx.bendylib;
import io.github.kosmx.bendylib.impl.accessors.IModelPartAccessor;
import java.util.*;
import net.minecraft.class_630;
/**
* Access to children and cuboids in {@link class_630}
* Don't have to reinterpret the object...
*/
public final class ModelPartAccessor {
public static Map getChildren(class_630 modelPart){
return ((IModelPartAccessor)modelPart).getChildren();
}
/**
* Get a cuboid, and cast ist to {@link MutableCuboid}
* @param modelPart
* @param index
* @return
*/
public static MutableCuboid getCuboid(class_630 modelPart, int index){
return (MutableCuboid) getCuboids(modelPart).get(index);
}
public static List getCuboids(class_630 modelPart){
return ((IModelPartAccessor)modelPart).getCuboids();
}
/**
* Different workarounds to fix shared mod incompatibilities
* If needed, I advice using {@link Workaround#VanillaDraw}. that is the most stable in any modded environment.
*/
public enum Workaround {
ExportQuads, VanillaDraw, None;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy