mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
run repo through formatter
This commit is contained in:
1 parent
5585d680a3
commit
ffaea7d4b7
140 files changed
+1050
-892
No files matched your search
@@ -8,52 +8,61 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import tconstruct.blocks.logic.*;
|
||||
|
||||
public class PacketToolStation extends AbstractPacket {
|
||||
public class PacketToolStation extends AbstractPacket
|
||||
{
|
||||
|
||||
private int x, y, z;
|
||||
private String toolName;
|
||||
private int x, y, z;
|
||||
private String toolName;
|
||||
|
||||
public PacketToolStation() {
|
||||
}
|
||||
public PacketToolStation()
|
||||
{
|
||||
}
|
||||
|
||||
public PacketToolStation(int x, int y, int z, String toolName) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.toolName = toolName;
|
||||
}
|
||||
public PacketToolStation(int x, int y, int z, String toolName)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.toolName = toolName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encodeInto(ChannelHandlerContext ctx, ByteBuf buffer) {
|
||||
buffer.writeInt(x);
|
||||
buffer.writeInt(y);
|
||||
buffer.writeInt(z);
|
||||
ByteBufUtils.writeUTF8String(buffer, toolName);
|
||||
}
|
||||
@Override
|
||||
public void encodeInto (ChannelHandlerContext ctx, ByteBuf buffer)
|
||||
{
|
||||
buffer.writeInt(x);
|
||||
buffer.writeInt(y);
|
||||
buffer.writeInt(z);
|
||||
ByteBufUtils.writeUTF8String(buffer, toolName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decodeInto(ChannelHandlerContext ctx, ByteBuf buffer) {
|
||||
x = buffer.readInt();
|
||||
y = buffer.readInt();
|
||||
z = buffer.readInt();
|
||||
toolName = ByteBufUtils.readUTF8String(buffer);
|
||||
}
|
||||
@Override
|
||||
public void decodeInto (ChannelHandlerContext ctx, ByteBuf buffer)
|
||||
{
|
||||
x = buffer.readInt();
|
||||
y = buffer.readInt();
|
||||
z = buffer.readInt();
|
||||
toolName = ByteBufUtils.readUTF8String(buffer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleClientSide(EntityPlayer player) {
|
||||
}
|
||||
@Override
|
||||
public void handleClientSide (EntityPlayer player)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleServerSide(EntityPlayer player) {
|
||||
World world = player.worldObj;
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
@Override
|
||||
public void handleServerSide (EntityPlayer player)
|
||||
{
|
||||
World world = player.worldObj;
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if (te instanceof ToolStationLogic) {
|
||||
((ToolStationLogic) te).setToolname(toolName);
|
||||
}
|
||||
if (te instanceof ToolForgeLogic) {
|
||||
((ToolForgeLogic) te).setToolname(toolName);
|
||||
}
|
||||
}
|
||||
if (te instanceof ToolStationLogic)
|
||||
{
|
||||
((ToolStationLogic) te).setToolname(toolName);
|
||||
}
|
||||
if (te instanceof ToolForgeLogic)
|
||||
{
|
||||
((ToolForgeLogic) te).setToolname(toolName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user