Move rendering IDs to Common Proxy classes to appease ExtraUtils.

This commit is contained in:
Ben Spiers 2015-03-18 21:39:01 +00:00
parent e36ecf9f05
commit efeeb06b77
9 changed files with 15 additions and 16 deletions

View file

@ -197,11 +197,6 @@ import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class ClientProxy extends CommonProxy
{
public static int MACHINE_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
public static int BASIC_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
public static int PLASTIC_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
public static int CTM_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
@Override
public void loadConfiguration()
{

View file

@ -113,6 +113,7 @@ import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import cpw.mods.fml.common.registry.GameRegistry;
@ -125,6 +126,12 @@ import cpw.mods.fml.relauncher.FMLInjectionData;
*/
public class CommonProxy
{
public static int MACHINE_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
public static int BASIC_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
public static int PLASTIC_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
public static int CTM_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
/**
* Register tile entities that have special models. Overwritten in client to register TESRs.
*/

View file

@ -715,10 +715,9 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderType()
{
return ClientProxy.CTM_RENDER_ID;
return Mekanism.proxy.CTM_RENDER_ID;
}
@Override

View file

@ -752,10 +752,9 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderType()
{
return ClientProxy.MACHINE_RENDER_ID;
return Mekanism.proxy.MACHINE_RENDER_ID;
}
@Override

View file

@ -129,9 +129,8 @@ public class BlockPlastic extends Block
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderType()
{
return ClientProxy.PLASTIC_RENDER_ID;
return Mekanism.proxy.PLASTIC_RENDER_ID;
}
}

View file

@ -40,8 +40,6 @@ import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class GeneratorsClientProxy extends GeneratorsCommonProxy
{
public static int GENERATOR_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
@Override
public void registerSpecialTileEntities()
{

View file

@ -27,6 +27,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
/**
@ -36,6 +37,8 @@ import cpw.mods.fml.common.registry.GameRegistry;
*/
public class GeneratorsCommonProxy
{
public static int GENERATOR_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
/**
* Register normal tile entities
*/

View file

@ -398,10 +398,9 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IP
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderType()
{
return GeneratorsClientProxy.GENERATOR_RENDER_ID;
return MekanismGenerators.proxy.GENERATOR_RENDER_ID;
}
/*This method is not used, metadata manipulation is required to create a Tile Entity.*/

View file

@ -275,7 +275,7 @@ public class BlockReactor extends BlockContainer implements IBlockCTM
@Override
public int getRenderType()
{
return ClientProxy.CTM_RENDER_ID;
return Mekanism.proxy.CTM_RENDER_ID;
}
@Override