Interface Terminal

Fixed bug with Assembler Packet Crashing the server.
This commit is contained in:
AlgorithmX2
2014-07-09 03:17:11 -05:00
parent 1541998281
commit 16ef731c00
18 changed files with 505 additions and 84 deletions
@@ -5,21 +5,22 @@ import io.netty.buffer.Unpooled;
import java.io.IOException;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.entity.player.EntityPlayer;
import appeng.api.storage.data.IAEItemStack;
import appeng.client.render.effects.AssemblerFX;
import appeng.client.EffectType;
import appeng.core.CommonHelper;
import appeng.core.sync.AppEngPacket;
import appeng.core.sync.network.INetworkInfo;
import appeng.util.item.AEItemStack;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class PacketAssemblerAnimation extends AppEngPacket
{
int x, y, z;
byte rate;
IAEItemStack is;
final public int x, y, z;
final public byte rate;
final public IAEItemStack is;
// automatic.
public PacketAssemblerAnimation(ByteBuf stream) throws IOException {
@@ -31,14 +32,14 @@ public class PacketAssemblerAnimation extends AppEngPacket
}
@Override
@SideOnly(Side.CLIENT)
public void clientPacketData(INetworkInfo network, AppEngPacket packet, EntityPlayer player)
{
double d0 = 0.5d;// + ((double) (Platform.getRandomFloat() - 0.5F) * 0.26D);
double d1 = 0.5d;// + ((double) (Platform.getRandomFloat() - 0.5F) * 0.26D);
double d2 = 0.5d;// + ((double) (Platform.getRandomFloat() - 0.5F) * 0.26D);
AssemblerFX fx = new AssemblerFX( Minecraft.getMinecraft().theWorld, x + d0, y + d1, z + d2, 0.0D, 0.0D, 0.0D, rate, is );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
CommonHelper.proxy.spawnEffect( EffectType.Assembler, player.getEntityWorld(), x + d0, y + d1, z + d2, this );
}
// api