@SideOnly(Side.CLIENT)

Ya i got a bit lazy way back when this was required. Hope this fixes any
issues with mods calling my code server side and crashing.
This commit is contained in:
DarkGuardsman 2013-09-05 20:35:21 -04:00
parent 962700a479
commit eb0c801440
34 changed files with 127 additions and 37 deletions

View file

@ -3,6 +3,8 @@ package dark.fluid.client;
import net.minecraftforge.client.MinecraftForgeClient;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.fluid.client.render.BlockRenderHelper;
import dark.fluid.client.render.ItemRenderHelper;
import dark.fluid.client.render.RenderConstructionPump;
@ -20,7 +22,7 @@ import dark.fluid.common.pipes.TileEntityGenericPipe;
import dark.fluid.common.pipes.TileEntityPipe;
import dark.fluid.common.pump.TileEntityConstructionPump;
import dark.fluid.common.pump.TileEntityStarterPump;
@SideOnly(Side.CLIENT)
public class ClientProxy extends CommonProxy
{
@Override

View file

@ -6,9 +6,11 @@
package dark.fluid.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
@SideOnly(Side.CLIENT)
public class ModelCenterTank extends ModelBase
{

View file

@ -6,9 +6,11 @@
package dark.fluid.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
@SideOnly(Side.CLIENT)
public class ModelCornerTank extends ModelBase
{
//Corner

View file

@ -6,9 +6,11 @@
package dark.fluid.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
@SideOnly(Side.CLIENT)
public class ModelEngine extends ModelBase
{
//fields

View file

@ -6,9 +6,11 @@
package dark.fluid.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
@SideOnly(Side.CLIENT)
public class ModelFurnace extends ModelBase
{
//fields

View file

@ -6,9 +6,11 @@
package dark.fluid.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
@SideOnly(Side.CLIENT)
public class ModelGearPiston extends ModelBase
{
//fields

View file

@ -6,9 +6,11 @@
package dark.fluid.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
@SideOnly(Side.CLIENT)
public class ModelGenerator extends ModelBase
{
//fields

View file

@ -6,9 +6,11 @@
package dark.fluid.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
@SideOnly(Side.CLIENT)
public class ModelLargePipe extends ModelBase
{
// fields

View file

@ -6,11 +6,13 @@
package dark.fluid.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.tileentity.TileEntity;
import dark.fluid.common.machines.TileEntityTank;
@SideOnly(Side.CLIENT)
public class ModelLiquidTank extends ModelBase
{
// fields

View file

@ -1,8 +1,10 @@
package dark.fluid.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
@SideOnly(Side.CLIENT)
public class ModelLiquidTankCorner extends ModelBase
{
// fields

View file

@ -6,9 +6,11 @@
package dark.fluid.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
@SideOnly(Side.CLIENT)
public class ModelPump extends ModelBase
{
// fields

View file

@ -6,9 +6,11 @@
package dark.fluid.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
@SideOnly(Side.CLIENT)
public class ModelReleaseValve extends ModelBase
{

View file

@ -6,9 +6,11 @@
package dark.fluid.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
@SideOnly(Side.CLIENT)
public class ModelSink extends ModelBase
{
// fields

View file

@ -6,9 +6,11 @@
package dark.fluid.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
@SideOnly(Side.CLIENT)
public class ModelTank extends ModelBase
{
//One Block Tank

View file

@ -6,9 +6,11 @@
package dark.fluid.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
@SideOnly(Side.CLIENT)
public class ModelTankSide extends ModelBase
{
@ -126,7 +128,7 @@ public class ModelTankSide extends ModelBase
* @param right - "" to the right
* @param bot - "" to the bot
* @param top - "" to the top
*
*
* Not this only renders one side of the block. You will need to rotate it to face another
* direction then render it. If rotating up or down you will need to translate it a bit */
public void render(float size, boolean left, boolean right, boolean bot, boolean top)

View file

@ -5,6 +5,9 @@ import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.client.renders.RenderMachine;
import dark.core.prefab.helpers.ConnectionHelper;
import dark.fluid.client.model.ModelCenterTank;
@ -12,7 +15,7 @@ import dark.fluid.client.model.ModelCornerTank;
import dark.fluid.client.model.ModelTank;
import dark.fluid.common.FluidMech;
import dark.fluid.common.machines.TileEntityBoiler;
@SideOnly(Side.CLIENT)
public class RenderBoiler extends RenderMachine
{
int type = 0;

View file

@ -5,10 +5,13 @@ import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.client.renders.RenderMachine;
import dark.fluid.client.model.ModelFurnace;
import dark.fluid.common.FluidMech;
@SideOnly(Side.CLIENT)
public class RenderFurnace extends RenderMachine
{
int type = 0;

View file

@ -5,11 +5,14 @@ import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.client.renders.RenderMachine;
import dark.fluid.client.model.ModelGearPiston;
import dark.fluid.common.FluidMech;
import dark.fluid.common.machines.TileEntitySteamPiston;
@SideOnly(Side.CLIENT)
public class RenderGearPiston extends RenderMachine
{
private ModelGearPiston model;

View file

@ -148,7 +148,7 @@ public class FluidMech extends ModPrefab
fmWaste = new Fluid(WASTE_FLUID_NAME).setUnlocalizedName("fluid.waste.name").setDensity(1300).setViscosity(1800);
FluidRegistry.registerFluid(fmWaste);
waste = FluidRegistry.getFluid(WASTE_FLUID_NAME);
if(waste == null)
if (waste == null)
{
waste = fmWaste;
}
@ -170,7 +170,7 @@ public class FluidMech extends ModPrefab
FluidRegistry.registerFluid(fmOil);
oil = FluidRegistry.getFluid(OIL_FLUID_NAME);
if(oil == null)
if (oil == null)
{
oil = fmOil;
}

View file

@ -2,6 +2,9 @@ package dark.fluid.common.machines;
import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
@ -38,13 +41,13 @@ public class BlockBoiler extends BlockFM
return false;
}
@Override
@Override @SideOnly(Side.CLIENT)
public boolean renderAsNormalBlock()
{
return false;
}
@Override
@Override @SideOnly(Side.CLIENT)
public int getRenderType()
{
return -1;

View file

@ -1,5 +1,7 @@
package dark.fluid.common.machines;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.util.Icon;
@ -20,7 +22,7 @@ public class BlockFluid extends BlockFluidFinite
}
@Override
@Override @SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister)
{
this.flowing = par1IconRegister.registerIcon(FluidMech.instance.PREFIX + this.getUnlocalizedName().replace("tile.", "") + "_flowing");
@ -28,7 +30,7 @@ public class BlockFluid extends BlockFluidFinite
fluid.setIcons(still, flowing);
}
@Override
@Override @SideOnly(Side.CLIENT)
public Icon getIcon(int par1, int par2)
{
return still;

View file

@ -2,6 +2,9 @@ package dark.fluid.common.machines;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
@ -38,13 +41,13 @@ public class BlockReleaseValve extends BlockFM
return false;
}
@Override
@Override @SideOnly(Side.CLIENT)
public boolean renderAsNormalBlock()
{
return false;
}
@Override
@Override @SideOnly(Side.CLIENT)
public int getRenderType()
{
return -1;

View file

@ -1,5 +1,7 @@
package dark.fluid.common.machines;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@ -78,13 +80,13 @@ public class BlockSink extends BlockFM
return false;
}
@Override
@Override @SideOnly(Side.CLIENT)
public boolean renderAsNormalBlock()
{
return false;
}
@Override
@Override @SideOnly(Side.CLIENT)
public int getRenderType()
{
return BlockRenderHelper.renderID;

View file

@ -2,6 +2,9 @@ package dark.fluid.common.machines;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
@ -40,13 +43,13 @@ public class BlockSteamPiston extends BlockFM
return false;
}
@Override
@Override @SideOnly(Side.CLIENT)
public boolean renderAsNormalBlock()
{
return false;
}
@Override
@Override @SideOnly(Side.CLIENT)
public int getRenderType()
{
return -1;

View file

@ -2,6 +2,9 @@ package dark.fluid.common.machines;
import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
@ -35,13 +38,13 @@ public class BlockTank extends BlockFM
return false;
}
@Override
@Override @SideOnly(Side.CLIENT)
public boolean renderAsNormalBlock()
{
return false;
}
@Override
@Override @SideOnly(Side.CLIENT)
public int getRenderType()
{
return BlockRenderHelper.renderID;

View file

@ -2,6 +2,9 @@ package dark.fluid.common.pipes;
import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
@ -34,6 +37,7 @@ public class BlockPipe extends BlockFM
}
@Override
@SideOnly(Side.CLIENT)
public boolean renderAsNormalBlock()
{
return false;
@ -46,6 +50,7 @@ public class BlockPipe extends BlockFM
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderType()
{
return -1;

View file

@ -2,6 +2,9 @@ package dark.fluid.common.pump;
import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
@ -34,6 +37,7 @@ public class BlockConstructionPump extends BlockFM
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister)
{
this.blockIcon = par1IconRegister.registerIcon(FluidMech.instance.PREFIX + "ironMachineSide");
@ -42,6 +46,7 @@ public class BlockConstructionPump extends BlockFM
}
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTexture(IBlockAccess world, int x, int y, int z, int side)
{
TileEntity entity = world.getBlockTileEntity(x, y, z);
@ -68,6 +73,7 @@ public class BlockConstructionPump extends BlockFM
}
@Override
@SideOnly(Side.CLIENT)
public boolean renderAsNormalBlock()
{
return false;
@ -80,6 +86,7 @@ public class BlockConstructionPump extends BlockFM
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderType()
{
return BlockRenderHelper.instance.renderID;

View file

@ -9,6 +9,8 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.fluid.client.render.BlockRenderHelper;
import dark.fluid.common.BlockFM;
import dark.fluid.common.FluidMech;
@ -30,12 +32,14 @@ public class BlockPumpMachine extends BlockFM
}
@Override
@SideOnly(Side.CLIENT)
public boolean renderAsNormalBlock()
{
return false;
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderType()
{
return BlockRenderHelper.renderID;

View file

@ -6,9 +6,11 @@
package dark.mech.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
@SideOnly(Side.CLIENT)
public class ModelGearRod extends ModelBase
{
// fields

View file

@ -6,10 +6,12 @@
package dark.mech.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.tileentity.TileEntity;
@SideOnly(Side.CLIENT)
public class ModelGenerator extends ModelBase
{
// fields

View file

@ -5,8 +5,11 @@ import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
import dark.mech.client.model.ModelGearRod;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.mech.client.model.ModelGearRod;
@SideOnly(Side.CLIENT)
public class RenderGearRod extends TileEntitySpecialRenderer
{
private ModelGearRod model;

View file

@ -5,8 +5,11 @@ import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
import dark.mech.client.model.ModelGenerator;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.mech.client.model.ModelGenerator;
@SideOnly(Side.CLIENT)
public class RenderGenerator extends TileEntitySpecialRenderer
{
int type = 0;

View file

@ -2,6 +2,9 @@ package dark.mech.common.machines;
import java.util.ArrayList;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@ -67,12 +70,14 @@ public class BlockGenerator extends BlockFM
}
@Override
@SideOnly(Side.CLIENT)
public boolean renderAsNormalBlock()
{
return false;
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderType()
{
return BlockRenderHelper.renderID;

View file

@ -1,5 +1,7 @@
package dark.mech.common.machines;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@ -87,12 +89,14 @@ public class BlockRod extends BlockFM
}
@Override
@SideOnly(Side.CLIENT)
public boolean renderAsNormalBlock()
{
return false;
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderType()
{
return BlockRenderHelper.renderID;