diff --git a/src/main/java/ellpeck/actuallyadditions/event/RenderPlayerEventAA.java b/src/main/java/ellpeck/actuallyadditions/event/RenderPlayerEventAA.java index 81a644d87..84adc9b3f 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/RenderPlayerEventAA.java +++ b/src/main/java/ellpeck/actuallyadditions/event/RenderPlayerEventAA.java @@ -2,42 +2,42 @@ package ellpeck.actuallyadditions.event; import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import ellpeck.actuallyadditions.gadget.ModelStandardBlock; -import ellpeck.actuallyadditions.gadget.ModelTorch; +import ellpeck.actuallyadditions.blocks.InitBlocks; import ellpeck.actuallyadditions.gadget.RenderSpecial; +import net.minecraft.init.Blocks; import net.minecraftforge.client.event.RenderPlayerEvent; import java.util.UUID; public class RenderPlayerEventAA{ - private RenderSpecial ellpeckRender = new RenderSpecial(new ModelStandardBlock("Ellpeck")); - private RenderSpecial hoseRender = new RenderSpecial(new ModelTorch()); - private RenderSpecial paktoRender = new RenderSpecial(new ModelStandardBlock("Pakto")); - private RenderSpecial glenRender = new RenderSpecial(new ModelStandardBlock("Glenthor")); - private RenderSpecial lordiRender = new RenderSpecial(new ModelStandardBlock("Lordi")); + private RenderSpecial ellpeckRender = new RenderSpecial(InitBlocks.blockPhantomLiquiface, 0); + private RenderSpecial hoseRender = new RenderSpecial(Blocks.torch, 0); + private RenderSpecial paktoRender = new RenderSpecial(Blocks.wool, 6); + private RenderSpecial glenRender = new RenderSpecial(InitBlocks.blockHeatCollector, 0); + private RenderSpecial lordiRender = new RenderSpecial(InitBlocks.blockBreaker, 0); @SubscribeEvent(priority = EventPriority.HIGHEST) - public void RenderPlayerEvent(RenderPlayerEvent.Pre event){ + public void RenderPlayerEvent(RenderPlayerEvent.Specials.Pre event){ //Ellpeck if(event.entityPlayer.getUniqueID().equals(UUID.fromString("3f9f4a94-95e3-40fe-8895-e8e3e84d1468"))){ - ellpeckRender.render(event.entityPlayer, event.partialRenderTick, 0.3F, 1F); + ellpeckRender.render(event.entityPlayer, 0.3F, 0); } //Paktosan else if(event.entityPlayer.getUniqueID().equals(UUID.fromString("0bac71ad-9156-487e-9ade-9c5b57274b23"))){ - paktoRender.render(event.entityPlayer, event.partialRenderTick, 0.3F, 1F); + paktoRender.render(event.entityPlayer, 0.3F, 0); } //TwoOfEight else if(event.entityPlayer.getUniqueID().equals(UUID.fromString("a57d2829-9711-4552-a7de-ee800802f643"))){ - glenRender.render(event.entityPlayer, event.partialRenderTick, 0.3F, 1F); + glenRender.render(event.entityPlayer, 0.3F, 0); } //dqmhose else if(event.entityPlayer.getUniqueID().equals(UUID.fromString("cb7b293a-5031-484e-b5be-b4f2f4e92726"))){ - hoseRender.render(event.entityPlayer, event.partialRenderTick, 0.5F, 1.3F); + hoseRender.render(event.entityPlayer, 0.5F, -0.075F); } //Lordi else if(event.entityPlayer.getUniqueID().equals(UUID.fromString("990ecf6d-15dd-442c-b91b-323a6420c78e"))){ - lordiRender.render(event.entityPlayer, event.partialRenderTick, 0.3F, 1F); + lordiRender.render(event.entityPlayer, 0.3F, 0); } } } diff --git a/src/main/java/ellpeck/actuallyadditions/gadget/RenderSpecial.java b/src/main/java/ellpeck/actuallyadditions/gadget/RenderSpecial.java index 844fd4b21..d7cdb4d3f 100644 --- a/src/main/java/ellpeck/actuallyadditions/gadget/RenderSpecial.java +++ b/src/main/java/ellpeck/actuallyadditions/gadget/RenderSpecial.java @@ -1,26 +1,24 @@ package ellpeck.actuallyadditions.gadget; -import ellpeck.actuallyadditions.blocks.render.ModelBaseAA; -import ellpeck.actuallyadditions.util.ModUtil; +import ellpeck.actuallyadditions.util.AssetUtil; +import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.Vec3; import org.lwjgl.opengl.GL11; public class RenderSpecial{ private double lastTimeForBobbing; - ModelBaseAA theModel; - ResourceLocation theTexture; + private Block theBlock; + private int meta; - public RenderSpecial(ModelBaseAA model){ - this.theModel = model; - this.theTexture = new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/blocks/models/special/" + this.theModel.getName() + ".png"); + public RenderSpecial(Block block, int meta){ + this.theBlock = block; + this.meta = meta; } - public void render(EntityPlayer player, float renderTick, float size, float offsetUp){ + public void render(EntityPlayer player, float size, float offsetUp){ if(player.isInvisible() || player.getHideCape()) return; int bobHeight = 70; @@ -32,15 +30,7 @@ public class RenderSpecial{ } GL11.glPushMatrix(); - - if(player != Minecraft.getMinecraft().thePlayer){ - Vec3 clientPos = Minecraft.getMinecraft().thePlayer.getPosition(renderTick); - Vec3 playerPos = player.getPosition(renderTick); - GL11.glTranslated(playerPos.xCoord-clientPos.xCoord, playerPos.yCoord-clientPos.yCoord+1.6225, playerPos.zCoord-clientPos.zCoord); - } - - GL11.glTranslated(0F, offsetUp + 0.15D, 0F); - + GL11.glTranslated(0D, -0.775D+offsetUp, 0D); GL11.glRotatef(180F, 1.0F, 0.0F, 1.0F); GL11.glScalef(size, size, size); @@ -53,8 +43,10 @@ public class RenderSpecial{ GL11.glRotated((double)theTime/20, 0, 1, 0); - Minecraft.getMinecraft().renderEngine.bindTexture(theTexture); - theModel.render(0.0625F); + GL11.glDisable(GL11.GL_LIGHTING); + AssetUtil.renderBlock(this.theBlock, this.meta); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); } diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/special/modelEllpeck.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/special/modelEllpeck.png deleted file mode 100644 index af45ac1fa..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/blocks/models/special/modelEllpeck.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/special/modelGlenthor.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/special/modelGlenthor.png deleted file mode 100644 index d037667fe..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/blocks/models/special/modelGlenthor.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/special/modelHose.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/special/modelHose.png deleted file mode 100644 index 0f3c64e7f..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/blocks/models/special/modelHose.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/special/modelLordi.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/special/modelLordi.png deleted file mode 100644 index 05cdffccf..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/blocks/models/special/modelLordi.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/special/modelPakto.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/special/modelPakto.png deleted file mode 100644 index 5e0bff016..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/blocks/models/special/modelPakto.png and /dev/null differ