mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
Network stuffs -> 1.7
This commit is contained in:
1 parent
bb98f77de4
commit
8cd760ea06
34 files changed
+527
-595
No files matched your search
@@ -502,6 +502,6 @@ public class AdaptiveSmelteryGui extends NewContainerGui
|
||||
public void onGuiClosed ()
|
||||
{
|
||||
super.onGuiClosed();
|
||||
logic.getWorld().markBlockForUpdate(logic.field_145851_c, logic.field_145848_d, logic.field_145849_e);
|
||||
logic.getWorld().func_147471_g(logic.field_145851_c, logic.field_145848_d, logic.field_145849_e);
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,19 @@
|
||||
package tconstruct.client.gui;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.*;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.blocks.logic.SmelteryLogic;
|
||||
import tconstruct.inventory.*;
|
||||
import tconstruct.util.network.packet.PacketSmeltery;
|
||||
|
||||
public class SmelteryGui extends NewContainerGui
|
||||
{
|
||||
@@ -449,9 +441,10 @@ public class SmelteryGui extends NewContainerGui
|
||||
int sizeY = liquidSize;
|
||||
if (mouseX >= leftX && mouseX <= leftX + sizeX && mouseY >= topY && mouseY < topY + sizeY)
|
||||
{
|
||||
//TODO Update fluid stuff
|
||||
fluidToBeBroughtUp = liquid.fluidID;
|
||||
|
||||
Packet250CustomPayload packet = new Packet250CustomPayload();
|
||||
/*Packet250CustomPayload packet = new Packet250CustomPayload();
|
||||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
DataOutputStream dos = new DataOutputStream(bos);
|
||||
@@ -478,7 +471,9 @@ public class SmelteryGui extends NewContainerGui
|
||||
packet.data = bos.toByteArray();
|
||||
packet.length = bos.size();
|
||||
|
||||
PacketDispatcher.sendPacketToServer(packet);
|
||||
PacketDispatcher.sendPacketToServer(packet);*/
|
||||
|
||||
TConstruct.packetPipeline.sendToServer(new PacketSmeltery(logic.getWorld().provider.dimensionId, logic.field_145851_c, logic.field_145848_d, logic.field_145849_e, this.func_146272_n(), fluidToBeBroughtUp));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,17 @@
|
||||
package tconstruct.client.gui;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataOutputStream;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.blocks.logic.StencilTableLogic;
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.inventory.PatternShaperContainer;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import tconstruct.util.network.packet.PacketStencilTable;
|
||||
|
||||
public class StencilTableGui extends GuiContainer
|
||||
{
|
||||
@@ -122,7 +114,7 @@ public class StencilTableGui extends GuiContainer
|
||||
|
||||
void updateServer (ItemStack stack)
|
||||
{
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream(8);
|
||||
/*ByteArrayOutputStream bos = new ByteArrayOutputStream(8);
|
||||
DataOutputStream outputStream = new DataOutputStream(bos);
|
||||
try
|
||||
{
|
||||
@@ -144,6 +136,8 @@ public class StencilTableGui extends GuiContainer
|
||||
packet.data = bos.toByteArray();
|
||||
packet.length = bos.size();
|
||||
|
||||
PacketDispatcher.sendPacketToServer(packet);
|
||||
PacketDispatcher.sendPacketToServer(packet);*/
|
||||
|
||||
TConstruct.packetPipeline.sendToServer(new PacketStencilTable(logic.field_145851_c, logic.field_145848_d, logic.field_145849_e, stack));
|
||||
}
|
||||
}
|
||||
@@ -1,35 +1,23 @@
|
||||
package tconstruct.client.gui;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import cpw.mods.fml.relauncher.*;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import java.util.*;
|
||||
import net.minecraft.client.gui.*;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.blocks.logic.ToolStationLogic;
|
||||
import tconstruct.inventory.ActiveContainer;
|
||||
import tconstruct.inventory.ToolStationContainer;
|
||||
import tconstruct.library.client.TConstructClientRegistry;
|
||||
import tconstruct.library.client.ToolGuiElement;
|
||||
import tconstruct.inventory.*;
|
||||
import tconstruct.library.client.*;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import tconstruct.util.network.packet.PacketToolStation;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ToolStationGui extends NewContainerGui
|
||||
@@ -482,7 +470,7 @@ public class ToolStationGui extends NewContainerGui
|
||||
|
||||
void updateServer (String name)
|
||||
{
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream(8);
|
||||
/*ByteArrayOutputStream bos = new ByteArrayOutputStream(8);
|
||||
DataOutputStream outputStream = new DataOutputStream(bos);
|
||||
try
|
||||
{
|
||||
@@ -503,7 +491,9 @@ public class ToolStationGui extends NewContainerGui
|
||||
packet.data = bos.toByteArray();
|
||||
packet.length = bos.size();
|
||||
|
||||
PacketDispatcher.sendPacketToServer(packet);
|
||||
PacketDispatcher.sendPacketToServer(packet);*/
|
||||
|
||||
TConstruct.packetPipeline.sendToServer(new PacketToolStation(logic.field_145851_c, logic.field_145848_d, logic.field_145849_e, name));
|
||||
}
|
||||
|
||||
/*protected void mouseClicked(int par1, int par2, int par3)
|
||||
|
||||
Reference in new issue
Block a user