mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-19 19:49:50 +00:00
Under 1300 errors left now, started on packet/network stuffs.
This commit is contained in:
1 parent
86777694e5
commit
31938e8b68
151 files changed
+1796
-1510
No files matched your search
@@ -12,29 +12,21 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
|
||||
public class PacketRemoveUpgrade implements IMekanismPacket
|
||||
public class PacketRemoveUpgrade extends MekanismPacket
|
||||
{
|
||||
public Coord4D object3D;
|
||||
public Coord4D coord4D;
|
||||
|
||||
public byte upgradeType;
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
public PacketRemoveUpgrade(Coord4D coord, byte type)
|
||||
{
|
||||
return "RemoveUpgrade";
|
||||
coord4D = coord;
|
||||
upgradeType = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMekanismPacket setParams(Object... data)
|
||||
{
|
||||
object3D = (Coord4D)data[0];
|
||||
upgradeType = (Byte)data[1];
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(ByteArrayDataInput dataStream, EntityPlayer player, World world) throws Exception
|
||||
{
|
||||
int x = dataStream.readInt();
|
||||
@@ -72,13 +64,36 @@ public class PacketRemoveUpgrade implements IMekanismPacket
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(DataOutputStream dataStream) throws Exception
|
||||
{
|
||||
dataStream.writeInt(object3D.xCoord);
|
||||
dataStream.writeInt(object3D.yCoord);
|
||||
dataStream.writeInt(object3D.zCoord);
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
|
||||
dataStream.writeByte(upgradeType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encodeInto(ChannelHandlerContext ctx, ByteBuf buffer)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decodeInto(ChannelHandlerContext ctx, ByteBuf buffer)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleClientSide(EntityPlayer player)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleServerSide(EntityPlayer player)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user