Getting the rendering tank model to load in game, looks like its missing

a face though
This commit is contained in:
pahimar 2013-09-03 20:16:40 -04:00
parent 94a91829ec
commit 0e3b5ce119
4 changed files with 891 additions and 1235 deletions

View file

@ -5,6 +5,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import com.pahimar.ee3.EquivalentExchange3;
import com.pahimar.ee3.lib.RenderIds;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.tileentity.TileRenderingTank;
@ -14,6 +15,7 @@ public class BlockRenderingTank extends BlockEE {
super(id, Material.anvil);
this.setUnlocalizedName(Strings.RENDERING_TANK_NAME);
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 3.0F, 1.0F);
this.setCreativeTab(EquivalentExchange3.tabsEE3);
}
@ -30,23 +32,23 @@ public class BlockRenderingTank extends BlockEE {
}
// TODO Finish getting the rendering nice looking
// @Override
// public boolean renderAsNormalBlock() {
//
// return false;
// }
//
// @Override
// public boolean isOpaqueCube() {
//
// return false;
// }
//
// @Override
// public int getRenderType() {
//
// return RenderIds.renderingTank;
// }
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public int getRenderType() {
return RenderIds.renderingTank;
}
@Override
public TileEntity createNewTileEntity(World world) {

View file

@ -23,23 +23,26 @@ public class TileEntityRenderingTankRenderer extends TileEntitySpecialRenderer {
if (tileEntity instanceof TileRenderingTank) {
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_LIGHTING);
// Scale, Translate, Rotate
GL11.glScalef(1.0F, 1.0F, 1.0F);
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.0F, (float) z + 1.2F);
GL11.glRotatef(45F, 0F, 1F, 0F);
GL11.glRotatef(-90F, 1F, 0F, 0F);
GL11.glTranslatef((float) x + 0.0F, (float) y + 0.0F, (float) z + 1.0F);
//GL11.glRotatef(90F, 0F, 1F, 0F);
// Bind texture
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(Textures.MODEL_RENDERING_TANK);
// Render
modelRenderingTank.render();
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
}
}

View file

@ -117,7 +117,7 @@ public class ClientProxy extends CommonProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileAlchemicalChest.class, new TileEntityAlchemicalChestRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileGlassBell.class, new TileEntityGlassBellRenderer());
// TODO Alchemy Table TESR
// FIXME Get Rorax to export faces as triangles: ClientRegistry.bindTileEntitySpecialRenderer(TileRenderingTank.class, new TileEntityRenderingTankRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileRenderingTank.class, new TileEntityRenderingTankRenderer());
}
@Override

File diff suppressed because it is too large Load diff