Added AESU logic
This commit is contained in:
parent
58aac2ce0b
commit
e81fc202ad
4 changed files with 58 additions and 103 deletions
|
@ -24,6 +24,7 @@
|
|||
|
||||
package techreborn.packets;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
import reborncore.common.network.ExtendedPacketBuffer;
|
||||
|
@ -54,13 +55,14 @@ public class PacketAesu implements INetworkPacket<PacketAesu> {
|
|||
@Override
|
||||
public void readData(ExtendedPacketBuffer in) throws IOException {
|
||||
this.pos = in.readBlockPos();
|
||||
buttonID = in.readInt();
|
||||
this.buttonID = in.readInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processData(PacketAesu message, MessageContext context) {
|
||||
// if (!pos.getWorld().isRemote) {
|
||||
// pos.handleGuiInputFromClient(buttonID);
|
||||
// }
|
||||
TileEntity tile = context.getServerHandler().player.world.getTileEntity(message.pos);
|
||||
if (tile instanceof TileAdjustableSU){
|
||||
((TileAdjustableSU) tile).handleGuiInputFromClient(message.buttonID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue