diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockCarvableGlow.java b/src/main/java/com/cricketcraft/chisel/block/BlockCarvableGlow.java index ebc7c772..ff8a1682 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockCarvableGlow.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockCarvableGlow.java @@ -15,11 +15,13 @@ public class BlockCarvableGlow extends BlockCarvableColor { private IIcon glowTexture; private String glowTexturePath; + private boolean isColored; - public BlockCarvableGlow(String glowTexture) { + public BlockCarvableGlow(String glowTexture, boolean colorized) { super(); setLightLevel(0.5f); this.glowTexturePath = glowTexture; + this.isColored = colorized; } public BlockCarvableGlow(Material mat, String glowTexture) { @@ -39,6 +41,10 @@ public class BlockCarvableGlow extends BlockCarvableColor { @Override public int getRenderType() { - return Chisel.renderGlowId; + if(this.isColored){ + return Chisel.renderGlowId; + } else { + return Chisel.renderNoColorGlowId; + } } } diff --git a/src/main/java/com/cricketcraft/chisel/client/render/RenderLayeredGlowNoColor.java b/src/main/java/com/cricketcraft/chisel/client/render/RenderLayeredGlowNoColor.java new file mode 100644 index 00000000..95986691 --- /dev/null +++ b/src/main/java/com/cricketcraft/chisel/client/render/RenderLayeredGlowNoColor.java @@ -0,0 +1,51 @@ +package com.cricketcraft.chisel.client.render; + +import com.cricketcraft.chisel.Chisel; +import com.cricketcraft.chisel.block.BlockCarvableGlow; +import com.cricketcraft.chisel.config.Configurations; +import com.cricketcraft.chisel.utils.Drawing; +import com.cricketcraft.chisel.utils.GeneralClient; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import cpw.mods.fml.client.registry.RenderingRegistry; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.world.IBlockAccess; +import org.lwjgl.opengl.GL11; + +public class RenderLayeredGlowNoColor implements ISimpleBlockRenderingHandler{ + + public RenderLayeredGlowNoColor() { + Chisel.renderNoColorGlowId = RenderingRegistry.getNextAvailableRenderId(); + } + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); + GL11.glColor3f(1, 1, 1); + GL11.glDisable(GL11.GL_LIGHTING); + Drawing.drawBlock(block, ((BlockCarvableGlow) block).getGlowTexture(), renderer); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glColor3f(1, 1, 1); + Drawing.drawBlock(block, metadata, renderer); + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { + Tessellator.instance.setBrightness(0xF000F0); + Drawing.renderAllFaces(renderer, block, x, y, z, ((BlockCarvableGlow) block).getGlowTexture()); + renderer.renderStandardBlock(block, x, y, z); + return true; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return Chisel.renderNoColorGlowId; + } +} diff --git a/src/main/resources/assets/chisel/textures/blocks/futura/WIP/controller.png b/src/main/resources/assets/chisel/textures/blocks/futura/WIP/controller.png new file mode 100644 index 00000000..d8eeda88 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/futura/WIP/controller.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/futura/WIP/controllerAnim.png b/src/main/resources/assets/chisel/textures/blocks/futura/WIP/controllerAnim.png new file mode 100644 index 00000000..0a64976d Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/futura/WIP/controllerAnim.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/futura/WIP/controllerAnim.png.mcmeta b/src/main/resources/assets/chisel/textures/blocks/futura/WIP/controllerAnim.png.mcmeta new file mode 100644 index 00000000..9f04d7ff --- /dev/null +++ b/src/main/resources/assets/chisel/textures/blocks/futura/WIP/controllerAnim.png.mcmeta @@ -0,0 +1,19 @@ +{ + "animation": { + "frametime": 3, + "frames": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 0 + ] + } +} diff --git a/src/main/resources/assets/chisel/textures/blocks/futura/WIP/controllerWIP-ctm.png b/src/main/resources/assets/chisel/textures/blocks/futura/WIP/controllerWIP-ctm.png deleted file mode 100644 index 82059bb8..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/futura/WIP/controllerWIP-ctm.png and /dev/null differ