diff --git a/thaumicbees_res/changelog.txt b/thaumicbees_res/changelog.txt index 38d6cd9..43f416b 100644 --- a/thaumicbees_res/changelog.txt +++ b/thaumicbees_res/changelog.txt @@ -1,4 +1,6 @@ -Changed Version info embedded in mod to match format supported by Version checking. +1.4.3a +Changed Version info embedded in mod to match format supported by Version checking. Will need to make this more robust in the future. +Fixed bug with Thaumium Grafter not being enchantable. 1.4.3 Added automatic version-checking for ThaumicBees! From this version on, when a new version becomes available, it will notify you in-game. Notifications can be switched off via a config file option. diff --git a/thaumicbees_src/thaumicbees/item/ItemThaumiumGrafter.java b/thaumicbees_src/thaumicbees/item/ItemThaumiumGrafter.java index a3291bb..ae16fb7 100644 --- a/thaumicbees_src/thaumicbees/item/ItemThaumiumGrafter.java +++ b/thaumicbees_src/thaumicbees/item/ItemThaumiumGrafter.java @@ -16,15 +16,15 @@ import net.minecraftforge.common.ForgeHooks; public class ItemThaumiumGrafter extends Item implements IVisRepairable, IToolGrafter { - public ItemThaumiumGrafter(int id) { super(id); - this.setCreativeTab(forestry.api.core.Tabs.tabArboriculture); + this.setMaxStackSize(1); this.setMaxDamage(15); - this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE); this.setIconIndex(21); + this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE); this.setItemName("tb.thaumiumGrafter"); + this.setCreativeTab(forestry.api.core.Tabs.tabArboriculture); } @Override diff --git a/thaumicbees_src/thaumicbees/main/utils/VersionInfo.java b/thaumicbees_src/thaumicbees/main/utils/VersionInfo.java index 6a497fb..d7688f1 100644 --- a/thaumicbees_src/thaumicbees/main/utils/VersionInfo.java +++ b/thaumicbees_src/thaumicbees/main/utils/VersionInfo.java @@ -22,7 +22,7 @@ import cpw.mods.fml.relauncher.Side; public class VersionInfo { - public static final String Version = "@VERSION@"; + public static final String Version = "1.4.3"; public static final String Build = "@BUILD_NUMBER@"; public static final String MCVersion = "@MCVERSION@"; public static final String VersionURL = "http://bit.ly/thaumicbeeversion"; @@ -52,18 +52,20 @@ public class VersionInfo for (int i = 0; i < tokens.length; ++i) { - if (tokens[i].matches("[0-9]+[a-z]")) + tokens[i] = tokens[i].trim(); + if (tokens[i].matches("[0-9]+")) + { + versionTokens.add(Integer.valueOf(tokens[i])); + } + else if (tokens[i].matches("[0-9]+[a-z]")) { String numberString = tokens[i].substring(0, tokens[i].length()-1); versionTokens.add(Integer.valueOf(numberString)); versionTokens.add(Character.getNumericValue(tokens[i].charAt(tokens[i].length()-1))); } - else - { - versionTokens.add(Integer.valueOf(tokens[i])); - } } + // Can't use versionTokens.toArray 'cause that returns an Integer[], not int[] int[] value = new int[versionTokens.size()]; for (int i = 0; i < value.length; ++i) { @@ -91,6 +93,13 @@ public class VersionInfo result = false; break; } + + if (i == versionTokens.length-1 && versionTokens.length < targetTokens.length) + { + // If the versions compared are the same, but target has an extra token, it's probably a "letter" build + // and is ahead of this one. + result = true; + } } return result; @@ -181,7 +190,6 @@ public class VersionInfo @Override public void run() { - try { String location = VersionURL;