Another attempt at fixing the sided asm issues

This commit is contained in:
Adubbz 2013-10-19 12:43:51 +11:00
parent bc447a04eb
commit 4525c30c59
1 changed files with 36 additions and 30 deletions

View File

@ -9,55 +9,61 @@ import biomesoplenty.asm.smoothing.block.BlockLeaves;
import biomesoplenty.asm.smoothing.block.BlockTallGrass; import biomesoplenty.asm.smoothing.block.BlockTallGrass;
import biomesoplenty.configuration.configfile.BOPConfigurationMisc; import biomesoplenty.configuration.configfile.BOPConfigurationMisc;
import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.relauncher.FMLLaunchHandler;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
public class BOPBiomeTransitionSmoothing implements IClassTransformer public class BOPBiomeTransitionSmoothing implements IClassTransformer
{ {
private static String SIDE = FMLLaunchHandler.side().name();
@Override @Override
public byte[] transform(String name, String newname, byte[] bytes) public byte[] transform(String name, String newname, byte[] bytes)
{ {
if (name.equals("net.minecraft.block.BlockFluid")) if (SIDE.equals("CLIENT"))
{ {
return BlockFluid.patchColourMultiplier(newname, bytes, false); if (name.equals("net.minecraft.block.BlockFluid"))
} {
return BlockFluid.patchColourMultiplier(newname, bytes, false);
}
if (name.equals("net.minecraft.block.BlockGrass")) if (name.equals("net.minecraft.block.BlockGrass"))
{ {
return BlockGrass.patchColourMultiplier(newname, bytes, false); return BlockGrass.patchColourMultiplier(newname, bytes, false);
} }
if (name.equals("net.minecraft.block.BlockLeaves")) if (name.equals("net.minecraft.block.BlockLeaves"))
{ {
return BlockLeaves.patchColourMultiplier(newname, bytes, false); return BlockLeaves.patchColourMultiplier(newname, bytes, false);
} }
if (name.equals("net.minecraft.block.BlockTallGrass")) if (name.equals("net.minecraft.block.BlockTallGrass"))
{ {
return BlockTallGrass.patchColourMultiplier(newname, bytes, false); return BlockTallGrass.patchColourMultiplier(newname, bytes, false);
} }
if (name.equals("apc")) if (name.equals("apc"))
{ {
return BlockFluid.patchColourMultiplier(newname, bytes, true); return BlockFluid.patchColourMultiplier(newname, bytes, true);
} }
if (name.equals("aon")) if (name.equals("aon"))
{ {
return BlockGrass.patchColourMultiplier(newname, bytes, true); return BlockGrass.patchColourMultiplier(newname, bytes, true);
} }
if (name.equals("aoz")) if (name.equals("aoz"))
{ {
return BlockLeaves.patchColourMultiplier(newname, bytes, true); return BlockLeaves.patchColourMultiplier(newname, bytes, true);
} }
if (name.equals("aqv")) if (name.equals("aqv"))
{ {
return BlockTallGrass.patchColourMultiplier(newname, bytes, true); return BlockTallGrass.patchColourMultiplier(newname, bytes, true);
}
} }
return bytes; return bytes;