1591 - I think ill come back to this another day
This commit is contained in:
parent
b6312b124a
commit
f08fd1da4d
11 changed files with 36 additions and 34 deletions
|
@ -26,7 +26,7 @@ package techreborn.packets;
|
|||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
import net.minecraftforge.fml.network.NetworkEvent;
|
||||
import reborncore.common.network.ExtendedPacketBuffer;
|
||||
import reborncore.common.network.INetworkPacket;
|
||||
import techreborn.tiles.storage.TileAdjustableSU;
|
||||
|
@ -57,8 +57,8 @@ public class PacketAesu implements INetworkPacket {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void processData(MessageContext context) {
|
||||
TileEntity tile = context.getServerHandler().player.world.getTileEntity(pos);
|
||||
public void processData(NetworkEvent.Context context) {
|
||||
TileEntity tile = context.getSender().world.getTileEntity(pos);
|
||||
if (tile instanceof TileAdjustableSU){
|
||||
((TileAdjustableSU) tile).handleGuiInputFromClient(buttonID);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ package techreborn.packets;
|
|||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
import net.minecraftforge.fml.network.NetworkEvent;
|
||||
import reborncore.common.network.ExtendedPacketBuffer;
|
||||
import reborncore.common.network.INetworkPacket;
|
||||
import techreborn.tiles.machine.tier1.TileAutoCraftingTable;
|
||||
|
@ -57,8 +57,8 @@ public class PacketAutoCraftingTableLock implements INetworkPacket {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void processData(MessageContext context) {
|
||||
TileEntity tileEntity = context.getServerHandler().player.world.getTileEntity(machinePos);
|
||||
public void processData(NetworkEvent.Context context) {
|
||||
TileEntity tileEntity = context.getSender().world.getTileEntity(machinePos);
|
||||
if(tileEntity instanceof TileAutoCraftingTable){
|
||||
((TileAutoCraftingTable) tileEntity).locked = locked;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ package techreborn.packets;
|
|||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
import net.minecraftforge.fml.network.NetworkEvent;
|
||||
import reborncore.common.network.ExtendedPacketBuffer;
|
||||
import reborncore.common.network.INetworkPacket;
|
||||
import techreborn.tiles.fusionReactor.TileFusionControlComputer;
|
||||
|
@ -57,8 +57,8 @@ public class PacketFusionControlSize implements INetworkPacket {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void processData(MessageContext context) {
|
||||
TileEntity tile = context.getServerHandler().player.world.getTileEntity(pos);
|
||||
public void processData(NetworkEvent.Context context) {
|
||||
TileEntity tile = context.getSender().world.getTileEntity(pos);
|
||||
if(tile instanceof TileFusionControlComputer){
|
||||
((TileFusionControlComputer) tile).changeSize(sizeDelta);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
package techreborn.packets;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
import net.minecraftforge.fml.network.NetworkEvent;
|
||||
import reborncore.common.network.ExtendedPacketBuffer;
|
||||
import reborncore.common.network.INetworkPacket;
|
||||
import techreborn.tiles.storage.idsu.TileInterdimensionalSU;
|
||||
|
@ -56,7 +56,7 @@ public class PacketIdsu implements INetworkPacket {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void processData(MessageContext context) {
|
||||
public void processData(NetworkEvent.Context context) {
|
||||
// if (!pos.getWorld().isRemote) {
|
||||
// pos.handleGuiInputFromClient(buttonID);
|
||||
// }
|
||||
|
|
|
@ -26,7 +26,7 @@ package techreborn.packets;
|
|||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
import net.minecraftforge.fml.network.NetworkEvent;
|
||||
import reborncore.common.network.ExtendedPacketBuffer;
|
||||
import reborncore.common.network.INetworkPacket;
|
||||
import techreborn.tiles.machine.tier1.TileRollingMachine;
|
||||
|
@ -57,8 +57,8 @@ public class PacketRollingMachineLock implements INetworkPacket {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void processData(MessageContext context) {
|
||||
TileEntity tileEntity = context.getServerHandler().player.world.getTileEntity(machinePos);
|
||||
public void processData(NetworkEvent.Context context) {
|
||||
TileEntity tileEntity = context.getSender().world.getTileEntity(machinePos);
|
||||
if(tileEntity instanceof TileRollingMachine){
|
||||
((TileRollingMachine) tileEntity).locked = locked;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue