From 67c4f7faf7741ad103dd498243b2f744b62897fa Mon Sep 17 00:00:00 2001 From: Adubbz Date: Sun, 3 Nov 2013 17:36:41 +1100 Subject: [PATCH] Fog colours can now be on a per-biome basis --- ...thing.java => BOPBiomeColourBlending.java} | 12 +- .../asm/BOPFMLLoadingPlugin.java | 3 +- common/biomesoplenty/asm/BOPFogColour.java | 217 ++++++++++++++++++ .../BlockFluid.java | 6 +- .../BlockGrass.java | 6 +- .../BlockLeaves.java | 6 +- .../BlockTallGrass.java | 6 +- .../blocks/BlockBOPColorizedLeaves.java | 4 +- .../biomesoplenty/blocks/BlockBOPFoliage.java | 8 +- common/biomesoplenty/blocks/BlockIvy.java | 4 +- common/biomesoplenty/blocks/BlockMoss.java | 4 +- common/biomesoplenty/blocks/BlockWillow.java | 4 +- .../biomesoplenty/interfaces/IFogColour.java | 6 + 13 files changed, 254 insertions(+), 32 deletions(-) rename common/biomesoplenty/asm/{smoothing/BOPBiomeTransitionSmoothing.java => BOPBiomeColourBlending.java} (93%) create mode 100644 common/biomesoplenty/asm/BOPFogColour.java rename common/biomesoplenty/asm/{smoothing/block => biomecolourblending}/BlockFluid.java (91%) rename common/biomesoplenty/asm/{smoothing/block => biomecolourblending}/BlockGrass.java (90%) rename common/biomesoplenty/asm/{smoothing/block => biomecolourblending}/BlockLeaves.java (91%) rename common/biomesoplenty/asm/{smoothing/block => biomecolourblending}/BlockTallGrass.java (90%) create mode 100644 common/biomesoplenty/interfaces/IFogColour.java diff --git a/common/biomesoplenty/asm/smoothing/BOPBiomeTransitionSmoothing.java b/common/biomesoplenty/asm/BOPBiomeColourBlending.java similarity index 93% rename from common/biomesoplenty/asm/smoothing/BOPBiomeTransitionSmoothing.java rename to common/biomesoplenty/asm/BOPBiomeColourBlending.java index 344dd1bd9..94af8bf40 100644 --- a/common/biomesoplenty/asm/smoothing/BOPBiomeTransitionSmoothing.java +++ b/common/biomesoplenty/asm/BOPBiomeColourBlending.java @@ -1,19 +1,19 @@ -package biomesoplenty.asm.smoothing; +package biomesoplenty.asm; import net.minecraft.launchwrapper.IClassTransformer; import net.minecraft.world.IBlockAccess; import net.minecraft.world.biome.BiomeGenBase; -import biomesoplenty.asm.smoothing.block.BlockFluid; -import biomesoplenty.asm.smoothing.block.BlockGrass; -import biomesoplenty.asm.smoothing.block.BlockLeaves; -import biomesoplenty.asm.smoothing.block.BlockTallGrass; +import biomesoplenty.asm.biomecolourblending.BlockFluid; +import biomesoplenty.asm.biomecolourblending.BlockGrass; +import biomesoplenty.asm.biomecolourblending.BlockLeaves; +import biomesoplenty.asm.biomecolourblending.BlockTallGrass; import biomesoplenty.configuration.configfile.BOPConfigurationMisc; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.relauncher.FMLLaunchHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BOPBiomeTransitionSmoothing implements IClassTransformer +public class BOPBiomeColourBlending implements IClassTransformer { private static String SIDE = FMLLaunchHandler.side().name(); diff --git a/common/biomesoplenty/asm/BOPFMLLoadingPlugin.java b/common/biomesoplenty/asm/BOPFMLLoadingPlugin.java index 83c0e30a4..47373119f 100644 --- a/common/biomesoplenty/asm/BOPFMLLoadingPlugin.java +++ b/common/biomesoplenty/asm/BOPFMLLoadingPlugin.java @@ -3,7 +3,6 @@ package biomesoplenty.asm; import java.io.File; import java.util.Map; -import biomesoplenty.asm.smoothing.BOPBiomeTransitionSmoothing; import cpw.mods.fml.relauncher.IFMLLoadingPlugin; import cpw.mods.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions; @@ -21,7 +20,7 @@ public class BOPFMLLoadingPlugin implements IFMLLoadingPlugin @Override public String[] getASMTransformerClass() { - return new String[] {BOPBiomeTransitionSmoothing.class.getName()}; + return new String[] {BOPBiomeColourBlending.class.getName(), BOPFogColour.class.getName()}; } @Override diff --git a/common/biomesoplenty/asm/BOPFogColour.java b/common/biomesoplenty/asm/BOPFogColour.java new file mode 100644 index 000000000..ba64344f8 --- /dev/null +++ b/common/biomesoplenty/asm/BOPFogColour.java @@ -0,0 +1,217 @@ +package biomesoplenty.asm; + +import static org.objectweb.asm.Opcodes.*; + +import java.awt.Color; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.launchwrapper.IClassTransformer; +import net.minecraft.util.MathHelper; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraftforge.common.ForgeDummyContainer; + +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.tree.AbstractInsnNode; +import org.objectweb.asm.tree.ClassNode; +import org.objectweb.asm.tree.InsnList; +import org.objectweb.asm.tree.MethodInsnNode; +import org.objectweb.asm.tree.MethodNode; +import org.objectweb.asm.tree.VarInsnNode; +import org.w3c.dom.css.RGBColor; + +import biomesoplenty.interfaces.IFogColour; + +public class BOPFogColour implements IClassTransformer +{ + private static int fogX, fogZ; + + private static boolean fogInit; + private static int fogRGBMultiplier; + + @Override + public byte[] transform(String name, String newname, byte[] bytes) + { + if (name.equals("net.minecraft.client.renderer.EntityRenderer")) + { + return patchEntityRenderer(newname, bytes, false); + } + + if (name.equals("bfe")) + { + return patchEntityRenderer(newname, bytes, false); + } + + return bytes; + } + + public static byte[] patchEntityRenderer(String name, byte[] bytes, boolean obfuscated) + { + String targetMethodName = ""; + + if (obfuscated) + targetMethodName ="i"; + else + targetMethodName ="updateFogColor"; + + ClassNode classNode = new ClassNode(); + ClassReader classReader = new ClassReader(bytes); + classReader.accept(classNode, 0); + + Iterator methods = classNode.methods.iterator(); + + while (methods.hasNext()) + { + MethodNode m = methods.next(); + int fdiv_index = -1; + + if (m.name.equals(targetMethodName) && (m.desc.equals("(F)V"))) + { + AbstractInsnNode currentNode = null; + AbstractInsnNode targetNode = null; + + Iterator iter = m.instructions.iterator(); + + int index = -1; + int timesFound = 0; + + while (iter.hasNext()) + { + index++; + currentNode = iter.next(); + + if (currentNode.getOpcode() == INVOKEVIRTUAL) + { + if (timesFound == 1) + { + targetNode = currentNode; + fdiv_index = index; + break; + } + else + { + timesFound++; + } + } + } + + /* + mv.visitLineNumber(1658, l8); + mv.visitVarInsn(ALOAD, 3); + mv.visitVarInsn(ALOAD, 2); + mv.visitMethodInsn(INVOKESTATIC, "biomesoplenty/asm/BOPFogColour", "getFogVec", "(Lnet/minecraft/entity/Entity;Lnet/minecraft/world/World;)Lnet/minecraft/util/Vec3;"); + mv.visitVarInsn(ASTORE, 9); + */ + + InsnList toInject = new InsnList(); + + toInject.add(new VarInsnNode(ALOAD, 3)); + toInject.add(new VarInsnNode(ALOAD, 2)); + toInject.add(new VarInsnNode(FLOAD, 1)); + toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/BOPFogColour", "getFogVec", "(Lnn;Labw;F)Latc;")); + toInject.add(new VarInsnNode(ASTORE, 9)); + + m.instructions.insert(m.instructions.get(fdiv_index + 1), toInject); + + /* + mv.visitLineNumber(1654, l8); + mv.visitVarInsn(ALOAD, 2); + mv.visitVarInsn(FLOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/client/multiplayer/WorldClient", "getFogColor", "(F)Lnet/minecraft/util/Vec3;"); + mv.visitVarInsn(ASTORE, 9); + */ + + List remNodes = new ArrayList(); + + for (int i = -2; i <= 1; i++) + { + remNodes.add(m.instructions.get(fdiv_index + i)); + } + + for (AbstractInsnNode remNode : remNodes) + { + m.instructions.remove(remNode); + } + + break; + } + } + + ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_MAXS | ClassWriter.COMPUTE_FRAMES); + classNode.accept(writer); + return writer.toByteArray(); + } + + public static int getFogBlendColour(World world, float partialRenderTick, int playerX, int playerZ) + { + if (playerX == fogX && playerZ == fogZ && fogInit) + { + return fogRGBMultiplier; + } + fogInit = true; + + int distance = Minecraft.getMinecraft().gameSettings.fancyGraphics ? ForgeDummyContainer.blendRanges[Minecraft.getMinecraft().gameSettings.renderDistance] : 0; + + int r = 0; + int g = 0; + int b = 0; + + int wr = (int)(world.getFogColor(partialRenderTick).xCoord * 255); + int wg = (int)(world.getFogColor(partialRenderTick).yCoord * 255); + int wb = (int)(world.getFogColor(partialRenderTick).zCoord * 255); + + int defaultcolour = (wr << 16) + (wg << 8) + (wb); + int divider = 0; + + for (int x = -distance; x <= distance; ++x) + { + for (int z = -distance; z <= distance; ++z) + { + BiomeGenBase biome = world.getBiomeGenForCoords(playerX + x, playerZ + z); + int colour = 0; + + if (biome instanceof IFogColour) + { + colour = ((IFogColour)biome).getFogColour(); + } + else + { + colour = defaultcolour; + } + + r += (colour & 0xFF0000) >> 16; + g += (colour & 0x00FF00) >> 8; + b += colour & 0x0000FF; + divider++; + } + } + + int multiplier = (r / divider & 255) << 16 | (g / divider & 255) << 8 | b / divider & 255; + + fogX = playerX; + fogZ = playerZ; + fogRGBMultiplier = multiplier; + return fogRGBMultiplier; + } + + public static Vec3 getFogVec(Entity entity, World world, float partialRenderTick) + { + int x = MathHelper.floor_double(entity.posX); + int z = MathHelper.floor_double(entity.posZ); + BiomeGenBase biome = world.getBiomeGenForCoords(x, z); + + int multiplier = getFogBlendColour(world, partialRenderTick, x, z); + + float r = (float)(multiplier >> 16 & 255) / 255.0F; + float g = (float)(multiplier >> 8 & 255) / 255.0F; + float b = (float)(multiplier & 255) / 255.0F; + + return world.getWorldVec3Pool().getVecFromPool(r, g, b); + } +} diff --git a/common/biomesoplenty/asm/smoothing/block/BlockFluid.java b/common/biomesoplenty/asm/biomecolourblending/BlockFluid.java similarity index 91% rename from common/biomesoplenty/asm/smoothing/block/BlockFluid.java rename to common/biomesoplenty/asm/biomecolourblending/BlockFluid.java index 5299c3719..d9f9a8f13 100644 --- a/common/biomesoplenty/asm/smoothing/block/BlockFluid.java +++ b/common/biomesoplenty/asm/biomecolourblending/BlockFluid.java @@ -1,4 +1,4 @@ -package biomesoplenty.asm.smoothing.block; +package biomesoplenty.asm.biomecolourblending; import static org.objectweb.asm.Opcodes.ALOAD; import static org.objectweb.asm.Opcodes.ICONST_0; @@ -71,9 +71,9 @@ public class BlockFluid toInject.add(new VarInsnNode(ILOAD, 3)); toInject.add(new VarInsnNode(ILOAD, 4)); if (obfuscated) - toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/smoothing/BOPBiomeTransitionSmoothing", "getWaterColourMultiplier", "(Lacf;III)I")); + toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/BOPBiomeColourBlending", "getWaterColourMultiplier", "(Lacf;III)I")); else - toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/smoothing/BOPBiomeTransitionSmoothing", "getWaterColourMultiplier", "(Lnet/minecraft/world/IBlockAccess;III)I")); + toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/BOPBiomeColourBlending", "getWaterColourMultiplier", "(Lnet/minecraft/world/IBlockAccess;III)I")); toInject.add(new InsnNode(IRETURN)); m.instructions.insertBefore(targetNode, toInject); diff --git a/common/biomesoplenty/asm/smoothing/block/BlockGrass.java b/common/biomesoplenty/asm/biomecolourblending/BlockGrass.java similarity index 90% rename from common/biomesoplenty/asm/smoothing/block/BlockGrass.java rename to common/biomesoplenty/asm/biomecolourblending/BlockGrass.java index 0fd3d1aba..c5e6ac509 100644 --- a/common/biomesoplenty/asm/smoothing/block/BlockGrass.java +++ b/common/biomesoplenty/asm/biomecolourblending/BlockGrass.java @@ -1,4 +1,4 @@ -package biomesoplenty.asm.smoothing.block; +package biomesoplenty.asm.biomecolourblending; import static org.objectweb.asm.Opcodes.*; import static org.objectweb.asm.tree.AbstractInsnNode.*; @@ -69,9 +69,9 @@ public class BlockGrass toInject.add(new VarInsnNode(ILOAD, 3)); toInject.add(new VarInsnNode(ILOAD, 4)); if (obfuscated) - toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/smoothing/BOPBiomeTransitionSmoothing", "getGrassColourMultiplier", "(Lacf;III)I")); + toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/BOPBiomeColourBlending", "getGrassColourMultiplier", "(Lacf;III)I")); else - toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/smoothing/BOPBiomeTransitionSmoothing", "getGrassColourMultiplier", "(Lnet/minecraft/world/IBlockAccess;III)I")); + toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/BOPBiomeColourBlending", "getGrassColourMultiplier", "(Lnet/minecraft/world/IBlockAccess;III)I")); toInject.add(new InsnNode(IRETURN)); m.instructions.insertBefore(targetNode, toInject); diff --git a/common/biomesoplenty/asm/smoothing/block/BlockLeaves.java b/common/biomesoplenty/asm/biomecolourblending/BlockLeaves.java similarity index 91% rename from common/biomesoplenty/asm/smoothing/block/BlockLeaves.java rename to common/biomesoplenty/asm/biomecolourblending/BlockLeaves.java index 7994d1655..fc185d575 100644 --- a/common/biomesoplenty/asm/smoothing/block/BlockLeaves.java +++ b/common/biomesoplenty/asm/biomecolourblending/BlockLeaves.java @@ -1,4 +1,4 @@ -package biomesoplenty.asm.smoothing.block; +package biomesoplenty.asm.biomecolourblending; import static org.objectweb.asm.Opcodes.ALOAD; import static org.objectweb.asm.Opcodes.ICONST_0; @@ -72,9 +72,9 @@ public class BlockLeaves toInject.add(new VarInsnNode(ILOAD, 3)); toInject.add(new VarInsnNode(ILOAD, 4)); if (obfuscated) - toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/smoothing/BOPBiomeTransitionSmoothing", "getLeavesColourMultiplier", "(Lacf;III)I")); + toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/BOPBiomeColourBlending", "getLeavesColourMultiplier", "(Lacf;III)I")); else - toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/smoothing/BOPBiomeTransitionSmoothing", "getLeavesColourMultiplier", "(Lnet/minecraft/world/IBlockAccess;III)I")); + toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/BOPBiomeColourBlending", "getLeavesColourMultiplier", "(Lnet/minecraft/world/IBlockAccess;III)I")); toInject.add(new InsnNode(IRETURN)); m.instructions.insertBefore(targetNode, toInject); diff --git a/common/biomesoplenty/asm/smoothing/block/BlockTallGrass.java b/common/biomesoplenty/asm/biomecolourblending/BlockTallGrass.java similarity index 90% rename from common/biomesoplenty/asm/smoothing/block/BlockTallGrass.java rename to common/biomesoplenty/asm/biomecolourblending/BlockTallGrass.java index e42bf8fe2..70f958d3c 100644 --- a/common/biomesoplenty/asm/smoothing/block/BlockTallGrass.java +++ b/common/biomesoplenty/asm/biomecolourblending/BlockTallGrass.java @@ -1,4 +1,4 @@ -package biomesoplenty.asm.smoothing.block; +package biomesoplenty.asm.biomecolourblending; import static org.objectweb.asm.Opcodes.*; import static org.objectweb.asm.tree.AbstractInsnNode.*; @@ -69,9 +69,9 @@ public class BlockTallGrass toInject.add(new VarInsnNode(ILOAD, 3)); toInject.add(new VarInsnNode(ILOAD, 4)); if (obfuscated) - toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/smoothing/BOPBiomeTransitionSmoothing", "getGrassColourMultiplier", "(Lacf;III)I")); + toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/BOPBiomeColourBlending", "getGrassColourMultiplier", "(Lacf;III)I")); else - toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/smoothing/BOPBiomeTransitionSmoothing", "getGrassColourMultiplier", "(Lnet/minecraft/world/IBlockAccess;III)I")); + toInject.add(new MethodInsnNode(INVOKESTATIC, "biomesoplenty/asm/BOPBiomeColourBlending", "getGrassColourMultiplier", "(Lnet/minecraft/world/IBlockAccess;III)I")); toInject.add(new InsnNode(IRETURN)); m.instructions.insertBefore(targetNode, toInject); diff --git a/common/biomesoplenty/blocks/BlockBOPColorizedLeaves.java b/common/biomesoplenty/blocks/BlockBOPColorizedLeaves.java index 450c1886d..f24c824ab 100644 --- a/common/biomesoplenty/blocks/BlockBOPColorizedLeaves.java +++ b/common/biomesoplenty/blocks/BlockBOPColorizedLeaves.java @@ -17,7 +17,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.IShearable; import biomesoplenty.BiomesOPlenty; import biomesoplenty.api.Blocks; -import biomesoplenty.asm.smoothing.BOPBiomeTransitionSmoothing; +import biomesoplenty.asm.BOPBiomeColourBlending; import cpw.mods.fml.common.Loader; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -96,7 +96,7 @@ public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearab @Override public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { - return BOPBiomeTransitionSmoothing.getLeavesColourMultiplier(par1IBlockAccess, par2, par3, par4); + return BOPBiomeColourBlending.getLeavesColourMultiplier(par1IBlockAccess, par2, par3, par4); } @Override diff --git a/common/biomesoplenty/blocks/BlockBOPFoliage.java b/common/biomesoplenty/blocks/BlockBOPFoliage.java index b7e84395f..91a01f6c6 100644 --- a/common/biomesoplenty/blocks/BlockBOPFoliage.java +++ b/common/biomesoplenty/blocks/BlockBOPFoliage.java @@ -30,8 +30,8 @@ import net.minecraftforge.common.IShearable; import biomesoplenty.BiomesOPlenty; import biomesoplenty.api.Blocks; import biomesoplenty.api.Items; -import biomesoplenty.asm.smoothing.BOPBiomeTransitionSmoothing; -import biomesoplenty.asm.smoothing.block.BlockGrass; +import biomesoplenty.asm.BOPBiomeColourBlending; +import biomesoplenty.asm.biomecolourblending.BlockGrass; import biomesoplenty.blocks.renderers.RenderUtils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -244,10 +244,10 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable { if (par1IBlockAccess.getBlockMetadata(par2, par3, par4) == 9) { - return BOPBiomeTransitionSmoothing.getLeavesColourMultiplier(par1IBlockAccess, par2, par3, par4); + return BOPBiomeColourBlending.getLeavesColourMultiplier(par1IBlockAccess, par2, par3, par4); } - return BOPBiomeTransitionSmoothing.getGrassColourMultiplier(par1IBlockAccess, par2, par3, par4); + return BOPBiomeColourBlending.getGrassColourMultiplier(par1IBlockAccess, par2, par3, par4); } @Override diff --git a/common/biomesoplenty/blocks/BlockIvy.java b/common/biomesoplenty/blocks/BlockIvy.java index 2e8476977..5d838d123 100644 --- a/common/biomesoplenty/blocks/BlockIvy.java +++ b/common/biomesoplenty/blocks/BlockIvy.java @@ -16,7 +16,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.IShearable; import biomesoplenty.BiomesOPlenty; -import biomesoplenty.asm.smoothing.BOPBiomeTransitionSmoothing; +import biomesoplenty.asm.BOPBiomeColourBlending; public class BlockIvy extends Block implements IShearable { @@ -250,7 +250,7 @@ public class BlockIvy extends Block implements IShearable @Override public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { - return BOPBiomeTransitionSmoothing.getLeavesColourMultiplier(par1IBlockAccess, par2, par3, par4); + return BOPBiomeColourBlending.getLeavesColourMultiplier(par1IBlockAccess, par2, par3, par4); } /** diff --git a/common/biomesoplenty/blocks/BlockMoss.java b/common/biomesoplenty/blocks/BlockMoss.java index fa1a099bd..353e1e039 100644 --- a/common/biomesoplenty/blocks/BlockMoss.java +++ b/common/biomesoplenty/blocks/BlockMoss.java @@ -12,7 +12,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import biomesoplenty.BiomesOPlenty; import biomesoplenty.api.Blocks; -import biomesoplenty.asm.smoothing.BOPBiomeTransitionSmoothing; +import biomesoplenty.asm.BOPBiomeColourBlending; public class BlockMoss extends Block { @@ -244,7 +244,7 @@ public class BlockMoss extends Block @Override public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { - return BOPBiomeTransitionSmoothing.getLeavesColourMultiplier(par1IBlockAccess, par2, par3, par4); + return BOPBiomeColourBlending.getLeavesColourMultiplier(par1IBlockAccess, par2, par3, par4); } /** diff --git a/common/biomesoplenty/blocks/BlockWillow.java b/common/biomesoplenty/blocks/BlockWillow.java index 7bb0b3b51..46577e1b7 100644 --- a/common/biomesoplenty/blocks/BlockWillow.java +++ b/common/biomesoplenty/blocks/BlockWillow.java @@ -15,7 +15,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.IShearable; import biomesoplenty.BiomesOPlenty; -import biomesoplenty.asm.smoothing.BOPBiomeTransitionSmoothing; +import biomesoplenty.asm.BOPBiomeColourBlending; public class BlockWillow extends Block implements IShearable { @@ -250,7 +250,7 @@ public class BlockWillow extends Block implements IShearable @Override public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { - return BOPBiomeTransitionSmoothing.getLeavesColourMultiplier(par1IBlockAccess, par2, par3, par4); + return BOPBiomeColourBlending.getLeavesColourMultiplier(par1IBlockAccess, par2, par3, par4); } /** diff --git a/common/biomesoplenty/interfaces/IFogColour.java b/common/biomesoplenty/interfaces/IFogColour.java new file mode 100644 index 000000000..32bb282e0 --- /dev/null +++ b/common/biomesoplenty/interfaces/IFogColour.java @@ -0,0 +1,6 @@ +package biomesoplenty.interfaces; + +public interface IFogColour +{ + public int getFogColour(); +}