Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.dyeo.teleporter.rendering;
- import net.dyeo.teleporter.Reference;
- import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
- import net.minecraft.tileentity.TileEntity;
- import net.minecraft.util.ResourceLocation;
- import net.minecraftforge.client.model.AdvancedModelLoader;
- import net.minecraftforge.client.model.IModelCustom;
- import org.lwjgl.opengl.GL11;
- public class RenderBlockTeleporter extends TileEntitySpecialRenderer
- {
- ResourceLocation texture;
- ResourceLocation objModelLocation;
- public IModelCustom model;
- public RenderBlockTeleporter(String texloc, String modloc)
- {
- texture = new ResourceLocation(Reference.MODID.toLowerCase(), texloc);
- objModelLocation = new ResourceLocation(Reference.MODID.toLowerCase(), modloc);
- model = AdvancedModelLoader.loadModel(objModelLocation);
- }
- @Override
- public void renderTileEntityAt(TileEntity te, double posX, double posY, double posZ, float timeSinceLastTick)
- {
- bindTexture(texture);
- GL11.glPushMatrix();
- GL11.glTranslated(posX + 0.5, posY + 0.5, posZ + 0.5);
- GL11.glPushMatrix();
- model.renderAll();
- GL11.glPopMatrix();
- GL11.glPopMatrix();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement