mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +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
@@ -16,8 +16,10 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
|
||||
public class PacketElectricChest implements IMekanismPacket
|
||||
public class PacketElectricChest extends MekanismPacket
|
||||
{
|
||||
public ElectricChestPacketType activeType;
|
||||
|
||||
@@ -34,16 +36,9 @@ public class PacketElectricChest implements IMekanismPacket
|
||||
|
||||
public Coord4D obj;
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
public PacketElectricChest(ElectricChestPacketType type)//TODO I'm bored now.)
|
||||
{
|
||||
return "ElectricChest";
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMekanismPacket setParams(Object... data)
|
||||
{
|
||||
activeType = (ElectricChestPacketType)data[0];
|
||||
activeType = type;
|
||||
|
||||
switch(activeType)
|
||||
{
|
||||
@@ -89,11 +84,8 @@ public class PacketElectricChest implements IMekanismPacket
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(ByteArrayDataInput dataStream, EntityPlayer player, World world) throws Exception
|
||||
{
|
||||
ElectricChestPacketType packetType = ElectricChestPacketType.values()[dataStream.readInt()];
|
||||
@@ -222,7 +214,6 @@ public class PacketElectricChest implements IMekanismPacket
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(DataOutputStream dataStream) throws Exception
|
||||
{
|
||||
dataStream.writeInt(activeType.ordinal());
|
||||
@@ -281,6 +272,30 @@ public class PacketElectricChest implements IMekanismPacket
|
||||
}
|
||||
}
|
||||
|
||||
@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)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static enum ElectricChestPacketType
|
||||
{
|
||||
LOCK,
|
||||
|
||||
Reference in new issue
Block a user