mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 23:03:01 +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
@@ -2,7 +2,6 @@ package mekanism.client.gui;
|
||||
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
import mekanism.common.entity.EntityRobit;
|
||||
import mekanism.common.inventory.container.ContainerRobitMain;
|
||||
import mekanism.common.network.PacketRobit;
|
||||
@@ -47,7 +46,7 @@ public class GuiRobitMain extends GuiMekanism
|
||||
{
|
||||
if(nameChangeField.getText() != null && !nameChangeField.getText().isEmpty())
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketRobit().setParams(RobitPacketType.NAME, nameChangeField.getText(), robit.getEntityId()));
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.NAME, nameChangeField.getText(), robit.getEntityId()));
|
||||
toggleNameChange();
|
||||
nameChangeField.setText("");
|
||||
}
|
||||
@@ -272,31 +271,31 @@ public class GuiRobitMain extends GuiMekanism
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 30 && yAxis <= 48)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketRobit().setParams(RobitPacketType.GUI, 1, robit.getEntityId()));
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 1, robit.getEntityId()));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 22, mc.theWorld, robit.getEntityId(), 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 50 && yAxis <= 68)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketRobit().setParams(RobitPacketType.GUI, 2, robit.getEntityId()));
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 2, robit.getEntityId()));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 23, mc.theWorld, robit.getEntityId(), 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 70 && yAxis <= 88)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketRobit().setParams(RobitPacketType.GUI, 3, robit.getEntityId()));
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 3, robit.getEntityId()));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 24, mc.theWorld, robit.getEntityId(), 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 90 && yAxis <= 108)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketRobit().setParams(RobitPacketType.GUI, 4, robit.getEntityId()));
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 4, robit.getEntityId()));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 25, mc.theWorld, robit.getEntityId(), 0, 0);
|
||||
}
|
||||
else if(xAxis >= 152 && xAxis <= 170 && yAxis >= 54 && yAxis <= 72)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketRobit().setParams(RobitPacketType.FOLLOW, robit.getEntityId()));
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.FOLLOW, robit.getEntityId()));
|
||||
}
|
||||
else if(xAxis >= 6 && xAxis <= 24 && yAxis >= 54 && yAxis <= 72)
|
||||
{
|
||||
@@ -306,13 +305,13 @@ public class GuiRobitMain extends GuiMekanism
|
||||
else if(xAxis >= 6 && xAxis <= 24 && yAxis >= 16 && yAxis <= 34)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketRobit().setParams(RobitPacketType.GO_HOME, robit.getEntityId()));
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GO_HOME, robit.getEntityId()));
|
||||
mc.displayGuiScreen(null);
|
||||
}
|
||||
else if(xAxis >= 6 && xAxis <= 24 && yAxis >= 35 && yAxis <= 53)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketRobit().setParams(RobitPacketType.DROP_PICKUP, robit.getEntityId()));
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.DROP_PICKUP, robit.getEntityId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user