Finished christmas lights
This commit is contained in:
parent
51b8f75bb1
commit
682006965d
5 changed files with 3 additions and 22 deletions
|
@ -42,7 +42,6 @@ public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearab
|
||||||
private static final String[] leaves = new String[] {"acacia", "mangrove", "palm", "redwood", "willow", "pine"};
|
private static final String[] leaves = new String[] {"acacia", "mangrove", "palm", "redwood", "willow", "pine"};
|
||||||
private Icon[][] textures;
|
private Icon[][] textures;
|
||||||
public Icon christmasLights;
|
public Icon christmasLights;
|
||||||
public Icon christmasLightsOff;
|
|
||||||
private final ColourizedLeafCategory category;
|
private final ColourizedLeafCategory category;
|
||||||
int[] adjacentTreeBlocks;
|
int[] adjacentTreeBlocks;
|
||||||
|
|
||||||
|
@ -78,7 +77,6 @@ public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearab
|
||||||
}
|
}
|
||||||
|
|
||||||
christmasLights = iconRegister.registerIcon("biomesoplenty:christmaslights");
|
christmasLights = iconRegister.registerIcon("biomesoplenty:christmaslights");
|
||||||
christmasLightsOff = iconRegister.registerIcon("biomesoplenty:christmaslightsoff");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Icon getIconBetterLeaves(int metadata, float randomIndex)
|
public Icon getIconBetterLeaves(int metadata, float randomIndex)
|
||||||
|
|
|
@ -7,6 +7,7 @@ import java.util.Random;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockLeavesBase;
|
import net.minecraft.block.BlockLeavesBase;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.renderer.texture.IconRegister;
|
import net.minecraft.client.renderer.texture.IconRegister;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -58,7 +59,6 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable
|
||||||
|
|
||||||
private Icon[][] textures;
|
private Icon[][] textures;
|
||||||
public Icon christmasLights;
|
public Icon christmasLights;
|
||||||
public Icon christmasLightsOff;
|
|
||||||
private final LeafCategory category;
|
private final LeafCategory category;
|
||||||
int[] adjacentTreeBlocks;
|
int[] adjacentTreeBlocks;
|
||||||
|
|
||||||
|
@ -92,7 +92,6 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable
|
||||||
}
|
}
|
||||||
|
|
||||||
christmasLights = iconRegister.registerIcon("biomesoplenty:christmaslights");
|
christmasLights = iconRegister.registerIcon("biomesoplenty:christmaslights");
|
||||||
christmasLightsOff = iconRegister.registerIcon("biomesoplenty:christmaslightsoff");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Icon getIconBetterLeaves(int metadata, float randomIndex)
|
public Icon getIconBetterLeaves(int metadata, float randomIndex)
|
||||||
|
|
|
@ -27,7 +27,6 @@ public class ColorizedLeavesRenderer implements ISimpleBlockRenderingHandler
|
||||||
BlockBOPColorizedLeaves colorizedLeaves = (BlockBOPColorizedLeaves)block;
|
BlockBOPColorizedLeaves colorizedLeaves = (BlockBOPColorizedLeaves)block;
|
||||||
|
|
||||||
Icon christmasLights = colorizedLeaves.christmasLights;
|
Icon christmasLights = colorizedLeaves.christmasLights;
|
||||||
Icon christmasLightsOff = colorizedLeaves.christmasLightsOff;
|
|
||||||
|
|
||||||
renderer.renderStandardBlock(block, x, y, z);
|
renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
|
||||||
|
@ -43,14 +42,7 @@ public class ColorizedLeavesRenderer implements ISimpleBlockRenderingHandler
|
||||||
{
|
{
|
||||||
if (direction != ForgeDirection.UP && direction != ForgeDirection.DOWN)
|
if (direction != ForgeDirection.UP && direction != ForgeDirection.DOWN)
|
||||||
{
|
{
|
||||||
if (Minecraft.getMinecraft().theWorld.isDaytime())
|
RenderUtils.renderFace(renderer, block, christmasLights, world, x, y, z, 200, direction);
|
||||||
{
|
|
||||||
RenderUtils.renderFace(renderer, block, christmasLightsOff, world, x, y, z, direction);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
RenderUtils.renderFace(renderer, block, christmasLights, world, x, y, z, 200, direction);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,6 @@ public class LeavesRenderer implements ISimpleBlockRenderingHandler
|
||||||
BlockBOPLeaves leaves = (BlockBOPLeaves)block;
|
BlockBOPLeaves leaves = (BlockBOPLeaves)block;
|
||||||
|
|
||||||
Icon christmasLights = leaves.christmasLights;
|
Icon christmasLights = leaves.christmasLights;
|
||||||
Icon christmasLightsOff = leaves.christmasLightsOff;
|
|
||||||
|
|
||||||
renderer.renderStandardBlock(block, x, y, z);
|
renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
|
||||||
|
@ -44,14 +43,7 @@ public class LeavesRenderer implements ISimpleBlockRenderingHandler
|
||||||
{
|
{
|
||||||
if (direction != ForgeDirection.UP && direction != ForgeDirection.DOWN)
|
if (direction != ForgeDirection.UP && direction != ForgeDirection.DOWN)
|
||||||
{
|
{
|
||||||
if (Minecraft.getMinecraft().theWorld.isDaytime())
|
RenderUtils.renderFace(renderer, block, christmasLights, world, x, y, z, 200, direction);
|
||||||
{
|
|
||||||
RenderUtils.renderFace(renderer, block, christmasLightsOff, world, x, y, z, direction);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
RenderUtils.renderFace(renderer, block, christmasLights, world, x, y, z, 200, direction);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1,000 B After Width: | Height: | Size: 684 B |
Loading…
Reference in a new issue