mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Major packet work, I think it's done. 34 errors to go!
This commit is contained in:
1 parent
659b963af6
commit
1933723b52
41 files changed
+638
-886
No files matched your search
@@ -20,7 +20,16 @@ public class PacketPortalFX extends MekanismPacket
|
||||
coord4D = coord;
|
||||
}
|
||||
|
||||
public void read(ByteArrayDataInput dataStream, EntityPlayer player, World world) throws Exception
|
||||
@Override
|
||||
public void write(ChannelHandlerContext ctx, ByteBuf dataStream)
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(ChannelHandlerContext ctx, EntityPlayer player, ByteBuf dataStream)
|
||||
{
|
||||
Random random = new Random();
|
||||
|
||||
@@ -30,30 +39,11 @@ public class PacketPortalFX extends MekanismPacket
|
||||
|
||||
for(int i = 0; i < 50; i++)
|
||||
{
|
||||
world.spawnParticle("portal", x + random.nextFloat(), y + random.nextFloat(), z + random.nextFloat(), 0.0F, 0.0F, 0.0F);
|
||||
world.spawnParticle("portal", x + random.nextFloat(), y + 1 + random.nextFloat(), z + random.nextFloat(), 0.0F, 0.0F, 0.0F);
|
||||
player.worldObj.spawnParticle("portal", x + random.nextFloat(), y + random.nextFloat(), z + random.nextFloat(), 0.0F, 0.0F, 0.0F);
|
||||
player.worldObj.spawnParticle("portal", x + random.nextFloat(), y + 1 + random.nextFloat(), z + random.nextFloat(), 0.0F, 0.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
|
||||
public void write(DataOutputStream dataStream) throws Exception
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(ChannelHandlerContext ctx, ByteBuf buffer)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(ChannelHandlerContext ctx, ByteBuf buffer)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleClientSide(EntityPlayer player)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user