Skip to content

Instantly share code, notes, and snippets.

{
"forge_marker": 1,
"defaults": {
"textures": {},
"model": "energymod:engine.b3d"
},
"variants": {
"normal": [{}],
"inventory": [{
"transform": "forge:default-block"
double d3 = EntityRenderer.thirdPersonDistanceTemp + (EntityRenderer.thirdPersonDistance - EntityRenderer.thirdPersonDistanceTemp) * partialTicks;
double d4 = (double)(-MathHelper.sin(entity.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(entity.rotation / 180.0F * (float)Math.PI)) * d3;
double d5 = (double)(MathHelper.cos(entity.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(entity.rotation / 180.0F * (float)Math.PI)) * d3;
double d6 = (double)(-MathHelper.sin(entity.rotation / 180.0F * (float)Math.PI)) * d3;
ModelBlockDefinition.Variant v = iter.next();
Class clazz = Class.forName("net.minecraftforge.client.model.BlockStateLoader$ForgeVariant");
if (clazz.isInstance(v))
// if (v instanceof BlockStateLoader.ForgeVariant)
{
// BlockStateLoader.ForgeVariant forgeV = (ForgeVariant) v;
IModelState state = forgeV.getState();
//?
}
public static class Group implements IModelPart
{
public static final String DEFAULT_NAME = "OBJModel.Default.Element.Name";
public static final String ALL = "OBJModel.Group.All.Key";
public static final String ALL_EXCEPT = "OBJModel.Group.All.Except.Key";
private String name = DEFAULT_NAME;
private TRSRTransformation transform = TRSRTransformation.identity();
private LinkedHashSet<Face> faces = new LinkedHashSet<Face>();
private boolean visible = true;
public class MaterialLibrary
{
private Set<String> unknownMaterialCommands = new HashSet<String>();
private Map<String, Material> materials = new HashMap<String, Material>();
private Map<Face, Material> library = new HashMap<Face, Material>();
private Map<String, Group> groups = new HashMap<String, Group>();
private InputStreamReader mtlStream;
private BufferedReader mtlReader;
private float minU = 0f;
private float maxU = 1f;
Vector3f v1 = new Vector3f(this.verts[0].getPosition().x, this.verts[0].getPosition().y, this.verts[0].getPosition().z);
Vector3f v2 = new Vector3f(this.verts[1].getPosition().x, this.verts[1].getPosition().y, this.verts[1].getPosition().z);
Vector3f v3 = new Vector3f(this.verts[2].getPosition().x, this.verts[2].getPosition().y, this.verts[2].getPosition().z);
Vector3f v4 = this.verts.length > 3 ? new Vector3f(this.verts[3].getPosition().x, this.verts[3].getPosition().y, this.verts[3].getPosition().z) : null;
if (v4 == null)
{
Vector3f v2c = new Vector3f(v2.x, v2.y, v2.z);
Vector3f v1c = new Vector3f(v1.x, v1.y, v1.z);
v1c.sub(v2c);
@Override
public void renderTileEntityAt(TileEntity tile, double posX, double posY, double posZ, float partialTicks, int destroyStage)
{
if (tile instanceof CustomTileEntity8)
{
this.bindTexture(new ResourceLocation(MODID.toLowerCase() + ":" + "textures/eye128.png"));
try
{
IModel model = ModelLoaderRegistry.getModel(new ResourceLocation(MODID.toLowerCase() + ":" + "block/eye.obj"));
Function<ResourceLocation, TextureAtlasSprite> textureGetter = new Function<ResourceLocation, TextureAtlasSprite>()
public static class CustomTileEntity8Renderer extends TileEntitySpecialRenderer
{
public CustomTileEntity8Renderer() {}
@Override
public void renderTileEntityAt(TileEntity tile, double posX, double posY, double posZ, float partialTicks, int destroyStage)
{
if (tile instanceof CustomTileEntity8)
{
this.bindTexture(new ResourceLocation(MODID.toLowerCase() + ":" + "textures/eye128.png"));
"forge_marker": 1,
"defaults": {
"textures": {
"#texture": "forgedebugmodelloaderregistry:texture",
"#chest": "entity/chest/normal"
},
"model": "forgedebugmodelloaderregistry:chest.b3d"
},
"variants": {
"normal": [{
private static Pattern vertexPattern = Pattern.compile("(v( (\\-){0,1}\\d+(\\.\\d+)?){3,4} *\\n)|(v( (\\-){0,1}\\d+(\\.\\d+)?){3,4} *$)");
private static Pattern vertexNormalPattern = Pattern.compile("(vn( (\\-){0,1}\\d+(\\.\\d+)?){3,4} *\\n)|(vn( (\\-){0,1}\\d+(\\.\\d+)?){3,4} *$)");
private static Pattern textureCoordinatePattern = Pattern.compile("(vt( (\\-){0,1}\\d+\\.\\d+){2,3} *\\n)|(vt( (\\-){0,1}\\d+(\\.\\d+)?){2,3} *$)");
private static Pattern face_V_VT_VN_Pattern = Pattern.compile("(f( \\d+/\\d+/\\d+){3,4} *\\n)|(f( \\d+/\\d+/\\d+){3,4} *$)");
private static Pattern face_V_VT_Pattern = Pattern.compile("(f( \\d+/\\d+){3,4} *\\n)|(f( \\d+/\\d+){3,4} *$)");
private static Pattern face_V_VN_Pattern = Pattern.compile("(f( \\d+//\\d+){3,4} *\\n)|(f( \\d+//\\d+){3,4} *$)");
private static Pattern face_V_Pattern = Pattern.compile("(f( \\d+){3,4} *\\n)|(f( \\d+){3,4} *$)");
private static Pattern groupObjectPattern = Pattern.compile("([go]( [\\w\\d\\.]+) *\\n)|([go]( [\\w\\d\\.]+