Skip to content
This repository has been archived by the owner on May 2, 2018. It is now read-only.

Commit

Permalink
FIX FIX FIX FIX FIX FIX FIX FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
unascribed committed Jun 24, 2015
1 parent 8547734 commit a02b7df
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package com.unascribed.farrago.network;

import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;

import com.unascribed.farrago.client.particle.EntityBrokenBeltFX;

import com.unascribed.farrago.FarragoMod;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
Expand All @@ -13,8 +10,7 @@ public class SpawnBeltBreakParticleHandler implements IMessageHandler<SpawnBeltB

@Override
public IMessage onMessage(SpawnBeltBreakParticleMessage message, MessageContext ctx) {
Entity e = Minecraft.getMinecraft().theWorld.getEntityByID(message.getEntityId());
Minecraft.getMinecraft().effectRenderer.addEffect(new EntityBrokenBeltFX(Minecraft.getMinecraft().getTextureManager(), e));
FarragoMod.proxy.spawnBeltBreakParticle(Minecraft.getMinecraft().theWorld.getEntityByID(message.getEntityId()));
return null;
}
}
7 changes: 7 additions & 0 deletions src/main/java/com/unascribed/farrago/proxy/ClientProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import net.minecraft.client.resources.IReloadableResourceManager;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
Expand Down Expand Up @@ -48,6 +49,7 @@
import com.unascribed.farrago.client.pane.PaneBranding;
import com.unascribed.farrago.client.pane.PaneOrbGlow;
import com.unascribed.farrago.client.pane.PaneRenameHotbar;
import com.unascribed.farrago.client.particle.EntityBrokenBeltFX;
import com.unascribed.farrago.client.render.LightPipeBlockRenderer;
import com.unascribed.farrago.client.render.RenderBlunderbussProjectile;
import com.unascribed.farrago.client.render.RenderNull;
Expand Down Expand Up @@ -393,4 +395,9 @@ public void breakUtilityBelt(ItemStack belt) {
FarragoMod.doBreakUtilityBelt(belt, Minecraft.getMinecraft().getIntegratedServer().getConfigurationManager().playerEntityList);
}

@Override
public void spawnBeltBreakParticle(Entity e) {
Minecraft.getMinecraft().effectRenderer.addEffect(new EntityBrokenBeltFX(Minecraft.getMinecraft().getTextureManager(), e));
}

}
2 changes: 2 additions & 0 deletions src/main/java/com/unascribed/farrago/proxy/Proxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.unascribed.farrago.entity.EntityRifleProjectile;
import com.unascribed.farrago.enums.RifleMode;

import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
Expand All @@ -20,4 +21,5 @@ public interface Proxy {
void scope(EntityPlayer player);
void tooltip(ItemTooltipEvent e);
void breakUtilityBelt(ItemStack belt);
void spawnBeltBreakParticle(Entity e);
}
3 changes: 3 additions & 0 deletions src/main/java/com/unascribed/farrago/proxy/ServerProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.io.File;
import java.util.Random;

import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
Expand Down Expand Up @@ -55,9 +56,11 @@ public void preInit() {
@Override public void glowRandomDisplayTick(World world, int x, int y, int z,Random rand) {}
@Override public void scope(EntityPlayer player) {}
@Override public void tooltip(ItemTooltipEvent e) {}
@Override public void spawnBeltBreakParticle(Entity e) {}
@Override
public void breakUtilityBelt(ItemStack belt) {
FarragoMod.doBreakUtilityBelt(belt, MinecraftServer.getServer().getConfigurationManager().playerEntityList);
}


}

0 comments on commit a02b7df

Please sign in to comment.