Moved textures to '/textures,' removed RenderObsidianArrow

This commit is contained in:
Aidan Brady 2012-10-18 15:25:15 -04:00
parent 7753eba45f
commit 0b81562191
21 changed files with 23 additions and 107 deletions

View file

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2 KiB

View file

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

Before

Width:  |  Height:  |  Size: 264 B

After

Width:  |  Height:  |  Size: 264 B

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View file

@ -331,7 +331,7 @@ public class BlockMachine extends BlockContainer
public String getTextureFile()
{
return "/obsidian/terrain.png";
return "/textures/terrain.png";
}
public TileEntity createNewTileEntity(World world, int metadata)

View file

@ -98,6 +98,6 @@ public class BlockMulti extends Block
public String getTextureFile()
{
return "/obsidian/terrain.png";
return "/textures/terrain.png";
}
}

View file

@ -109,6 +109,6 @@ public class BlockObsidianTNT extends Block
public String getTextureFile()
{
return "/obsidian/terrain.png";
return "/textures/terrain.png";
}
}

View file

@ -46,6 +46,6 @@ public class BlockOre extends Block
public String getTextureFile()
{
return "/obsidian/terrain.png";
return "/textures/terrain.png";
}
}

View file

@ -191,7 +191,7 @@ public class BlockPowerUnit extends BlockContainer
public String getTextureFile()
{
return "/obsidian/terrain.png";
return "/textures/terrain.png";
}
public TileEntity createNewTileEntity(World world, int metadata)

View file

@ -177,7 +177,7 @@ public class ItemEnergized extends Item implements IEnergizedItem, IItemElectric
public String getTextureFile()
{
return "/obsidian/items.png";
return "/textures/items.png";
}
public boolean canCharge()

View file

@ -12,6 +12,6 @@ public class ItemObsidian extends Item
}
public String getTextureFile() {
return "/obsidian/items.png";
return "/textures/items.png";
}
}

View file

@ -11,6 +11,6 @@ public class ItemObsidianArmor extends ItemArmor
}
public String getTextureFile() {
return "/obsidian/items.png";
return "/textures/items.png";
}
}

View file

@ -17,6 +17,6 @@ public class ItemObsidianTool extends ItemTool
public String getTextureFile()
{
return "/obsidian/items.png";
return "/textures/items.png";
}
}

View file

@ -24,7 +24,6 @@ import net.minecraft.src.World;
import net.minecraftforge.client.MinecraftForgeClient;
import net.uberkat.obsidian.common.CommonProxy;
import net.uberkat.obsidian.common.EntityKnife;
import net.uberkat.obsidian.common.EntityObsidianArrow;
import net.uberkat.obsidian.common.EntityObsidianTNT;
import net.uberkat.obsidian.common.ObsidianIngots;
import net.uberkat.obsidian.common.ObsidianUtils;
@ -52,28 +51,27 @@ public class ClientProxy extends CommonProxy
System.out.println("[ObsidianIngots] Beginning render initiative...");
//Preload block/item textures
MinecraftForgeClient.preloadTexture("/obsidian/items.png");
MinecraftForgeClient.preloadTexture("/obsidian/terrain.png");
MinecraftForgeClient.preloadTexture("/obsidian/CompressorFront.png");
MinecraftForgeClient.preloadTexture("/obsidian/CombinerFront.png");
MinecraftForgeClient.preloadTexture("/obsidian/ElementizerFront.png");
MinecraftForgeClient.preloadTexture("/obsidian/ElementizerBack.png");
MinecraftForgeClient.preloadTexture("/obsidian/ElementizerSide.png");
MinecraftForgeClient.preloadTexture("/textures/items.png");
MinecraftForgeClient.preloadTexture("/textures/terrain.png");
MinecraftForgeClient.preloadTexture("/textures/CompressorFront.png");
MinecraftForgeClient.preloadTexture("/textures/CombinerFront.png");
MinecraftForgeClient.preloadTexture("/textures/ElementizerFront.png");
MinecraftForgeClient.preloadTexture("/textures/ElementizerBack.png");
MinecraftForgeClient.preloadTexture("/textures/ElementizerSide.png");
//Register animated TextureFX for machines
try {
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/obsidian/CompressorFront.png", ObsidianIngots.ANIMATED_TEXTURE_INDEX));
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/obsidian/CombinerFront.png", ObsidianIngots.ANIMATED_TEXTURE_INDEX+1));
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/obsidian/ElementizerFront.png", ObsidianIngots.ANIMATED_TEXTURE_INDEX+2));
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/obsidian/ElementizerBack.png", ObsidianIngots.ANIMATED_TEXTURE_INDEX+3));
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/obsidian/ElementizerSide.png", ObsidianIngots.ANIMATED_TEXTURE_INDEX+4));
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/textures/CompressorFront.png", ObsidianIngots.ANIMATED_TEXTURE_INDEX));
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/textures/CombinerFront.png", ObsidianIngots.ANIMATED_TEXTURE_INDEX+1));
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/textures/ElementizerFront.png", ObsidianIngots.ANIMATED_TEXTURE_INDEX+2));
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/textures/ElementizerBack.png", ObsidianIngots.ANIMATED_TEXTURE_INDEX+3));
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/textures/ElementizerSide.png", ObsidianIngots.ANIMATED_TEXTURE_INDEX+4));
} catch (IOException e) {
System.err.println("[ObsidianIngots] Error registering animation with FML: " + e.getMessage());
}
//Register entity rendering handlers
RenderingRegistry.registerEntityRenderingHandler(EntityObsidianTNT.class, new RenderObsidianTNT());
RenderingRegistry.registerEntityRenderingHandler(EntityObsidianArrow.class, new RenderObsidianArrow());
RenderingRegistry.registerEntityRenderingHandler(EntityKnife.class, new RenderKnife());
System.out.println("[ObsidianIngots] Render initiative complete.");
}

View file

@ -17,7 +17,7 @@ public class RenderKnife extends Render
public void renderKnife(EntityKnife entityknife, double d, double d1, double d2, float f, float f1)
{
loadTexture("/obsidian/Knife.png");
loadTexture("/textures/Knife.png");
if (entityknife.prevRotationYaw == 0.0F && entityknife.prevRotationPitch == 0.0F)
{
return;

View file

@ -1,82 +0,0 @@
package net.uberkat.obsidian.client;
import net.uberkat.obsidian.common.EntityObsidianArrow;
import net.minecraft.src.*;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
public class RenderObsidianArrow extends Render
{
public void renderArrow(EntityObsidianArrow par1EntityArrow, double par2, double par4, double par6, float par8, float par9)
{
this.loadTexture("/obsidian/ObsidianArrows.png");
GL11.glPushMatrix();
GL11.glTranslatef((float)par2, (float)par4, (float)par6);
GL11.glRotatef(par1EntityArrow.prevRotationYaw + (par1EntityArrow.rotationYaw - par1EntityArrow.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(par1EntityArrow.prevRotationPitch + (par1EntityArrow.rotationPitch - par1EntityArrow.prevRotationPitch) * par9, 0.0F, 0.0F, 1.0F);
Tessellator var10 = Tessellator.instance;
byte var11 = 0;
float var12 = 0.0F;
float var13 = 0.5F;
float var14 = (float)(0 + var11 * 10) / 32.0F;
float var15 = (float)(5 + var11 * 10) / 32.0F;
float var16 = 0.0F;
float var17 = 0.15625F;
float var18 = (float)(5 + var11 * 10) / 32.0F;
float var19 = (float)(10 + var11 * 10) / 32.0F;
float var20 = 0.05625F;
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
float var21 = (float)par1EntityArrow.arrowShake - par9;
if (var21 > 0.0F)
{
float var22 = -MathHelper.sin(var21 * 3.0F) * var21;
GL11.glRotatef(var22, 0.0F, 0.0F, 1.0F);
}
GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
GL11.glScalef(var20, var20, var20);
GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
GL11.glNormal3f(var20, 0.0F, 0.0F);
var10.startDrawingQuads();
var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double)var16, (double)var18);
var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double)var17, (double)var18);
var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double)var17, (double)var19);
var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double)var16, (double)var19);
var10.draw();
GL11.glNormal3f(-var20, 0.0F, 0.0F);
var10.startDrawingQuads();
var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double)var16, (double)var18);
var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double)var17, (double)var18);
var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double)var17, (double)var19);
var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double)var16, (double)var19);
var10.draw();
for (int var23 = 0; var23 < 4; ++var23)
{
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
GL11.glNormal3f(0.0F, 0.0F, var20);
var10.startDrawingQuads();
var10.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double)var12, (double)var14);
var10.addVertexWithUV(8.0D, -2.0D, 0.0D, (double)var13, (double)var14);
var10.addVertexWithUV(8.0D, 2.0D, 0.0D, (double)var13, (double)var15);
var10.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double)var12, (double)var15);
var10.draw();
}
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
this.renderArrow((EntityObsidianArrow)par1Entity, par2, par4, par6, par8, par9);
}
}

View file

@ -42,7 +42,7 @@ public class RenderObsidianTNT extends Render
}
float f3 = (1.0F - (((float)entityobsidiantnt.fuse - f1) + 1.0F) / 100F) * 0.8F;
loadTexture("/obsidian/terrain.png");
loadTexture("/textures/terrain.png");
blockRenderer.renderBlockAsItem(ObsidianIngots.ObsidianTNT, 0, entityobsidiantnt.getBrightness(f1));
if ((entityobsidiantnt.fuse / 5) % 2 == 0)