From c7d448ecea6a6b6f5020537c1a7beefed2780eb8 Mon Sep 17 00:00:00 2001 From: Pokemonplatin Date: Fri, 2 Jul 2021 16:03:37 +0200 Subject: [PATCH 1/4] Downgrade to gradle 2.0 --- build.gradle | 58 ++++++++++++++++------- gradle/wrapper/gradle-wrapper.jar | Bin 52271 -> 51017 bytes gradle/wrapper/gradle-wrapper.properties | 4 +- 3 files changed, 43 insertions(+), 19 deletions(-) diff --git a/build.gradle b/build.gradle index 31d7110f2..36fdf24c9 100644 --- a/build.gradle +++ b/build.gradle @@ -2,19 +2,32 @@ defaultTasks 'fullBuild' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2/" } - maven { - name = "forge" - url = "https://files.minecraftforge.net/maven" + + // [HTTPS FIX] Replace mavenCentral() with the code block below + maven { + url "https://repo1.maven.org/maven2" + } + + maven { + name = "forge" + url = "https://files.minecraftforge.net/maven" + } + maven { + name = "forge2" + url = "https://maven.minecraftforge.net/" + } + maven { + name = "sonatype" + url = "https://oss.sonatype.org/content/repositories/snapshots/" + } + + flatDir { + dirs 'libs' + } } - maven { - name = "sonatype" - url = "https://oss.sonatype.org/content/repositories/snapshots/" + dependencies { + classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' } - } - dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' - } } repositories { @@ -28,14 +41,24 @@ repositories { } } -apply plugin: 'idea' +allprojects { + repositories { + all { ArtifactRepository repo -> + if (repo instanceof MavenArtifactRepository) { + if (repo.url.toString().startsWith("http://repo1.maven.org/maven2")) { + repo.url = repo.url.toString().replace("http://", "https://") + } + } + } + } +} -idea { +/*idea { module { // For some reason this is necessary for IDEA 2014 workspaces to recognize assets inheritOutputDirs = true } -} +}*/ apply plugin: 'forge' @@ -60,11 +83,12 @@ version = "${config.minecraft_version}-${config.mod_version}." + (System.env.BUI archivesBaseName = "MekanismAll" libsDirName = "../output" distsDirName = "../output" -sourceCompatibility = '1.7' -targetCompatibility = '1.7' +sourceCompatibility = '1.8' +targetCompatibility = '1.8' minecraft { - version = config.minecraft_version + "-" + config.forge_version + version = "1.7.10-10.13.4.1558-1.7.10" + runDir = "eclipse" } processResources diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 30d399d8d2bf522ff5de94bf434a7cc43a9a74b5..b7612167031001b7b84baf2a959e8ea8ad03c011 100644 GIT binary patch delta 21708 zcmZ5{V~}RsvTfP6ZFbqVZQC}#F59+k+v;+4*|u%Gea^l=?tQ;%|8Ab5 z{MWuP{?{ha0PiCIXCY4KF%|;^2*?o(2uL(30SqIlzndw^7z7_MIvku%u|yGyXby|Z z>C!{$6O{}oF|aL)5a=f~%LcCmlVZB#znq$3nVo8C@)7X&|3b)*9;2A2O0QS^Ri8R2 zhkCIpX~Ys@cD2pi5VAqB?+9m$+ddTUdkmhtZWhin0vakxZwnn-(uo-_UuM&Sl9HV}O7i9GcFO{BbUsSv71oI*)*9}BsZdmb+6C08pvZrB3@LTtky zMW#i&M05jyQQ_e@Tf@o#~@-X<@Xoz}Q;5Kd( zKG@lUQVnj?3~1bAW=XmBbYM8v0}I9l1$*kNo-%8{q-+e3#1$m19T@_LQ89|A1s8>1 z(pgf=f4?Cq3Hm~pygQHo2|Uw|v&N*@>PU#_8WsjYz;yY&V@9={K8~1fU__N^g4`F#KS2chzd|i380`4JVbf#}UIg+lLWe?u z_!rS4l>Luy8Ho}6zfom>K{SK|2?XSX00czw->B-tLI-@9Y^bAuC$FYfmD`<{#+gbv zCAqs@l9lRBN_U~5jM?z*lSL&(H`mKXs7d6|n|U`wM{|S#+#<7=V^+^q5Mnp&E zcEIh{L+ygA`e9`hy?yR8m1}utR zvx8?3V7p&QX6>V1Q3U$v_OSGK_h?CaY4&ZDx~YtS7{%_~*uNnV8JlJ`JfEkjdPim* zB<^ykdTIB3UilB&QAZF9Uy1X&N%w1igC>neDg$!o=r$Hp@pV{Sft}@7)L2y1>10~K z@H%*T*qJi)G8s)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p_W7ik&h-{H~JyzY=BTga0K_8dWo*HU%PHR15xF+!N7QEhc)wOiLm0DuVaOD+j{_T1SLS;!F$NQVAzkx&G84OqPS`a?_SCuVl${|9qP z^fxQA2IO_SWZk&T%;Nqpr&XYt#d{=b0{LeC8;(3y2GAggYv~d5HKYue(V_~AB8eT5 zp(@_M0f30M8af1jE%fSYt!nRGb!uz%t~#W3CRZKTx@*gDo#FpeSW>*61p`%B5}{dp zHR}H=`3GRTG3rYYa#V6;0YG|Gc>mTk0st6p0N3bIKsYTvqNN`1DvsfLFi?{3(jMEu zc4gvf00Y&aD5yFC7GelOfN*TULvi2O%6Wr(TpH!@K#~&Cdky|49Ucz=V7dVwx{CtW z-yuYR8n2jdq(j~S(>_3fP3teSBUw;k+{m)K0cL-Q1k)mV8cDGKQP39~DS$9T#0yZ}cO>8L8rSyi57K#A>3I+x`qa5>ExloS(s@#D8EU;EL)X0QwpetwYHZU;G2WjI(IJVKEoc|TS z|LctKLlm_^QJ_dUAv<5>jN>9xUd3;OW*dS)Ygf5qzuyi9%7mdpi)x3U9RGO`&-GvS z?Fb~03Gt_$1O*T+RS+)}llqlFG>uxwTgTUH*J4Bl(n&Z~7a& eA@vCCYDS6&Y8c2x3jjcnFCt<90H@*d?0*0dt Date: Sat, 3 Jul 2021 00:12:08 +0200 Subject: [PATCH 2/4] Teleporter and Quantum Entangloporter now have a trusted channel for smp --- .../java/mekanism/client/ClientProxy.java | 1 + .../client/gui/GuiQuantumEntangloporter.java | 208 +++--- .../mekanism/client/gui/GuiTeleporter.java | 126 +++- src/main/java/mekanism/common/Mekanism.java | 10 +- .../mekanism/common/frequency/Frequency.java | 249 +++---- .../common/item/ItemPortableTeleporter.java | 32 +- .../network/PacketPortableTeleporter.java | 693 +++++++++--------- .../tile/TileEntityQuantumEntangloporter.java | 68 +- .../common/tile/TileEntitySecurityDesk.java | 2 +- .../common/tile/TileEntityTeleporter.java | 69 +- .../tile/component/TileComponentSecurity.java | 2 +- .../resources/assets/mekanism/lang/en_US.lang | 1 + 12 files changed, 815 insertions(+), 646 deletions(-) diff --git a/src/main/java/mekanism/client/ClientProxy.java b/src/main/java/mekanism/client/ClientProxy.java index ee3fc7184..96f3bbe1d 100644 --- a/src/main/java/mekanism/client/ClientProxy.java +++ b/src/main/java/mekanism/client/ClientProxy.java @@ -540,6 +540,7 @@ public class ClientProxy extends CommonProxy teleporter.clientFreq = message.frequency; teleporter.clientPublicCache = message.publicCache; teleporter.clientPrivateCache = message.privateCache; + teleporter.clientProtectedCache = message.protectedCache; teleporter.updateButtons(); } diff --git a/src/main/java/mekanism/client/gui/GuiQuantumEntangloporter.java b/src/main/java/mekanism/client/gui/GuiQuantumEntangloporter.java index 59450192c..5e10c5f18 100644 --- a/src/main/java/mekanism/client/gui/GuiQuantumEntangloporter.java +++ b/src/main/java/mekanism/client/gui/GuiQuantumEntangloporter.java @@ -16,6 +16,7 @@ import mekanism.common.inventory.container.ContainerQuantumEntangloporter; import mekanism.common.network.PacketPortableTeleporter.PortableTeleporterMessage; import mekanism.common.network.PacketPortableTeleporter.PortableTeleporterPacketType; import mekanism.common.network.PacketTileEntity.TileEntityMessage; +import mekanism.common.security.ISecurityTile; import mekanism.common.tile.TileEntityQuantumEntangloporter; import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; @@ -36,22 +37,23 @@ import cpw.mods.fml.relauncher.SideOnly; public class GuiQuantumEntangloporter extends GuiMekanism { public ResourceLocation resource; - + public TileEntityQuantumEntangloporter tileEntity; - + public EntityPlayer entityPlayer; - + public GuiButton publicButton; public GuiButton privateButton; - + public GuiButton protectedButton; + public GuiButton setButton; public GuiButton deleteButton; - + public GuiScrollList scrollList; - + public GuiTextField frequencyField; - - public boolean privateMode; + + public ISecurityTile.SecurityMode access; public GuiQuantumEntangloporter(InventoryPlayer inventory, TileEntityQuantumEntangloporter tentity) { @@ -62,15 +64,15 @@ public class GuiQuantumEntangloporter extends GuiMekanism guiElements.add(scrollList = new GuiScrollList(this, resource, 28, 37, 120, 4)); guiElements.add(new GuiSideConfigurationTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiTeleporter.png"))); guiElements.add(new GuiTransporterConfigTab(this, 34, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiTeleporter.png"))); - + if(tileEntity.frequency != null) { - privateMode = !tileEntity.frequency.publicFreq; + access= tileEntity.frequency.access; } - + ySize+=64; } - + @Override public void initGui() { @@ -80,84 +82,108 @@ public class GuiQuantumEntangloporter extends GuiMekanism int guiHeight = (height - ySize) / 2; buttonList.clear(); - - publicButton = new GuiButton(0, guiWidth + 27, guiHeight + 14, 60, 20, LangUtils.localize("gui.public")); - privateButton = new GuiButton(1, guiWidth + 89, guiHeight + 14, 60, 20, LangUtils.localize("gui.private")); - + + publicButton = new GuiButton(0, guiWidth + 27, guiHeight + 14, 40, 20, LangUtils.localize("gui.public")); + privateButton = new GuiButton(1, guiWidth + 69, guiHeight + 14, 40, 20, LangUtils.localize("gui.private")); + protectedButton = new GuiButton(4, guiWidth + 111, guiHeight + 14, 40, 20, LangUtils.localize("gui.trusted")); + setButton = new GuiButton(2, guiWidth + 27, guiHeight + 116, 60, 20, LangUtils.localize("gui.set")); deleteButton = new GuiButton(3, guiWidth + 89, guiHeight + 116, 60, 20, LangUtils.localize("gui.delete")); - + frequencyField = new GuiTextField(fontRendererObj, guiWidth + 50, guiHeight + 104, 86, 11); frequencyField.setMaxStringLength(FrequencyManager.MAX_FREQ_LENGTH); frequencyField.setEnableBackgroundDrawing(false); - + updateButtons(); buttonList.add(publicButton); buttonList.add(privateButton); + buttonList.add(protectedButton); buttonList.add(setButton); buttonList.add(deleteButton); } - + public void setFrequency(String freq) { if(freq.isEmpty()) { return; } - + ArrayList data = new ArrayList(); data.add(0); data.add(freq); - data.add(!privateMode); - + data.add(access.ordinal()); + Mekanism.packetHandler.sendToServer(new TileEntityMessage(Coord4D.get(tileEntity), data)); } - + public String getSecurity(Frequency freq) { - return !freq.publicFreq ? EnumColor.DARK_RED + LangUtils.localize("gui.private") : LangUtils.localize("gui.public"); + if(freq.isPrivate()) { + return EnumColor.DARK_RED + LangUtils.localize("gui.private"); + } else if(freq.isPublic()) { + return LangUtils.localize("gui.public"); + } + + return EnumColor.ORANGE + LangUtils.localize("gui.trusted"); } - + public void updateButtons() { if(tileEntity.getSecurity().getOwner() == null) { return; } - + List text = new ArrayList(); - - if(privateMode) - { - for(Frequency freq : tileEntity.privateCache) - { - text.add(freq.name); - } - } - else { - for(Frequency freq : tileEntity.publicCache) - { - text.add(freq.name + " (" + freq.owner + ")"); - } - } - + + + if(access == ISecurityTile.SecurityMode.PRIVATE) { + for(Frequency freq : tileEntity.privateCache) + { + text.add(freq.name); + } + + publicButton.enabled = true; + privateButton.enabled = false; + protectedButton.enabled = true; + } else if(access == ISecurityTile.SecurityMode.PUBLIC) { + for(Frequency freq : tileEntity.publicCache) + { + text.add(freq.name + " (" + freq.owner + ")"); + } + + publicButton.enabled = false; + privateButton.enabled = true; + protectedButton.enabled = true; + } else { + for(Frequency freq : tileEntity.protectedCache) + { + text.add(freq.name + " (" + freq.owner + ")"); + } + + publicButton.enabled = true; + privateButton.enabled = true; + protectedButton.enabled = false; + } + scrollList.setText(text); - - if(privateMode) - { - publicButton.enabled = true; - privateButton.enabled = false; - } - else { - publicButton.enabled = false; - privateButton.enabled = true; - } - + + if(scrollList.hasSelection()) { - Frequency freq = privateMode ? tileEntity.privateCache.get(scrollList.selected) : tileEntity.publicCache.get(scrollList.selected); - + + Frequency freq; + + if(access == ISecurityTile.SecurityMode.PRIVATE) { + freq = tileEntity.privateCache.get(scrollList.selected); + } else if(access == ISecurityTile.SecurityMode.PUBLIC) { + freq = tileEntity.publicCache.get(scrollList.selected); + } else { + freq = tileEntity.protectedCache.get(scrollList.selected); + } + if(tileEntity.getFrequency(null) == null || !tileEntity.getFrequency(null).equals(freq)) { setButton.enabled = true; @@ -165,7 +191,7 @@ public class GuiQuantumEntangloporter extends GuiMekanism else { setButton.enabled = false; } - + if(tileEntity.getSecurity().getOwner().equals(freq.owner)) { deleteButton.enabled = true; @@ -179,31 +205,31 @@ public class GuiQuantumEntangloporter extends GuiMekanism deleteButton.enabled = false; } } - + @Override public void updateScreen() { super.updateScreen(); - + updateButtons(); - + frequencyField.updateCursorCounter(); } - + @Override public void mouseClicked(int mouseX, int mouseY, int button) { super.mouseClicked(mouseX, mouseY, button); - + updateButtons(); frequencyField.mouseClicked(mouseX, mouseY, button); - + if(button == 0) { int xAxis = (mouseX - (width - xSize) / 2); int yAxis = (mouseY - (height - ySize) / 2); - + if(xAxis >= 137 && xAxis <= 148 && yAxis >= 103 && yAxis <= 114) { setFrequency(frequencyField.getText()); @@ -212,7 +238,7 @@ public class GuiQuantumEntangloporter extends GuiMekanism } } } - + @Override public void keyTyped(char c, int i) { @@ -234,10 +260,10 @@ public class GuiQuantumEntangloporter extends GuiMekanism { frequencyField.textboxKeyTyped(c, i); } - + updateButtons(); } - + @Override protected void actionPerformed(GuiButton guibutton) { @@ -245,48 +271,66 @@ public class GuiQuantumEntangloporter extends GuiMekanism if(guibutton.id == 0) { - privateMode = false; + access = ISecurityTile.SecurityMode.PUBLIC; } else if(guibutton.id == 1) { - privateMode = true; + access = ISecurityTile.SecurityMode.PRIVATE; } else if(guibutton.id == 2) { int selection = scrollList.getSelection(); - + if(selection != -1) { - Frequency freq = privateMode ? tileEntity.privateCache.get(selection) : tileEntity.publicCache.get(selection); + Frequency freq; + if(access == ISecurityTile.SecurityMode.PRIVATE) { + freq = tileEntity.privateCache.get(selection); + } else if(access == ISecurityTile.SecurityMode.PUBLIC) { + freq = tileEntity.publicCache.get(selection); + } else { + freq = tileEntity.protectedCache.get(selection); + } + setFrequency(freq.name); } } else if(guibutton.id == 3) { int selection = scrollList.getSelection(); - + if(selection != -1) { - Frequency freq = privateMode ? tileEntity.privateCache.get(selection) : tileEntity.publicCache.get(selection); - + Frequency freq; + if(access == ISecurityTile.SecurityMode.PRIVATE) { + freq = tileEntity.privateCache.get(selection); + } else if(access == ISecurityTile.SecurityMode.PUBLIC) { + freq = tileEntity.publicCache.get(selection); + } else { + freq = tileEntity.protectedCache.get(selection); + } + if(tileEntity != null) { ArrayList data = new ArrayList(); data.add(1); data.add(freq.name); - data.add(freq.publicFreq); - + data.add(freq.access.ordinal()); + Mekanism.packetHandler.sendToServer(new TileEntityMessage(Coord4D.get(tileEntity), data)); } else { Mekanism.packetHandler.sendToServer(new PortableTeleporterMessage(PortableTeleporterPacketType.DEL_FREQ, freq)); Mekanism.packetHandler.sendToServer(new PortableTeleporterMessage(PortableTeleporterPacketType.DATA_REQUEST, null)); } - + scrollList.selected = -1; } - } - + }else if(guibutton.id == 4) + { + access = ISecurityTile.SecurityMode.TRUSTED; + } + updateButtons(); } @@ -301,10 +345,10 @@ public class GuiQuantumEntangloporter extends GuiMekanism fontRendererObj.drawString(LangUtils.localize("gui.freq") + ":", 32, 81, 0x404040); fontRendererObj.drawString(LangUtils.localize("gui.security") + ":", 32, 91, 0x404040); - + fontRendererObj.drawString(" " + (tileEntity.getFrequency(null) != null ? tileEntity.getFrequency(null).name : EnumColor.DARK_RED + LangUtils.localize("gui.none")), 32 + fontRendererObj.getStringWidth(LangUtils.localize("gui.freq") + ":"), 81, 0x797979); fontRendererObj.drawString(" " + (tileEntity.getFrequency(null) != null ? getSecurity(tileEntity.getFrequency(null)) : EnumColor.DARK_RED + LangUtils.localize("gui.none")), 32 + fontRendererObj.getStringWidth(LangUtils.localize("gui.security") + ":"), 91, 0x797979); - + String str = LangUtils.localize("gui.set") + ":"; renderScaledText(str, 27, 104, 0x404040, 20); @@ -319,10 +363,10 @@ public class GuiQuantumEntangloporter extends GuiMekanism int guiWidth = (width-xSize)/2; int guiHeight = (height-ySize)/2; drawTexturedModalRect(guiWidth, guiHeight, 0, 0, xSize, ySize); - + int xAxis = (mouseX - (width - xSize) / 2); int yAxis = (mouseY - (height - ySize) / 2); - + if(xAxis >= 137 && xAxis <= 148 && yAxis >= 103 && yAxis <= 114) { drawTexturedModalRect(guiWidth + 137, guiHeight + 103, xSize, 0, 11, 11); @@ -332,7 +376,7 @@ public class GuiQuantumEntangloporter extends GuiMekanism } super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY); - + frequencyField.drawTextBox(); } } diff --git a/src/main/java/mekanism/client/gui/GuiTeleporter.java b/src/main/java/mekanism/client/gui/GuiTeleporter.java index ac4884eaf..19e9e3df9 100644 --- a/src/main/java/mekanism/client/gui/GuiTeleporter.java +++ b/src/main/java/mekanism/client/gui/GuiTeleporter.java @@ -23,6 +23,7 @@ import mekanism.common.network.PacketPortableTeleporter.PortableTeleporterMessag import mekanism.common.network.PacketPortableTeleporter.PortableTeleporterPacketType; import mekanism.common.network.PacketTileEntity.TileEntityMessage; import mekanism.common.security.IOwnerItem; +import mekanism.common.security.ISecurityTile; import mekanism.common.tile.TileEntityTeleporter; import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; @@ -52,7 +53,8 @@ public class GuiTeleporter extends GuiMekanism public GuiButton publicButton; public GuiButton privateButton; - + public GuiButton protectedButton; + public GuiButton setButton; public GuiButton deleteButton; @@ -62,14 +64,15 @@ public class GuiTeleporter extends GuiMekanism public GuiTextField frequencyField; - public boolean privateMode; + public ISecurityTile.SecurityMode access = ISecurityTile.SecurityMode.PUBLIC; public Frequency clientFreq; public byte clientStatus; public List clientPublicCache = new ArrayList(); public List clientPrivateCache = new ArrayList(); - + public List clientProtectedCache = new ArrayList(); + public boolean isInit = true; public GuiTeleporter(InventoryPlayer inventory, TileEntityTeleporter tentity) @@ -97,7 +100,7 @@ public class GuiTeleporter extends GuiMekanism if(tileEntity.frequency != null) { - privateMode = !tileEntity.frequency.publicFreq; + access = tileEntity.frequency.access; } ySize+=64; @@ -129,13 +132,13 @@ public class GuiTeleporter extends GuiMekanism if(item.getFrequency(stack) != null) { - privateMode = item.isPrivateMode(itemStack); + access = item.getAccess(itemStack); setFrequency(item.getFrequency(stack)); } else { Mekanism.packetHandler.sendToServer(new PortableTeleporterMessage(PortableTeleporterPacketType.DATA_REQUEST, clientFreq)); } - + ySize = 175; } @@ -149,9 +152,10 @@ public class GuiTeleporter extends GuiMekanism buttonList.clear(); - publicButton = new GuiButton(0, guiWidth + 27, guiHeight + 14, 60, 20, LangUtils.localize("gui.public")); - privateButton = new GuiButton(1, guiWidth + 89, guiHeight + 14, 60, 20, LangUtils.localize("gui.private")); - + publicButton = new GuiButton(0, guiWidth + 27, guiHeight + 14, 40, 20, LangUtils.localize("gui.public")); + privateButton = new GuiButton(1, guiWidth + 69, guiHeight + 14, 40, 20, LangUtils.localize("gui.private")); + protectedButton = new GuiButton(5, guiWidth + 111, guiHeight + 14, 40, 20, LangUtils.localize("gui.trusted")); + setButton = new GuiButton(2, guiWidth + 27, guiHeight + 116, 60, 20, LangUtils.localize("gui.set")); deleteButton = new GuiButton(3, guiWidth + 89, guiHeight + 116, 60, 20, LangUtils.localize("gui.delete")); @@ -168,13 +172,14 @@ public class GuiTeleporter extends GuiMekanism buttonList.add(publicButton); buttonList.add(privateButton); + buttonList.add(protectedButton); buttonList.add(setButton); buttonList.add(deleteButton); if(itemStack != null) { buttonList.add(teleportButton); - + if(!isInit) { Mekanism.packetHandler.sendToServer(new PortableTeleporterMessage(PortableTeleporterPacketType.DATA_REQUEST, clientFreq)); @@ -197,12 +202,12 @@ public class GuiTeleporter extends GuiMekanism ArrayList data = new ArrayList(); data.add(0); data.add(freq); - data.add(!privateMode); + data.add(access.ordinal()); Mekanism.packetHandler.sendToServer(new TileEntityMessage(Coord4D.get(tileEntity), data)); } else { - Frequency newFreq = new Frequency(freq, null).setPublic(!privateMode); + Frequency newFreq = new Frequency(freq, null).setAccess(access); Mekanism.packetHandler.sendToServer(new PortableTeleporterMessage(PortableTeleporterPacketType.SET_FREQ, newFreq)); } @@ -210,7 +215,14 @@ public class GuiTeleporter extends GuiMekanism public String getSecurity(Frequency freq) { - return !freq.publicFreq ? EnumColor.DARK_RED + LangUtils.localize("gui.private") : LangUtils.localize("gui.public"); + + if(freq.isPrivate()) { + return EnumColor.DARK_RED + LangUtils.localize("gui.private"); + } else if(freq.isPublic()) { + return LangUtils.localize("gui.public"); + } + + return EnumColor.ORANGE + LangUtils.localize("gui.trusted"); } public void updateButtons() @@ -221,37 +233,52 @@ public class GuiTeleporter extends GuiMekanism } List text = new ArrayList(); - - if(privateMode) - { + + if(access == ISecurityTile.SecurityMode.PRIVATE) { for(Frequency freq : getPrivateCache()) { text.add(freq.name); } - } - else { + + publicButton.enabled = true; + privateButton.enabled = false; + protectedButton.enabled = true; + } else if(access == ISecurityTile.SecurityMode.PUBLIC) { for(Frequency freq : getPublicCache()) { text.add(freq.name + " (" + freq.owner + ")"); } - } - - scrollList.setText(text); - - if(privateMode) - { - publicButton.enabled = true; - privateButton.enabled = false; - } - else { + publicButton.enabled = false; privateButton.enabled = true; + protectedButton.enabled = true; + } else { + for(Frequency freq : getProtectedCache()) + { + text.add(freq.name + " (" + freq.owner + ")"); + } + + publicButton.enabled = true; + privateButton.enabled = true; + protectedButton.enabled = false; } + + scrollList.setText(text); + if(scrollList.hasSelection()) { - Frequency freq = privateMode ? getPrivateCache().get(scrollList.selected) : getPublicCache().get(scrollList.selected); - + + Frequency freq; + + if(access == ISecurityTile.SecurityMode.PRIVATE) { + freq = getPrivateCache().get(scrollList.selected); + } else if(access == ISecurityTile.SecurityMode.PUBLIC) { + freq = getPublicCache().get(scrollList.selected); + } else { + freq = getProtectedCache().get(scrollList.selected); + } + if(getFrequency() == null || !getFrequency().equals(freq)) { setButton.enabled = true; @@ -350,11 +377,11 @@ public class GuiTeleporter extends GuiMekanism if(guibutton.id == 0) { - privateMode = false; + access = ISecurityTile.SecurityMode.PUBLIC; } else if(guibutton.id == 1) { - privateMode = true; + access = ISecurityTile.SecurityMode.PRIVATE; } else if(guibutton.id == 2) { @@ -362,7 +389,16 @@ public class GuiTeleporter extends GuiMekanism if(selection != -1) { - Frequency freq = privateMode ? getPrivateCache().get(selection) : getPublicCache().get(selection); + Frequency freq; + + if(access == ISecurityTile.SecurityMode.PRIVATE) { + freq = getPrivateCache().get(scrollList.selected); + } else if(access == ISecurityTile.SecurityMode.PUBLIC) { + freq = getPublicCache().get(scrollList.selected); + } else { + freq = getProtectedCache().get(scrollList.selected); + } + setFrequency(freq.name); } } @@ -372,14 +408,23 @@ public class GuiTeleporter extends GuiMekanism if(selection != -1) { - Frequency freq = privateMode ? getPrivateCache().get(selection) : getPublicCache().get(selection); - + + Frequency freq; + + if(access == ISecurityTile.SecurityMode.PRIVATE) { + freq = getPrivateCache().get(scrollList.selected); + } else if(access == ISecurityTile.SecurityMode.PUBLIC) { + freq = getPublicCache().get(scrollList.selected); + } else { + freq = getProtectedCache().get(scrollList.selected); + } + if(tileEntity != null) { ArrayList data = new ArrayList(); data.add(1); data.add(freq.name); - data.add(freq.publicFreq); + data.add(freq.access.ordinal()); Mekanism.packetHandler.sendToServer(new TileEntityMessage(Coord4D.get(tileEntity), data)); } @@ -398,6 +443,8 @@ public class GuiTeleporter extends GuiMekanism mc.setIngameFocus(); Mekanism.packetHandler.sendToServer(new PortableTeleporterMessage(PortableTeleporterPacketType.TELEPORT, clientFreq)); } + } else if(guibutton.id == 5) { + access = ISecurityTile.SecurityMode.TRUSTED; } updateButtons(); @@ -507,7 +554,12 @@ public class GuiTeleporter extends GuiMekanism { return tileEntity != null ? tileEntity.privateCache : clientPrivateCache; } - + + private List getProtectedCache() + { + return tileEntity != null ? tileEntity.protectedCache : clientProtectedCache; + } + private Frequency getFrequency() { return tileEntity != null ? tileEntity.frequency : clientFreq; diff --git a/src/main/java/mekanism/common/Mekanism.java b/src/main/java/mekanism/common/Mekanism.java index 900b06960..c1479a508 100644 --- a/src/main/java/mekanism/common/Mekanism.java +++ b/src/main/java/mekanism/common/Mekanism.java @@ -181,10 +181,12 @@ public class Mekanism /** FrequencyManagers for various networks */ public static FrequencyManager publicTeleporters = new FrequencyManager(Frequency.class, Frequency.TELEPORTER); public static Map privateTeleporters = new HashMap(); - + public static Map protectedTeleporters = new HashMap(); + public static FrequencyManager publicEntangloporters = new FrequencyManager(InventoryFrequency.class, InventoryFrequency.ENTANGLOPORTER); public static Map privateEntangloporters = new HashMap(); - + public static Map protectedEntangloporters = new HashMap(); + public static FrequencyManager securityFrequencies = new FrequencyManager(SecurityFrequency.class, SecurityFrequency.SECURITY); /** Mekanism creative tab */ @@ -1193,8 +1195,10 @@ public class Mekanism activeVibrators.clear(); worldTickHandler.resetRegenChunks(); privateTeleporters.clear(); + protectedTeleporters.clear(); privateEntangloporters.clear(); - + protectedEntangloporters.clear(); + //Reset consistent managers MultiblockManager.reset(); FrequencyManager.reset(); diff --git a/src/main/java/mekanism/common/frequency/Frequency.java b/src/main/java/mekanism/common/frequency/Frequency.java index 11c8cbeae..1e7d4200f 100644 --- a/src/main/java/mekanism/common/frequency/Frequency.java +++ b/src/main/java/mekanism/common/frequency/Frequency.java @@ -8,137 +8,132 @@ import java.util.Set; import mekanism.api.Coord4D; import mekanism.common.PacketHandler; +import mekanism.common.security.ISecurityTile; import net.minecraft.nbt.NBTTagCompound; -public class Frequency -{ - public static final String TELEPORTER = "Teleporter"; - - public String name; - public String owner; - - public boolean valid = true; - - public boolean publicFreq; - - public Set activeCoords = new HashSet(); - - public Frequency(String n, String o) - { - name = n; - owner = o; - } - - public Frequency(NBTTagCompound nbtTags) - { - read(nbtTags); - } - - public Frequency(ByteBuf dataStream) - { - read(dataStream); - } - - public Frequency setPublic(boolean isPublic) - { - publicFreq = isPublic; - - return this; - } - - public boolean isPublic() - { - return publicFreq; - } - - public boolean isPrivate() - { - return !publicFreq; - } - - public Coord4D getClosestCoords(Coord4D coord) - { - Coord4D closest = null; - - for(Coord4D iterCoord : activeCoords) - { - if(iterCoord.equals(coord)) - { - continue; - } - - if(closest == null) - { - closest = iterCoord; - continue; - } - - if(coord.dimensionId != closest.dimensionId && coord.dimensionId == iterCoord.dimensionId) - { - closest = iterCoord; - continue; - } - else if(coord.dimensionId == closest.dimensionId && coord.dimensionId != iterCoord.dimensionId) - { - continue; - } - else { - if(coord.distanceTo(closest) > coord.distanceTo(iterCoord)) - { - closest = iterCoord; - continue; - } - else { - continue; - } - } - } - - return closest; - } - - public void write(NBTTagCompound nbtTags) - { - nbtTags.setString("name", name); - nbtTags.setString("owner", owner); - nbtTags.setBoolean("publicFreq", publicFreq); - } +public class Frequency { + public static final String TELEPORTER = "Teleporter"; - protected void read(NBTTagCompound nbtTags) - { - name = nbtTags.getString("name"); - owner = nbtTags.getString("owner"); - publicFreq = nbtTags.getBoolean("publicFreq"); - } + public String name; + public String owner; - public void write(ArrayList data) - { - data.add(name); - data.add(owner); - data.add(publicFreq); - } + public boolean valid = true; - protected void read(ByteBuf dataStream) - { - name = PacketHandler.readString(dataStream); - owner = PacketHandler.readString(dataStream); - publicFreq = dataStream.readBoolean(); - } - - @Override - public int hashCode() - { - int code = 1; - code = 31 * code + name.hashCode(); - code = 31 * code + owner.hashCode(); - code = 31 * code + (publicFreq ? 1 : 0); - return code; - } + public ISecurityTile.SecurityMode access; - @Override - public boolean equals(Object obj) - { - return obj instanceof Frequency && ((Frequency)obj).name.equals(name) - && ((Frequency)obj).owner.equals(owner) && ((Frequency)obj).publicFreq == publicFreq; - } + public Set activeCoords = new HashSet(); + + public Frequency(String n, String o) { + name = n; + owner = o; + } + + public Frequency(NBTTagCompound nbtTags) { + read(nbtTags); + } + + public Frequency(ByteBuf dataStream) { + read(dataStream); + } + + public Frequency setAccess(ISecurityTile.SecurityMode access) { + this.access = access; + + return this; + } + + public boolean isPublic() { + return access == ISecurityTile.SecurityMode.PUBLIC; + } + + public boolean isPrivate() { + return access == ISecurityTile.SecurityMode.PRIVATE; + } + + public boolean isProtected() { + return access == ISecurityTile.SecurityMode.TRUSTED; + } + + public Coord4D getClosestCoords(Coord4D coord) { + Coord4D closest = null; + + for (Coord4D iterCoord : activeCoords) { + if (iterCoord.equals(coord)) { + continue; + } + + if (closest == null) { + closest = iterCoord; + continue; + } + + if (coord.dimensionId != closest.dimensionId && coord.dimensionId == iterCoord.dimensionId) { + closest = iterCoord; + continue; + } else if (coord.dimensionId == closest.dimensionId && coord.dimensionId != iterCoord.dimensionId) { + continue; + } else { + if (coord.distanceTo(closest) > coord.distanceTo(iterCoord)) { + closest = iterCoord; + continue; + } else { + continue; + } + } + } + + return closest; + } + + public void write(NBTTagCompound nbtTags) { + nbtTags.setString("name", name); + nbtTags.setString("owner", owner); + nbtTags.setInteger("access", access.ordinal()); + //nbtTags.setBoolean("publicFreq", publicFreq); + } + + protected void read(NBTTagCompound nbtTags) { + name = nbtTags.getString("name"); + owner = nbtTags.getString("owner"); + + if (nbtTags.hasKey("access")) { + access = ISecurityTile.SecurityMode.values()[nbtTags.getInteger("access")]; + } else { + boolean isPublic = nbtTags.getBoolean("publicFreq"); + if (isPublic) { + access = ISecurityTile.SecurityMode.PUBLIC; + } else { + access = ISecurityTile.SecurityMode.PRIVATE; + } + } + } + + public void write(ArrayList data) { + data.add(name); + data.add(owner); + data.add(access.ordinal()); + } + + protected void read(ByteBuf dataStream) { + name = PacketHandler.readString(dataStream); + owner = PacketHandler.readString(dataStream); + + access = ISecurityTile.SecurityMode.values()[dataStream.readInt()]; + //publicFreq = dataStream.readBoolean(); + } + + @Override + public int hashCode() { + int code = 1; + code = 31 * code + name.hashCode(); + code = 31 * code + owner.hashCode(); + code = 31 * code + access.hashCode(); + return code; + } + + @Override + public boolean equals(Object obj) { + return obj instanceof Frequency && ((Frequency) obj).name.equals(name) + && ((Frequency) obj).owner.equals(owner) && ((Frequency) obj).access == access; + } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/item/ItemPortableTeleporter.java b/src/main/java/mekanism/common/item/ItemPortableTeleporter.java index 425ce7370..52b932cf2 100644 --- a/src/main/java/mekanism/common/item/ItemPortableTeleporter.java +++ b/src/main/java/mekanism/common/item/ItemPortableTeleporter.java @@ -6,6 +6,7 @@ import mekanism.api.Coord4D; import mekanism.api.EnumColor; import mekanism.common.Mekanism; import mekanism.common.security.IOwnerItem; +import mekanism.common.security.ISecurityTile; import mekanism.common.util.LangUtils; import mekanism.common.util.SecurityUtils; import net.minecraft.entity.Entity; @@ -30,7 +31,17 @@ public class ItemPortableTeleporter extends ItemEnergized implements IOwnerItem if(getFrequency(itemstack) != null) { list.add(EnumColor.INDIGO + LangUtils.localize("gui.frequency") + ": " + EnumColor.GREY + getFrequency(itemstack)); - list.add(EnumColor.INDIGO + LangUtils.localize("gui.mode") + ": " + EnumColor.GREY + LangUtils.localize("gui." + (isPrivateMode(itemstack) ? "private" : "public"))); + + String name = "trusted"; + + ISecurityTile.SecurityMode access= getAccess(itemstack); + if(access == ISecurityTile.SecurityMode.PUBLIC) { + name = "public"; + } else if(access == ISecurityTile.SecurityMode.PRIVATE) { + name = "private"; + } + + list.add(EnumColor.INDIGO + LangUtils.localize("gui.mode") + ": " + EnumColor.GREY + LangUtils.localize("gui." + name)); } super.addInformation(itemstack, entityplayer, list, flag); @@ -102,7 +113,7 @@ public class ItemPortableTeleporter extends ItemEnergized implements IOwnerItem public void setOwner(ItemStack stack, String owner) { setFrequency(stack, null); - setPrivateMode(stack, false); + setAccess(stack, ISecurityTile.SecurityMode.PUBLIC); if(owner == null || owner.isEmpty()) { @@ -119,24 +130,31 @@ public class ItemPortableTeleporter extends ItemEnergized implements IOwnerItem return true; } - public boolean isPrivateMode(ItemStack stack) + public ISecurityTile.SecurityMode getAccess(ItemStack stack) { if(stack.stackTagCompound != null) { - return stack.stackTagCompound.getBoolean("private"); + if(stack.stackTagCompound.hasKey("access")) { + return ISecurityTile.SecurityMode.values()[stack.stackTagCompound.getInteger("access")]; + } else { + boolean priv = stack.stackTagCompound.getBoolean("private"); + + if(priv) + return ISecurityTile.SecurityMode.PRIVATE; + } } - return false; + return ISecurityTile.SecurityMode.PUBLIC; } - public void setPrivateMode(ItemStack stack, boolean isPrivate) + public void setAccess(ItemStack stack, ISecurityTile.SecurityMode access) { if(stack.stackTagCompound == null) { stack.setTagCompound(new NBTTagCompound()); } - stack.stackTagCompound.setBoolean("private", isPrivate); + stack.stackTagCompound.setInteger("access", access.ordinal()); } public String getFrequency(ItemStack stack) diff --git a/src/main/java/mekanism/common/network/PacketPortableTeleporter.java b/src/main/java/mekanism/common/network/PacketPortableTeleporter.java index 1568e98a9..d2456af2c 100644 --- a/src/main/java/mekanism/common/network/PacketPortableTeleporter.java +++ b/src/main/java/mekanism/common/network/PacketPortableTeleporter.java @@ -3,7 +3,9 @@ package mekanism.common.network; import io.netty.buffer.ByteBuf; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import java.util.Map; import mekanism.api.Coord4D; import mekanism.api.Range4D; @@ -15,6 +17,8 @@ import mekanism.common.frequency.FrequencyManager; import mekanism.common.item.ItemPortableTeleporter; import mekanism.common.network.PacketPortableTeleporter.PortableTeleporterMessage; import mekanism.common.network.PacketPortalFX.PortalFXMessage; +import mekanism.common.security.ISecurityTile; +import mekanism.common.security.SecurityFrequency; import mekanism.common.tile.TileEntityTeleporter; import mekanism.common.util.MekanismUtils; import net.minecraft.entity.player.EntityPlayer; @@ -27,363 +31,334 @@ import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; -public class PacketPortableTeleporter implements IMessageHandler -{ - @Override - public IMessage onMessage(PortableTeleporterMessage message, MessageContext context) - { - EntityPlayer player = PacketHandler.getPlayer(context); - ItemStack itemstack = player.getCurrentEquippedItem(); - World world = player.worldObj; - - if(itemstack != null && itemstack.getItem() instanceof ItemPortableTeleporter) - { - ItemPortableTeleporter item = (ItemPortableTeleporter)itemstack.getItem(); - - switch(message.packetType) - { - case DATA_REQUEST: - sendDataResponse(message.frequency, world, player, item, itemstack); - break; - case DATA_RESPONSE: - Mekanism.proxy.handleTeleporterUpdate(message); - break; - case SET_FREQ: - FrequencyManager manager1 = getManager(message.frequency.isPublic() ? null : player.getCommandSenderName(), world); - Frequency toUse = null; - - for(Frequency freq : manager1.getFrequencies()) - { - if(freq.name.equals(message.frequency.name)) - { - toUse = freq; - break; - } - } - - if(toUse == null) - { - toUse = new Frequency(message.frequency.name, player.getCommandSenderName()).setPublic(message.frequency.isPublic()); - manager1.addFrequency(toUse); - } - - item.setFrequency(itemstack, toUse.name); - item.setPrivateMode(itemstack, !toUse.publicFreq); - - sendDataResponse(toUse, world, player, item, itemstack); - - break; - case DEL_FREQ: - FrequencyManager manager = getManager(message.frequency.isPublic() ? null : player.getCommandSenderName(), world); - manager.remove(message.frequency.name, player.getCommandSenderName()); - - item.setFrequency(itemstack, null); - item.setPrivateMode(itemstack, false); - - break; - case TELEPORT: - FrequencyManager manager2 = getManager(message.frequency.isPublic() ? null : player.getCommandSenderName(), world); - Frequency found = null; - - for(Frequency freq : manager2.getFrequencies()) - { - if(message.frequency.name.equals(freq.name)) - { - found = freq; - break; - } - } - - if(found == null) - { - break; - } - - Coord4D coords = found.getClosestCoords(new Coord4D(player)); - - if(coords != null) - { - World teleWorld = FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(coords.dimensionId); - TileEntityTeleporter teleporter = (TileEntityTeleporter)coords.getTileEntity(teleWorld); - - if(teleporter != null) - { - try { - teleporter.didTeleport.add(player.getPersistentID()); - teleporter.teleDelay = 5; - - item.setEnergy(itemstack, item.getEnergy(itemstack) - item.calculateEnergyCost(player, coords)); - - if(player instanceof EntityPlayerMP) - { - MekanismUtils.setPrivateValue(((EntityPlayerMP)player).playerNetServerHandler, 0, NetHandlerPlayServer.class, ObfuscatedNames.NetHandlerPlayServer_floatingTickCount); - } - - player.closeScreen(); - - Mekanism.packetHandler.sendToAllAround(new PortalFXMessage(new Coord4D(player)), coords.getTargetPoint(40D)); - TileEntityTeleporter.teleportPlayerTo((EntityPlayerMP)player, coords, teleporter); - TileEntityTeleporter.alignPlayer((EntityPlayerMP)player, coords); - - world.playSoundAtEntity(player, "mob.endermen.portal", 1.0F, 1.0F); - Mekanism.packetHandler.sendToReceivers(new PortalFXMessage(coords), new Range4D(coords)); - } catch(Exception e) {} - } - } - - break; - } - } - - return null; - } - - public void sendDataResponse(Frequency given, World world, EntityPlayer player, ItemPortableTeleporter item, ItemStack itemstack) - { - List publicFreqs = new ArrayList(); - - for(Frequency f : getManager(null, world).getFrequencies()) - { - publicFreqs.add(f); - } - - List privateFreqs = new ArrayList(); - - for(Frequency f : getManager(player.getCommandSenderName(), world).getFrequencies()) - { - privateFreqs.add(f); - } - - byte status = 3; - - if(given != null) - { - FrequencyManager manager = given.isPublic() ? getManager(null, world) : getManager(player.getCommandSenderName(), world); - boolean found = false; - - for(Frequency iterFreq : manager.getFrequencies()) - { - if(given.equals(iterFreq)) - { - given = iterFreq; - found = true; - - break; - } - } - - if(!found) - { - given = null; - } - } - - if(given != null) - { - if(given.activeCoords.size() == 0) - { - status = 3; - } - else { - Coord4D coords = given.getClosestCoords(new Coord4D(player)); - double energyNeeded = item.calculateEnergyCost(player, coords); - - if(energyNeeded > item.getEnergy(itemstack)) - { - status = 4; - } - else { - status = 1; - } - } - } - - Mekanism.packetHandler.sendTo(new PortableTeleporterMessage(given, status, publicFreqs, privateFreqs), (EntityPlayerMP)player); - } - - public FrequencyManager getManager(String owner, World world) - { - if(owner == null) - { - return Mekanism.publicTeleporters; - } - else { - if(!Mekanism.privateTeleporters.containsKey(owner)) - { - FrequencyManager manager = new FrequencyManager(Frequency.class, owner); - Mekanism.privateTeleporters.put(owner, manager); - manager.createOrLoad(world); - } - - return Mekanism.privateTeleporters.get(owner); - } - } - - public static class PortableTeleporterMessage implements IMessage - { - public PortableTeleporterPacketType packetType; - public Frequency frequency; - public byte status; - - public List publicCache = new ArrayList(); - public List privateCache = new ArrayList(); - - public PortableTeleporterMessage() {} - - public PortableTeleporterMessage(PortableTeleporterPacketType type, Frequency freq) - { - packetType = type; - - if(type == PortableTeleporterPacketType.DATA_REQUEST) - { - frequency = freq; - } - else if(type == PortableTeleporterPacketType.SET_FREQ) - { - frequency = freq; - } - else if(type == PortableTeleporterPacketType.DEL_FREQ) - { - frequency = freq; - } - else if(type == PortableTeleporterPacketType.TELEPORT) - { - frequency = freq; - } - } - - public PortableTeleporterMessage(Frequency freq, byte b, List publicFreqs, List privateFreqs) - { - packetType = PortableTeleporterPacketType.DATA_RESPONSE; - - frequency = freq; - status = b; - - publicCache = publicFreqs; - privateCache = privateFreqs; - } - - @Override - public void toBytes(ByteBuf buffer) - { - buffer.writeInt(packetType.ordinal()); - - if(packetType == PortableTeleporterPacketType.DATA_REQUEST) - { - if(frequency != null) - { - buffer.writeBoolean(true); - PacketHandler.writeString(buffer, frequency.name); - buffer.writeBoolean(frequency.publicFreq); - } - else { - buffer.writeBoolean(false); - } - } - else if(packetType == PortableTeleporterPacketType.DATA_RESPONSE) - { - if(frequency != null) - { - buffer.writeBoolean(true); - PacketHandler.writeString(buffer, frequency.name); - buffer.writeBoolean(frequency.publicFreq); - } - else { - buffer.writeBoolean(false); - } - - buffer.writeByte(status); - - ArrayList data = new ArrayList(); - data.add(publicCache.size()); - - for(Frequency freq : publicCache) - { - freq.write(data); - } - - data.add(privateCache.size()); - - for(Frequency freq : privateCache) - { - freq.write(data); - } - - PacketHandler.encode(data.toArray(), buffer); - } - else if(packetType == PortableTeleporterPacketType.SET_FREQ) - { - PacketHandler.writeString(buffer, frequency.name); - buffer.writeBoolean(frequency.publicFreq); - } - else if(packetType == PortableTeleporterPacketType.DEL_FREQ) - { - PacketHandler.writeString(buffer, frequency.name); - buffer.writeBoolean(frequency.publicFreq); - } - else if(packetType == PortableTeleporterPacketType.TELEPORT) - { - PacketHandler.writeString(buffer, frequency.name); - buffer.writeBoolean(frequency.publicFreq); - } - } - - @Override - public void fromBytes(ByteBuf buffer) - { - packetType = PortableTeleporterPacketType.values()[buffer.readInt()]; - - if(packetType == PortableTeleporterPacketType.DATA_REQUEST) - { - if(buffer.readBoolean()) - { - frequency = new Frequency(PacketHandler.readString(buffer), null).setPublic(buffer.readBoolean()); - } - } - else if(packetType == PortableTeleporterPacketType.DATA_RESPONSE) - { - if(buffer.readBoolean()) - { - frequency = new Frequency(PacketHandler.readString(buffer), null).setPublic(buffer.readBoolean()); - } - - status = buffer.readByte(); - - int amount = buffer.readInt(); - - for(int i = 0; i < amount; i++) - { - publicCache.add(new Frequency(buffer)); - } - - amount = buffer.readInt(); - - for(int i = 0; i < amount; i++) - { - privateCache.add(new Frequency(buffer)); - } - } - else if(packetType == PortableTeleporterPacketType.SET_FREQ) - { - frequency = new Frequency(PacketHandler.readString(buffer), null).setPublic(buffer.readBoolean()); - } - else if(packetType == PortableTeleporterPacketType.DEL_FREQ) - { - frequency = new Frequency(PacketHandler.readString(buffer), null).setPublic(buffer.readBoolean()); - } - else if(packetType == PortableTeleporterPacketType.TELEPORT) - { - frequency = new Frequency(PacketHandler.readString(buffer), null).setPublic(buffer.readBoolean()); - } - } - } - - public static enum PortableTeleporterPacketType - { - DATA_REQUEST, - DATA_RESPONSE, - SET_FREQ, - DEL_FREQ, - TELEPORT; - } +public class PacketPortableTeleporter implements IMessageHandler { + @Override + public IMessage onMessage(PortableTeleporterMessage message, MessageContext context) { + EntityPlayer player = PacketHandler.getPlayer(context); + ItemStack itemstack = player.getCurrentEquippedItem(); + World world = player.worldObj; + + if (itemstack != null && itemstack.getItem() instanceof ItemPortableTeleporter) { + ItemPortableTeleporter item = (ItemPortableTeleporter) itemstack.getItem(); + + switch (message.packetType) { + case DATA_REQUEST: + sendDataResponse(message.frequency, world, player, item, itemstack); + break; + case DATA_RESPONSE: + Mekanism.proxy.handleTeleporterUpdate(message); + break; + case SET_FREQ: + FrequencyManager manager1 = getManager(message.frequency.access, player.getCommandSenderName(), world); + Frequency toUse = null; + + for (Frequency freq : manager1.getFrequencies()) { + if (freq.name.equals(message.frequency.name)) { + toUse = freq; + break; + } + } + + if (toUse == null) { + toUse = new Frequency(message.frequency.name, player.getCommandSenderName()).setAccess(message.frequency.access); + manager1.addFrequency(toUse); + } + + item.setFrequency(itemstack, toUse.name); + item.setAccess(itemstack, toUse.access); + + sendDataResponse(toUse, world, player, item, itemstack); + + break; + case DEL_FREQ: + FrequencyManager manager = getManager(message.frequency.access, player.getCommandSenderName(), world); + manager.remove(message.frequency.name, player.getCommandSenderName()); + + item.setFrequency(itemstack, null); + item.setAccess(itemstack, ISecurityTile.SecurityMode.PUBLIC); + + break; + case TELEPORT: + FrequencyManager manager2 = getManager(message.frequency.access,player.getCommandSenderName(), world); + Frequency found = null; + + for (Frequency freq : manager2.getFrequencies()) { + if (message.frequency.name.equals(freq.name)) { + found = freq; + break; + } + } + + if (found == null) { + break; + } + + Coord4D coords = found.getClosestCoords(new Coord4D(player)); + + if (coords != null) { + World teleWorld = FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(coords.dimensionId); + TileEntityTeleporter teleporter = (TileEntityTeleporter) coords.getTileEntity(teleWorld); + + if (teleporter != null) { + try { + teleporter.didTeleport.add(player.getPersistentID()); + teleporter.teleDelay = 5; + + item.setEnergy(itemstack, item.getEnergy(itemstack) - item.calculateEnergyCost(player, coords)); + + if (player instanceof EntityPlayerMP) { + MekanismUtils.setPrivateValue(((EntityPlayerMP) player).playerNetServerHandler, 0, NetHandlerPlayServer.class, ObfuscatedNames.NetHandlerPlayServer_floatingTickCount); + } + + player.closeScreen(); + + Mekanism.packetHandler.sendToAllAround(new PortalFXMessage(new Coord4D(player)), coords.getTargetPoint(40D)); + TileEntityTeleporter.teleportPlayerTo((EntityPlayerMP) player, coords, teleporter); + TileEntityTeleporter.alignPlayer((EntityPlayerMP) player, coords); + + world.playSoundAtEntity(player, "mob.endermen.portal", 1.0F, 1.0F); + Mekanism.packetHandler.sendToReceivers(new PortalFXMessage(coords), new Range4D(coords)); + } catch (Exception e) { + } + } + } + + break; + } + } + + return null; + } + + public void sendDataResponse(Frequency given, World world, EntityPlayer player, ItemPortableTeleporter item, ItemStack itemstack) { + List publicFreqs = new ArrayList(); + + for (Frequency f : getManager(ISecurityTile.SecurityMode.PUBLIC, null, world).getFrequencies()) { + publicFreqs.add(f); + } + + List privateFreqs = new ArrayList(); + + for (Frequency f : getManager(ISecurityTile.SecurityMode.PRIVATE, player.getCommandSenderName(), world).getFrequencies()) { + privateFreqs.add(f); + } + + List protectedFrqs = new ArrayList(); + + for (Frequency frequency : Mekanism.securityFrequencies.getFrequencies()) { + SecurityFrequency secure = (SecurityFrequency) frequency; + if(secure.trusted.contains(player.getCommandSenderName())) { + FrequencyManager protected_ = Mekanism.protectedTeleporters.get(secure.owner); + if(protected_ != null) { + protectedFrqs.addAll(protected_.getFrequencies()); + } + } + } + + protectedFrqs.addAll(getManager(ISecurityTile.SecurityMode.TRUSTED, player.getCommandSenderName(), world).getFrequencies()); + + byte status = 3; + + if (given != null) { + + + + FrequencyManager manager = getManager(given.access, player.getCommandSenderName(), world);// given.isPublic() ? getManager(null, world) : getManager(player.getCommandSenderName(), world); + boolean found = false; + + for (Frequency iterFreq : manager.getFrequencies()) { + if (given.equals(iterFreq)) { + given = iterFreq; + found = true; + + break; + } + } + + if (!found) { + given = null; + } + } + + if (given != null) { + if (given.activeCoords.size() == 0) { + status = 3; + } else { + Coord4D coords = given.getClosestCoords(new Coord4D(player)); + double energyNeeded = item.calculateEnergyCost(player, coords); + + if (energyNeeded > item.getEnergy(itemstack)) { + status = 4; + } else { + status = 1; + } + } + } + + Mekanism.packetHandler.sendTo(new PortableTeleporterMessage(given, status, publicFreqs, privateFreqs, protectedFrqs), (EntityPlayerMP) player); + } + + public FrequencyManager getManager(ISecurityTile.SecurityMode mode, String owner, World world) { + if (mode == ISecurityTile.SecurityMode.PUBLIC) { + return Mekanism.publicTeleporters; + } else if (mode == ISecurityTile.SecurityMode.PRIVATE) { + if (!Mekanism.privateTeleporters.containsKey(owner)) { + FrequencyManager manager = new FrequencyManager(Frequency.class, owner); + Mekanism.privateTeleporters.put(owner, manager); + manager.createOrLoad(world); + } + + return Mekanism.privateTeleporters.get(owner); + } else { + if (!Mekanism.protectedTeleporters.containsKey(owner)) { + FrequencyManager manager = new FrequencyManager(Frequency.class, owner); + Mekanism.protectedTeleporters.put(owner, manager); + manager.createOrLoad(world); + } + + return Mekanism.protectedTeleporters.get(owner); + } + } + + public static class PortableTeleporterMessage implements IMessage { + public PortableTeleporterPacketType packetType; + public Frequency frequency; + public byte status; + + public List publicCache = new ArrayList(); + public List privateCache = new ArrayList(); + public List protectedCache = new ArrayList(); + + public PortableTeleporterMessage() { + } + + public PortableTeleporterMessage(PortableTeleporterPacketType type, Frequency freq) { + packetType = type; + + if (type == PortableTeleporterPacketType.DATA_REQUEST) { + frequency = freq; + } else if (type == PortableTeleporterPacketType.SET_FREQ) { + frequency = freq; + } else if (type == PortableTeleporterPacketType.DEL_FREQ) { + frequency = freq; + } else if (type == PortableTeleporterPacketType.TELEPORT) { + frequency = freq; + } + } + + public PortableTeleporterMessage(Frequency freq, byte b, List publicFreqs, List privateFreqs, List protectedFreqs) { + packetType = PortableTeleporterPacketType.DATA_RESPONSE; + + frequency = freq; + status = b; + + publicCache = publicFreqs; + privateCache = privateFreqs; + protectedCache = protectedFreqs; + } + + @Override + public void toBytes(ByteBuf buffer) { + buffer.writeInt(packetType.ordinal()); + + if (packetType == PortableTeleporterPacketType.DATA_REQUEST) { + if (frequency != null) { + buffer.writeBoolean(true); + PacketHandler.writeString(buffer, frequency.name); + buffer.writeInt(frequency.access.ordinal()); + } else { + buffer.writeBoolean(false); + } + } else if (packetType == PortableTeleporterPacketType.DATA_RESPONSE) { + if (frequency != null) { + buffer.writeBoolean(true); + PacketHandler.writeString(buffer, frequency.name); + buffer.writeInt(frequency.access.ordinal()); + } else { + buffer.writeBoolean(false); + } + + buffer.writeByte(status); + + ArrayList data = new ArrayList(); + data.add(publicCache.size()); + + for (Frequency freq : publicCache) { + freq.write(data); + } + + data.add(privateCache.size()); + + for (Frequency freq : privateCache) { + freq.write(data); + } + + data.add(protectedCache.size()); + + for (Frequency freq : protectedCache) { + freq.write(data); + } + + PacketHandler.encode(data.toArray(), buffer); + } else if (packetType == PortableTeleporterPacketType.SET_FREQ) { + PacketHandler.writeString(buffer, frequency.name); + buffer.writeInt(frequency.access.ordinal()); + } else if (packetType == PortableTeleporterPacketType.DEL_FREQ) { + PacketHandler.writeString(buffer, frequency.name); + buffer.writeInt(frequency.access.ordinal()); + } else if (packetType == PortableTeleporterPacketType.TELEPORT) { + PacketHandler.writeString(buffer, frequency.name); + buffer.writeInt(frequency.access.ordinal()); + } + } + + @Override + public void fromBytes(ByteBuf buffer) { + packetType = PortableTeleporterPacketType.values()[buffer.readInt()]; + + if (packetType == PortableTeleporterPacketType.DATA_REQUEST) { + if (buffer.readBoolean()) { + frequency = new Frequency(PacketHandler.readString(buffer), null).setAccess(ISecurityTile.SecurityMode.values()[buffer.readInt()]); + } + } else if (packetType == PortableTeleporterPacketType.DATA_RESPONSE) { + if (buffer.readBoolean()) { + frequency = new Frequency(PacketHandler.readString(buffer), null).setAccess(ISecurityTile.SecurityMode.values()[buffer.readInt()]); + } + + status = buffer.readByte(); + + int amount = buffer.readInt(); + + for (int i = 0; i < amount; i++) { + publicCache.add(new Frequency(buffer)); + } + + amount = buffer.readInt(); + + for (int i = 0; i < amount; i++) { + privateCache.add(new Frequency(buffer)); + } + + amount = buffer.readInt(); + for (int i = 0; i < amount; i++) { + protectedCache.add(new Frequency(buffer)); + } + + } else if (packetType == PortableTeleporterPacketType.SET_FREQ) { + frequency = new Frequency(PacketHandler.readString(buffer), null).setAccess(ISecurityTile.SecurityMode.values()[buffer.readInt()]); + } else if (packetType == PortableTeleporterPacketType.DEL_FREQ) { + frequency = new Frequency(PacketHandler.readString(buffer), null).setAccess(ISecurityTile.SecurityMode.values()[buffer.readInt()]); + } else if (packetType == PortableTeleporterPacketType.TELEPORT) { + frequency = new Frequency(PacketHandler.readString(buffer), null).setAccess(ISecurityTile.SecurityMode.values()[buffer.readInt()]); + } + } + } + + public static enum PortableTeleporterPacketType { + DATA_REQUEST, + DATA_RESPONSE, + SET_FREQ, + DEL_FREQ, + TELEPORT; + } } diff --git a/src/main/java/mekanism/common/tile/TileEntityQuantumEntangloporter.java b/src/main/java/mekanism/common/tile/TileEntityQuantumEntangloporter.java index 130c4a499..c87f7d001 100644 --- a/src/main/java/mekanism/common/tile/TileEntityQuantumEntangloporter.java +++ b/src/main/java/mekanism/common/tile/TileEntityQuantumEntangloporter.java @@ -24,6 +24,7 @@ import mekanism.common.frequency.FrequencyManager; import mekanism.common.frequency.IFrequencyHandler; import mekanism.common.integration.IComputerIntegration; import mekanism.common.security.ISecurityTile; +import mekanism.common.security.SecurityFrequency; import mekanism.common.tile.component.TileComponentConfig; import mekanism.common.tile.component.TileComponentEjector; import mekanism.common.tile.component.TileComponentSecurity; @@ -51,6 +52,7 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp public double lastEnvironmentLoss; public List publicCache = new ArrayList(); + public List protectedCache = new ArrayList(); public List privateCache = new ArrayList(); public static final EnumSet nothing = EnumSet.noneOf(ForgeDirection.class); @@ -186,7 +188,7 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp { return Mekanism.publicEntangloporters; } - else { + else if(freq.isPrivate()) { if(!Mekanism.privateEntangloporters.containsKey(getSecurity().getOwner())) { FrequencyManager manager = new FrequencyManager(InventoryFrequency.class, InventoryFrequency.ENTANGLOPORTER, getSecurity().getOwner()); @@ -195,12 +197,21 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp } return Mekanism.privateEntangloporters.get(getSecurity().getOwner()); + } else { + if(!Mekanism.protectedEntangloporters.containsKey(getSecurity().getOwner())) + { + FrequencyManager manager = new FrequencyManager(InventoryFrequency.class, InventoryFrequency.ENTANGLOPORTER + "#protected", getSecurity().getOwner()); + Mekanism.protectedEntangloporters.put(getSecurity().getOwner(), manager); + manager.createOrLoad(worldObj); + } + + return Mekanism.protectedEntangloporters.get(getSecurity().getOwner()); } } - public void setFrequency(String name, boolean publicFreq) + public void setFrequency(String name, ISecurityTile.SecurityMode access) { - FrequencyManager manager = getManager(new InventoryFrequency(name, null).setPublic(publicFreq)); + FrequencyManager manager = getManager(new InventoryFrequency(name, null).setAccess(access)); manager.deactivate(Coord4D.get(this)); for(Frequency freq : manager.getFrequencies()) @@ -216,7 +227,7 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp } } - Frequency freq = new InventoryFrequency(name, getSecurity().getOwner()).setPublic(publicFreq); + Frequency freq = new InventoryFrequency(name, getSecurity().getOwner()).setAccess(access); freq.activeCoords.add(Coord4D.get(this)); manager.addFrequency(freq); frequency = (InventoryFrequency)freq; @@ -260,16 +271,14 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp if(type == 0) { String name = PacketHandler.readString(dataStream); - boolean isPublic = dataStream.readBoolean(); - - setFrequency(name, isPublic); + + setFrequency(name, ISecurityTile.SecurityMode.values()[dataStream.readInt()]); } else if(type == 1) { String freq = PacketHandler.readString(dataStream); - boolean isPublic = dataStream.readBoolean(); - - FrequencyManager manager = getManager(new InventoryFrequency(freq, null).setPublic(isPublic)); + + FrequencyManager manager = getManager(new InventoryFrequency(freq, null).setAccess(ISecurityTile.SecurityMode.values()[dataStream.readInt()])); if(manager != null) { @@ -297,7 +306,8 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp publicCache.clear(); privateCache.clear(); - + protectedCache.clear(); + int amount = dataStream.readInt(); for(int i = 0; i < amount; i++) @@ -311,6 +321,13 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp { privateCache.add(new InventoryFrequency(dataStream)); } + + amount = dataStream.readInt(); + + for(int i = 0; i < amount; i++) + { + protectedCache.add(new InventoryFrequency(dataStream)); + } } } @@ -338,7 +355,7 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp freq.write(data); } - FrequencyManager manager = getManager(new InventoryFrequency(null, null).setPublic(false)); + FrequencyManager manager = getManager(new InventoryFrequency(null, null).setAccess(SecurityMode.PRIVATE)); if(manager != null) { @@ -352,6 +369,27 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp else { data.add(0); } + + List protectedFrqs = new ArrayList(); + + for (Frequency frequency : Mekanism.securityFrequencies.getFrequencies()) { + SecurityFrequency secure = (SecurityFrequency) frequency; + if(secure.trusted.contains(getSecurity().getOwner())) { + FrequencyManager protected_ = Mekanism.protectedEntangloporters.get(secure.owner); + if(protected_ != null) { + protectedFrqs.addAll(protected_.getFrequencies()); + } + } + } + + if(getSecurity().getOwner() != null) + protectedFrqs.addAll(getManager(new Frequency(null, null).setAccess(SecurityMode.TRUSTED)).getFrequencies()); + + data.add(protectedFrqs.size()); + + for (Frequency freq : protectedFrqs) { + freq.write(data); + } return data; } @@ -680,15 +718,15 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp switch(method) { case 0: - if(!(arguments[0] instanceof String) || !(arguments[1] instanceof Boolean)) + if(!(arguments[0] instanceof String) || !(arguments[1] instanceof Integer)) { return new Object[] {"Invalid parameters."}; } String freq = ((String)arguments[0]).trim(); - boolean isPublic = (Boolean)arguments[1]; + int access = (int)arguments[1]; - setFrequency(freq, isPublic); + setFrequency(freq, ISecurityTile.SecurityMode.values()[access]); return new Object[] {"Frequency set."}; default: diff --git a/src/main/java/mekanism/common/tile/TileEntitySecurityDesk.java b/src/main/java/mekanism/common/tile/TileEntitySecurityDesk.java index bbd60a9ec..37385d396 100644 --- a/src/main/java/mekanism/common/tile/TileEntitySecurityDesk.java +++ b/src/main/java/mekanism/common/tile/TileEntitySecurityDesk.java @@ -136,7 +136,7 @@ public class TileEntitySecurityDesk extends TileEntityContainerBlock implements } } - Frequency freq = new SecurityFrequency(owner).setPublic(true); + Frequency freq = new SecurityFrequency(owner).setAccess(SecurityMode.PUBLIC); freq.activeCoords.add(Coord4D.get(this)); manager.addFrequency(freq); frequency = (SecurityFrequency)freq; diff --git a/src/main/java/mekanism/common/tile/TileEntityTeleporter.java b/src/main/java/mekanism/common/tile/TileEntityTeleporter.java index 9d732e4b4..f178d0f9d 100644 --- a/src/main/java/mekanism/common/tile/TileEntityTeleporter.java +++ b/src/main/java/mekanism/common/tile/TileEntityTeleporter.java @@ -26,6 +26,7 @@ import mekanism.common.network.PacketEntityMove.EntityMoveMessage; import mekanism.common.network.PacketPortalFX.PortalFXMessage; import mekanism.common.network.PacketTileEntity.TileEntityMessage; import mekanism.common.security.ISecurityTile; +import mekanism.common.security.SecurityFrequency; import mekanism.common.tile.component.TileComponentSecurity; import mekanism.common.util.ChargeUtils; import mekanism.common.util.MekanismUtils; @@ -49,6 +50,7 @@ import net.minecraftforge.common.util.ForgeDirection; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import scala.Int; public class TileEntityTeleporter extends TileEntityElectricBlock implements IComputerIntegration, IChunkLoader, IFrequencyHandler, IRedstoneControl, ISecurityTile { @@ -68,7 +70,8 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo public List publicCache = new ArrayList(); public List privateCache = new ArrayList(); - + public List protectedCache = new ArrayList(); + public Ticket chunkTicket; /** This teleporter's current status. */ @@ -178,9 +181,9 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo return null; } - public void setFrequency(String name, boolean publicFreq) + public void setFrequency(String name, SecurityMode publicFreq) { - FrequencyManager manager = getManager(new Frequency(name, null).setPublic(publicFreq)); + FrequencyManager manager = getManager(new Frequency(name, null).setAccess(publicFreq)); manager.deactivate(Coord4D.get(this)); for(Frequency freq : manager.getFrequencies()) @@ -194,7 +197,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo } } - Frequency freq = new Frequency(name, getSecurity().getOwner()).setPublic(publicFreq); + Frequency freq = new Frequency(name, getSecurity().getOwner()).setAccess(publicFreq); freq.activeCoords.add(Coord4D.get(this)); manager.addFrequency(freq); frequency = freq; @@ -213,7 +216,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo { return Mekanism.publicTeleporters; } - else { + else if(freq.isPrivate()) { if(!Mekanism.privateTeleporters.containsKey(getSecurity().getOwner())) { FrequencyManager manager = new FrequencyManager(Frequency.class, Frequency.TELEPORTER, getSecurity().getOwner()); @@ -222,6 +225,15 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo } return Mekanism.privateTeleporters.get(getSecurity().getOwner()); + } else { + if(!Mekanism.protectedTeleporters.containsKey( getSecurity().getOwner())) + { + FrequencyManager manager = new FrequencyManager(Frequency.class, Frequency.TELEPORTER + "protected", getSecurity().getOwner()); + Mekanism.protectedTeleporters.put(getSecurity().getOwner(), manager); + manager.createOrLoad(worldObj); + } + + return Mekanism.protectedTeleporters.get(getSecurity().getOwner()); } } @@ -597,16 +609,16 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo if(type == 0) { String name = PacketHandler.readString(dataStream); - boolean isPublic = dataStream.readBoolean(); + int isPublic = dataStream.readInt(); - setFrequency(name, isPublic); + setFrequency(name, SecurityMode.values()[isPublic]); } else if(type == 1) { String freq = PacketHandler.readString(dataStream); - boolean isPublic = dataStream.readBoolean(); + int isPublic = dataStream.readInt(); - FrequencyManager manager = getManager(new Frequency(freq, null).setPublic(isPublic)); + FrequencyManager manager = getManager(new Frequency(freq, null).setAccess(SecurityMode.values()[isPublic])); if(manager != null) { @@ -635,7 +647,8 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo publicCache.clear(); privateCache.clear(); - + protectedCache.clear(); + int amount = dataStream.readInt(); for(int i = 0; i < amount; i++) @@ -649,6 +662,13 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo { privateCache.add(new Frequency(dataStream)); } + + amount = dataStream.readInt(); + + for(int i = 0; i < amount; i++) + { + protectedCache.add(new Frequency(dataStream)); + } } } @@ -677,7 +697,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo freq.write(data); } - FrequencyManager manager = getManager(new Frequency(null, null).setPublic(false)); + FrequencyManager manager = getManager(new Frequency(null, null).setAccess(SecurityMode.PRIVATE)); if(manager != null) { @@ -692,6 +712,27 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo data.add(0); } + + List protectedFrqs = new ArrayList(); + + for (Frequency frequency : Mekanism.securityFrequencies.getFrequencies()) { + SecurityFrequency secure = (SecurityFrequency) frequency; + if(secure.trusted.contains(getSecurity().getOwner())) { + FrequencyManager protected_ = Mekanism.protectedTeleporters.get(secure.owner); + if(protected_ != null) { + protectedFrqs.addAll(protected_.getFrequencies()); + } + } + } + if(getSecurity().getOwner() != null) + protectedFrqs.addAll(getManager(new Frequency(null, null).setAccess(SecurityMode.TRUSTED)).getFrequencies()); + + data.add(protectedFrqs.size()); + + for (Frequency freq : protectedFrqs) { + freq.write(data); + } + return data; } @@ -724,15 +765,15 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo teleport(); return new Object[] {"Attempted to teleport."}; case 4: - if(!(arguments[0] instanceof String) || !(arguments[1] instanceof Boolean)) + if(!(arguments[0] instanceof String) || !(arguments[1] instanceof Integer)) { return new Object[] {"Invalid parameters."}; } String freq = ((String)arguments[0]).trim(); - boolean isPublic = (Boolean)arguments[1]; + int isPublic = (int)arguments[1]; - setFrequency(freq, isPublic); + setFrequency(freq, SecurityMode.values()[isPublic]); return new Object[] {"Frequency set."}; default: diff --git a/src/main/java/mekanism/common/tile/component/TileComponentSecurity.java b/src/main/java/mekanism/common/tile/component/TileComponentSecurity.java index c2c1010d7..e9eac5644 100644 --- a/src/main/java/mekanism/common/tile/component/TileComponentSecurity.java +++ b/src/main/java/mekanism/common/tile/component/TileComponentSecurity.java @@ -97,7 +97,7 @@ public class TileComponentSecurity implements ITileComponent } } - Frequency freq = new SecurityFrequency(owner).setPublic(true); + Frequency freq = new SecurityFrequency(owner).setAccess(SecurityMode.PUBLIC); freq.activeCoords.add(Coord4D.get(tileEntity)); manager.addFrequency(freq); frequency = (SecurityFrequency)freq; diff --git a/src/main/resources/assets/mekanism/lang/en_US.lang b/src/main/resources/assets/mekanism/lang/en_US.lang index 71c4aebfe..eeb8050fc 100644 --- a/src/main/resources/assets/mekanism/lang/en_US.lang +++ b/src/main/resources/assets/mekanism/lang/en_US.lang @@ -675,6 +675,7 @@ gui.digitalMiner.inverse=Inverse mode gui.digitalMiner.requireReplace=Require replace gui.digitalMiner.fuzzyMode=Fuzzy mode gui.digitalMiner.missingBlock=Missing block +gui.trusted=Trusted //Recipe names recipe.mekanismShaped=Shaped From 77afc49e70979bbe4d86025a08a3fef49aede9c2 Mon Sep 17 00:00:00 2001 From: Pokemonplatin Date: Fri, 16 Jul 2021 22:21:58 +0200 Subject: [PATCH 3/4] updated mod version --- build.gradle | 4 ++++ build.properties | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 36fdf24c9..21f8bd60d 100644 --- a/build.gradle +++ b/build.gradle @@ -35,6 +35,10 @@ repositories { name 'CB Maven FS' url "http://chickenbones.net/maven/" } + maven { + name = "forge2" + url = "https://maven.minecraftforge.net/" + } maven { name 'ForgeFS' url 'http://files.minecraftforge.net/maven' diff --git a/build.properties b/build.properties index ddbae1afa..08e43a180 100644 --- a/build.properties +++ b/build.properties @@ -4,4 +4,4 @@ FMP_version=1.2.0.345 CCLIB_version=1.1.3.136 NEI_version=1.0.4.101 CCC_version=1.0.6.39 -mod_version=9.10.6 +mod_version=9.10.7 From 1ff403937917252de620f913a77f812a82756f3a Mon Sep 17 00:00:00 2001 From: Pokemonplatin Date: Tue, 20 Jul 2021 22:35:46 +0200 Subject: [PATCH 4/4] players now should be able to use others frequencies --- .../mekanism/common/frequency/Frequency.java | 2 +- .../network/PacketPortableTeleporter.java | 22 +++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/main/java/mekanism/common/frequency/Frequency.java b/src/main/java/mekanism/common/frequency/Frequency.java index 1e7d4200f..2866ee607 100644 --- a/src/main/java/mekanism/common/frequency/Frequency.java +++ b/src/main/java/mekanism/common/frequency/Frequency.java @@ -19,7 +19,7 @@ public class Frequency { public boolean valid = true; - public ISecurityTile.SecurityMode access; + public ISecurityTile.SecurityMode access = ISecurityTile.SecurityMode.PUBLIC; public Set activeCoords = new HashSet(); diff --git a/src/main/java/mekanism/common/network/PacketPortableTeleporter.java b/src/main/java/mekanism/common/network/PacketPortableTeleporter.java index d2456af2c..3b7330303 100644 --- a/src/main/java/mekanism/common/network/PacketPortableTeleporter.java +++ b/src/main/java/mekanism/common/network/PacketPortableTeleporter.java @@ -160,10 +160,7 @@ public class PacketPortableTeleporter implements IMessageHandler