Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #60 from alexandre-tardif/fix/ender-link-private
Browse files Browse the repository at this point in the history
Fix ender link cover private mode
  • Loading branch information
Connor-Colenso authored Jul 27, 2022
2 parents 176199a + 441931b commit 377abc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public IMessage handleServerMessage(EntityPlayer pPlayer, EnderLinkCoverUpdate p
bindEnderLinkTag(handler, tag);
} else if (handler instanceof BaseMetaTileEntity) {
BaseMetaTileEntity baseTile = (BaseMetaTileEntity) handler;
if (tag.getUUID() == baseTile.getOwnerUuid()){
if (tag.getUUID().equals(baseTile.getOwnerUuid())){
bindEnderLinkTag(handler, tag);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import gregtech.api.gui.widgets.GT_GuiIntegerTextBox;
import gregtech.api.interfaces.IGuiScreen;
import gregtech.api.interfaces.tileentity.ICoverable;
import gregtech.api.metatileentity.BaseMetaTileEntity;
import gregtech.api.net.GT_Packet_TileEntityCover;
import gregtech.api.util.GT_CoverBehavior;
import gregtech.api.util.GT_Utility;
Expand All @@ -28,6 +27,7 @@

import static com.github.technus.tectech.mechanics.enderStorage.EnderWorldSavedData.getEnderFluidContainer;
import static com.github.technus.tectech.mechanics.enderStorage.EnderWorldSavedData.getEnderLinkTag;
import static gregtech.GT_Mod.gregtechproxy;

public class GT_Cover_TM_EnderFluidLink extends GT_CoverBehavior {
private static final int L_PER_TICK = 8000;
Expand Down Expand Up @@ -270,10 +270,7 @@ private void updateButtons(){
private void switchPrivatePublic(int coverVar) {
UUID ownerUUID = tag.getUUID();
if (testBit(coverVar, PUBLIC_PRIVATE_MASK)){
if (tile instanceof BaseMetaTileEntity){
BaseMetaTileEntity mte = (BaseMetaTileEntity) tile;
ownerUUID = mte.getOwnerUuid();
}
ownerUUID = gregtechproxy.getThePlayer().getUniqueID();
} else {
ownerUUID = null;
}
Expand Down

0 comments on commit 377abc9

Please sign in to comment.