Move laser render effect calls to core proxy
Its for the best seeing as 3 mods needed this one method and all of them use the core anyways.
This commit is contained in:
parent
8719fae859
commit
a6a94aa753
2 changed files with 52 additions and 0 deletions
|
@ -1,6 +1,42 @@
|
||||||
package dark.core;
|
package dark.core;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
|
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import universalelectricity.core.vector.Vector3;
|
||||||
|
import cpw.mods.fml.client.FMLClientHandler;
|
||||||
|
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||||
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import dark.client.FXBeam;
|
||||||
|
import dark.client.renders.RenderCopperWire;
|
||||||
|
import dark.common.transmit.TileEntityWire;
|
||||||
|
|
||||||
public class ClientProxy extends CommonProxy
|
public class ClientProxy extends CommonProxy
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/** Renders a laser beam from one power to another by a set color for a set time
|
||||||
|
*
|
||||||
|
* @param world - world this laser is to be rendered in
|
||||||
|
* @param position - start vector3
|
||||||
|
* @param target - end vector3
|
||||||
|
* @param color - color of the beam
|
||||||
|
* @param age - life of the beam in 1/20 secs */
|
||||||
|
@Override
|
||||||
|
public void renderBeam(World world, Vector3 position, Vector3 target, Color color, int age)
|
||||||
|
{
|
||||||
|
if (world.isRemote || FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
|
||||||
|
{
|
||||||
|
FMLClientHandler.instance().getClient().effectRenderer.addEffect(new FXBeam(world, position, target, color, DarkMain.TEXTURE_DIRECTORY + "", age));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init()
|
||||||
|
{
|
||||||
|
if (CoreRecipeLoader.blockWire != null)
|
||||||
|
{
|
||||||
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWire.class, new RenderCopperWire());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
package dark.core;
|
package dark.core;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
|
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import universalelectricity.core.vector.Vector3;
|
||||||
|
|
||||||
public class CommonProxy
|
public class CommonProxy
|
||||||
{
|
{
|
||||||
public void preInit()
|
public void preInit()
|
||||||
|
@ -20,4 +25,15 @@ public class CommonProxy
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Renders a laser beam from one power to another by a set color for a set time
|
||||||
|
*
|
||||||
|
* @param world - world this laser is to be rendered in
|
||||||
|
* @param position - start vector3
|
||||||
|
* @param target - end vector3
|
||||||
|
* @param color - color of the beam
|
||||||
|
* @param age - life of the beam in 1/20 secs */
|
||||||
|
public void renderBeam(World world, Vector3 position, Vector3 target, Color color, int age)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue