mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-22 05:02:25 +00:00
more moving.
This commit is contained in:
1 parent
ce486c0540
commit
bef5f6193e
510 files changed
No files matched your search
@@ -0,0 +1,41 @@
|
||||
package crazypants.enderio.machine.hypercube;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import crazypants.render.RenderUtil;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(SCALE, SCALE, SCALE);
|
||||
RenderUtil.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
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