mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-28 07:55:45 +00:00
47 lines
1.6 KiB
Java
47 lines
1.6 KiB
Java
/**
|
|
* This class was created by <Vazkii>. It's distributed as
|
|
* part of the Botania Mod. Get the Source Code in github:
|
|
* https://github.com/Vazkii/Botania
|
|
*
|
|
* Botania is Open Source and distributed under a
|
|
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
|
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
|
*
|
|
* File Created @ [Jan 26, 2014, 12:25:11 AM (GMT)]
|
|
*/
|
|
package vazkii.botania.client.render.tile;
|
|
|
|
import org.lwjgl.opengl.GL11;
|
|
import org.lwjgl.opengl.GL12;
|
|
|
|
import net.minecraft.client.Minecraft;
|
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
|
import net.minecraft.tileentity.TileEntity;
|
|
import net.minecraft.util.ResourceLocation;
|
|
import vazkii.botania.client.lib.LibResources;
|
|
import vazkii.botania.client.model.ModelPool;
|
|
import vazkii.botania.client.model.ModelSpreader;
|
|
import vazkii.botania.common.block.tile.TileSpreader;
|
|
|
|
public class RenderTilePool extends TileEntitySpecialRenderer {
|
|
|
|
private static final ResourceLocation texture = new ResourceLocation(LibResources.MODEL_POOL);
|
|
private static final ModelPool model = new ModelPool();
|
|
|
|
@Override
|
|
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) {
|
|
GL11.glPushMatrix();
|
|
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
|
GL11.glColor4f(1F, 1F, 1F, 1F);
|
|
GL11.glTranslated(d0, d1, d2);
|
|
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
|
|
|
GL11.glTranslatef(0.5F, 1.5F, 0.5F);
|
|
GL11.glScalef(1F, -1F, -1F);
|
|
model.render();
|
|
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
|
GL11.glPopMatrix();
|
|
}
|
|
|
|
}
|