From 02710cbbbbb5254d8182e53cd7de66418ef0b514 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Fri, 24 Mar 2023 22:37:55 +0100 Subject: address reviews --- .../GT_MetaTileEntity_Hatch_WirelessMulti.java | 32 ++++++++++++++-------- 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'src/main/java/com') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_WirelessMulti.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_WirelessMulti.java index a6de130c38..75ed7fe8a6 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_WirelessMulti.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_WirelessMulti.java @@ -163,24 +163,32 @@ public class GT_MetaTileEntity_Hatch_WirelessMulti extends GT_MetaTileEntity_Hat } @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - - super.onPreTick(aBaseMetaTileEntity, aTick); + public ConnectionType getConnectionType() { + return ConnectionType.WIRELESS; + } + @Override + public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { if (aBaseMetaTileEntity.isServerSide()) { - // On first tick find the player name and attempt to add them to the map. - if (aTick == 1) { - // UUID and username of the owner. - owner_uuid = aBaseMetaTileEntity.getOwnerUuid().toString(); - owner_name = aBaseMetaTileEntity.getOwnerName(); + // UUID and username of the owner. + owner_uuid = aBaseMetaTileEntity.getOwnerUuid().toString(); + owner_name = aBaseMetaTileEntity.getOwnerName(); - strongCheckOrAddUser(owner_uuid, owner_name); + strongCheckOrAddUser(owner_uuid, owner_name); - if (addEUToGlobalEnergyMap(owner_uuid, eu_transferred_per_operation.negate())) - setEUVar(eu_transferred_per_operation_long); - } + if (addEUToGlobalEnergyMap(owner_uuid, eu_transferred_per_operation.negate())) + setEUVar(eu_transferred_per_operation_long); + } + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + + super.onPreTick(aBaseMetaTileEntity, aTick); + + if (aBaseMetaTileEntity.isServerSide()) { // This is set up in a way to be as optimised as possible. If a user has a relatively plentiful energy // network -- cgit