Furher BG&L support

This commit is contained in:
Matt Caughey 2013-07-21 20:17:19 -04:00
parent 24375b96de
commit ec64fddb04
3 changed files with 36 additions and 13 deletions

View file

@ -20,6 +20,7 @@ import net.minecraftforge.common.FakePlayer;
import net.minecraftforge.common.IShearable;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Blocks;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -43,13 +44,19 @@ public class BlockBOPAppleLeaves extends BlockLeavesBase implements IShearable
@Override
public void registerIcons(IconRegister iconRegister)
{
textures = new Icon[3][4];
textures = new Icon[3][4];
if(Loader.isModLoaded("BetterGrassAndLeavesMod"))
for (int i = 0; i < 4; ++i)
{
textures[0][i] = iconRegister.registerIcon("biomesoplenty:leaves_apple" + i + "_fancy");
textures[1][i] = iconRegister.registerIcon("biomesoplenty:leaves_apple" + i + "_fast");
textures[2][i] = iconRegister.registerIcon("biomesoplenty:better_leaves_apple" + i);
textures[0][i] = iconRegister.registerIcon("biomesoplenty:leaves_apple" + i + "_round");
textures[1][i] = iconRegister.registerIcon("biomesoplenty:leaves_apple" + i + "_fast");
textures[2][i] = iconRegister.registerIcon("biomesoplenty:better_leaves_apple" + i);
}
else
for (int i = 0; i < 4; ++i)
{
textures[0][i] = iconRegister.registerIcon("biomesoplenty:leaves_apple" + i + "_fancy");
textures[1][i] = iconRegister.registerIcon("biomesoplenty:leaves_apple" + i + "_fast");
}
}

View file

@ -17,6 +17,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.IShearable;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Blocks;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -40,12 +41,19 @@ public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearab
@Override
public void registerIcons(IconRegister iconRegister)
{
textures = new Icon[3][leaves.length];
textures = new Icon[3][leaves.length];
if(Loader.isModLoaded("BetterGrassAndLeavesMod"))
for (int i = 0; i < leaves.length; ++i)
{
textures[0][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_fancy");
textures[1][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_fast");
textures[2][i] = iconRegister.registerIcon("biomesoplenty:better_leaves_" + leaves[i]);
textures[0][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_round");
textures[1][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_fast");
textures[2][i] = iconRegister.registerIcon("biomesoplenty:better_leaves_" + leaves[i]);
}
else
for (int i = 0; i < leaves.length; ++i)
{
textures[0][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_fancy");
textures[1][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_fast");
}
}

View file

@ -17,6 +17,7 @@ import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.IShearable;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Blocks;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -50,12 +51,19 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable
@Override
public void registerIcons(IconRegister iconRegister)
{
textures = new Icon[3][leaves.length];
textures = new Icon[3][leaves.length];
if(Loader.isModLoaded("BetterGrassAndLeavesMod"))
for (int i = 0; i < leaves.length; ++i)
{
textures[0][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_fancy");
textures[1][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_fast");
textures[2][i] = iconRegister.registerIcon("biomesoplenty:better_leaves_" + leaves[i]);
textures[0][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_round");
textures[1][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_fast");
textures[2][i] = iconRegister.registerIcon("biomesoplenty:better_leaves_" + leaves[i]);
}
else
for (int i = 0; i < leaves.length; ++i)
{
textures[0][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_fancy");
textures[1][i] = iconRegister.registerIcon("biomesoplenty:leaves_" + leaves[i] + "_fast");
}
}