diff --git a/src/main/java/mekanism/api/lasers/LaserManager.java b/src/main/java/mekanism/api/lasers/LaserManager.java index 08cfd52d2..6e92d91ba 100644 --- a/src/main/java/mekanism/api/lasers/LaserManager.java +++ b/src/main/java/mekanism/api/lasers/LaserManager.java @@ -2,6 +2,7 @@ package mekanism.api.lasers; import mekanism.api.Coord4D; import mekanism.client.entity.EntityLaser; +import mekanism.common.Mekanism; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntityNoteFX; @@ -39,11 +40,11 @@ public class LaserManager } } - renderLaser(world, from, new Coord4D(mop.blockX, mop.blockY, mop.blockZ), direction); + Mekanism.proxy.renderLaser(world, from, new Coord4D(mop.blockX, mop.blockY, mop.blockZ), direction); } else { - renderLaser(world, from, to, direction); + Mekanism.proxy.renderLaser(world, from, to, direction); } } diff --git a/src/main/java/mekanism/client/ClientProxy.java b/src/main/java/mekanism/client/ClientProxy.java index 38d0b44e6..79f20f899 100644 --- a/src/main/java/mekanism/client/ClientProxy.java +++ b/src/main/java/mekanism/client/ClientProxy.java @@ -4,6 +4,7 @@ import java.io.File; import java.util.HashMap; import mekanism.api.Coord4D; +import mekanism.client.entity.EntityLaser; import mekanism.client.gui.GuiChemicalCrystallizer; import mekanism.client.gui.GuiChemicalDissolutionChamber; import mekanism.client.gui.GuiChemicalInfuser; @@ -147,6 +148,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.common.util.ForgeDirection; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; @@ -583,4 +585,10 @@ public class ClientProxy extends CommonProxy return Minecraft.getMinecraft().thePlayer; } } + + @Override + public void renderLaser(World world, Coord4D from, Coord4D to, ForgeDirection direction) + { + Minecraft.getMinecraft().effectRenderer.addEffect(new EntityLaser(world, from, to, direction)); + } } diff --git a/src/main/java/mekanism/common/CommonProxy.java b/src/main/java/mekanism/common/CommonProxy.java index 68f701f58..e4dce9f06 100644 --- a/src/main/java/mekanism/common/CommonProxy.java +++ b/src/main/java/mekanism/common/CommonProxy.java @@ -2,6 +2,7 @@ package mekanism.common; import java.io.File; +import mekanism.api.Coord4D; import mekanism.api.MekanismAPI; import mekanism.common.EnergyDisplay.EnergyType; import mekanism.common.entity.EntityRobit; @@ -85,6 +86,7 @@ import net.minecraft.inventory.Container; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.common.util.ForgeDirection; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; import cpw.mods.fml.common.registry.GameRegistry; @@ -471,4 +473,6 @@ public class CommonProxy { return context.getServerHandler().playerEntity; } + + public void renderLaser(World world, Coord4D from, Coord4D to, ForgeDirection direction) {} }