From 50693e27d267cffc7f1741e3d784bb6e15bd25ea Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 20 Jul 2016 02:22:04 -0400 Subject: [PATCH 1/6] Going back to MIT, thanks to the concerns of @bshelden and @asiekierka --- README.md | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 4cc7c5d48..042489490 100644 --- a/README.md +++ b/README.md @@ -15,30 +15,9 @@ As long as you follow the terms laid out in the license below, go right ahead. # License # -**Note that this license exists for Mekanism v9.1 or later. Previous versions of Mekanism utilize the MIT license.** +Licenses are not really my friend -- strict closed source software really drives me nuts. Even more, with a derivative work coded in a language such as Java, nothing can really prevent people from looking through my source with JD-GUI. I learned to program through a combination of textbooks, trial-and-error and browsing open source projects. As such, I have decided to license Mekanism under the MIT license, allowing for anyone with an interest in the project to fork/pull/distribute. -Licenses are not really my friend -- strict closed source software really drives me nuts. Even more, with a derivative work coded in a language such as Java, nothing can really prevent people from looking through my source with JD-GUI. I learned to program through a combination of textbooks, trial-and-error and browsing open source projects. As such, I have decided to utilize a fairly lenient policy in hopes that my work will educate and inspire others with interests in computer science. - -I'm choosing to not adopt a specific license, meaning that all rights to source code, assets and distributed binaries are reserved to me by default. However, I've made some notable exceptions in regards to Mekanism's source code, which can be listed below. Read each section carefully to make sure you understand exactly what you can and can't do. Don't try to work in the 'grey area' - if it's not listed, don't attempt it. - -**Mekanism's artwork and sounds are licensed under Creative Commons Attribution-ShareAlike 4.0 International.** - -**You may:** -- Use any Mekanism binaries. Free of charge :) -- View Mekanism's source code, either through this website or decompiling. -- Utilize and/or package copies of Mekanism's API (MDK) in third-party projects. -- Create and make profit from Mekanism-dependent, third-party Mekanism modules, as long as no Mekanism source code (other than the API) is included in public releases. -- Learn from, utilize, and/or distribute **small snippets** of Mekanism code for use in third-party projects, with credit to the author. -- Include and distribute official Mekanism binaries in public modpacks, with credit to the author. -- Distribute **modified** Mekanism binaries for **private** use, with or without credit to the author. - -**You may, with permission (via Twitter or Email):** -- Distribute **modified** Mekanism binaries for use in **public** modpacks with credit to the author. - -**You may *not*:** -- Distribute **official** Mekanism binaries in **public** modpacks without credit to the author. -- Distribute **modified** Mekanism binaries in **public** modpacks without permission from the author. -- Publicly distribute 10% or more of Mekanism's raw or compiled source code, without explicit permission from the author, with the exception of modpacks. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **Copyright © 2016 Aidan Brady** From 3462baf7615e13a0a0906bbb0d9f90628c3112cd Mon Sep 17 00:00:00 2001 From: aidancbrady Date: Sat, 23 Jul 2016 23:11:32 -0400 Subject: [PATCH 2/6] Restrict Thermal Evaporation Plant output to needed --- .../common/tile/TileEntityThermalEvaporationController.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/mekanism/common/tile/TileEntityThermalEvaporationController.java b/src/main/java/mekanism/common/tile/TileEntityThermalEvaporationController.java index 929dbaa69..1fb9d6928 100644 --- a/src/main/java/mekanism/common/tile/TileEntityThermalEvaporationController.java +++ b/src/main/java/mekanism/common/tile/TileEntityThermalEvaporationController.java @@ -111,10 +111,12 @@ public class TileEntityThermalEvaporationController extends TileEntityThermalEva { int outputNeeded = outputTank.getCapacity()-outputTank.getFluidAmount(); int inputStored = inputTank.getFluidAmount(); + double outputRatio = (double)recipe.recipeOutput.output.amount/(double)recipe.recipeInput.ingredient.amount; double tempMult = Math.max(0, getTemperature())*general.evaporationTempMultiplier; double inputToUse = (tempMult*recipe.recipeInput.ingredient.amount)*((float)height/(float)MAX_HEIGHT); inputToUse = Math.min(inputTank.getFluidAmount(), inputToUse); + inputToUse = Math.min(inputToUse, outputNeeded/outputRatio); lastGain = (float)inputToUse/(float)recipe.recipeInput.ingredient.amount; partialInput += inputToUse; From 833d7372fbb707e4e8c61d33555ba8556fcf913b Mon Sep 17 00:00:00 2001 From: aidancbrady Date: Tue, 9 Aug 2016 01:34:47 -0400 Subject: [PATCH 3/6] Fixed chunk churning issue with frames --- .../mekanism/common/block/BlockBounding.java | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/main/java/mekanism/common/block/BlockBounding.java b/src/main/java/mekanism/common/block/BlockBounding.java index 176585493..3a16ac6da 100644 --- a/src/main/java/mekanism/common/block/BlockBounding.java +++ b/src/main/java/mekanism/common/block/BlockBounding.java @@ -37,7 +37,7 @@ public class BlockBounding extends Block { try { TileEntityBoundingBlock tileEntity = (TileEntityBoundingBlock)world.getTileEntity(x, y, z); - return world.getBlock(tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ).onBlockActivated(world, tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ, entityplayer, facing, playerX, playerY, playerZ); + return getMainBlock(tileEntity, world).onBlockActivated(world, tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ, entityplayer, facing, playerX, playerY, playerZ); } catch(Exception e) { return false; } @@ -56,7 +56,7 @@ public class BlockBounding extends Block { try { TileEntityBoundingBlock tileEntity = (TileEntityBoundingBlock)world.getTileEntity(x, y, z); - return world.getBlock(tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ).getPickBlock(target, world, tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ, player); + return getMainBlock(tileEntity, world).getPickBlock(target, world, tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ, player); } catch(Exception e) { return null; } @@ -67,7 +67,7 @@ public class BlockBounding extends Block { try { TileEntityBoundingBlock tileEntity = (TileEntityBoundingBlock)world.getTileEntity(x, y, z); - return world.getBlock(tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ).removedByPlayer(world, player, tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ, willHarvest); + return getMainBlock(tileEntity, world).removedByPlayer(world, player, tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ, willHarvest); } catch(Exception e) { return false; } @@ -79,7 +79,7 @@ public class BlockBounding extends Block try { TileEntityBoundingBlock tileEntity = (TileEntityBoundingBlock)world.getTileEntity(x, y, z); tileEntity.onNeighborChange(block); - world.getBlock(tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ).onNeighborBlockChange(world, tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ, this); + getMainBlock(tileEntity, world).onNeighborBlockChange(world, tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ, this); } catch(Exception e) {} } @@ -88,11 +88,23 @@ public class BlockBounding extends Block { try { TileEntityBoundingBlock tileEntity = (TileEntityBoundingBlock)world.getTileEntity(x, y, z); - return world.getBlock(tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ).getPlayerRelativeBlockHardness(player, world, tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ); + return getMainBlock(tileEntity, world).getPlayerRelativeBlockHardness(player, world, tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ); } catch(Exception e) { return super.getPlayerRelativeBlockHardness(player, world, x, y, z); } } + + private Block getMainBlock(TileEntityBoundingBlock mainTile, World world) + { + Block block = world.getBlock(mainTile.mainX, mainTile.mainY, mainTile.mainZ); + + if(block instanceof BlockBounding) + { + return null; + } + + return block; + } @Override public int quantityDropped(Random random) From 03191f198b2b705dc6f36607fb182a1d241b8edc Mon Sep 17 00:00:00 2001 From: Clienthax Date: Mon, 15 Aug 2016 02:58:15 +0100 Subject: [PATCH 4/6] Add config option to disable block protections --- src/main/java/mekanism/api/MekanismConfig.java | 1 + .../java/mekanism/client/gui/element/GuiSecurityTab.java | 6 +++++- src/main/java/mekanism/common/CommonProxy.java | 1 + .../java/mekanism/common/item/ItemBlockEnergyCube.java | 2 +- src/main/java/mekanism/common/item/ItemBlockGasTank.java | 2 +- src/main/java/mekanism/common/item/ItemBlockMachine.java | 2 +- .../java/mekanism/common/network/PacketConfigSync.java | 2 ++ .../common/tile/component/TileComponentSecurity.java | 7 ++++++- .../generators/common/item/ItemBlockGenerator.java | 2 +- 9 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/main/java/mekanism/api/MekanismConfig.java b/src/main/java/mekanism/api/MekanismConfig.java index 40e44fcb0..e0167926f 100644 --- a/src/main/java/mekanism/api/MekanismConfig.java +++ b/src/main/java/mekanism/api/MekanismConfig.java @@ -66,6 +66,7 @@ public class MekanismConfig public static double superheatingHeatTransfer = 10000; public static double heatPerFuelTick = 4; public static boolean allowTransmitterAlloyUpgrade; + public static boolean allowProtection = true; } public static class client diff --git a/src/main/java/mekanism/client/gui/element/GuiSecurityTab.java b/src/main/java/mekanism/client/gui/element/GuiSecurityTab.java index c01e7dbcd..ece37160e 100644 --- a/src/main/java/mekanism/client/gui/element/GuiSecurityTab.java +++ b/src/main/java/mekanism/client/gui/element/GuiSecurityTab.java @@ -2,6 +2,7 @@ package mekanism.client.gui.element; import mekanism.api.Coord4D; import mekanism.api.EnumColor; +import mekanism.api.MekanismConfig.general; import mekanism.api.util.ListUtils; import mekanism.client.MekanismClient; import mekanism.client.gui.IGuiWrapper; @@ -129,6 +130,9 @@ public class GuiSecurityTab extends GuiElement private SecurityMode getSecurity() { + if(!general.allowProtection) { + return SecurityMode.PUBLIC; + } if(isItem) { if(getItem() == null || !(getItem().getItem() instanceof ISecurityItem)) @@ -172,7 +176,7 @@ public class GuiSecurityTab extends GuiElement @Override public void mouseClicked(int xAxis, int yAxis, int button) { - if(button == 0) + if(button == 0 && general.allowProtection) { if(getOwner() != null && mc.thePlayer.getCommandSenderName().equals(getOwner())) { diff --git a/src/main/java/mekanism/common/CommonProxy.java b/src/main/java/mekanism/common/CommonProxy.java index b1fe7d693..73dc1d6a8 100644 --- a/src/main/java/mekanism/common/CommonProxy.java +++ b/src/main/java/mekanism/common/CommonProxy.java @@ -298,6 +298,7 @@ public class CommonProxy implements IGuiProvider general.superheatingHeatTransfer = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "SuperheatingHeatTransfer", 10000D).getDouble(); general.heatPerFuelTick = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "HeatPerFuelTick", 4D).getDouble(); general.allowTransmitterAlloyUpgrade = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "AllowTransmitterAlloyUpgrade", true).getBoolean(); + general.allowProtection = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "AllowProtection", true).getBoolean(); general.blacklistIC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistIC2Power", false).getBoolean(); general.blacklistRF = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistRFPower", false).getBoolean(); diff --git a/src/main/java/mekanism/common/item/ItemBlockEnergyCube.java b/src/main/java/mekanism/common/item/ItemBlockEnergyCube.java index 1a1fe7c42..d467beb84 100644 --- a/src/main/java/mekanism/common/item/ItemBlockEnergyCube.java +++ b/src/main/java/mekanism/common/item/ItemBlockEnergyCube.java @@ -393,7 +393,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE @Override public SecurityMode getSecurity(ItemStack stack) { - if(stack.stackTagCompound == null) + if(stack.stackTagCompound == null || !general.allowProtection) { return SecurityMode.PUBLIC; } diff --git a/src/main/java/mekanism/common/item/ItemBlockGasTank.java b/src/main/java/mekanism/common/item/ItemBlockGasTank.java index 188d7dda5..1f9be49f8 100644 --- a/src/main/java/mekanism/common/item/ItemBlockGasTank.java +++ b/src/main/java/mekanism/common/item/ItemBlockGasTank.java @@ -373,7 +373,7 @@ public class ItemBlockGasTank extends ItemBlock implements IGasItem, ISustainedI @Override public SecurityMode getSecurity(ItemStack stack) { - if(stack.stackTagCompound == null) + if(stack.stackTagCompound == null || !general.allowProtection) { return SecurityMode.PUBLIC; } diff --git a/src/main/java/mekanism/common/item/ItemBlockMachine.java b/src/main/java/mekanism/common/item/ItemBlockMachine.java index 71d449eb8..7d695f6b2 100644 --- a/src/main/java/mekanism/common/item/ItemBlockMachine.java +++ b/src/main/java/mekanism/common/item/ItemBlockMachine.java @@ -944,7 +944,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec @Override public SecurityMode getSecurity(ItemStack stack) { - if(stack.stackTagCompound == null) + if(stack.stackTagCompound == null || !general.allowProtection) { return SecurityMode.PUBLIC; } diff --git a/src/main/java/mekanism/common/network/PacketConfigSync.java b/src/main/java/mekanism/common/network/PacketConfigSync.java index 58e1b3a22..c1836d40b 100644 --- a/src/main/java/mekanism/common/network/PacketConfigSync.java +++ b/src/main/java/mekanism/common/network/PacketConfigSync.java @@ -72,6 +72,7 @@ public class PacketConfigSync implements IMessageHandler Date: Mon, 5 Sep 2016 15:28:55 -0400 Subject: [PATCH 5/6] Bump up Dynamic Tank max storage, fixed Factory container issue --- .../content/tank/TankUpdateProtocol.java | 2 +- .../inventory/container/ContainerFactory.java | 24 ++++--------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/src/main/java/mekanism/common/content/tank/TankUpdateProtocol.java b/src/main/java/mekanism/common/content/tank/TankUpdateProtocol.java index 12cebf11d..995051974 100644 --- a/src/main/java/mekanism/common/content/tank/TankUpdateProtocol.java +++ b/src/main/java/mekanism/common/content/tank/TankUpdateProtocol.java @@ -16,7 +16,7 @@ import net.minecraft.item.ItemStack; public class TankUpdateProtocol extends UpdateProtocol { - public static final int FLUID_PER_TANK = 16000; + public static final int FLUID_PER_TANK = 64000; public TankUpdateProtocol(TileEntityDynamicTank tileEntity) { diff --git a/src/main/java/mekanism/common/inventory/container/ContainerFactory.java b/src/main/java/mekanism/common/inventory/container/ContainerFactory.java index 088e03932..03643cb52 100644 --- a/src/main/java/mekanism/common/inventory/container/ContainerFactory.java +++ b/src/main/java/mekanism/common/inventory/container/ContainerFactory.java @@ -116,7 +116,7 @@ public class ContainerFactory extends Container { ItemStack stack = null; Slot currentSlot = (Slot)inventorySlots.get(slotID); - + if(currentSlot != null && currentSlot.getHasStack()) { ItemStack slotStack = currentSlot.getStack(); @@ -178,7 +178,7 @@ public class ContainerFactory extends Container } else if(tileEntity.recipeType.getItemGas(slotStack) != null) { - if(slotID > tileEntity.inventory.length-1) + if(slotID >= tileEntity.inventory.length-1) { if(!mergeItemStack(slotStack, 3, 4, false)) { @@ -194,7 +194,7 @@ public class ContainerFactory extends Container } else if(tileEntity.recipeType == RecipeType.INFUSING && InfuseRegistry.getObject(slotStack) != null && (tileEntity.infuseStored.type == null || tileEntity.infuseStored.type == InfuseRegistry.getObject(slotStack).type)) { - if(slotID > tileEntity.inventory.length-1) + if(slotID >= tileEntity.inventory.length-1) { if(!mergeItemStack(slotStack, 3, 4, false)) { @@ -267,25 +267,11 @@ public class ContainerFactory extends Container public boolean isInputSlot(int slot) { - if(tileEntity.tier == Tier.FactoryTier.BASIC) - return slot >= 4 && slot <= 6; - if(tileEntity.tier == Tier.FactoryTier.ADVANCED) - return slot >= 4 && slot <= 8; - if(tileEntity.tier == Tier.FactoryTier.ELITE) - return slot >= 4 && slot <= 10; - - return false; + return slot >= 4 && slot < 4+tileEntity.tier.processes; } public boolean isOutputSlot(int slot) { - if(tileEntity.tier == Tier.FactoryTier.BASIC) - return slot >= 7 && slot <= 9; - if(tileEntity.tier == Tier.FactoryTier.ADVANCED) - return slot >= 9 && slot <= 13; - if(tileEntity.tier == Tier.FactoryTier.ELITE) - return slot >= 11 && slot <= 17; - - return false; + return slot >= 4+tileEntity.tier.processes && slot < 4+tileEntity.tier.processes*2; } } From ddc9e68f8ef81f5ae3979be0cecf4cce016a2ab2 Mon Sep 17 00:00:00 2001 From: aidancbrady Date: Thu, 11 Aug 2016 12:15:16 -0400 Subject: [PATCH 6/6] Added version-based handling, bump version to 9.1.1 --- build.properties | 2 +- src/main/java/mekanism/common/Mekanism.java | 4 +-- .../java/mekanism/common/ThreadGetData.java | 27 ++++++++++++++-- src/main/java/mekanism/common/Version.java | 27 +++++++++++++++- .../mekanism/common/util/MekanismUtils.java | 31 ++----------------- .../generators/common/MekanismGenerators.java | 4 +-- .../mekanism/tools/common/MekanismTools.java | 4 +-- 7 files changed, 60 insertions(+), 39 deletions(-) diff --git a/build.properties b/build.properties index cd60cf117..b8e16c745 100644 --- a/build.properties +++ b/build.properties @@ -4,4 +4,4 @@ FMP_version=1.1.2.331 CCLIB_version=1.1.3.136 NEI_version=1.0.4.101 CCC_version=1.0.6.39 -mod_version=9.1.0 +mod_version=9.1.1 diff --git a/src/main/java/mekanism/common/Mekanism.java b/src/main/java/mekanism/common/Mekanism.java index db1e15eee..b7a597646 100644 --- a/src/main/java/mekanism/common/Mekanism.java +++ b/src/main/java/mekanism/common/Mekanism.java @@ -142,7 +142,7 @@ import cpw.mods.fml.common.registry.GameRegistry; * @author AidanBrady * */ -@Mod(modid = "Mekanism", name = "Mekanism", version = "9.1.0", guiFactory = "mekanism.client.gui.ConfigGuiFactory", +@Mod(modid = "Mekanism", name = "Mekanism", version = "9.1.1", guiFactory = "mekanism.client.gui.ConfigGuiFactory", dependencies = "after:ForgeMultipart;after:BuildCraft;after:BuildCraftAPI;after:IC2;after:CoFHCore;" + "after:ComputerCraft;after:Galacticraft API;after:MetallurgyCore") public class Mekanism @@ -168,7 +168,7 @@ public class Mekanism public static Configuration configuration; /** Mekanism version number */ - public static Version versionNumber = new Version(9, 1, 0); + public static Version versionNumber = new Version(9, 1, 1); /** MultiblockManagers for various structrures */ public static MultiblockManager tankManager = new MultiblockManager("dynamicTank"); diff --git a/src/main/java/mekanism/common/ThreadGetData.java b/src/main/java/mekanism/common/ThreadGetData.java index 310154f54..40e4bb4fd 100644 --- a/src/main/java/mekanism/common/ThreadGetData.java +++ b/src/main/java/mekanism/common/ThreadGetData.java @@ -1,6 +1,9 @@ package mekanism.common; +import java.util.List; + import mekanism.common.util.MekanismUtils; +import cpw.mods.fml.relauncher.FMLInjectionData; /** * Thread used to retrieve data from the Mekanism server. @@ -18,9 +21,27 @@ public class ThreadGetData extends Thread @Override public void run() { - Mekanism.latestVersionNumber = MekanismUtils.getLatestVersion(); - Mekanism.recentNews = MekanismUtils.getRecentNews(); - + List ret = MekanismUtils.getHTML("https://dl.dropbox.com/u/90411166/Versions/Mekanism.txt"); + + Mekanism.latestVersionNumber = "null"; + Mekanism.recentNews = "null"; + + for(String s : ret) + { + String[] text = s.split(":"); + + if(text.length == 3 && !text[0].contains("UTF-8") && !text[0].contains("HTML") && !text[0].contains("http")) + { + if(Version.get(text[0]) != null && Version.get(text[0]).equals(Version.get((String)FMLInjectionData.data()[4]))) + { + Mekanism.latestVersionNumber = text[1]; + Mekanism.recentNews = text[2]; + + break; + } + } + } + MekanismUtils.updateDonators(); } } diff --git a/src/main/java/mekanism/common/Version.java b/src/main/java/mekanism/common/Version.java index ee5b058cd..ff1eb97e1 100644 --- a/src/main/java/mekanism/common/Version.java +++ b/src/main/java/mekanism/common/Version.java @@ -1,7 +1,7 @@ package mekanism.common; /** - * Version v1.0.4. Simple version handling for Mekanism. + * Version v2.0.0. Simple version handling for Mekanism. * @author AidanBrady * */ @@ -127,4 +127,29 @@ public class Version return major + "." + minor + "." + build; } } + + @Override + public int hashCode() + { + int result = 1; + + result = 31 * result + build; + result = 31 * result + major; + result = 31 * result + minor; + + return result; + } + + @Override + public boolean equals(Object obj) + { + if(obj == null || getClass() != obj.getClass()) + { + return false; + } + + Version other = (Version)obj; + + return build == other.build && major == other.major && minor == other.minor; + } } diff --git a/src/main/java/mekanism/common/util/MekanismUtils.java b/src/main/java/mekanism/common/util/MekanismUtils.java index c1eff4ca5..a658157ec 100644 --- a/src/main/java/mekanism/common/util/MekanismUtils.java +++ b/src/main/java/mekanism/common/util/MekanismUtils.java @@ -160,28 +160,6 @@ public final class MekanismUtils return false; } - /** - * Gets the latest version using getHTML and returns it as a string. - * @return latest version - */ - public static String getLatestVersion() - { - String[] text = merge(getHTML("https://dl.dropbox.com/u/90411166/Mod%20Versions/Mekanism.txt")).split(":"); - if(text.length > 1 && !text[0].contains("UTF-8") && !text[0].contains("HTML") && !text[0].contains("http")) return text[0]; - return "null"; - } - - /** - * Gets the recent news using getHTML and returns it as a string. - * @return recent news - */ - public static String getRecentNews() - { - String[] text = merge(getHTML("https://dl.dropbox.com/u/90411166/Mod%20Versions/Mekanism.txt")).split(":"); - if(text.length > 1 && !text[1].contains("UTF-8") && !text[1].contains("HTML") && !text[1].contains("http")) return text[1]; - return "null"; - } - /** * Updates the donator list by retrieving the most recent information from a foreign document. */ @@ -202,17 +180,14 @@ public final class MekanismUtils */ public static List getHTML(String urlToRead) { - URL url; - HttpURLConnection conn; - BufferedReader rd; String line; List result = new ArrayList(); try { - url = new URL(urlToRead); - conn = (HttpURLConnection)url.openConnection(); + URL url = new URL(urlToRead); + HttpURLConnection conn = (HttpURLConnection)url.openConnection(); conn.setRequestMethod("GET"); - rd = new BufferedReader(new InputStreamReader(conn.getInputStream())); + BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream())); while((line = rd.readLine()) != null) { diff --git a/src/main/java/mekanism/generators/common/MekanismGenerators.java b/src/main/java/mekanism/generators/common/MekanismGenerators.java index 8a39f918c..e2203bc66 100644 --- a/src/main/java/mekanism/generators/common/MekanismGenerators.java +++ b/src/main/java/mekanism/generators/common/MekanismGenerators.java @@ -44,7 +44,7 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.network.NetworkRegistry; -@Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = "9.1.0", dependencies = "required-after:Mekanism", guiFactory = "mekanism.generators.client.gui.GeneratorsGuiFactory") +@Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = "9.1.1", dependencies = "required-after:Mekanism", guiFactory = "mekanism.generators.client.gui.GeneratorsGuiFactory") public class MekanismGenerators implements IModule { @SidedProxy(clientSide = "mekanism.generators.client.GeneratorsClientProxy", serverSide = "mekanism.generators.common.GeneratorsCommonProxy") @@ -54,7 +54,7 @@ public class MekanismGenerators implements IModule public static MekanismGenerators instance; /** MekanismGenerators version number */ - public static Version versionNumber = new Version(9, 1, 0); + public static Version versionNumber = new Version(9, 1, 1); public static MultiblockManager turbineManager = new MultiblockManager("industrialTurbine"); diff --git a/src/main/java/mekanism/tools/common/MekanismTools.java b/src/main/java/mekanism/tools/common/MekanismTools.java index 36e5b72bf..88fa2cdf4 100644 --- a/src/main/java/mekanism/tools/common/MekanismTools.java +++ b/src/main/java/mekanism/tools/common/MekanismTools.java @@ -29,7 +29,7 @@ import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; -@Mod(modid = "MekanismTools", name = "MekanismTools", version = "9.1.0", dependencies = "required-after:Mekanism", guiFactory = "mekanism.tools.client.gui.ToolsGuiFactory") +@Mod(modid = "MekanismTools", name = "MekanismTools", version = "9.1.1", dependencies = "required-after:Mekanism", guiFactory = "mekanism.tools.client.gui.ToolsGuiFactory") public class MekanismTools implements IModule { @SidedProxy(clientSide = "mekanism.tools.client.ToolsClientProxy", serverSide = "mekanism.tools.common.ToolsCommonProxy") @@ -39,7 +39,7 @@ public class MekanismTools implements IModule public static MekanismTools instance; /** MekanismTools version number */ - public static Version versionNumber = new Version(9, 1, 0); + public static Version versionNumber = new Version(9, 1, 1); //Enums: Tools public static ToolMaterial toolOBSIDIAN;