Fixed battery render

This commit is contained in:
Calclavia 2013-12-23 22:23:55 +08:00
parent e3d043f5e5
commit f51b0c67b7

View file

@ -5,28 +5,16 @@ package resonantinduction.battery;
import java.util.Random; import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
import net.minecraftforge.common.ForgeDirection;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import resonantinduction.ResonantInduction; import resonantinduction.ResonantInduction;
import resonantinduction.model.ModelBattery; import resonantinduction.model.ModelBattery;
import universalelectricity.api.vector.Vector3;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -45,8 +33,6 @@ public class RenderBattery extends TileEntitySpecialRenderer
private Random random = new Random(); private Random random = new Random();
protected RenderManager renderManager; protected RenderManager renderManager;
//public static final IModelCustom batteryModel = AdvancedModelLoader.loadModel(ResonantInduction.MODEL_DIRECTORY + "battery.tcn");
@Override @Override
public void renderTileEntityAt(TileEntity t, double x, double y, double z, float f) public void renderTileEntityAt(TileEntity t, double x, double y, double z, float f)
{ {
@ -54,10 +40,16 @@ public class RenderBattery extends TileEntitySpecialRenderer
GL11.glTranslated(x + 0.5, y + 1.5, z + 0.5); GL11.glTranslated(x + 0.5, y + 1.5, z + 0.5);
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
if (((TileBattery) t).structure.isMultiblock)
{
this.bindTexture(TEXTURE_MULTI);
}
else
{
this.bindTexture(TEXTURE);
}
MODEL.render(0.0625f); MODEL.render(0.0625f);
/*
* GL11.glScalef(0.0625f, 0.0625f, 0.0625f); batteryModel.renderAll();
*/
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }