mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-22 05:02:25 +00:00
Added models for tesseract. Texture still not done for one of them.
Switch between implementations via the config using
B:useAlternateTesseractModel=true
This commit is contained in:
1 parent
9b07908fd8
commit
4ea4f052de
13 files changed
+1163
-19
No files matched your search
@@ -0,0 +1,39 @@
|
||||
package crazypants.enderio.machine.hypercube;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import crazypants.render.RenderUtil;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
public class HyperCubeModel extends ModelBase implements IModel {
|
||||
|
||||
public static final float SCALE = 1/16f;
|
||||
|
||||
private static final String TEXTURE = "enderio:models/hyperCube.png";
|
||||
//private static final String MODEL = "enderio:models/hyperCube.obj";
|
||||
private static final String MODEL = "/assets/enderio/models/hyperCube.obj";
|
||||
|
||||
private IModelCustom model;
|
||||
|
||||
public HyperCubeModel() {
|
||||
model = AdvancedModelLoader.loadModel(MODEL);
|
||||
}
|
||||
|
||||
public void render() {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(SCALE, SCALE, SCALE);
|
||||
RenderUtil.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void render(TileHyperCube cube, double x, double y, double z) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x + 0.5f, (float) y + 0.5f, (float) z + 0.5f);
|
||||
render();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user