From 162568a5ca37d2b8c830811e1ee58732170a47fd Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 30 Aug 2015 22:41:29 +0200 Subject: [PATCH] Added a tiny squid floating above Larixine. Amazing. --- .../event/RenderPlayerEventAA.java | 15 ++++++++++----- .../actuallyadditions/gadget/RenderSpecial.java | 14 +++++++++++++- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/main/java/ellpeck/actuallyadditions/event/RenderPlayerEventAA.java b/src/main/java/ellpeck/actuallyadditions/event/RenderPlayerEventAA.java index 935800470..0b0a30c50 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/RenderPlayerEventAA.java +++ b/src/main/java/ellpeck/actuallyadditions/event/RenderPlayerEventAA.java @@ -21,11 +21,12 @@ import java.util.UUID; public class RenderPlayerEventAA{ - 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); + private static RenderSpecial ellpeckRender = new RenderSpecial(InitBlocks.blockPhantomLiquiface, 0); + private static RenderSpecial hoseRender = new RenderSpecial(Blocks.torch, 0); + private static RenderSpecial paktoRender = new RenderSpecial(Blocks.wool, 6); + private static RenderSpecial glenRender = new RenderSpecial(InitBlocks.blockHeatCollector, 0); + private static RenderSpecial lordiRender = new RenderSpecial(InitBlocks.blockBreaker, 0); + public static RenderSpecial lariRender = new RenderSpecial(null, 0); @SubscribeEvent(priority = EventPriority.HIGHEST) public void RenderPlayerEvent(RenderPlayerEvent.Specials.Pre event){ @@ -49,5 +50,9 @@ public class RenderPlayerEventAA{ else if(event.entityPlayer.getUniqueID().equals(UUID.fromString("990ecf6d-15dd-442c-b91b-323a6420c78e"))){ lordiRender.render(event.entityPlayer, 0.3F, 0); } + //Lari + else if(event.entityPlayer.getUniqueID().equals(UUID.fromString("ac275e30-c468-42af-b5d4-b26c1c705b70"))){ + lariRender.render(event.entityPlayer, 0.15F, -0.125F); + } } } diff --git a/src/main/java/ellpeck/actuallyadditions/gadget/RenderSpecial.java b/src/main/java/ellpeck/actuallyadditions/gadget/RenderSpecial.java index e24047c7f..f11b8a363 100644 --- a/src/main/java/ellpeck/actuallyadditions/gadget/RenderSpecial.java +++ b/src/main/java/ellpeck/actuallyadditions/gadget/RenderSpecial.java @@ -10,10 +10,13 @@ package ellpeck.actuallyadditions.gadget; +import ellpeck.actuallyadditions.event.RenderPlayerEventAA; import ellpeck.actuallyadditions.util.AssetUtil; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; +import net.minecraft.client.model.ModelSquid; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; public class RenderSpecial{ @@ -23,6 +26,8 @@ public class RenderSpecial{ private Block theBlock; private int meta; + private static final ResourceLocation squidTextures = new ResourceLocation("textures/entity/squid.png"); + public RenderSpecial(Block block, int meta){ this.theBlock = block; this.meta = meta; @@ -54,7 +59,14 @@ public class RenderSpecial{ GL11.glRotated((double)theTime/20, 0, 1, 0); GL11.glDisable(GL11.GL_LIGHTING); - AssetUtil.renderBlock(this.theBlock, this.meta); + if(this == RenderPlayerEventAA.lariRender){ + Minecraft.getMinecraft().renderEngine.bindTexture(squidTextures); + GL11.glRotatef(180F, 1F, 0F, 0F); + new ModelSquid().render(null, 0F, 0F, 0.25F, 0F, 0F, 0.0625F); + } + else{ + AssetUtil.renderBlock(this.theBlock, this.meta); + } GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix();