This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.minecraftforge.client.model.obj; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.nio.ByteBuffer; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Map; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.minecraftforge.client.model.obj; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.nio.ByteBuffer; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.Collections; | |
import java.util.HashMap; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.minecraftforge.debug; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collection; | |
import java.util.Collections; | |
import java.util.List; | |
import javax.vecmath.Vector3f; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"forge_marker": 1, | |
"defaults": { | |
"textures": { | |
"#texture": "forgedebugmodelloaderregistry:texture" | |
}, | |
"model": "forgedebugmodelloaderregistry:cmb_tesseract.obj" | |
}, | |
"variants": { | |
"normal": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
v 0.950000 0.000000 1.050000 | |
v 1.050000 0.000000 1.050000 | |
v 0.950000 1.000000 1.050000 | |
v 1.050000 1.000000 1.050000 | |
v 0.950000 1.000000 0.950000 | |
v 1.050000 1.000000 0.950000 | |
v 0.950000 0.000000 0.950000 | |
v 1.050000 0.000000 0.950000 | |
vt 0.375000 0.000000 | |
vt 0.625000 0.000000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"forge_marker": 1, | |
"defaults": { | |
"textures": {}, | |
"model": "<modid>:assaultrifle.b3d" | |
}, | |
"variants": { | |
"normal": { | |
"dummy": "" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class B3DLoader implements ICustomModelLoader | |
{ | |
public static final B3DLoader instance = new B3DLoader(); | |
private IResourceManager manager; | |
private final Set<String> enabledDomains = new HashSet<String>(); | |
private final Map<ResourceLocation, B3DModel> cache = new HashMap<ResourceLocation, B3DModel>(); | |
private Map jsons = new HashMap(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public List<BakedQuad> getGeneralQuads() | |
{ | |
if (quads == null) | |
{ | |
quads = new LinkedHashSet<BakedQuad>(); | |
LinkedHashSet<Face> faces = new LinkedHashSet<Face>(); | |
Iterator<Element> elementIterator = this.model.getMatLib().getElements().values().iterator(); | |
while (elementIterator.hasNext()) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SuppressWarnings("unchecked") | |
private final void putVertexData(Vertex v, TextureCoordinate t, Normal n, TextureAtlasSprite sprite) | |
{ | |
int oldPos = buffer.position(); | |
Number[] ns = new Number[16]; | |
for (int i = 0; i < ns.length; i++) | |
ns[i] = 0f; | |
for (VertexFormatElement e : (List<VertexFormatElement>) format.getElements()) | |
{ | |
switch (e.getUsage()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Mod(modid = ModelLoaderRegistryDebug.MODID, version = ModelLoaderRegistryDebug.VERSION) | |
public class ModelLoaderRegistryDebug | |
{ | |
public static final String MODID = "ForgeDebugModelLoaderRegistry"; | |
public static final String VERSION = "1.0"; | |
@EventHandler | |
public void preInit(FMLPreInitializationEvent event) | |
{ | |
GameRegistry.registerBlock(CustomModelBlock.instance, CustomModelBlock.name); |