All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.kosmx.bendylib.ModelPartAccessor Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
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