From 6a977a7e32162fa89625cbde851492988cb0d95e Mon Sep 17 00:00:00 2001 From: Wliu Date: Sat, 1 Dec 2012 09:52:22 -0500 Subject: [PATCH 01/12] Update README.md Removed a comma. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 36f7b004..0e5008f1 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ ________________________________________________________________________________ \-jars \-source \-Equivalent-Exchange-3 - \-EE3's files, (should have build.xml). + \-EE3's files (should have build.xml). *** 4. Inside `Equivalent-Exchange-3`, create a new file called `build.properties`. * Open it up, and type into it the following: From 0aca53fef5240d63b8d1cdec01eebf987877ac1f Mon Sep 17 00:00:00 2001 From: Wliu Date: Sun, 2 Dec 2012 14:35:46 -0500 Subject: [PATCH 02/12] Update README.md Added a nice descriptive warning, reverted back my previous Java JDK link change (felt like it required more work). --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e5008f1..3dab200c 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ The Minecraft Forums page can be found [here] (http://www.minecraftforum.net/top IMPORTANT: This is not guaranteed to work as it has not been tested extensively (Linux and Windows tested). ____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ #### Prerequisites (Tested for Windows 7 ONLY!) -1. Download and install the Java JDK [here](http://www.oracle.com/technetwork/java/javase/downloads/index.html). Click the one that says `Java Platform (JDK) #u#`, and follow instructions. +0. WARNING: Make sure you know EXACTLY what you're doing! It's not any of our faults if your OS crashes, becomes corrupted, etc. +1. Download and install the Java JDK [here](http://www.oracle.com/technetwork/java/javase/downloads/jdk7u9-downloads-1859576.html). Scroll down, accept the Oracle Binary Code License Agreement for Java SE, and download the one pertaining to your OS. * Go to `Control Panel\System and Security\System`, and click on `Advanced System Settings` on the left-hand side. * Click on `Environment Variables`. * Under `System Variables`, click `New`. From 27538a9604daec68c16013724410af9f92a6c6d8 Mon Sep 17 00:00:00 2001 From: Wliu Date: Sun, 2 Dec 2012 14:36:42 -0500 Subject: [PATCH 03/12] Update README.md Changed release.mod.version to pre1d. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3dab200c..8725ee94 100644 --- a/README.md +++ b/README.md @@ -72,15 +72,15 @@ ________________________________________________________________________________ * `dir.share=Shared` (or what you want it to be-optional) * `dir.release=Releases` (what you want it to be) * `release.minecraft.version=1.4.5` (as of 11/30) - * `release.mod.version=pre2` (or whatever version # want it to be) + * `release.mod.version=pre1d` (or whatever version # want it to be) 5. [FOR WINDOWS] Open up `cmd` by typing `cmd` in Run. 6. [FOR WINDOWS] Navigate to `mcdev\source\Equivalent-Exchange-3` by executing `cd mcdev's location\source\Equivalent-Exchange-3`. 7. Execute `ant release`. This will generally take around 5-15 minutes, depending on your computer. If you've done everything right, `BUILD SUCCESSFUL` is displayed after it finishes. * If you see `BUILD FAILED`, check the error output (it should be right around `BUILD FAILED`), fix everything, and try again. -8. Go to `mcdev\source\Equivalent-Exchange-3\Releases\1.4.5\pre2` (This might be different according to what you put in build.properties). - * You should see a .jar named `ee3-universal-pre2.jar` (Again, might be different). +8. Go to `mcdev\source\Equivalent-Exchange-3\Releases\1.4.5\pre1d` (This might be different according to what you put in build.properties). + * You should see a .jar named `ee3-universal-pre1d.jar` (Again, might be different). 9. Copy the jar into your Minecraft mods folder, and play Minecraft! ### To Update EE3 (For Windows/Mac?) From 76ab40448ce7b10ba79553a50547d71751a15fc4 Mon Sep 17 00:00:00 2001 From: Wliu Date: Sun, 2 Dec 2012 14:38:37 -0500 Subject: [PATCH 04/12] Update README.md Github supports Windows AND Mac 10.7+, so added the Mac download link. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8725ee94..f728bcd7 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ ________________________________________________________________________________ * For `Variable Value`, input `C:\Ant\apache-ant-1.8.4` (or your Ant directory \apache-ant-1.8.4). * Scroll down to `Path`, and double-click on it. * Append `;C:\Ant\apache-ant-1.8.4\bin` exactly as shown to the end (or your Ant directory \apache-ant-1.8.4\bin). -3. Download and install Github [here] (http://windows.github.com/). +3. Download and install Github [here] (http://windows.github.com/) (Windows) or [here] (http://mac.github.com/) (Mac OS X 10.7+). * Create an account. * Scroll to the top of this page, login at the top-right, and then click `Clone to Windows` near the top-left of the page.. * You should see Github flash and `pahimar/Equivalent-Exchange-3` appear. (The local repository defaults to `C:\Users\(username)\Documents\GitHub\Equivalent-Exchange-3`, you can change it if you want but then you have to find it again on Github). From c15099f31f00fe2ebe7041ece86644f5139afd29 Mon Sep 17 00:00:00 2001 From: Wliu Date: Sun, 2 Dec 2012 15:24:48 -0500 Subject: [PATCH 05/12] Update README.md Added an unsure Linux tip... --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f728bcd7..57e9ebd9 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ ________________________________________________________________________________ * For `Variable Value`, input `C:\Ant\apache-ant-1.8.4` (or your Ant directory \apache-ant-1.8.4). * Scroll down to `Path`, and double-click on it. * Append `;C:\Ant\apache-ant-1.8.4\bin` exactly as shown to the end (or your Ant directory \apache-ant-1.8.4\bin). -3. Download and install Github [here] (http://windows.github.com/) (Windows) or [here] (http://mac.github.com/) (Mac OS X 10.7+). +3. Download and install Github [here] (http://windows.github.com/) (Windows) or [here] (http://mac.github.com/) (Mac OS X 10.7+). For Linux, I *guess* you could download it as a .zip/tarball and unzip it? * Create an account. * Scroll to the top of this page, login at the top-right, and then click `Clone to Windows` near the top-left of the page.. * You should see Github flash and `pahimar/Equivalent-Exchange-3` appear. (The local repository defaults to `C:\Users\(username)\Documents\GitHub\Equivalent-Exchange-3`, you can change it if you want but then you have to find it again on Github). From 9104e4d432e655682780050a0ad47fa7363b10c8 Mon Sep 17 00:00:00 2001 From: Wliu Date: Sun, 2 Dec 2012 19:50:35 -0500 Subject: [PATCH 06/12] Update README.md Added Github for Mac changes everywhere, typo fixes, stuff. --- README.md | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 57e9ebd9..2d6a3d78 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ ________________________________________________________________________________ * Append `;C:\Ant\apache-ant-1.8.4\bin` exactly as shown to the end (or your Ant directory \apache-ant-1.8.4\bin). 3. Download and install Github [here] (http://windows.github.com/) (Windows) or [here] (http://mac.github.com/) (Mac OS X 10.7+). For Linux, I *guess* you could download it as a .zip/tarball and unzip it? * Create an account. - * Scroll to the top of this page, login at the top-right, and then click `Clone to Windows` near the top-left of the page.. - * You should see Github flash and `pahimar/Equivalent-Exchange-3` appear. (The local repository defaults to `C:\Users\(username)\Documents\GitHub\Equivalent-Exchange-3`, you can change it if you want but then you have to find it again on Github). + * Scroll to the top of this page, login at the top-right, and then click `Clone to Windows/Mac` near the top-left of the page. + * You should see Github flash and `pahimar/Equivalent-Exchange-3` appear. (The local repository on Windows defaults to `C:\Users\(username)\Documents\GitHub\Equivalent-Exchange-3`, you can change it if you want but then you have to find it again on Github). 4. Create an empty directory for EE3 development. This directory is refernced as `mcdev` from now on. It can be where you cloned EE3, but it'll be a little messy. 5. You are now ready to setup MCP! @@ -37,16 +37,10 @@ ________________________________________________________________________________ 1. Download the latest version of MCP from [here] (http://mcp.ocean-labs.de/index.php/MCP_Releases), e.g. mcp723.zip. Install MCP dependencies as listed on the website if neccessary. 2. Inside `mcdev`, create a directory named `mcp` and unzip the MCP .zip file into it. - * To verify, check if a file name `CHANGELOG` exists inside `mcp`. -3. Get an unmodded copy of minecraft's `bin` folder. Currently EE3 runs on 1.4.5 but that might have changed. - -4. From your `.minecraft` directory (on Windows, defaults to `%appdata%\.minecraft`), copy the `bin` and the `resources` (not sure if necessary) directory to the `jars` directory inside `mcp`. (Forge might do this for you, not confirmed.) - -5. Get an unmodded copy of `minecraft_server.jar` and also place it into `jars`. (Forge might do this for you) - -6. Download the latest forge **source** for Minecraft 1.4.5 and unzip it into `mcp` so that `mcp\forge\install.sh` exists. You need at least Forge 6.4.0, best way is to get it from [here] (http://files.minecraftforge.net/). - -7. Execute `install.sh` (Linux and Mac) or `install.cmd` (Windows), both found in `mcdev\mcp\forge`. On Linux you might have to `chmod +x` `install.sh` before you can execute it. On some system configurations you need to execute `install.sh` from within the `forge` directory whereas on others it doesn't matter. Just check the output for error messages to find out what you need to do. + * To verify, check if a file named `CHANGELOG` exists inside `mcp`. +3. Download the latest forge **source** for Minecraft 1.4.5 and unzip it into `mcp`. You need at least Forge 6.4.0, best way is to get it from [here] (http://files.minecraftforge.net/). + * To verify, check if a application named `install.sh` exists. +4. Execute `install.sh` (Linux and Mac) or `install.cmd` (Windows), both found in `mcdev\mcp\forge`. On Linux you might have to `chmod +x` `install.sh` before you can execute it. On some system configurations you need to execute `install.sh` from within the `forge` directory whereas on others it doesn't matter. Just check the output for error messages to find out what you need to do. #### Setup EE3 (Some tested for Linux, tested fully for Windows) 1. Inside `mcdev`, create a directory named `source`. @@ -71,7 +65,7 @@ ________________________________________________________________________________ * `dir.development=../../` * `dir.share=Shared` (or what you want it to be-optional) * `dir.release=Releases` (what you want it to be) - * `release.minecraft.version=1.4.5` (as of 11/30) + * `release.minecraft.version=1.4.5` (as of 12/02) * `release.mod.version=pre1d` (or whatever version # want it to be) 5. [FOR WINDOWS] Open up `cmd` by typing `cmd` in Run. @@ -83,14 +77,14 @@ ________________________________________________________________________________ * You should see a .jar named `ee3-universal-pre1d.jar` (Again, might be different). 9. Copy the jar into your Minecraft mods folder, and play Minecraft! -### To Update EE3 (For Windows/Mac?) +#### To Update EE3 (For Windows/Mac) 1. Check to see if pahimar updated EE3 since you last compiled. If he/she did, follow these instructions. 2. Open Github. 3. Double-click on pahimar/Equivalent-Exchange-3. -4. At the top, there is a button named `Sync` (or `Refreshing...` if its still checking). +4. At the top, there is a button named `Sync`/`Sync Branch` (Mac) (or `Refreshing...` if it's still checking). 5. Click `Sync`, and wait for it to finish. From b4d895a1b9f41dc1bbd1fd6d4a045a220ffb8ddc Mon Sep 17 00:00:00 2001 From: Wliu Date: Sun, 2 Dec 2012 19:58:06 -0500 Subject: [PATCH 07/12] Update README.md Small changes. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2d6a3d78..66187356 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## Welcome to Equivalent Exchange 3! -Setup MCP was done mostly by the people who update the wiki, I just changed it a bit. Some credit goes to BuildCraft's README.md, which I based this README off of. +Setup MCP was done mostly by the people who update How to Compile for Beginners on the wiki, I just updated/changed it a bit. Some credit goes to BuildCraft's README.md, which I based this README off of. The Minecraft Forums page can be found [here] (http://www.minecraftforum.net/topic/1540010-equivalent-exchange-3). @@ -77,7 +77,7 @@ ________________________________________________________________________________ * You should see a .jar named `ee3-universal-pre1d.jar` (Again, might be different). 9. Copy the jar into your Minecraft mods folder, and play Minecraft! -#### To Update EE3 (For Windows/Mac) +#### Update EE3 (For Windows/Mac) 1. Check to see if pahimar updated EE3 since you last compiled. If he/she did, follow these instructions. 2. Open Github. From 9753091d2941027a4053cfbd350ff615597da1e2 Mon Sep 17 00:00:00 2001 From: Dion Williams Date: Tue, 4 Dec 2012 15:16:14 +0000 Subject: [PATCH 08/12] Updated Welsh localisation with alchemical bag names and revised version checker messages --- resources/ee3/lang/cy_GB.xml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/resources/ee3/lang/cy_GB.xml b/resources/ee3/lang/cy_GB.xml index cf0f471b..e0e2111a 100644 --- a/resources/ee3/lang/cy_GB.xml +++ b/resources/ee3/lang/cy_GB.xml @@ -10,14 +10,37 @@ Carreg Anadweithiol Carreg Miniwm Maen Athronwyr + Lludw + Llwch Miniwm + Llwch Werdd + Llwch Asur + Llwch Amorol + Llwch Symudliw + Bag Alcemaidd Gwyn + Bag Alcemaidd Oren + Bag Alcemaidd Magenta + Bag Alcemaidd Glas Golau + Bag Alcemaidd Melyn + Bag Alcemaidd Leim + Bag Alcemaidd Pinc + Bag Alcemaidd Llwyd + Bag Alcemaidd Llwyd Golau + Bag Alcemaidd Gwyrddlas + Bag Alcemaidd Porffor + Bag Alcemaidd Glas + Bag Alcemaidd Brown + Bag Alcemaidd Gwyrdd + Bag Alcemaidd Coch + Bag Alcemaidd Du Dŵr Coch (Llonydd) Dŵr Coch (Llifeiriol) Calchyniadwr Calchyniadwr + Equivalent Exchange 3 Ymgychwynnu gwiriad fersiwn yn erbyn y ffeil awdurdod fersiwn o bell, a leolir ar - Ni gyflawnwyd y gwiriad fersiwn yn llwyddiannus (ni ymgychwynodd y gwiriad fersiwn yn briodol) - Rydych yn defnyddio y fersiwn diweddaraf ar gyfer eich fersiwn o Minecraft - Rydych yn defnyddio fersiwn wedi dyddio; cysidrwch diweddaru yma - @MOD_UPDATE_LOCATION@ + Ni ymgychwynodd y gwiriad fersiwn yn briodol + Rydych yn defnyddio y fersiwn diweddaraf (@REMOTE_MOD_VERSION@) o Equivalent Exchange 3 ar gyfer @MINECRAFT_VERSION@ + Mae yna fersiwn mwy diweddar o @MOD_NAME@ ar gael (@REMOTE_MOD_VERSION@) ar gyfer @MINECRAFT_VERSION@. Ffeindiwch o yma: @MOD_UPDATE_LOCATION@ Gwall wrth drio cysylltu gyda'r ffeil awdurdod fersiwn o bell (Gwiriwch eich cysylltiad rhwydwaith) Gwiriad fersiwn o bell wedi'i ddiffodd, esgusodid From bb07edc77c9223aea663a94f8236ff3e1fa88a37 Mon Sep 17 00:00:00 2001 From: pahimar Date: Tue, 4 Dec 2012 16:11:54 -0500 Subject: [PATCH 09/12] Nothing to see here --- .../common/core/addons/AddonRedPower2.java | 39 +++++++++++++++++++ .../common/core/handlers/AddonHandler.java | 6 ++- .../ee3/common/lib/ConfigurationSettings.java | 4 ++ .../recipe/RecipesTransmutationStone.java | 3 +- 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 ee3_common/ee3/common/core/addons/AddonRedPower2.java diff --git a/ee3_common/ee3/common/core/addons/AddonRedPower2.java b/ee3_common/ee3/common/core/addons/AddonRedPower2.java new file mode 100644 index 00000000..10b511f0 --- /dev/null +++ b/ee3_common/ee3/common/core/addons/AddonRedPower2.java @@ -0,0 +1,39 @@ +package ee3.common.core.addons; + +import java.util.logging.Level; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Loader; + +import ee3.common.core.helper.LogHelper; +import ee3.common.core.helper.RecipeHelper; +import ee3.common.recipe.RecipesTransmutationStone; +import net.minecraft.src.Block; +import net.minecraft.src.ItemStack; +import net.minecraft.src.ModLoader; + +public class AddonRedPower2 { + + public static Block rp2Stone = null; + + public static void initWorld() { + + if (Loader.isModLoaded("RedPowerWorld")) { + try { + rp2Stone = (Block) Class.forName("RedPowerWorld").getField("blockStone").get(null); + + for (ItemStack stone: RecipesTransmutationStone.transmutationStones) { + // Extremely temporary recipe + RecipeHelper.addRecipe(new ItemStack(rp2Stone.blockID, 1, 3), stone, Block.cobblestone, Block.cobblestone, Block.cobblestone, Block.cobblestone, Block.cobblestone, Block.cobblestone); + } + + LogHelper.log(Level.INFO, "Loaded RP2 World addon"); + } + catch (Exception e) { + LogHelper.log(Level.SEVERE, "Could not load RP2 World addon"); + e.printStackTrace(System.err); + } + } + } + +} diff --git a/ee3_common/ee3/common/core/handlers/AddonHandler.java b/ee3_common/ee3/common/core/handlers/AddonHandler.java index d093e45a..cdd97188 100644 --- a/ee3_common/ee3/common/core/handlers/AddonHandler.java +++ b/ee3_common/ee3/common/core/handlers/AddonHandler.java @@ -1,5 +1,7 @@ package ee3.common.core.handlers; +import ee3.common.core.addons.AddonRedPower2; + /** * AddonHandler * @@ -12,6 +14,8 @@ package ee3.common.core.handlers; */ public class AddonHandler { - public static void init() {} + public static void init() { + AddonRedPower2.initWorld(); + } } diff --git a/ee3_common/ee3/common/lib/ConfigurationSettings.java b/ee3_common/ee3/common/lib/ConfigurationSettings.java index 0cbe5b13..419554ec 100644 --- a/ee3_common/ee3/common/lib/ConfigurationSettings.java +++ b/ee3_common/ee3/common/lib/ConfigurationSettings.java @@ -56,5 +56,9 @@ public class ConfigurationSettings { public static int MINIUM_STONE_MAX_DURABILITY; public static final String MINIUM_STONE_MAX_DURABILITY_CONFIGNAME = Strings.MINIUM_STONE_NAME + ".maxDurability"; public static final int MINIUM_STONE_MAX_DURABILITY_DEFAULT = 1521; + + public static int PHILOSOPHERS_STONE_MAX_DURABILITY; + public static final String PHILOSOPHERS_STONE_MAX_DURABILITY_CONFIGNAME = Strings.PHILOSOPHER_STONE_NAME + ".maxDurability"; + public static final int PHILOSOPHERS_STONE_MAX_DURABILITY_DEFAULT = 10001; } diff --git a/ee3_common/ee3/common/recipe/RecipesTransmutationStone.java b/ee3_common/ee3/common/recipe/RecipesTransmutationStone.java index c39e05a3..ae63306d 100644 --- a/ee3_common/ee3/common/recipe/RecipesTransmutationStone.java +++ b/ee3_common/ee3/common/recipe/RecipesTransmutationStone.java @@ -31,7 +31,8 @@ public class RecipesTransmutationStone { private static ItemStack philStone = new ItemStack(ModItems.philStone, 1, -1); private static ItemStack miniumStone = new ItemStack(ModItems.miniumStone, 1, -1); - private static List transmutationStones = Arrays.asList(miniumStone, philStone); + + public static List transmutationStones = Arrays.asList(miniumStone, philStone); private static ItemStack anyCoal = new ItemStack(Item.coal, 1, -1); private static ItemStack anyWood = new ItemStack(Block.wood, 1, -1); From 8b059dfd0c3ed564dcd4cbccbb42221af4e0f0ca Mon Sep 17 00:00:00 2001 From: pahimar Date: Wed, 5 Dec 2012 14:33:03 -0500 Subject: [PATCH 10/12] Some rework on configs (where they are stored/etc) --- .../core/handlers/ConfigurationHandler.java | 89 +++++++++++++------ .../common/core/helper/RedWaterHelper.java | 14 +-- .../ee3/common/item/ItemMiniumStone.java | 2 +- .../ee3/common/item/ItemPhilosopherStone.java | 34 +++++-- .../ee3/common/lib/ConfigurationSettings.java | 84 +++++++++++++---- ee3_common/ee3/common/lib/Reference.java | 21 ----- ee3_common/ee3/common/lib/Strings.java | 14 ++- ee3_common/ee3/common/tile/TileEE.java | 13 +-- 8 files changed, 179 insertions(+), 92 deletions(-) diff --git a/ee3_common/ee3/common/core/handlers/ConfigurationHandler.java b/ee3_common/ee3/common/core/handlers/ConfigurationHandler.java index 1ce26b67..66aaef99 100644 --- a/ee3_common/ee3/common/core/handlers/ConfigurationHandler.java +++ b/ee3_common/ee3/common/core/handlers/ConfigurationHandler.java @@ -25,8 +25,12 @@ import static net.minecraftforge.common.Configuration.*; */ public class ConfigurationHandler { - private static final String CATEGORY_KEYBIND = "keybinds"; + private static final String CATEGORY_KEYBIND = "keybindings"; private static final String CATEGORY_GRAPHICS = "graphics"; + private static final String CATEGORY_TRANSMUTATION = "transmutation"; + private static final String CATEGORY_BLOCK_PROPERTIES = Configuration.CATEGORY_BLOCK + Configuration.CATEGORY_SPLITTER + "properties"; + private static final String CATEGORY_RED_WATER_PROPERTIES = CATEGORY_BLOCK_PROPERTIES + Configuration.CATEGORY_SPLITTER + "red_water"; + private static final String CATEGORY_DURABILITY = Configuration.CATEGORY_ITEM + Configuration.CATEGORY_SPLITTER + "durability"; public static void init(File configFile) { Configuration configuration = new Configuration(configFile); @@ -34,21 +38,15 @@ public class ConfigurationHandler { try { configuration.load(); - /* General Configs */ + /* General configs */ ConfigurationSettings.ENABLE_VERSION_CHECK = configuration .get(CATEGORY_GENERAL, ConfigurationSettings.ENABLE_VERSION_CHECK_CONFIGNAME, ConfigurationSettings.ENABLE_VERSION_CHECK_DEFAULT) .getBoolean(ConfigurationSettings.ENABLE_VERSION_CHECK_DEFAULT); ConfigurationSettings.ENABLE_SOUNDS = configuration .get(CATEGORY_GENERAL, ConfigurationSettings.ENABLE_SOUNDS_CONFIGNAME, ConfigurationSettings.ENABLE_SOUNDS_DEFAULT) .getBoolean(ConfigurationSettings.ENABLE_SOUNDS_DEFAULT); - ConfigurationSettings.MINIUM_STONE_TRANSMUTE_COST = configuration - .get(CATEGORY_GENERAL, ConfigurationSettings.MINIUM_STONE_TRANSMUTE_COST_CONFIGNAME, ConfigurationSettings.MINIUM_STONE_TRANSMUTE_COST_DEFAULT) - .getInt(ConfigurationSettings.MINIUM_STONE_TRANSMUTE_COST_DEFAULT); - ConfigurationSettings.MINIUM_STONE_MAX_DURABILITY = configuration - .get(CATEGORY_GENERAL, ConfigurationSettings.MINIUM_STONE_MAX_DURABILITY_CONFIGNAME, ConfigurationSettings.MINIUM_STONE_MAX_DURABILITY_DEFAULT) - .getInt(ConfigurationSettings.MINIUM_STONE_MAX_DURABILITY_DEFAULT); - /* Graphics/Rendering Configs */ + /* Graphic configs */ ConfigurationSettings.ENABLE_PARTICLE_FX = configuration .get(CATEGORY_GRAPHICS, ConfigurationSettings.ENABLE_PARTICLE_FX_CONFIGNAME, ConfigurationSettings.ENABLE_PARTICLE_FX_DEFAULT) .getBoolean(ConfigurationSettings.ENABLE_PARTICLE_FX_DEFAULT); @@ -56,18 +54,34 @@ public class ConfigurationHandler { .get(CATEGORY_GRAPHICS, ConfigurationSettings.ENABLE_OVERLAY_WORLD_TRANSMUTATION_CONFIGNAME, ConfigurationSettings.ENABLE_OVERLAY_WORLD_TRANSMUTATION_DEFAULT) .getBoolean(ConfigurationSettings.ENABLE_OVERLAY_WORLD_TRANSMUTATION_DEFAULT); - /* Block Configs */ - ConfigurationSettings.AUTO_RESOLVE_BLOCK_IDS = configuration - .get(CATEGORY_BLOCK, ConfigurationSettings.AUTO_RESOLVE_BLOCK_IDS_CONFIGNAME, ConfigurationSettings.AUTO_RESOLVE_BLOCK_IDS_DEFAULT) - .getBoolean(ConfigurationSettings.AUTO_RESOLVE_BLOCK_IDS_DEFAULT); + /* Block configs */ BlockIds.CALCINATOR = configuration .getBlock(Strings.CALCINATOR_NAME, BlockIds.CALCINATOR_DEFAULT) .getInt(BlockIds.CALCINATOR_DEFAULT); BlockIds.RED_WATER_STILL = configuration .getBlock(Strings.RED_WATER_STILL_NAME, BlockIds.RED_WATER_STILL_DEFAULT) .getInt(BlockIds.RED_WATER_STILL_DEFAULT); + + /* Block property configs */ + configuration.addCustomCategoryComment(CATEGORY_BLOCK_PROPERTIES, "Custom block properties"); + + /* Red Water configs */ + configuration.addCustomCategoryComment(CATEGORY_RED_WATER_PROPERTIES, "Configuration settings for various properties of Red Water"); + ConfigurationSettings.RED_WATER_DURATION_BASE = configuration + .get(CATEGORY_RED_WATER_PROPERTIES, ConfigurationSettings.RED_WATER_DURATION_BASE_CONFIGNAME, ConfigurationSettings.RED_WATER_DURATION_BASE_DEFAULT) + .getInt(ConfigurationSettings.RED_WATER_DURATION_BASE_DEFAULT); + ConfigurationSettings.RED_WATER_DURATION_MODIFIER = configuration + .get(CATEGORY_RED_WATER_PROPERTIES, ConfigurationSettings.RED_WATER_DURATION_MODIFIER_CONFIGNAME, ConfigurationSettings.RED_WATER_DURATION_MODIFIER_DEFAULT) + .getInt(ConfigurationSettings.RED_WATER_DURATION_MODIFIER_DEFAULT); + ConfigurationSettings.RED_WATER_RANGE_BASE = configuration + .get(CATEGORY_RED_WATER_PROPERTIES, ConfigurationSettings.RED_WATER_RANGE_BASE_CONFIGNAME, ConfigurationSettings.RED_WATER_RANGE_BASE_DEFAULT) + .getInt(ConfigurationSettings.RED_WATER_RANGE_BASE_DEFAULT); + ConfigurationSettings.RED_WATER_RANGE_MODIFIER = configuration + .get(CATEGORY_RED_WATER_PROPERTIES, ConfigurationSettings.RED_WATER_RANGE_MODIFIER_CONFIGNAME, ConfigurationSettings.RED_WATER_RANGE_MODIFIER_DEFAULT) + .getInt(ConfigurationSettings.RED_WATER_RANGE_MODIFIER_DEFAULT); + - /* Item Configs */ + /* Item configs */ ItemIds.MINIUM_SHARD = configuration .getItem(Strings.MINIUM_SHARD_NAME, ItemIds.MINIUM_SHARD_DEFAULT) .getInt(ItemIds.MINIUM_SHARD_DEFAULT); @@ -86,21 +100,40 @@ public class ConfigurationHandler { ItemIds.ALCHEMY_BAG = configuration .getItem(Strings.ALCHEMY_BAG_NAME, ItemIds.ALCHEMY_BAG_DEFAULT) .getInt(ItemIds.ALCHEMY_BAG_DEFAULT); + + /* Item durability configs */ + ConfigurationSettings.MINIUM_STONE_MAX_DURABILITY = configuration + .get(CATEGORY_DURABILITY, ConfigurationSettings.MINIUM_STONE_MAX_DURABILITY_CONFIGNAME, ConfigurationSettings.MINIUM_STONE_MAX_DURABILITY_DEFAULT) + .getInt(ConfigurationSettings.MINIUM_STONE_MAX_DURABILITY_DEFAULT); + ConfigurationSettings.PHILOSOPHERS_STONE_MAX_DURABILITY = configuration + .get(CATEGORY_DURABILITY, ConfigurationSettings.PHILOSOPHERS_STONE_MAX_DURABILITY_CONFIGNAME, ConfigurationSettings.PHILOSOPHERS_STONE_MAX_DURABILITY_DEFAULT) + .getInt(ConfigurationSettings.PHILOSOPHERS_STONE_MAX_DURABILITY_DEFAULT); - /* KeyBinding Configs */ - configuration.addCustomCategoryComment(CATEGORY_KEYBIND, ""); - EquivalentExchange3.proxy.setKeyBinding(Reference.KEYBINDING_EXTRA, configuration - .get(CATEGORY_KEYBIND, Reference.KEYBINDING_EXTRA, Reference.KEYBINDING_EXTRA_DEFAULT) - .getInt(Reference.KEYBINDING_EXTRA_DEFAULT)); - EquivalentExchange3.proxy.setKeyBinding(Reference.KEYBINDING_CHARGE, configuration - .get(CATEGORY_KEYBIND, Reference.KEYBINDING_CHARGE, Reference.KEYBINDING_CHARGE_DEFAULT) - .getInt(Reference.KEYBINDING_CHARGE_DEFAULT)); - EquivalentExchange3.proxy.setKeyBinding(Reference.KEYBINDING_TOGGLE, configuration - .get(CATEGORY_KEYBIND, Reference.KEYBINDING_TOGGLE, Reference.KEYBINDING_TOGGLE_DEFAULT) - .getInt(Reference.KEYBINDING_TOGGLE_DEFAULT)); - EquivalentExchange3.proxy.setKeyBinding(Reference.KEYBINDING_RELEASE, configuration - .get(CATEGORY_KEYBIND, Reference.KEYBINDING_RELEASE, Reference.KEYBINDING_RELEASE_DEFAULT) - .getInt(Reference.KEYBINDING_RELEASE_DEFAULT)); + /* KeyBinding configs */ + configuration.addCustomCategoryComment(CATEGORY_KEYBIND, "Keybindings for Equivalent Exchange 3. See http://www.minecraftwiki.net/wiki/Key_codes for mapping of key codes to keyboard keys"); + EquivalentExchange3.proxy.setKeyBinding(ConfigurationSettings.KEYBINDING_EXTRA, configuration + .get(CATEGORY_KEYBIND, ConfigurationSettings.KEYBINDING_EXTRA, ConfigurationSettings.KEYBINDING_EXTRA_DEFAULT) + .getInt(ConfigurationSettings.KEYBINDING_EXTRA_DEFAULT)); + EquivalentExchange3.proxy.setKeyBinding(ConfigurationSettings.KEYBINDING_CHARGE, configuration + .get(CATEGORY_KEYBIND, ConfigurationSettings.KEYBINDING_CHARGE, ConfigurationSettings.KEYBINDING_CHARGE_DEFAULT) + .getInt(ConfigurationSettings.KEYBINDING_CHARGE_DEFAULT)); + EquivalentExchange3.proxy.setKeyBinding(ConfigurationSettings.KEYBINDING_TOGGLE, configuration + .get(CATEGORY_KEYBIND, ConfigurationSettings.KEYBINDING_TOGGLE, ConfigurationSettings.KEYBINDING_TOGGLE_DEFAULT) + .getInt(ConfigurationSettings.KEYBINDING_TOGGLE_DEFAULT)); + EquivalentExchange3.proxy.setKeyBinding(ConfigurationSettings.KEYBINDING_RELEASE, configuration + .get(CATEGORY_KEYBIND, ConfigurationSettings.KEYBINDING_RELEASE, ConfigurationSettings.KEYBINDING_RELEASE_DEFAULT) + .getInt(ConfigurationSettings.KEYBINDING_RELEASE_DEFAULT)); + + /* Transmutation configs */ + ConfigurationSettings.TRANSMUTE_COST_ITEM = configuration + .get(CATEGORY_TRANSMUTATION, ConfigurationSettings.TRANSMUTE_COST_ITEM_CONFIGNAME, ConfigurationSettings.TRANSMUTE_COST_ITEM_DEFAULT) + .getInt(ConfigurationSettings.TRANSMUTE_COST_ITEM_DEFAULT); + ConfigurationSettings.TRANSMUTE_COST_BLOCK = configuration + .get(CATEGORY_TRANSMUTATION, ConfigurationSettings.TRANSMUTE_COST_BLOCK_CONFIGNAME, ConfigurationSettings.TRANSMUTE_COST_BLOCK_DEFAULT) + .getInt(ConfigurationSettings.TRANSMUTE_COST_BLOCK_DEFAULT); + ConfigurationSettings.TRANSMUTE_COST_MOB = configuration + .get(CATEGORY_TRANSMUTATION, ConfigurationSettings.TRANSMUTE_COST_MOB_CONFIGNAME, ConfigurationSettings.TRANSMUTE_COST_MOB_DEFAULT) + .getInt(ConfigurationSettings.TRANSMUTE_COST_MOB_DEFAULT); } catch (Exception e) { FMLLog.log(Level.SEVERE, e, Reference.MOD_NAME + " has had a problem loading its configuration"); diff --git a/ee3_common/ee3/common/core/helper/RedWaterHelper.java b/ee3_common/ee3/common/core/helper/RedWaterHelper.java index e35a37f2..d24bc1f5 100644 --- a/ee3_common/ee3/common/core/helper/RedWaterHelper.java +++ b/ee3_common/ee3/common/core/helper/RedWaterHelper.java @@ -1,7 +1,7 @@ package ee3.common.core.helper; import ee3.common.block.ModBlocks; -import ee3.common.lib.Reference; +import ee3.common.lib.ConfigurationSettings; import net.minecraft.src.AxisAlignedBB; import net.minecraft.src.Block; import net.minecraft.src.EntityLiving; @@ -24,12 +24,12 @@ public class RedWaterHelper { } public static boolean isBlockInBB(World world, AxisAlignedBB par1AxisAlignedBB, Block block) { - int minX = MathHelper.floor_double(par1AxisAlignedBB.minX - Reference.BLOCK_RED_WATER_RANGE_BASE * Reference.BLOCK_RED_WATER_RANGE_MODIFIER * 1.0D); - int maxX = MathHelper.floor_double(par1AxisAlignedBB.maxX + Reference.BLOCK_RED_WATER_RANGE_BASE * Reference.BLOCK_RED_WATER_RANGE_MODIFIER * 1.0D); - int minY = MathHelper.floor_double(par1AxisAlignedBB.minY - Reference.BLOCK_RED_WATER_RANGE_BASE * Reference.BLOCK_RED_WATER_RANGE_MODIFIER * 1.0D); - int maxY = MathHelper.floor_double(par1AxisAlignedBB.maxY + Reference.BLOCK_RED_WATER_RANGE_BASE * Reference.BLOCK_RED_WATER_RANGE_MODIFIER * 1.0D); - int minZ = MathHelper.floor_double(par1AxisAlignedBB.minZ - Reference.BLOCK_RED_WATER_RANGE_BASE * Reference.BLOCK_RED_WATER_RANGE_MODIFIER * 1.0D); - int maxZ = MathHelper.floor_double(par1AxisAlignedBB.maxZ + Reference.BLOCK_RED_WATER_RANGE_BASE * Reference.BLOCK_RED_WATER_RANGE_MODIFIER * 1.0D); + int minX = MathHelper.floor_double(par1AxisAlignedBB.minX - ConfigurationSettings.RED_WATER_RANGE_BASE * ConfigurationSettings.RED_WATER_RANGE_MODIFIER * 1.0D); + int maxX = MathHelper.floor_double(par1AxisAlignedBB.maxX + ConfigurationSettings.RED_WATER_RANGE_BASE * ConfigurationSettings.RED_WATER_RANGE_MODIFIER * 1.0D); + int minY = MathHelper.floor_double(par1AxisAlignedBB.minY - ConfigurationSettings.RED_WATER_RANGE_BASE * ConfigurationSettings.RED_WATER_RANGE_MODIFIER * 1.0D); + int maxY = MathHelper.floor_double(par1AxisAlignedBB.maxY + ConfigurationSettings.RED_WATER_RANGE_BASE * ConfigurationSettings.RED_WATER_RANGE_MODIFIER * 1.0D); + int minZ = MathHelper.floor_double(par1AxisAlignedBB.minZ - ConfigurationSettings.RED_WATER_RANGE_BASE * ConfigurationSettings.RED_WATER_RANGE_MODIFIER * 1.0D); + int maxZ = MathHelper.floor_double(par1AxisAlignedBB.maxZ + ConfigurationSettings.RED_WATER_RANGE_BASE * ConfigurationSettings.RED_WATER_RANGE_MODIFIER * 1.0D); for (int i = minX; i < maxX; ++i) { for (int j = minY; j < maxY; ++j) { diff --git a/ee3_common/ee3/common/item/ItemMiniumStone.java b/ee3_common/ee3/common/item/ItemMiniumStone.java index 95749376..cd58846d 100644 --- a/ee3_common/ee3/common/item/ItemMiniumStone.java +++ b/ee3_common/ee3/common/item/ItemMiniumStone.java @@ -93,7 +93,7 @@ public class ItemMiniumStone extends ItemEE @Override public void doKeyBindingAction(EntityPlayer thePlayer, ItemStack itemStack, String keyBinding) { - if (keyBinding.equals(Reference.KEYBINDING_EXTRA)) { + if (keyBinding.equals(ConfigurationSettings.KEYBINDING_EXTRA)) { openPortableCrafting(thePlayer); } diff --git a/ee3_common/ee3/common/item/ItemPhilosopherStone.java b/ee3_common/ee3/common/item/ItemPhilosopherStone.java index 800a370c..7d71ad16 100644 --- a/ee3_common/ee3/common/item/ItemPhilosopherStone.java +++ b/ee3_common/ee3/common/item/ItemPhilosopherStone.java @@ -7,6 +7,7 @@ import cpw.mods.fml.common.network.PacketDispatcher; import ee3.common.EquivalentExchange3; import ee3.common.core.helper.NBTHelper; import ee3.common.core.helper.TransmutationHelper; +import ee3.common.lib.ConfigurationSettings; import ee3.common.lib.CustomItemRarity; import ee3.common.lib.GuiIds; import ee3.common.lib.Reference; @@ -39,6 +40,7 @@ public class ItemPhilosopherStone extends ItemEE this.setIconCoord(2, 0); this.setItemName(Strings.PHILOSOPHER_STONE_NAME); this.setCreativeTab(EquivalentExchange3.tabsEE3); + this.setMaxDamage(ConfigurationSettings.PHILOSOPHERS_STONE_MAX_DURABILITY - 1); this.maxChargeLevel = 3; } @@ -66,10 +68,24 @@ public class ItemPhilosopherStone extends ItemEE return true; } + @Override + public ItemStack getContainerItemStack(ItemStack itemStack) { + + itemStack.setItemDamage(itemStack.getItemDamage() + 1); + + return itemStack; + } + @Override public boolean onItemUse(ItemStack itemStack, EntityPlayer entityPlayer, World world, int x, int y, int z, int l, float f1, float f2, float f3) { - return TransmutationHelper.transmuteInWorld(world, entityPlayer, itemStack, x, y, z); + boolean result = TransmutationHelper.transmuteInWorld(world, entityPlayer, itemStack, x, y, z); + + if (result) { + itemStack.damageItem(1, entityPlayer); + } + + return result; } @Override @@ -81,40 +97,40 @@ public class ItemPhilosopherStone extends ItemEE @Override public short getCharge(ItemStack stack) { - return NBTHelper.getShort(stack, Strings.NBT_CHARGE_LEVEL_KEY); + return NBTHelper.getShort(stack, Strings.NBT_ITEM_CHARGE_LEVEL_KEY); } @Override public void setCharge(ItemStack stack, short charge) { if (charge <= maxChargeLevel) { - NBTHelper.setShort(stack, Strings.NBT_CHARGE_LEVEL_KEY, charge); + NBTHelper.setShort(stack, Strings.NBT_ITEM_CHARGE_LEVEL_KEY, charge); } } @Override public void increaseCharge(ItemStack stack) { - if (NBTHelper.getShort(stack, Strings.NBT_CHARGE_LEVEL_KEY) < maxChargeLevel) { - NBTHelper.setShort(stack, Strings.NBT_CHARGE_LEVEL_KEY, (short) (NBTHelper.getShort(stack, Strings.NBT_CHARGE_LEVEL_KEY) + 1)); + if (NBTHelper.getShort(stack, Strings.NBT_ITEM_CHARGE_LEVEL_KEY) < maxChargeLevel) { + NBTHelper.setShort(stack, Strings.NBT_ITEM_CHARGE_LEVEL_KEY, (short) (NBTHelper.getShort(stack, Strings.NBT_ITEM_CHARGE_LEVEL_KEY) + 1)); } } @Override public void decreaseCharge(ItemStack stack) { - if (NBTHelper.getShort(stack, Strings.NBT_CHARGE_LEVEL_KEY) > 0) { - NBTHelper.setShort(stack, Strings.NBT_CHARGE_LEVEL_KEY, (short) (NBTHelper.getShort(stack, Strings.NBT_CHARGE_LEVEL_KEY) - 1)); + if (NBTHelper.getShort(stack, Strings.NBT_ITEM_CHARGE_LEVEL_KEY) > 0) { + NBTHelper.setShort(stack, Strings.NBT_ITEM_CHARGE_LEVEL_KEY, (short) (NBTHelper.getShort(stack, Strings.NBT_ITEM_CHARGE_LEVEL_KEY) - 1)); } } @Override public void doKeyBindingAction(EntityPlayer thePlayer, ItemStack itemStack, String keyBinding) { - if (keyBinding.equals(Reference.KEYBINDING_EXTRA)) { + if (keyBinding.equals(ConfigurationSettings.KEYBINDING_EXTRA)) { openPortableCrafting(thePlayer); } - else if (keyBinding.equals(Reference.KEYBINDING_CHARGE)) { + else if (keyBinding.equals(ConfigurationSettings.KEYBINDING_CHARGE)) { if (!thePlayer.isSneaking()) { increaseCharge(itemStack); thePlayer.worldObj.playSoundAtEntity(thePlayer, Sounds.CHARGE_UP, 0.5F, 0.5F + (0.5F * (getCharge(itemStack) * 1.0F / maxChargeLevel))); diff --git a/ee3_common/ee3/common/lib/ConfigurationSettings.java b/ee3_common/ee3/common/lib/ConfigurationSettings.java index 419554ec..acc22f37 100644 --- a/ee3_common/ee3/common/lib/ConfigurationSettings.java +++ b/ee3_common/ee3/common/lib/ConfigurationSettings.java @@ -1,5 +1,6 @@ package ee3.common.lib; +import net.minecraftforge.common.Configuration; import ee3.common.item.ModItems; /** @@ -16,49 +17,96 @@ public class ConfigurationSettings { /* * General configuration settings */ - // Whether or not automatic block id resolution for EE3 is turned on or off - public static boolean AUTO_RESOLVE_BLOCK_IDS; - public static final String ENABLE_VERSION_CHECK_CONFIGNAME = "enable_version_check"; - public static final boolean AUTO_RESOLVE_BLOCK_IDS_DEFAULT = false; - // Whether or not EE3 sounds are enabled public static boolean ENABLE_SOUNDS; - public static final String ENABLE_SOUNDS_CONFIGNAME = "enable_sounds"; + public static final String ENABLE_SOUNDS_CONFIGNAME = "sounds.enabled"; public static final boolean ENABLE_SOUNDS_DEFAULT = true; // Whether or not EE3 will do a version check when loaded public static boolean ENABLE_VERSION_CHECK; - public static final String AUTO_RESOLVE_BLOCK_IDS_CONFIGNAME = "auto_resolve_block_ids"; + public static final String ENABLE_VERSION_CHECK_CONFIGNAME = "version_check.enabled"; public static final boolean ENABLE_VERSION_CHECK_DEFAULT = true; /* - * Render config settings + * Graphic config settings */ // Whether or not EE3 particle fx are enabled public static boolean ENABLE_PARTICLE_FX; - public static final String ENABLE_PARTICLE_FX_CONFIGNAME = "enable_particle_fx"; + public static final String ENABLE_PARTICLE_FX_CONFIGNAME = "particle_fx.enabled"; public static final boolean ENABLE_PARTICLE_FX_DEFAULT = true; // Whether or not the in world transmutation overlay is enabled public static boolean ENABLE_OVERLAY_WORLD_TRANSMUTATION; - public static final String ENABLE_OVERLAY_WORLD_TRANSMUTATION_CONFIGNAME = "enable_world_transmutation_overlay"; + public static final String ENABLE_OVERLAY_WORLD_TRANSMUTATION_CONFIGNAME = "world_transmutation_overlay.enabled"; public static final boolean ENABLE_OVERLAY_WORLD_TRANSMUTATION_DEFAULT = true; /* - * Minium stone config settings + * Block related config settings */ - // The durability cost for each transmute with the Minium Stone - public static int MINIUM_STONE_TRANSMUTE_COST; - public static final String MINIUM_STONE_TRANSMUTE_COST_CONFIGNAME = Strings.MINIUM_STONE_NAME + ".transmuteCost"; - public static final int MINIUM_STONE_TRANSMUTE_COST_DEFAULT = 1; + public static int RED_WATER_DURATION_BASE; + public static String RED_WATER_DURATION_BASE_CONFIGNAME = "duration.base"; + public static final int RED_WATER_DURATION_BASE_DEFAULT = 5; + public static int RED_WATER_DURATION_MODIFIER; + public static String RED_WATER_DURATION_MODIFIER_CONFIGNAME = "duration.modifier"; + public static final int RED_WATER_DURATION_MODIFIER_DEFAULT = 2; + + public static int RED_WATER_RANGE_BASE; + public static String RED_WATER_RANGE_BASE_CONFIGNAME = "range.base"; + public static final int RED_WATER_RANGE_BASE_DEFAULT = 1; + + public static int RED_WATER_RANGE_MODIFIER; + public static String RED_WATER_RANGE_MODIFIER_CONFIGNAME = "range.modifier"; + public static final int RED_WATER_RANGE_MODIFIER_DEFAULT = 3; + + /* + * Item related config settings + */ // The maximum durability for the Minium Stone public static int MINIUM_STONE_MAX_DURABILITY; - public static final String MINIUM_STONE_MAX_DURABILITY_CONFIGNAME = Strings.MINIUM_STONE_NAME + ".maxDurability"; + public static final String MINIUM_STONE_MAX_DURABILITY_CONFIGNAME = Strings.MINIUM_STONE_NAME; public static final int MINIUM_STONE_MAX_DURABILITY_DEFAULT = 1521; - + + // The maximum durability for the Philosophers Stone public static int PHILOSOPHERS_STONE_MAX_DURABILITY; - public static final String PHILOSOPHERS_STONE_MAX_DURABILITY_CONFIGNAME = Strings.PHILOSOPHER_STONE_NAME + ".maxDurability"; + public static final String PHILOSOPHERS_STONE_MAX_DURABILITY_CONFIGNAME = Strings.PHILOSOPHER_STONE_NAME; public static final int PHILOSOPHERS_STONE_MAX_DURABILITY_DEFAULT = 10001; + /* + * Keybinding related config settings + */ + // Extra key + public static final String KEYBINDING_EXTRA = "key.extra"; + public static final int KEYBINDING_EXTRA_DEFAULT = 46; + + // Release key + public static final String KEYBINDING_RELEASE = "key.release"; + public static final int KEYBINDING_RELEASE_DEFAULT = 19; + + // Toggle key + public static final String KEYBINDING_TOGGLE = "key.toggle"; + public static final int KEYBINDING_TOGGLE_DEFAULT = 34; + + // Charge key + public static final String KEYBINDING_CHARGE = "key.charge"; + public static final int KEYBINDING_CHARGE_DEFAULT = 47; + + /* + * Transmutation related config settings + */ + // The durability cost for each item transmutation + public static int TRANSMUTE_COST_ITEM; + public static final String TRANSMUTE_COST_ITEM_CONFIGNAME = Strings.TRANSMUTATION_COST_ITEM; + public static final int TRANSMUTE_COST_ITEM_DEFAULT = 1; + + // The durability cost for each block transmutation + public static int TRANSMUTE_COST_BLOCK; + public static final String TRANSMUTE_COST_BLOCK_CONFIGNAME = Strings.TRANSMUTATION_COST_BLOCK; + public static final int TRANSMUTE_COST_BLOCK_DEFAULT = 1; + + // The durability cost for each block transmutation + public static int TRANSMUTE_COST_MOB; + public static final String TRANSMUTE_COST_MOB_CONFIGNAME = Strings.TRANSMUTATION_COST_MOB; + public static final int TRANSMUTE_COST_MOB_DEFAULT = 1; + } diff --git a/ee3_common/ee3/common/lib/Reference.java b/ee3_common/ee3/common/lib/Reference.java index cab79fef..5460cef7 100644 --- a/ee3_common/ee3/common/lib/Reference.java +++ b/ee3_common/ee3/common/lib/Reference.java @@ -24,25 +24,4 @@ public class Reference { public static final String SERVER_PROXY_CLASS = "ee3.common.core.CommonProxy"; public static final String CLIENT_PROXY_CLASS = "ee3.client.core.ClientProxy"; - /* KeyBinding related constants */ - public static final String KEYBINDING_EXTRA = "key.extra"; - public static final int KEYBINDING_EXTRA_DEFAULT = 46; - public static final String KEYBINDING_RELEASE = "key.release"; - public static final int KEYBINDING_RELEASE_DEFAULT = 19; - public static final String KEYBINDING_TOGGLE = "key.toggle"; - public static final int KEYBINDING_TOGGLE_DEFAULT = 34; - public static final String KEYBINDING_CHARGE = "key.charge"; - public static final int KEYBINDING_CHARGE_DEFAULT = 47; - - /* General Tile Entity related constants */ - public static final String TE_GEN_OWNER_NBT_TAG_LABEL = "owner"; - public static final String TE_GEN_STATE_NBT_TAG_LABEL = "state"; - public static final String TE_GEN_DIRECTION_NBT_TAG_LABEL = "direction"; - - // TODO: Find a better spot for these - public static final int BLOCK_RED_WATER_EFFECT_DURATION_BASE = 5; - public static final int BLOCK_RED_WATER_EFFECT_DURATION_MODIFIER = 2; - public static final int BLOCK_RED_WATER_RANGE_BASE = 1; - public static final int BLOCK_RED_WATER_RANGE_MODIFIER = 3; - } diff --git a/ee3_common/ee3/common/lib/Strings.java b/ee3_common/ee3/common/lib/Strings.java index bcc8ec3c..9e289da8 100644 --- a/ee3_common/ee3/common/lib/Strings.java +++ b/ee3_common/ee3/common/lib/Strings.java @@ -2,7 +2,7 @@ package ee3.common.lib; public class Strings { - /* General text keys */ + /* General keys */ /* Version check related constants */ public static final String VERSION_CHECK_DISABLED = "version.check_disabled"; @@ -16,7 +16,11 @@ public class Strings { public static final String GUI_CALCINATOR_NAME = "gui.calcinator.name"; /* NBT related constants */ - public static final String NBT_CHARGE_LEVEL_KEY = "chargeLevel"; + public static final String NBT_ITEM_CHARGE_LEVEL_KEY = "itemChargeLevel"; + public static final String NBT_ITEM_MODE_KEY = "itemMode"; + public static final String NBT_TE_OWNER_KEY = "teOwner"; + public static final String NBT_TE_STATE_KEY = "teState"; + public static final String NBT_TE_DIRECTION_KEY = "teDirection"; /* Block name constants */ public static final String CALCINATOR_NAME = "calcinator"; @@ -33,5 +37,11 @@ public class Strings { /* TileEntity name constants */ public static final String TE_CALCINATOR_NAME = "tileCalcinator"; + + /* Transmutation cost related constants */ + public static final String TRANSMUTATION_COST = "_cost"; + public static final String TRANSMUTATION_COST_ITEM = "item" + TRANSMUTATION_COST; + public static final String TRANSMUTATION_COST_BLOCK = "block" + TRANSMUTATION_COST; + public static final String TRANSMUTATION_COST_MOB = "mob" + TRANSMUTATION_COST; } diff --git a/ee3_common/ee3/common/tile/TileEE.java b/ee3_common/ee3/common/tile/TileEE.java index 3213f6bf..a4dac65f 100644 --- a/ee3_common/ee3/common/tile/TileEE.java +++ b/ee3_common/ee3/common/tile/TileEE.java @@ -1,6 +1,7 @@ package ee3.common.tile; import ee3.common.lib.Reference; +import ee3.common.lib.Strings; import net.minecraft.src.EntityPlayer; import net.minecraft.src.NBTTagCompound; import net.minecraft.src.TileEntity; @@ -51,18 +52,18 @@ public class TileEE extends TileEntity { public void readFromNBT(NBTTagCompound nbtTagCompound) { super.readFromNBT(nbtTagCompound); - direction = nbtTagCompound.getByte(Reference.TE_GEN_DIRECTION_NBT_TAG_LABEL); - state = nbtTagCompound.getShort(Reference.TE_GEN_STATE_NBT_TAG_LABEL); - owner = nbtTagCompound.getString(Reference.TE_GEN_OWNER_NBT_TAG_LABEL); + direction = nbtTagCompound.getByte(Strings.NBT_TE_DIRECTION_KEY); + state = nbtTagCompound.getShort(Strings.NBT_TE_STATE_KEY); + owner = nbtTagCompound.getString(Strings.NBT_TE_OWNER_KEY); } public void writeToNBT(NBTTagCompound nbtTagCompound) { super.writeToNBT(nbtTagCompound); - nbtTagCompound.setByte(Reference.TE_GEN_DIRECTION_NBT_TAG_LABEL, direction); - nbtTagCompound.setShort(Reference.TE_GEN_STATE_NBT_TAG_LABEL, state); + nbtTagCompound.setByte(Strings.NBT_TE_DIRECTION_KEY, direction); + nbtTagCompound.setShort(Strings.NBT_TE_STATE_KEY, state); if(owner != null && owner != "") { - nbtTagCompound.setString(Reference.TE_GEN_OWNER_NBT_TAG_LABEL, owner); + nbtTagCompound.setString(Strings.NBT_TE_OWNER_KEY, owner); } } From 02e9bb09daf5acfe37e056c66512ad5d98e00612 Mon Sep 17 00:00:00 2001 From: pahimar Date: Wed, 5 Dec 2012 16:06:50 -0500 Subject: [PATCH 11/12] Beginning work on world transmutation packets --- ee3_common/ee3/common/lib/PacketIds.java | 1 + .../ee3/common/network/PacketTypeHandler.java | 3 ++- .../common/network/PacketWorldTransmutation.java | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 ee3_common/ee3/common/network/PacketWorldTransmutation.java diff --git a/ee3_common/ee3/common/lib/PacketIds.java b/ee3_common/ee3/common/lib/PacketIds.java index 6880064e..d81ff22e 100644 --- a/ee3_common/ee3/common/lib/PacketIds.java +++ b/ee3_common/ee3/common/lib/PacketIds.java @@ -13,5 +13,6 @@ public class PacketIds { public static final int KEYBINDING_PRESSED = 0; public static final int TILEENTITY_UPDATE = 1; + public static final int WORLD_TRANSMUTATION_EVENT = 2; } diff --git a/ee3_common/ee3/common/network/PacketTypeHandler.java b/ee3_common/ee3/common/network/PacketTypeHandler.java index c19cfdc0..7ab8af91 100644 --- a/ee3_common/ee3/common/network/PacketTypeHandler.java +++ b/ee3_common/ee3/common/network/PacketTypeHandler.java @@ -19,7 +19,8 @@ import net.minecraft.src.Packet250CustomPayload; */ public enum PacketTypeHandler { KEY(PacketKeyPressed.class), - TILE(PacketTileUpdate.class); + TILE(PacketTileUpdate.class), + WORLD_TRANSMUTATION(PacketWorldTransmutation.class); private Class clazz; diff --git a/ee3_common/ee3/common/network/PacketWorldTransmutation.java b/ee3_common/ee3/common/network/PacketWorldTransmutation.java new file mode 100644 index 00000000..8c7f9605 --- /dev/null +++ b/ee3_common/ee3/common/network/PacketWorldTransmutation.java @@ -0,0 +1,14 @@ +package ee3.common.network; + +public class PacketWorldTransmutation extends PacketEE { + + public int originX, originY, originZ; + public int rangeX, rangeY, rangeZ; + public int targetID, targetMeta; + + public PacketWorldTransmutation() { + + super(PacketTypeHandler.TILE, true); + } + +} From 0d7199ccd497dd4ed290ac4eb206a6b56b271a80 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 5 Dec 2012 18:04:06 -0500 Subject: [PATCH 12/12] Removed duplicate Red Water entries --- resources/ee3/lang/pt_BR.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/resources/ee3/lang/pt_BR.xml b/resources/ee3/lang/pt_BR.xml index 3e87a2a8..e6f0c436 100644 --- a/resources/ee3/lang/pt_BR.xml +++ b/resources/ee3/lang/pt_BR.xml @@ -34,8 +34,6 @@ Bolsa Alquímica Negra Água Vermelha (Parada) Água Vermelha (Corrente) - Água Vermelha (Parada) - Água Vermelha (Corrente) Calcinador Calcinador Equivalent Exchange 3