diff --git a/README.md b/README.md index 40360de2..66187356 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,14 @@ ## Welcome to Equivalent Exchange 3! -Setup MCP was done mostly by Minalien, 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). ### Compiling Equivalent Exchange 3 -IMPORTANT: This is not guaranteed to work as it has not been tested extensively (only done on Linux so far, partly on Windows). +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/jdk7u9-downloads-1859576.html). Just scroll down. +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`. @@ -15,7 +16,7 @@ ________________________________________________________________________________ * For `Variable Value`, input something similar to `;C:\Program Files (x86)\Java\jdk1.7.0_09` exactly as shown to the end.(or wherever your Java JDK installation is), and click `Ok`. * Scroll down to a variable named `Path`, and double-click on it. * Append `;C:\Program Files (x86)\Java\jdk1.7.0_09\bin` (or wherever your Java JDK installation is \bin), and click `Ok`. -2. Download and Apache Ant [here] (http://ant.apache.org). +2. Download Apache Ant [here] (http://ant.apache.org). * Unzip the files anywhere you want, eg `C:\Program Files (x86)\Ant`. * Again, go to `Environment Variables` just like you did for the Java JDK. * Under `System Variables`, click `New`. @@ -23,37 +24,28 @@ ________________________________________________________________________________ * 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+). For Linux, I *guess* you could download it as a .zip/tarball and unzip it? * Create an account. - * Go back to the Equivalent-Exchange-3 directory [here] (http://github.com/pahimar/Equivalent-Exchange-3). - * 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! +5. You are now ready to setup MCP! #### Setup MCP (Linux and Windows 7 tested) -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. +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 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. -3. To verify, check if a file name `CHANGELOG` exists inside the `mcp` directory. +#### Setup EE3 (Some tested for Linux, tested fully for Windows) +1. Inside `mcdev`, create a directory named `source`. -4. Get a clean (unmodded!) copy of minecraft's `bin` folder. Currently EE3 runs on 1.4.5 but that might have changed. - -5. From your `.minecraft` directory (on Windows, defaults to `%appdata%\.minecraft`), copy the `bin` and the `resources` (I don't think you need resources on Windows 7) directory to the `jars` directory inside `mcp`. (I actually believe Forge's installation might do it for you) - -6. Get a clean (unmodded!) copy of `minecraft_server.jar` and also place it into `jars`. (Forge might do this for you) - -7. 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/). - -8. 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, some for Windows) -1. Inside `mcdev`, create a directory named `source`. If you're doing this from the default clone directory, make two folders: `source` and `Equivalent-Exchange-3`. Copy and paste the original files into `Equivalent-Exchange-3`, and then move that into `source`. - -2. If you haven't already, move/clone `Equivalent-Exchange-3` into `source`. +2. Move/clone `Equivalent-Exchange-3` into `source`. 3. Right now, you should have a directory that looks something like: @@ -61,38 +53,38 @@ ________________________________________________________________________________ mcdev \-mcp - \-mcp stuff blablabla (should have CHANGELOG). + \-complicated mcp stuff (should have CHANGELOG). \-forge \-jars \-source \-Equivalent-Exchange-3 - \-EE3's files, including 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: * `dir.development=../../` - * `dir.share=Shared` (or what you want it to be) + * `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/21) - * `release.mod.version=pre2` (or whatever version # want it to be) + * `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. -6. [FOR WINDOWS] Navigate to `mcdev\source` by executing `cd mcdev's location\source`. - -7. Inside `sources\Equivalent-Exchange-3` execute `ant release`. If you've done everything right, `BUILD SUCCESSFUL` is displayed. If not, you probably did something wrong. - -8. Go to `mcdev\source\Equivalent-Exchange-3\Releases\1.4.5\pre2` (or whatever you put into `build.properties` for `dir.release`, `release.minecraft.version`, and `release.mod.version`). You should see a .jar named `ee3-universal-pre2.jar` (or whatever you put into `release.mod.version`). +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\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 Only?) +#### 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. diff --git a/build.xml b/build.xml index c297ebd9..97c6e84c 100644 --- a/build.xml +++ b/build.xml @@ -24,6 +24,9 @@ + + + @@ -33,6 +36,9 @@ + + + diff --git a/ee3_client/ee3/client/core/ClientProxy.java b/ee3_client/ee3/client/core/ClientProxy.java index 0addd2c9..239cd2a0 100644 --- a/ee3_client/ee3/client/core/ClientProxy.java +++ b/ee3_client/ee3/client/core/ClientProxy.java @@ -9,10 +9,12 @@ import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.KeyBindingRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.Side; +import cpw.mods.fml.common.network.PacketDispatcher; import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.TickRegistry; import ee3.client.core.handlers.DrawBlockHighlightHandler; import ee3.client.core.handlers.KeyBindingHandler; +import ee3.client.core.handlers.RenderTickHandler; import ee3.client.core.handlers.SoundHandler; import ee3.client.core.helper.KeyBindingHelper; import ee3.client.render.RenderCalcinator; @@ -20,10 +22,11 @@ import ee3.client.render.RenderItemCalcinator; import ee3.client.render.TextureRedWaterFX; import ee3.client.render.TextureRedWaterFlowFX; import ee3.common.core.CommonProxy; -import ee3.common.core.handlers.RenderTickHandler; import ee3.common.lib.BlockIds; -import ee3.common.lib.Reference; import ee3.common.lib.RenderIds; +import ee3.common.lib.Sprites; +import ee3.common.network.PacketTypeHandler; +import ee3.common.network.PacketWorldEvent; import ee3.common.tile.TileCalcinator; import static ee3.common.lib.CustomItemRarity.*; @@ -96,8 +99,8 @@ public class ClientProxy extends CommonProxy { RenderIds.calcinatorRenderId = RenderingRegistry.getNextAvailableRenderId(); - MinecraftForgeClient.preloadTexture(Reference.SPRITE_SHEET_LOCATION + Reference.BLOCK_SPRITE_SHEET); - MinecraftForgeClient.preloadTexture(Reference.SPRITE_SHEET_LOCATION + Reference.ITEM_SPRITE_SHEET); + MinecraftForgeClient.preloadTexture(Sprites.SPRITE_SHEET_LOCATION + Sprites.BLOCK_SPRITE_SHEET); + MinecraftForgeClient.preloadTexture(Sprites.SPRITE_SHEET_LOCATION + Sprites.ITEM_SPRITE_SHEET); FMLClientHandler.instance().getClient().renderEngine.registerTextureFX(new TextureRedWaterFX()); FMLClientHandler.instance().getClient().renderEngine.registerTextureFX(new TextureRedWaterFlowFX()); @@ -112,5 +115,11 @@ public class ClientProxy extends CommonProxy { ClientRegistry.bindTileEntitySpecialRenderer(TileCalcinator.class, new RenderCalcinator()); } - + + @Override + public void sendWorldEventPacket(byte eventType, int originX, int originY, int originZ, byte sideHit, byte rangeX, byte rangeY, byte rangeZ, String data) { + + PacketDispatcher.sendPacketToServer(PacketTypeHandler.populatePacket(new PacketWorldEvent(eventType, originX, originY, originZ, sideHit, rangeX, rangeY, rangeZ, data))); + } + } diff --git a/ee3_client/ee3/client/core/handlers/DrawBlockHighlightHandler.java b/ee3_client/ee3/client/core/handlers/DrawBlockHighlightHandler.java index 7995f2b6..4c15bcc3 100644 --- a/ee3_client/ee3/client/core/handlers/DrawBlockHighlightHandler.java +++ b/ee3_client/ee3/client/core/handlers/DrawBlockHighlightHandler.java @@ -3,8 +3,10 @@ package ee3.client.core.handlers; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import ee3.common.item.ItemPhilosopherStone; -import ee3.common.lib.Reference; +import ee3.common.item.ITransmutationStone; +import ee3.common.item.IChargeable; +import ee3.common.lib.ConfigurationSettings; +import ee3.common.lib.Sprites; import net.minecraft.src.EnumMovingObjectType; import net.minecraft.src.RenderEngine; import net.minecraft.src.Tessellator; @@ -18,15 +20,17 @@ public class DrawBlockHighlightHandler { public void onDrawBlockHighlightEvent(DrawBlockHighlightEvent event) { if (event.currentItem != null) { - if (event.currentItem.getItem() instanceof ItemPhilosopherStone) { + if (event.currentItem.getItem() instanceof ITransmutationStone) { if (event.target.typeOfHit == EnumMovingObjectType.TILE) { - drawPhilosopherStoneOverlay(event); + if (ConfigurationSettings.ENABLE_OVERLAY_WORLD_TRANSMUTATION) { + drawInWorldTransmutationOverlay(event); + } } } } } - public void drawPhilosopherStoneOverlay(DrawBlockHighlightEvent event) { + public void drawInWorldTransmutationOverlay(DrawBlockHighlightEvent event) { double x = event.target.blockX + 0.5F; double y = event.target.blockY + 0.5F; @@ -34,17 +38,20 @@ public class DrawBlockHighlightHandler { double iPX = event.player.prevPosX + (event.player.posX - event.player.prevPosX) * event.partialTicks; double iPY = event.player.prevPosY + (event.player.posY - event.player.prevPosY) * event.partialTicks; double iPZ = event.player.prevPosZ + (event.player.posZ - event.player.prevPosZ) * event.partialTicks; - int texture = event.context.renderEngine.getTexture(Reference.SPRITE_SHEET_LOCATION + "noise.png"); + int texture = event.context.renderEngine.getTexture(Sprites.SPRITE_SHEET_LOCATION + Sprites.WORLD_TRANSMUTATION_TEXTURE); int xScale = 1; int yScale = 1; int zScale = 1; - int chargeLevel = ((ItemPhilosopherStone)event.currentItem.getItem()).getCharge(event.currentItem); - - if (chargeLevel < 1) { - chargeLevel = 1; + int chargeLevel; + int itemChargeLevel = 0; + + if (event.currentItem.getItem() instanceof IChargeable) { + itemChargeLevel = ((IChargeable) event.currentItem.getItem()).getCharge(event.currentItem); } + chargeLevel = 1 + itemChargeLevel * 2; + if ((event.target.sideHit == 0) || (event.target.sideHit == 1)) { xScale = chargeLevel; zScale = chargeLevel; @@ -116,8 +123,7 @@ public class DrawBlockHighlightHandler { public static void renderSlidingQuad(int texture, float transparency) { - float slide = (System.currentTimeMillis() % 3000) / 3000f; - double pulse = (double) 1 + slide; + float pulse = (System.currentTimeMillis() % 3000) / 3000f; GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture); Tessellator tessellator = Tessellator.instance; @@ -125,15 +131,15 @@ public class DrawBlockHighlightHandler { GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - GL11.glColor4f(1, 1, 1, transparency); + GL11.glColor4f(1, 1, 1, pulse); tessellator.startDrawingQuads(); - tessellator.setColorRGBA_F(1, 1, 1, transparency); + tessellator.setColorRGBA_F(1, 1, 1, pulse); - tessellator.addVertexWithUV(-0.5D, 0.5D, 0F, 0, pulse); - tessellator.addVertexWithUV(0.5D, 0.5D, 0F, 0, pulse); - tessellator.addVertexWithUV(0.5D, -0.5D, 0F, 1, pulse); - tessellator.addVertexWithUV(-0.5D, -0.5D, 0F, 1, pulse); + tessellator.addVertexWithUV(-0.5D, 0.5D, 0F, 0, 1); + tessellator.addVertexWithUV(0.5D, 0.5D, 0F, 1, 1); + tessellator.addVertexWithUV(0.5D, -0.5D, 0F, 1, 0); + tessellator.addVertexWithUV(-0.5D, -0.5D, 0F, 0, 0); tessellator.draw(); GL11.glDisable(GL11.GL_BLEND); diff --git a/ee3_client/ee3/client/core/handlers/KeyBindingHandler.java b/ee3_client/ee3/client/core/handlers/KeyBindingHandler.java index c3029340..b5b46b53 100644 --- a/ee3_client/ee3/client/core/handlers/KeyBindingHandler.java +++ b/ee3_client/ee3/client/core/handlers/KeyBindingHandler.java @@ -3,6 +3,7 @@ package ee3.client.core.handlers; import java.util.EnumSet; import java.util.logging.Level; +import net.minecraft.src.EntityPlayer; import net.minecraft.src.Item; import net.minecraft.src.ItemStack; import net.minecraft.src.KeyBinding; @@ -14,6 +15,7 @@ import cpw.mods.fml.common.registry.LanguageRegistry; import ee3.client.core.helper.KeyBindingHelper; import ee3.common.EquivalentExchange3; import ee3.common.core.helper.LogHelper; +import ee3.common.item.IKeyBound; import ee3.common.item.ITransmutationStone; import ee3.common.item.ModItems; import ee3.common.lib.ConfigurationSettings; @@ -35,36 +37,30 @@ import ee3.common.network.PacketTypeHandler; public class KeyBindingHandler extends KeyBindingRegistry.KeyHandler { public KeyBindingHandler() { + super(KeyBindingHelper.gatherKeyBindings(), KeyBindingHelper.gatherIsRepeating()); } @Override public String getLabel() { - return Reference.MOD_NAME + ": " + this.getClass().getSimpleName(); + + return Reference.MOD_NAME + ": " + this.getClass().getSimpleName(); } @Override public void keyDown(EnumSet types, KeyBinding kb, boolean tickEnd, boolean isRepeat) { + // Only operate at the end of the tick if (tickEnd) { // If we are not in a GUI of any kind, continue execution if (FMLClientHandler.instance().getClient().inGameHasFocus) { - // TODO Clean this up properly - if (kb.keyDescription == Reference.KEYBINDING_EXTRA) { + EntityPlayer player = FMLClientHandler.instance().getClient().thePlayer; + if (player != null) { ItemStack currentItem = FMLClientHandler.instance().getClient().thePlayer.getCurrentEquippedItem(); - + if (currentItem != null) { - if (currentItem.getItem() instanceof ITransmutationStone) { - ((ITransmutationStone)currentItem.getItem()).openPortableCrafting(kb.keyDescription); - } - } - } - else if (kb.keyDescription == Reference.KEYBINDING_TOGGLE) { - ItemStack currentItem = FMLClientHandler.instance().getClient().thePlayer.getCurrentEquippedItem(); - - if (currentItem != null) { - if (currentItem.getItem() instanceof ITransmutationStone) { - ConfigurationSettings.ENABLE_OVERLAY_PHILOSOPHER_STONE = !ConfigurationSettings.ENABLE_OVERLAY_PHILOSOPHER_STONE; + if (currentItem.getItem() instanceof IKeyBound) { + PacketDispatcher.sendPacketToServer(PacketTypeHandler.populatePacket(new PacketKeyPressed(kb.keyDescription))); } } } @@ -74,14 +70,18 @@ public class KeyBindingHandler extends KeyBindingRegistry.KeyHandler { } @Override - public void keyUp(EnumSet types, KeyBinding kb, boolean tickEnd) {} + public void keyUp(EnumSet types, KeyBinding kb, boolean tickEnd) { + + } @Override public EnumSet ticks() { + return EnumSet.of(TickType.CLIENT); } private static String getLocalizedKey(String key) { - return LanguageRegistry.instance().getStringLocalization(key); + + return LanguageRegistry.instance().getStringLocalization(key); } } diff --git a/ee3_common/ee3/common/core/handlers/RenderTickHandler.java b/ee3_client/ee3/client/core/handlers/RenderTickHandler.java similarity index 52% rename from ee3_common/ee3/common/core/handlers/RenderTickHandler.java rename to ee3_client/ee3/client/core/handlers/RenderTickHandler.java index 293cbed4..6baee069 100644 --- a/ee3_common/ee3/common/core/handlers/RenderTickHandler.java +++ b/ee3_client/ee3/client/core/handlers/RenderTickHandler.java @@ -1,4 +1,4 @@ -package ee3.common.core.handlers; +package ee3.client.core.handlers; import java.util.EnumSet; @@ -19,7 +19,6 @@ import net.minecraft.src.ScaledResolution; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.ITickHandler; import cpw.mods.fml.common.TickType; -import ee3.client.core.handlers.DrawBlockHighlightHandler; import ee3.client.core.helper.RenderUtils; import ee3.common.core.helper.TransmutationHelper; import ee3.common.core.helper.VersionHelper; @@ -44,10 +43,10 @@ public class RenderTickHandler implements ITickHandler { if (type.contains(TickType.RENDER)) { if (player != null) { currentItemStack = player.inventory.getCurrentItem(); - } - if ((player != null) && (currentItemStack != null) && (minecraft.inGameHasFocus) && (currentItemStack.getItem() instanceof ITransmutationStone) && (ConfigurationSettings.ENABLE_OVERLAY_PHILOSOPHER_STONE)) { - renderStoneHUD(minecraft, player, currentItemStack, (Float) tickData[0]); + if ((currentItemStack != null) && (minecraft.inGameHasFocus) && (currentItemStack.getItem() instanceof ITransmutationStone) && (ConfigurationSettings.ENABLE_OVERLAY_WORLD_TRANSMUTATION)) { + renderStoneHUD(minecraft, player, currentItemStack, (Float) tickData[0]); + } } } } @@ -66,39 +65,39 @@ public class RenderTickHandler implements ITickHandler { private static void renderStoneHUD(Minecraft minecraft, EntityPlayer player, ItemStack stack, float partialTicks) { - float overlayScale = 2F; // TODO config option + float overlayScale = 2F; // TODO config option float blockScale = overlayScale / 2; - float overlayOpacity = 1F; // TODO config option - + float overlayOpacity = 1F; // TODO config option + MovingObjectPosition rayTrace = minecraft.objectMouseOver; ItemStack currentBlock = null; - + if ((player.worldObj != null) && (rayTrace != null)) { - currentBlock = TransmutationHelper.getNextBlock(player.worldObj.getBlockId(rayTrace.blockX, rayTrace.blockY, rayTrace.blockZ), player.worldObj.getBlockMetadata(rayTrace.blockX, rayTrace.blockY, rayTrace.blockZ), true); + currentBlock = TransmutationHelper.getNextBlock(player.worldObj.getBlockId(rayTrace.blockX, rayTrace.blockY, rayTrace.blockZ), player.worldObj.getBlockMetadata(rayTrace.blockX, rayTrace.blockY, rayTrace.blockZ), player.isSneaking()); } - + GL11.glPushMatrix(); - ScaledResolution sr = new ScaledResolution(minecraft.gameSettings, minecraft.displayWidth, minecraft.displayHeight); - GL11.glClear(256); - GL11.glMatrixMode(GL11.GL_PROJECTION); - GL11.glLoadIdentity(); - GL11.glOrtho(0.0D, sr.getScaledWidth_double(), sr.getScaledHeight_double(), 0.0D, 1000.0D, 3000.0D); - GL11.glMatrixMode(GL11.GL_MODELVIEW); - GL11.glLoadIdentity(); - GL11.glTranslatef(0.0F, 0.0F, -2000.0F); - - GL11.glPushMatrix(); - RenderHelper.enableGUIStandardItemLighting(); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - GL11.glEnable(GL11.GL_COLOR_MATERIAL); - GL11.glEnable(GL11.GL_LIGHTING); - RenderUtils.renderItemIntoGUI(minecraft.fontRenderer, minecraft.renderEngine, stack, (int) (sr.getScaledWidth() - (16 * overlayScale)), (int) (sr.getScaledHeight() - (16 * overlayScale)), overlayOpacity / 2, overlayScale); - if ((currentBlock != null) && (currentBlock.getItem() instanceof ItemBlock)) { - RenderUtils.renderRotatingBlockIntoGUI(minecraft.fontRenderer, minecraft.renderEngine, currentBlock, (int) (sr.getScaledWidth() - (16 * overlayScale) / 2 - 8), (int) (sr.getScaledHeight() - (16 * overlayScale) / 2 - 8), -90, blockScale); - } - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + ScaledResolution sr = new ScaledResolution(minecraft.gameSettings, minecraft.displayWidth, minecraft.displayHeight); + GL11.glClear(256); + GL11.glMatrixMode(GL11.GL_PROJECTION); + GL11.glLoadIdentity(); + GL11.glOrtho(0.0D, sr.getScaledWidth_double(), sr.getScaledHeight_double(), 0.0D, 1000.0D, 3000.0D); + GL11.glMatrixMode(GL11.GL_MODELVIEW); + GL11.glLoadIdentity(); + GL11.glTranslatef(0.0F, 0.0F, -2000.0F); + + GL11.glPushMatrix(); + RenderHelper.enableGUIStandardItemLighting(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + GL11.glEnable(GL11.GL_COLOR_MATERIAL); + GL11.glEnable(GL11.GL_LIGHTING); + RenderUtils.renderItemIntoGUI(minecraft.fontRenderer, minecraft.renderEngine, stack, (int) (sr.getScaledWidth() - (16 * overlayScale)), (int) (sr.getScaledHeight() - (16 * overlayScale)), overlayOpacity / 2, overlayScale); + if ((currentBlock != null) && (currentBlock.getItem() instanceof ItemBlock)) { + RenderUtils.renderRotatingBlockIntoGUI(minecraft.fontRenderer, minecraft.renderEngine, currentBlock, (int) (sr.getScaledWidth() - (16 * overlayScale) / 2 - 8), (int) (sr.getScaledHeight() - (16 * overlayScale) / 2 - 8), -90, blockScale); + } + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); GL11.glPopMatrix(); } diff --git a/ee3_client/ee3/client/gui/GuiCalcinator.java b/ee3_client/ee3/client/gui/GuiCalcinator.java index 8b3e2619..6132db65 100644 --- a/ee3_client/ee3/client/gui/GuiCalcinator.java +++ b/ee3_client/ee3/client/gui/GuiCalcinator.java @@ -6,7 +6,7 @@ import cpw.mods.fml.common.Side; import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.registry.LanguageRegistry; import ee3.common.container.ContainerCalcinator; -import ee3.common.lib.Reference; +import ee3.common.lib.Sprites; import ee3.common.lib.Strings; import ee3.common.tile.TileCalcinator; import net.minecraft.src.Container; @@ -42,7 +42,7 @@ public class GuiCalcinator extends GuiContainer { protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { - int var4 = this.mc.renderEngine.getTexture(Reference.GUI_SHEET_LOCATION + "calcinator.png"); + int var4 = this.mc.renderEngine.getTexture(Sprites.GUI_SHEET_LOCATION + Sprites.CALCINATOR_MODEL_TEXTURE); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.renderEngine.bindTexture(var4); int var5 = (this.width - this.xSize) / 2; diff --git a/ee3_client/ee3/client/render/ModelCalcinator.java b/ee3_client/ee3/client/render/ModelCalcinator.java index fb3c61a1..de21b265 100644 --- a/ee3_client/ee3/client/render/ModelCalcinator.java +++ b/ee3_client/ee3/client/render/ModelCalcinator.java @@ -2,7 +2,7 @@ package ee3.client.render; import org.lwjgl.opengl.GL11; -import ee3.common.lib.Reference; +import ee3.common.lib.Sprites; import ee3.common.tile.TileCalcinator; import net.minecraft.src.ModelBase; import net.minecraft.src.ModelRenderer; @@ -130,7 +130,7 @@ public class ModelCalcinator extends ModelBase { GL11.glDisable(GL11.GL_LIGHTING); GL11.glTranslated(x, y, z); - ForgeHooksClient.bindTexture(Reference.SPRITE_SHEET_LOCATION + Reference.CALCINATOR_TEXTURE_SHEET, 0); + ForgeHooksClient.bindTexture(Sprites.SPRITE_SHEET_LOCATION + Sprites.CALCINATOR_MODEL_TEXTURE, 0); firePotBottom.render(scale); bowlBottom.render(scale); diff --git a/ee3_client/ee3/client/render/RenderItemCalcinator.java b/ee3_client/ee3/client/render/RenderItemCalcinator.java index 3ede590f..8432d6a5 100644 --- a/ee3_client/ee3/client/render/RenderItemCalcinator.java +++ b/ee3_client/ee3/client/render/RenderItemCalcinator.java @@ -3,6 +3,7 @@ package ee3.client.render; import org.lwjgl.opengl.GL11; import ee3.common.lib.Reference; +import ee3.common.lib.Sprites; import net.minecraft.src.ItemStack; import net.minecraft.src.Tessellator; import net.minecraftforge.client.ForgeHooksClient; @@ -48,7 +49,7 @@ public class RenderItemCalcinator implements IItemRenderer { private void renderCalcinator(float x, float y, float z) { Tessellator tesselator = Tessellator.instance; - ForgeHooksClient.bindTexture(Reference.SPRITE_SHEET_LOCATION + "calcinator.png", 0); + ForgeHooksClient.bindTexture(Sprites.SPRITE_SHEET_LOCATION + Sprites.CALCINATOR_MODEL_TEXTURE, 0); GL11.glPushMatrix(); //start GL11.glTranslatef(x, y, z); //size calcinatorModel.render(0.0625F); diff --git a/ee3_client/ee3/client/render/TextureRedWaterFX.java b/ee3_client/ee3/client/render/TextureRedWaterFX.java index 98d4ade7..adee7bc9 100644 --- a/ee3_client/ee3/client/render/TextureRedWaterFX.java +++ b/ee3_client/ee3/client/render/TextureRedWaterFX.java @@ -6,7 +6,7 @@ import net.minecraft.src.RenderEngine; import net.minecraftforge.client.MinecraftForgeClient; import cpw.mods.fml.client.FMLTextureFX; import ee3.common.block.ModBlocks; -import ee3.common.lib.Reference; +import ee3.common.lib.Sprites; /** * TextureRedWaterFX @@ -42,7 +42,7 @@ public class TextureRedWaterFX extends FMLTextureFX { @Override public void bindImage(RenderEngine renderEngine) { - GL11.glBindTexture(GL11.GL_TEXTURE_2D, renderEngine.getTexture(Reference.SPRITE_SHEET_LOCATION + Reference.BLOCK_SPRITE_SHEET)); + GL11.glBindTexture(GL11.GL_TEXTURE_2D, renderEngine.getTexture(Sprites.SPRITE_SHEET_LOCATION + Sprites.BLOCK_SPRITE_SHEET)); } public void onTick() { diff --git a/ee3_client/ee3/client/render/TextureRedWaterFlowFX.java b/ee3_client/ee3/client/render/TextureRedWaterFlowFX.java index 5a70ad8e..f09b2971 100644 --- a/ee3_client/ee3/client/render/TextureRedWaterFlowFX.java +++ b/ee3_client/ee3/client/render/TextureRedWaterFlowFX.java @@ -6,7 +6,7 @@ import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLTextureFX; import ee3.common.block.ModBlocks; -import ee3.common.lib.Reference; +import ee3.common.lib.Sprites; /** * TextureRedWaterFlowFX @@ -43,7 +43,7 @@ public class TextureRedWaterFlowFX extends FMLTextureFX { @Override public void bindImage(RenderEngine renderEngine) { - GL11.glBindTexture(GL11.GL_TEXTURE_2D, renderEngine.getTexture(Reference.SPRITE_SHEET_LOCATION + Reference.BLOCK_SPRITE_SHEET)); + GL11.glBindTexture(GL11.GL_TEXTURE_2D, renderEngine.getTexture(Sprites.SPRITE_SHEET_LOCATION + Sprites.BLOCK_SPRITE_SHEET)); } public void onTick() { diff --git a/ee3_common/ee3/common/EquivalentExchange3.java b/ee3_common/ee3/common/EquivalentExchange3.java index 516e6ab4..51db7eb8 100644 --- a/ee3_common/ee3/common/EquivalentExchange3.java +++ b/ee3_common/ee3/common/EquivalentExchange3.java @@ -17,6 +17,7 @@ import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.TickRegistry; +import ee3.client.core.handlers.RenderTickHandler; import ee3.common.block.ModBlocks; import ee3.common.core.CommonProxy; import ee3.common.core.CreativeTabEE3; @@ -28,7 +29,6 @@ import ee3.common.core.handlers.ItemPickupHandler; import ee3.common.core.handlers.LocalizationHandler; import ee3.common.core.handlers.PacketHandler; import ee3.common.core.handlers.PlayerDestroyItemHandler; -import ee3.common.core.handlers.RenderTickHandler; import ee3.common.core.handlers.VersionCheckTickHandler; import ee3.common.core.helper.LogHelper; import ee3.common.core.helper.VersionHelper; diff --git a/ee3_common/ee3/common/block/BlockRedWaterFlowing.java b/ee3_common/ee3/common/block/BlockRedWaterFlowing.java index c4633a07..435704d4 100644 --- a/ee3_common/ee3/common/block/BlockRedWaterFlowing.java +++ b/ee3_common/ee3/common/block/BlockRedWaterFlowing.java @@ -2,6 +2,8 @@ package ee3.common.block; import ee3.common.EquivalentExchange3; import ee3.common.lib.Reference; +import ee3.common.lib.Sprites; +import ee3.common.lib.Strings; import net.minecraft.src.BlockFlowing; import net.minecraft.src.CreativeTabs; import net.minecraft.src.Material; @@ -22,12 +24,12 @@ public class BlockRedWaterFlowing extends BlockFlowing { this.blockHardness = 100F; this.setLightOpacity(3); this.setCreativeTab(EquivalentExchange3.tabsEE3); - this.setBlockName("redWaterFlowing"); + this.setBlockName(Strings.RED_WATER_FLOWING_NAME); } @Override public String getTextureFile() { - return Reference.SPRITE_SHEET_LOCATION + Reference.BLOCK_SPRITE_SHEET; + return Sprites.SPRITE_SHEET_LOCATION + Sprites.BLOCK_SPRITE_SHEET; } } diff --git a/ee3_common/ee3/common/block/BlockRedWaterStill.java b/ee3_common/ee3/common/block/BlockRedWaterStill.java index 8c8b89fe..e9081d22 100644 --- a/ee3_common/ee3/common/block/BlockRedWaterStill.java +++ b/ee3_common/ee3/common/block/BlockRedWaterStill.java @@ -1,7 +1,8 @@ package ee3.common.block; import ee3.common.EquivalentExchange3; -import ee3.common.lib.Reference; +import ee3.common.lib.Sprites; +import ee3.common.lib.Strings; import net.minecraft.src.BlockStationary; import net.minecraft.src.Material; @@ -20,7 +21,7 @@ public class BlockRedWaterStill extends BlockStationary { super(id, Material.water); this.blockHardness = 100F; this.setLightOpacity(3); - this.setBlockName("redWaterStill"); + this.setBlockName(Strings.RED_WATER_STILL_NAME); this.setCreativeTab(EquivalentExchange3.tabsEE3); this.disableStats(); this.setRequiresSelfNotify(); @@ -28,7 +29,7 @@ public class BlockRedWaterStill extends BlockStationary { @Override public String getTextureFile() { - return Reference.SPRITE_SHEET_LOCATION + Reference.BLOCK_SPRITE_SHEET; + return Sprites.SPRITE_SHEET_LOCATION + Sprites.BLOCK_SPRITE_SHEET; } } diff --git a/ee3_common/ee3/common/core/CommonProxy.java b/ee3_common/ee3/common/core/CommonProxy.java index 35fd2dc4..57d7e18a 100644 --- a/ee3_common/ee3/common/core/CommonProxy.java +++ b/ee3_common/ee3/common/core/CommonProxy.java @@ -25,51 +25,73 @@ import ee3.common.tile.TileCalcinator; */ public class CommonProxy implements IGuiHandler { - public void registerKeyBindingHandler() {} - - public void registerRenderTickHandler() {} - - public void registerDrawBlockHighlightHandler() {} + public void registerKeyBindingHandler() { - public void setKeyBinding(String name, int value) {} + } - public void registerSoundHandler() {} + public void registerRenderTickHandler() { - public void initCustomRarityTypes() {} + } + + public void registerDrawBlockHighlightHandler() { + + } + + public void setKeyBinding(String name, int value) { + + } + + public void registerSoundHandler() { + + } + + public void initCustomRarityTypes() { + + } public EnumRarity getCustomRarityType(String customRarity) { + return null; } - - public void initRenderingAndTextures() {} - - public void initTileEntities() { - GameRegistry.registerTileEntity(TileCalcinator.class, Strings.TE_CALCINATOR_NAME); + + public void initRenderingAndTextures() { + } - + + public void initTileEntities() { + + GameRegistry.registerTileEntity(TileCalcinator.class, Strings.TE_CALCINATOR_NAME); + } + + public void sendWorldEventPacket(byte eventType, int originX, int originY, int originZ, byte sideHit, byte rangeX, byte rangeY, byte rangeZ, String data) { + + } + @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { + if (ID == GuiIds.PORTABLE_CRAFTING) { return new ContainerPortableCrafting(player.inventory, world, x, y, z); } else if (ID == GuiIds.CALCINATOR) { - TileCalcinator calcinator = (TileCalcinator)world.getBlockTileEntity(x, y, z); + TileCalcinator calcinator = (TileCalcinator) world.getBlockTileEntity(x, y, z); return new ContainerCalcinator(player.inventory, calcinator); } - + return null; } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { + if (ID == GuiIds.PORTABLE_CRAFTING) { return new GuiPortableCrafting(player, world, x, y, z); } else if (ID == GuiIds.CALCINATOR) { - TileCalcinator calcinator = (TileCalcinator)world.getBlockTileEntity(x, y, z); + TileCalcinator calcinator = (TileCalcinator) world.getBlockTileEntity(x, y, z); return new GuiCalcinator(player.inventory, calcinator); } - + return null; } 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/core/handlers/ConfigurationHandler.java b/ee3_common/ee3/common/core/handlers/ConfigurationHandler.java index 5606ce4c..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,40 +38,50 @@ 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_GENERAL, ConfigurationSettings.ENABLE_PARTICLE_FX_CONFIGNAME, ConfigurationSettings.ENABLE_PARTICLE_FX_DEFAULT) + .get(CATEGORY_GRAPHICS, ConfigurationSettings.ENABLE_PARTICLE_FX_CONFIGNAME, ConfigurationSettings.ENABLE_PARTICLE_FX_DEFAULT) .getBoolean(ConfigurationSettings.ENABLE_PARTICLE_FX_DEFAULT); - ConfigurationSettings.ENABLE_OVERLAY_PHILOSOPHER_STONE = configuration - .get(CATEGORY_GENERAL, ConfigurationSettings.ENABLE_OVERLAY_PHILOSOPHER_STONE_CONFIGNAME, ConfigurationSettings.ENABLE_OVERLAY_PHILOSOPHER_STONE_DEFAULT) - .getBoolean(ConfigurationSettings.ENABLE_OVERLAY_PHILOSOPHER_STONE_DEFAULT); + ConfigurationSettings.ENABLE_OVERLAY_WORLD_TRANSMUTATION = configuration + .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); @@ -83,21 +97,43 @@ public class ConfigurationHandler { ItemIds.ALCHEMY_DUST = configuration .getItem(Strings.ALCHEMY_DUST_NAME, ItemIds.ALCHEMY_DUST_DEFAULT) .getInt(ItemIds.ALCHEMY_DUST_DEFAULT); + 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/handlers/EquivalencyHandler.java b/ee3_common/ee3/common/core/handlers/EquivalencyHandler.java index cd02a3c6..c1f623c5 100644 --- a/ee3_common/ee3/common/core/handlers/EquivalencyHandler.java +++ b/ee3_common/ee3/common/core/handlers/EquivalencyHandler.java @@ -16,19 +16,22 @@ import net.minecraft.src.ItemStack; */ public class EquivalencyHandler { - private static final EquivalencyHandler instance = new EquivalencyHandler(); - + private static final EquivalencyHandler instance = new EquivalencyHandler(); + private static ArrayList> equivalencyList = new ArrayList>(); - + public static EquivalencyHandler instance() { - return instance; + + return instance; } - + public ArrayList> getAllLists() { - return equivalencyList; + + return equivalencyList; } public void addObjects(Object obj1, Object obj2) { + ItemStack stack1 = GeneralHelper.convertObjectToItemStack(obj1); ItemStack stack2 = GeneralHelper.convertObjectToItemStack(obj2); @@ -39,7 +42,7 @@ public class EquivalencyHandler { if ((stack1Index != null) && (stack2Index != null)) { return; - } + } else if ((stack1Index != null) && (stack2Index == null)) { currentList = equivalencyList.get(stack1Index.intValue()); currentList.add(stack2); @@ -58,6 +61,7 @@ public class EquivalencyHandler { } public void addObjects(Object... objList) { + if (objList.length < 2) return; @@ -67,6 +71,7 @@ public class EquivalencyHandler { } public Integer getIndexInList(Object obj) { + ItemStack checkStack = GeneralHelper.convertObjectToItemStack(obj); ArrayList currentList; int i = 0; @@ -83,25 +88,27 @@ public class EquivalencyHandler { return null; } - - public Integer getIndexinList(int id, int meta) { - ArrayList currentList; - int i = 0; - while (i < equivalencyList.size()) { - currentList = equivalencyList.get(i); - for (ItemStack currentStack : currentList) { - if ((id == currentStack.itemID) && (meta == currentStack.getItemDamage())) { - return new Integer(i); - } - } - ++i; - } + public Integer getIndexInList(int id, int meta) { - return null; + ArrayList currentList; + int i = 0; + + while (i < equivalencyList.size()) { + currentList = equivalencyList.get(i); + for (ItemStack currentStack : currentList) { + if ((id == currentStack.itemID) && (meta == currentStack.getItemDamage())) { + return new Integer(i); + } + } + ++i; + } + + return null; } public ArrayList getEquivalencyList(Object obj) { + ItemStack checkStack = GeneralHelper.convertObjectToItemStack(obj); if (checkStack == null) @@ -117,95 +124,106 @@ public class EquivalencyHandler { return null; } - + public ArrayList getEquivalencyList(int id, int meta) { - for (ArrayList list : equivalencyList) { - for (ItemStack currentStack : list) { - if ((id == currentStack.itemID) && (meta == currentStack.getItemDamage())) { - return list; - } - } - } - return null; + for (ArrayList list : equivalencyList) { + for (ItemStack currentStack : list) { + if ((id == currentStack.itemID) && (meta == currentStack.getItemDamage())) { + return list; + } + } + } + + return null; } - + public ItemStack getNextInList(Object obj) { - ItemStack checkStack = GeneralHelper.convertObjectToItemStack(obj); - if (checkStack != null) { - return getNextInList(checkStack.itemID, checkStack.getItemDamage()); - } - - return null; + ItemStack checkStack = GeneralHelper.convertObjectToItemStack(obj); + + if (checkStack != null) { + return getNextInList(checkStack.itemID, checkStack.getItemDamage()); + } + + return null; } - + public ItemStack getNextInList(int id, int meta) { - ArrayList list = getEquivalencyList(id, meta); - ItemStack currentStack; - ItemStack returnStack = null; - int i = 0; + ArrayList list = getEquivalencyList(id, meta); - if (list != null) { - if (list.size() == 1) { - return list.get(i); - } - - while (i < list.size()) { - currentStack = list.get(i); - - if ((id == currentStack.itemID) && (meta == currentStack.getItemDamage())) { - returnStack = list.get((i + 1) % list.size()); - break; - } - - ++i; - } - } + ItemStack currentStack; + ItemStack returnStack = null; + int i = 0; - return returnStack; - } - - public ItemStack getPrevInList(Object obj) { - ItemStack checkStack = GeneralHelper.convertObjectToItemStack(obj); - - if (checkStack != null) { - return getPrevInList(checkStack.itemID, checkStack.getItemDamage()); - } - - return null; - } - - public ItemStack getPrevInList(int id, int meta) { - ArrayList list = getEquivalencyList(id, meta); - - ItemStack currentStack; - ItemStack returnStack = null; - int i = 0; - - if (list != null) { - if (list.size() == 1) { + if (list != null) { + if (list.size() == 1) { return list.get(i); } - - while (i < list.size()) { - currentStack = list.get(i); - - if ((id == currentStack.itemID) && (meta == currentStack.getItemDamage())) { - int index = ((i - 1) + list.size()) % list.size(); - returnStack = list.get(index); - break; - } - - ++i; - } - } - return returnStack; + while (i < list.size()) { + currentStack = list.get(i); + + if ((id == currentStack.itemID) && (meta == currentStack.getItemDamage())) { + returnStack = list.get((i + 1) % list.size()); + break; + } + + ++i; + } + } + + return returnStack; + } + + public ItemStack getPrevInList(Object obj) { + + ItemStack checkStack = GeneralHelper.convertObjectToItemStack(obj); + + if (checkStack != null) { + return getPrevInList(checkStack.itemID, checkStack.getItemDamage()); + } + + return null; + } + + public ItemStack getPrevInList(int id, int meta) { + + ArrayList list = getEquivalencyList(id, meta); + + ItemStack currentStack; + ItemStack returnStack = null; + int i = 0; + + if (list != null) { + if (list.size() == 1) { + return list.get(i); + } + + while (i < list.size()) { + currentStack = list.get(i); + + if ((id == currentStack.itemID) && (meta == currentStack.getItemDamage())) { + int index = ((i - 1) + list.size()) % list.size(); + returnStack = list.get(index); + break; + } + + ++i; + } + } + + return returnStack; + } + + public boolean areEquivalent(Object obj1, Object obj2) { + + return (getEquivalencyList(obj1).equals(getEquivalencyList(obj2))); } public void debug() { + int i = 0; for (ArrayList list : equivalencyList) { System.out.println("equivalencyList[" + i + "]: " + list.toString()); 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/core/helper/TransmutationHelper.java b/ee3_common/ee3/common/core/helper/TransmutationHelper.java index 1de1667e..348eb344 100644 --- a/ee3_common/ee3/common/core/helper/TransmutationHelper.java +++ b/ee3_common/ee3/common/core/helper/TransmutationHelper.java @@ -30,7 +30,7 @@ public class TransmutationHelper { int meta = world.getBlockMetadata(x, y, z); if ((world.getBlockMaterial(x, y, z) == Material.leaves) && (Block.blocksList[id] instanceof BlockLeaves)) { - meta = meta % 4; + meta = meta % 4; } ItemStack nextItem = getNextBlock(id, meta, player.isSneaking()); @@ -42,70 +42,75 @@ public class TransmutationHelper { return true; } } - + return false; } - + public static ItemStack getNextBlock(int id, int meta, boolean allowFalling) { + ArrayList list = EquivalencyHandler.instance().getEquivalencyList(id, meta); - + ItemStack nextStack = null; - + if (list != null) { return getNextBlock(id, meta, id, meta, allowFalling); } - + return nextStack; } - + private static ItemStack getNextBlock(int id, int meta, int origId, int origMeta, boolean allowFalling) { + ArrayList list = EquivalencyHandler.instance().getEquivalencyList(id, meta); - + ItemStack nextStack = null; - + if (list != null) { nextStack = EquivalencyHandler.instance().getNextInList(id, meta); /* - * If the current item is the same as the original one we started with, then we have - * recursed through the entire list and not found a next block so return the original. - * This is the "base case" for the recursion. + * If the current item is the same as the original one we started + * with, then we have recursed through the entire list and not found + * a next block so return the original. This is the "base case" for + * the recursion. */ if ((nextStack.itemID == origId) && (nextStack.getItemDamage() == origMeta)) { - return nextStack; + return nextStack; } else { - /* - * If we are allowing any block (including falling ones) just check to see if the - * next item is a block. If it is, return it. Otherwise continue the recursion. - */ - if (allowFalling) { - if (nextStack.getItem() instanceof ItemBlock) { - return nextStack; - } - else { - return getNextBlock(nextStack.itemID, nextStack.getItemDamage(), origId, origMeta, allowFalling); - } - } - /* - * Else we need to check to make sure the next item is both a block and not an - * instance of BlockSand (which all gravity affected blocks are a subclass of. - * If the next item is a block, and is not a subclass of BlockSand return it, - * otherwise, continue the recursion. - */ - else { - if ((nextStack.getItem() instanceof ItemBlock) && (!(Block.blocksList[nextStack.itemID] instanceof BlockSand))) { - return nextStack; - } - else { - return getNextBlock(nextStack.itemID, nextStack.getItemDamage(), origId, origMeta, allowFalling); - } - } + /* + * If we are allowing any block (including falling ones) just + * check to see if the next item is a block. If it is, return + * it. Otherwise continue the recursion. + */ + if (allowFalling) { + if (nextStack.getItem() instanceof ItemBlock) { + return nextStack; + } + else { + return getNextBlock(nextStack.itemID, nextStack.getItemDamage(), origId, origMeta, allowFalling); + } + } + /* + * Else we need to check to make sure the next item is both a + * block and not an instance of BlockSand (which all gravity + * affected blocks are a subclass of. If the next item is a + * block, and is not a subclass of BlockSand return it, + * otherwise, continue the recursion. + */ + else { + if ((nextStack.getItem() instanceof ItemBlock) && (!(Block.blocksList[nextStack.itemID] instanceof BlockSand))) { + return nextStack; + } + else { + return getNextBlock(nextStack.itemID, nextStack.getItemDamage(), origId, origMeta, allowFalling); + } + } } } - + // In the event the list is null, return null return nextStack; } - + } diff --git a/ee3_common/ee3/common/item/IChargeable.java b/ee3_common/ee3/common/item/IChargeable.java index 58e9176c..11d111ce 100644 --- a/ee3_common/ee3/common/item/IChargeable.java +++ b/ee3_common/ee3/common/item/IChargeable.java @@ -5,7 +5,7 @@ import net.minecraft.src.ItemStack; public interface IChargeable { public abstract short getCharge(ItemStack stack); - + public abstract void setCharge(ItemStack stack, short charge); public abstract void increaseCharge(ItemStack stack); diff --git a/ee3_common/ee3/common/item/IKeyBound.java b/ee3_common/ee3/common/item/IKeyBound.java index 7d633f9c..bfdb53a0 100644 --- a/ee3_common/ee3/common/item/IKeyBound.java +++ b/ee3_common/ee3/common/item/IKeyBound.java @@ -1,7 +1,10 @@ package ee3.common.item; +import net.minecraft.src.EntityPlayer; +import net.minecraft.src.ItemStack; + public interface IKeyBound { - public abstract void doKeyBindingAction(String keyBinding, boolean isSneaking); + public abstract void doKeyBindingAction(EntityPlayer thePlayer, ItemStack itemStack, String keyBinding); } diff --git a/ee3_common/ee3/common/item/ITransmutationStone.java b/ee3_common/ee3/common/item/ITransmutationStone.java index 33507881..fd6cd504 100644 --- a/ee3_common/ee3/common/item/ITransmutationStone.java +++ b/ee3_common/ee3/common/item/ITransmutationStone.java @@ -1,5 +1,7 @@ package ee3.common.item; +import net.minecraft.src.EntityPlayer; + /** * ITransmutationStone * @@ -11,6 +13,6 @@ package ee3.common.item; */ public interface ITransmutationStone { - public abstract void openPortableCrafting(String keyPressed); + public abstract void openPortableCrafting(EntityPlayer thePlayer); } diff --git a/ee3_common/ee3/common/item/ItemAlchemyBag.java b/ee3_common/ee3/common/item/ItemAlchemyBag.java new file mode 100644 index 00000000..3a1a52aa --- /dev/null +++ b/ee3_common/ee3/common/item/ItemAlchemyBag.java @@ -0,0 +1,130 @@ +package ee3.common.item; + +import java.util.List; + +import net.minecraft.src.CreativeTabs; +import net.minecraft.src.ItemStack; +import net.minecraft.src.MathHelper; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.common.Side; +import cpw.mods.fml.common.asm.SideOnly; +import ee3.common.EquivalentExchange3; +import ee3.common.lib.Colours; +import ee3.common.lib.Strings; + +public class ItemAlchemyBag extends ItemEE { + + public static final String[] alchemyBagNames = new String[] { "white", "orange", "magenta", "light_blue", "yellow", "lime", "pink", "gray", "light_gray", "cyan", "purple", "blue", "brown", "green", "red", "black" }; + + public ItemAlchemyBag(int id) { + + super(id); + this.setHasSubtypes(true); + this.setIconCoord(6, 0); + this.setItemName(Strings.ALCHEMY_BAG_NAME); + this.setCreativeTab(EquivalentExchange3.tabsEE3); + } + + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses() { + + return true; + } + + @SideOnly(Side.CLIENT) + public int getIconFromDamageForRenderPass(int meta, int renderPass) { + + if (renderPass == 0) { + return this.getIconFromDamage(meta); + } + else { + return this.getIconFromDamage(meta) + 1; + } + } + + @SideOnly(Side.CLIENT) + public int getIconFromDamage(int meta) { + + if (FMLClientHandler.instance().getClient().currentScreen != null) { + return (this.iconIndex + 2); + } + + return this.iconIndex; + } + + @SideOnly(Side.CLIENT) + public String getItemNameIS(ItemStack stack) { + + int meta = MathHelper.clamp_int(stack.getItemDamage(), 0, 15); + return super.getItemName() + "." + alchemyBagNames[meta]; + } + + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack itemStack, int renderPass) { + + int returnValue = Integer.parseInt(Colours.PURE_WHITE, 16); + + if (renderPass == 0) { + switch (itemStack.getItemDamage()) { + case 0: + returnValue = Integer.parseInt(Colours.BAG_WHITE, 16); + break; + case 1: + returnValue = Integer.parseInt(Colours.BAG_ORANGE, 16); + break; + case 2: + returnValue = Integer.parseInt(Colours.BAG_MAGENTA, 16); + break; + case 3: + returnValue = Integer.parseInt(Colours.BAG_LIGHT_BLUE, 16); + break; + case 4: + returnValue = Integer.parseInt(Colours.BAG_YELLOW, 16); + break; + case 5: + returnValue = Integer.parseInt(Colours.BAG_LIME, 16); + break; + case 6: + returnValue = Integer.parseInt(Colours.BAG_PINK, 16); + break; + case 7: + returnValue = Integer.parseInt(Colours.BAG_GRAY, 16); + break; + case 8: + returnValue = Integer.parseInt(Colours.BAG_LIGHT_GRAY, 16); + break; + case 9: + returnValue = Integer.parseInt(Colours.BAG_CYAN, 16); + break; + case 10: + returnValue = Integer.parseInt(Colours.BAG_PURPLE, 16); + break; + case 11: + returnValue = Integer.parseInt(Colours.BAG_BLUE, 16); + break; + case 12: + returnValue = Integer.parseInt(Colours.BAG_BROWN, 16); + break; + case 13: + returnValue = Integer.parseInt(Colours.BAG_GREEN, 16); + break; + case 14: + returnValue = Integer.parseInt(Colours.BAG_RED, 16); + break; + case 15: + returnValue = Integer.parseInt(Colours.BAG_BLACK, 16); + break; + } + } + return returnValue; + } + + @SideOnly(Side.CLIENT) + public void getSubItems(int id, CreativeTabs creativeTab, List list) { + + for (int meta = 0; meta < 16; ++meta) { + list.add(new ItemStack(id, 1, meta)); + } + } + +} diff --git a/ee3_common/ee3/common/item/ItemAlchemyDust.java b/ee3_common/ee3/common/item/ItemAlchemyDust.java index 7aaa1bbe..d7de84be 100644 --- a/ee3_common/ee3/common/item/ItemAlchemyDust.java +++ b/ee3_common/ee3/common/item/ItemAlchemyDust.java @@ -26,60 +26,72 @@ import ee3.common.lib.Strings; */ public class ItemAlchemyDust extends ItemEE { - public static final String[] alchemyDustNames = new String[] {"ash", "minium", "verdant", "azure", "amaranthine", "iridescent"}; - - public ItemAlchemyDust(int id) { - super(id); - this.setHasSubtypes(true); - this.setMaxDamage(0); - this.setIconCoord(0, 3); + public static final String[] alchemyDustNames = new String[] { "ash", "minium", "verdant", "azure", "amaranthine", "iridescent" }; + + public ItemAlchemyDust(int id) { + + super(id); + this.setHasSubtypes(true); + this.setIconCoord(10, 0); this.setItemName(Strings.ALCHEMY_DUST_NAME); this.setCreativeTab(EquivalentExchange3.tabsEE3); - maxStackSize = 64; - } - - @SideOnly(Side.CLIENT) + maxStackSize = 64; + } + + @SideOnly(Side.CLIENT) public int getIconFromDamage(int meta) { - int i = MathHelper.clamp_int(meta, 0, 11); + + int i = MathHelper.clamp_int(meta, 0, 5); return (this.iconIndex + i); } - - public String getItemNameIS(ItemStack stack) { + + @SideOnly(Side.CLIENT) + public String getItemNameIS(ItemStack stack) { + int meta = MathHelper.clamp_int(stack.getItemDamage(), 0, 5); return super.getItemName() + "." + alchemyDustNames[meta]; } - - @SideOnly(Side.CLIENT) + + @SideOnly(Side.CLIENT) public boolean hasEffect(ItemStack stack) { - int meta = MathHelper.clamp_int(stack.getItemDamage(), 0, 5); - - if (meta == 5) { - return true; - } - else { - return false; - } + + int meta = MathHelper.clamp_int(stack.getItemDamage(), 0, 5); + + if (meta == 5) { + return true; + } + else { + return false; + } } - - @SideOnly(Side.CLIENT) + + @SideOnly(Side.CLIENT) public EnumRarity getRarity(ItemStack stack) { - int meta = MathHelper.clamp_int(stack.getItemDamage(), 0, 11); - - switch(meta) { - case 0: return EquivalentExchange3.proxy.getCustomRarityType(CustomItemRarity.NORMAL); - case 1: return EquivalentExchange3.proxy.getCustomRarityType(CustomItemRarity.NORMAL); - case 2: return EquivalentExchange3.proxy.getCustomRarityType(CustomItemRarity.UNCOMMON); - case 3: return EquivalentExchange3.proxy.getCustomRarityType(CustomItemRarity.MAGICAL); - case 4: return EquivalentExchange3.proxy.getCustomRarityType(CustomItemRarity.EPIC); - case 5: return EquivalentExchange3.proxy.getCustomRarityType(CustomItemRarity.LEGENDARY); - default: return EnumRarity.common; - } - + + int meta = MathHelper.clamp_int(stack.getItemDamage(), 0, 11); + + switch (meta) { + case 0: + return EquivalentExchange3.proxy.getCustomRarityType(CustomItemRarity.NORMAL); + case 1: + return EquivalentExchange3.proxy.getCustomRarityType(CustomItemRarity.NORMAL); + case 2: + return EquivalentExchange3.proxy.getCustomRarityType(CustomItemRarity.UNCOMMON); + case 3: + return EquivalentExchange3.proxy.getCustomRarityType(CustomItemRarity.MAGICAL); + case 4: + return EquivalentExchange3.proxy.getCustomRarityType(CustomItemRarity.EPIC); + case 5: + return EquivalentExchange3.proxy.getCustomRarityType(CustomItemRarity.LEGENDARY); + default: + return EnumRarity.common; + } + } - - @SideOnly(Side.CLIENT) - public void getSubItems(int id, CreativeTabs creativeTab, List list) - { + + @SideOnly(Side.CLIENT) + public void getSubItems(int id, CreativeTabs creativeTab, List list) { + for (int meta = 0; meta < 6; ++meta) { list.add(new ItemStack(id, 1, meta)); } diff --git a/ee3_common/ee3/common/item/ItemEE.java b/ee3_common/ee3/common/item/ItemEE.java index a20ae239..f8b0a5cd 100644 --- a/ee3_common/ee3/common/item/ItemEE.java +++ b/ee3_common/ee3/common/item/ItemEE.java @@ -1,6 +1,7 @@ package ee3.common.item; import ee3.common.lib.Reference; +import ee3.common.lib.Sprites; import net.minecraft.src.Item; /** @@ -15,9 +16,10 @@ import net.minecraft.src.Item; public class ItemEE extends Item { public ItemEE(int id) { + super(id - Reference.SHIFTED_ID_RANGE_CORRECTION); maxStackSize = 1; - setTextureFile(Reference.SPRITE_SHEET_LOCATION + Reference.ITEM_SPRITE_SHEET); + setTextureFile(Sprites.SPRITE_SHEET_LOCATION + Sprites.ITEM_SPRITE_SHEET); setNoRepair(); } diff --git a/ee3_common/ee3/common/item/ItemInertStone.java b/ee3_common/ee3/common/item/ItemInertStone.java index adea27bc..682cb2cc 100644 --- a/ee3_common/ee3/common/item/ItemInertStone.java +++ b/ee3_common/ee3/common/item/ItemInertStone.java @@ -14,11 +14,12 @@ import ee3.common.lib.Strings; */ public class ItemInertStone extends ItemEE { - public ItemInertStone(int id) { - super(id); - this.setIconCoord(1, 0); - this.setItemName(Strings.INERT_STONE_NAME); - this.setCreativeTab(EquivalentExchange3.tabsEE3); - } + public ItemInertStone(int id) { + + super(id); + this.setIconCoord(1, 0); + this.setItemName(Strings.INERT_STONE_NAME); + this.setCreativeTab(EquivalentExchange3.tabsEE3); + } } diff --git a/ee3_common/ee3/common/item/ItemMiniumStone.java b/ee3_common/ee3/common/item/ItemMiniumStone.java index 533f949d..53a82afd 100644 --- a/ee3_common/ee3/common/item/ItemMiniumStone.java +++ b/ee3_common/ee3/common/item/ItemMiniumStone.java @@ -28,10 +28,11 @@ import ee3.common.network.PacketTypeHandler; * @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html) * */ -public class ItemMiniumStone extends ItemEE - implements ITransmutationStone, IKeyBound { - +public class ItemMiniumStone extends ItemEE + implements ITransmutationStone, IKeyBound { + public ItemMiniumStone(int id) { + super(id); this.setIconCoord(1, 0); this.setItemName(Strings.MINIUM_STONE_NAME); @@ -41,59 +42,61 @@ public class ItemMiniumStone extends ItemEE @SideOnly(Side.CLIENT) public EnumRarity getRarity(ItemStack stack) { + return EquivalentExchange3.proxy.getCustomRarityType(CustomItemRarity.MAGICAL); } - + @Override public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemStack) { - return false; + + return false; } - + @Override public boolean getShareTag() { - return true; + + return true; } - + @Override public ItemStack getContainerItemStack(ItemStack itemStack) { - itemStack.setItemDamage(itemStack.getItemDamage() + 1); - - return 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) { - boolean result = TransmutationHelper.transmuteInWorld(world, entityPlayer, itemStack, x, y, z); - - if (result) { - itemStack.damageItem(1, entityPlayer); - } - - return result; + + @Override + public boolean onItemUse(ItemStack itemStack, EntityPlayer entityPlayer, World world, int x, int y, int z, int sideHit, float hitVecX, float hitVecY, float hitVecZ) { + + boolean result = TransmutationHelper.transmuteInWorld(world, entityPlayer, itemStack, x, y, z); + + if (result) { + itemStack.damageItem(1, entityPlayer); + } + + return result; } - - @SideOnly(Side.CLIENT) - public int getColorFromItemStack(ItemStack par1ItemStack, int par2) - { + + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack par1ItemStack, int par2) { + return Integer.parseInt(Colours.PURE_RED, 16); } @Override - public void openPortableCrafting(String keyPressed) { - /* - * Notify the Server that we opened the GUI. When the server receives the packet, it will open the Gui - * server side, and notify the client to open the Gui client side on its own. Magic! - */ - PacketDispatcher.sendPacketToServer(PacketTypeHandler.populatePacket(new PacketKeyPressed(keyPressed))); + public void openPortableCrafting(EntityPlayer thePlayer) { + + thePlayer.openGui(EquivalentExchange3.instance, GuiIds.PORTABLE_CRAFTING, thePlayer.worldObj, (int) thePlayer.posX, (int) thePlayer.posY, (int) thePlayer.posZ); } @Override - public void doKeyBindingAction(String keyBinding, boolean isSneaking) { + public void doKeyBindingAction(EntityPlayer thePlayer, ItemStack itemStack, String keyBinding) { - if (keyBinding.equals(Reference.KEYBINDING_EXTRA)) { - System.out.println("Extra key"); + 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 f6ec07d9..12f8aa5e 100644 --- a/ee3_common/ee3/common/item/ItemPhilosopherStone.java +++ b/ee3_common/ee3/common/item/ItemPhilosopherStone.java @@ -3,15 +3,19 @@ package ee3.common.item; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.Side; import cpw.mods.fml.common.asm.SideOnly; -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; +import ee3.common.lib.Sounds; import ee3.common.lib.Strings; +import ee3.common.lib.WorldEvents; import ee3.common.network.PacketKeyPressed; import ee3.common.network.PacketTypeHandler; +import ee3.common.network.PacketWorldEvent; import net.minecraft.src.EntityPlayer; import net.minecraft.src.EnumRarity; import net.minecraft.src.ItemStack; @@ -26,77 +30,122 @@ import net.minecraft.src.World; * @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html) * */ -public class ItemPhilosopherStone extends ItemEE - implements ITransmutationStone, IChargeable { +public class ItemPhilosopherStone extends ItemEE + implements ITransmutationStone, IChargeable, IKeyBound { private int maxChargeLevel; - + public ItemPhilosopherStone(int id) { + super(id); this.setIconCoord(2, 0); this.setItemName(Strings.PHILOSOPHER_STONE_NAME); this.setCreativeTab(EquivalentExchange3.tabsEE3); - this.maxChargeLevel = 4; + this.setMaxDamage(ConfigurationSettings.PHILOSOPHERS_STONE_MAX_DURABILITY - 1); + this.maxChargeLevel = 3; } @SideOnly(Side.CLIENT) public boolean hasEffect(ItemStack stack) { + return true; } @SideOnly(Side.CLIENT) public EnumRarity getRarity(ItemStack stack) { + return EquivalentExchange3.proxy.getCustomRarityType(CustomItemRarity.RARE); } - + @Override public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemStack) { - return false; + + return false; } - + @Override public boolean getShareTag() { - return true; + + return true; } - + @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); + public ItemStack getContainerItemStack(ItemStack itemStack) { + + itemStack.setItemDamage(itemStack.getItemDamage() + 1); + + return itemStack; } - + @Override - public void openPortableCrafting(String keyPressed) { + public boolean onItemUse(ItemStack itemStack, EntityPlayer entityPlayer, World world, int x, int y, int z, int sideHit, float hitVecX, float hitVecY, float hitVecZ) { + + //boolean result = TransmutationHelper.transmuteInWorld(world, entityPlayer, itemStack, x, y, z); + boolean result = true; + if (!world.isRemote) { + EquivalentExchange3.proxy.sendWorldEventPacket(WorldEvents.TRANSMUTATION, x, y, z, (byte)sideHit, (byte)getCharge(itemStack), (byte)getCharge(itemStack), (byte)getCharge(itemStack), "50:0"); + } /* - * Notify the Server that we opened the GUI. When the server receives the packet, it will open the Gui - * server side, and notify the client to open the Gui client side on its own. Magic! - */ - PacketDispatcher.sendPacketToServer(PacketTypeHandler.populatePacket(new PacketKeyPressed(keyPressed))); + if (result) { + itemStack.damageItem(1, entityPlayer); + } + */ + return result; } - + + @Override + public void openPortableCrafting(EntityPlayer thePlayer) { + + thePlayer.openGui(EquivalentExchange3.instance, GuiIds.PORTABLE_CRAFTING, thePlayer.worldObj, (int) thePlayer.posX, (int) thePlayer.posY, (int) thePlayer.posZ); + } + @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(ConfigurationSettings.KEYBINDING_EXTRA)) { + openPortableCrafting(thePlayer); + } + 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))); + } + else { + decreaseCharge(itemStack); + thePlayer.worldObj.playSoundAtEntity(thePlayer, Sounds.CHARGE_DOWN, 0.5F, 1.0F - (0.5F - (0.5F * (getCharge(itemStack) * 1.0F / maxChargeLevel)))); + } + } + + } + } diff --git a/ee3_common/ee3/common/item/ModItems.java b/ee3_common/ee3/common/item/ModItems.java index aa91c16c..60105f0d 100644 --- a/ee3_common/ee3/common/item/ModItems.java +++ b/ee3_common/ee3/common/item/ModItems.java @@ -27,6 +27,7 @@ public class ModItems { public static Item miniumStone; public static Item philStone; public static Item alchemyDust; + public static Item alchemyBag; public static void init() { /* Initialize each mod item individually */ @@ -35,6 +36,7 @@ public class ModItems { miniumStone = new ItemMiniumStone(ItemIds.MINIUM_STONE); philStone = new ItemPhilosopherStone(ItemIds.PHILOSOPHER_STONE); alchemyDust = new ItemAlchemyDust(ItemIds.ALCHEMY_DUST); + alchemyBag = new ItemAlchemyBag(ItemIds.ALCHEMY_BAG); miniumStone.setContainerItem(miniumStone); philStone.setContainerItem(philStone); diff --git a/ee3_common/ee3/common/lib/Colours.java b/ee3_common/ee3/common/lib/Colours.java index a65fe95f..760104a3 100644 --- a/ee3_common/ee3/common/lib/Colours.java +++ b/ee3_common/ee3/common/lib/Colours.java @@ -10,12 +10,30 @@ package ee3.common.lib; * */ public class Colours { - + + public static final String PURE_WHITE = "ffffff"; public static final String PURE_RED = "ff0000"; /* Text colour related constants */ public static final String TEXT_COLOUR_PREFIX_YELLOW = "\u00a7e"; - public static final String TEXT_COLOUR_PREFIX_WHITE = "\u00a7f"; + /* Bag colour related constants */ + public static final String BAG_WHITE = "ffffff"; + public static final String BAG_ORANGE = "db7d3e"; + public static final String BAG_MAGENTA = "b350bc"; + public static final String BAG_LIGHT_BLUE = "6b8ac9"; + public static final String BAG_YELLOW = "b1a627"; + public static final String BAG_LIME = "41ae38"; + public static final String BAG_PINK = "d08499"; + public static final String BAG_GRAY = "868d8d"; + public static final String BAG_LIGHT_GRAY = "c8c8be"; + public static final String BAG_CYAN = "2e6e89"; + public static final String BAG_PURPLE = "7e3db5"; + public static final String BAG_BLUE = "2e388d"; + public static final String BAG_BROWN = "4f321f"; + public static final String BAG_GREEN = "35461b"; + public static final String BAG_RED = "963430"; + public static final String BAG_BLACK = "404040"; + } diff --git a/ee3_common/ee3/common/lib/ConfigurationSettings.java b/ee3_common/ee3/common/lib/ConfigurationSettings.java index aee106eb..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,45 +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 Philosopher Stone overlay is enabled - public static boolean ENABLE_OVERLAY_PHILOSOPHER_STONE; - public static final String ENABLE_OVERLAY_PHILOSOPHER_STONE_CONFIGNAME = "enable_philosopher_stone_overlay"; - public static final boolean ENABLE_OVERLAY_PHILOSOPHER_STONE_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 = "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; + 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/ItemIds.java b/ee3_common/ee3/common/lib/ItemIds.java index aa098633..e4be319b 100644 --- a/ee3_common/ee3/common/lib/ItemIds.java +++ b/ee3_common/ee3/common/lib/ItemIds.java @@ -17,6 +17,7 @@ public class ItemIds { public static int MINIUM_STONE_DEFAULT = 27002; public static int PHILOSOPHER_STONE_DEFAULT = 27003; public static int ALCHEMY_DUST_DEFAULT = 27004; + public static int ALCHEMY_BAG_DEFAULT = 27005; /* Current item ids */ public static int MINIUM_SHARD; @@ -24,5 +25,6 @@ public class ItemIds { public static int MINIUM_STONE; public static int PHILOSOPHER_STONE; public static int ALCHEMY_DUST; + public static int ALCHEMY_BAG; } 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/lib/Reference.java b/ee3_common/ee3/common/lib/Reference.java index a6e5c761..5460cef7 100644 --- a/ee3_common/ee3/common/lib/Reference.java +++ b/ee3_common/ee3/common/lib/Reference.java @@ -24,33 +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; - - /* Texture related constants */ - public static final String SPRITE_SHEET_LOCATION = "/ee3/art/sprites/"; - public static final String ARMOR_SHEET_LOCATION = "/ee3/art/armor/"; - public static final String GUI_SHEET_LOCATION = "/ee3/art/gui/"; - public static final String ITEM_SPRITE_SHEET = "ee3_items.png"; - public static final String BLOCK_SPRITE_SHEET = "ee3_blocks.png"; - public static final String CALCINATOR_TEXTURE_SHEET = "calcinator.png"; - - /* 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/Sounds.java b/ee3_common/ee3/common/lib/Sounds.java index 145cdd76..0357bbe3 100644 --- a/ee3_common/ee3/common/lib/Sounds.java +++ b/ee3_common/ee3/common/lib/Sounds.java @@ -15,10 +15,9 @@ public class Sounds { private static final String SOUND_PREFIX = "ee3.sound."; public static String[] soundFiles = { - SOUND_RESOURCE_LOCATION + "break.ogg", - SOUND_RESOURCE_LOCATION + "chargetick.ogg", + SOUND_RESOURCE_LOCATION + "chargeDown.ogg", + SOUND_RESOURCE_LOCATION + "chargeUp.ogg", SOUND_RESOURCE_LOCATION + "destruct.ogg", - SOUND_RESOURCE_LOCATION + "flash.ogg", SOUND_RESOURCE_LOCATION + "gust.ogg", SOUND_RESOURCE_LOCATION + "heal.ogg", SOUND_RESOURCE_LOCATION + "kinesis.ogg", @@ -31,10 +30,9 @@ public class Sounds { SOUND_RESOURCE_LOCATION + "waterball.ogg", SOUND_RESOURCE_LOCATION + "wind.ogg" }; - public static final String BREAK = SOUND_PREFIX + "break"; - public static final String CHARGE_TICK = SOUND_PREFIX + "chargetick"; + public static final String CHARGE_DOWN = SOUND_PREFIX + "chargeDown"; + public static final String CHARGE_UP = SOUND_PREFIX + "chargeUp"; public static final String DESTRUCTION = SOUND_PREFIX + "destruct"; - public static final String FLASH = SOUND_PREFIX + "flash"; public static final String GUST = SOUND_PREFIX + "gust"; public static final String HEAL = SOUND_PREFIX + "heal"; public static final String KINESIS = SOUND_PREFIX + "kinesis"; diff --git a/ee3_common/ee3/common/lib/Sprites.java b/ee3_common/ee3/common/lib/Sprites.java new file mode 100644 index 00000000..fe186c50 --- /dev/null +++ b/ee3_common/ee3/common/lib/Sprites.java @@ -0,0 +1,15 @@ +package ee3.common.lib; + + +public class Sprites { + + public static final String SPRITE_SHEET_LOCATION = "/ee3/art/sprites/"; + public static final String ARMOR_SHEET_LOCATION = "/ee3/art/armor/"; + public static final String GUI_SHEET_LOCATION = "/ee3/art/gui/"; + + public static final String ITEM_SPRITE_SHEET = "ee3_items.png"; + public static final String BLOCK_SPRITE_SHEET = "ee3_blocks.png"; + public static final String CALCINATOR_MODEL_TEXTURE = "calcinator.png"; + public static final String WORLD_TRANSMUTATION_TEXTURE = "noise.png"; + +} diff --git a/ee3_common/ee3/common/lib/Strings.java b/ee3_common/ee3/common/lib/Strings.java index 194ba426..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,11 +16,16 @@ 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"; public static final String RED_WATER_STILL_NAME = "redWaterStill"; + public static final String RED_WATER_FLOWING_NAME = "redWaterFlowing"; /* Item name constants */ public static final String MINIUM_SHARD_NAME = "miniumShard"; @@ -28,8 +33,15 @@ public class Strings { public static final String MINIUM_STONE_NAME = "miniumStone"; public static final String PHILOSOPHER_STONE_NAME = "philStone"; public static final String ALCHEMY_DUST_NAME = "alchemyDust"; + public static final String ALCHEMY_BAG_NAME = "alchemyBag"; /* 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/lib/WorldEvents.java b/ee3_common/ee3/common/lib/WorldEvents.java new file mode 100644 index 00000000..5bf67236 --- /dev/null +++ b/ee3_common/ee3/common/lib/WorldEvents.java @@ -0,0 +1,8 @@ +package ee3.common.lib; + + +public class WorldEvents { + + public static final byte TRANSMUTATION = 0; + +} diff --git a/ee3_common/ee3/common/network/PacketKeyPressed.java b/ee3_common/ee3/common/network/PacketKeyPressed.java index e500f1a3..c24aa1a4 100644 --- a/ee3_common/ee3/common/network/PacketKeyPressed.java +++ b/ee3_common/ee3/common/network/PacketKeyPressed.java @@ -53,13 +53,9 @@ public class PacketKeyPressed extends PacketEE { public void execute(INetworkManager manager, Player player) { EntityPlayer thePlayer = (EntityPlayer) player; - /* - if ((this.key.equals(Reference.KEYBINDING_EXTRA)) && (thePlayer.getCurrentEquippedItem().getItem() instanceof ITransmutationStone)) { - thePlayer.openGui(EquivalentExchange3.instance, GuiIds.PORTABLE_CRAFTING, thePlayer.worldObj, (int)thePlayer.posX, (int)thePlayer.posY, (int)thePlayer.posZ); - } - */ + if ((thePlayer.getCurrentEquippedItem() != null) && (thePlayer.getCurrentEquippedItem().getItem() instanceof IKeyBound)) { - ((IKeyBound) thePlayer.getCurrentEquippedItem().getItem()).doKeyBindingAction(this.key, thePlayer.isSneaking()); + ((IKeyBound) thePlayer.getCurrentEquippedItem().getItem()).doKeyBindingAction(thePlayer, thePlayer.getCurrentEquippedItem(), this.key); } } } diff --git a/ee3_common/ee3/common/network/PacketTypeHandler.java b/ee3_common/ee3/common/network/PacketTypeHandler.java index c19cfdc0..f1d8da89 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_EVENT(PacketWorldEvent.class); private Class clazz; diff --git a/ee3_common/ee3/common/network/PacketWorldEvent.java b/ee3_common/ee3/common/network/PacketWorldEvent.java new file mode 100644 index 00000000..d511812a --- /dev/null +++ b/ee3_common/ee3/common/network/PacketWorldEvent.java @@ -0,0 +1,104 @@ +package ee3.common.network; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; + +import net.minecraft.src.INetworkManager; +import cpw.mods.fml.common.network.Player; + +public class PacketWorldEvent extends PacketEE { + + public byte eventType; + public int originX, originY, originZ; + public byte sideHit; + public byte rangeX, rangeY, rangeZ; + public String data; + + public PacketWorldEvent() { + + super(PacketTypeHandler.WORLD_EVENT, false); + } + + public PacketWorldEvent(byte eventType, int originX, int originY, int originZ, byte sideHit, byte rangeX, byte rangeY, byte rangeZ, String data) { + + super(PacketTypeHandler.WORLD_EVENT, false); + this.eventType = eventType; + this.originX = originX; + this.originY = originY; + this.originZ = originZ; + this.sideHit = sideHit; + this.rangeX = rangeX; + this.rangeY = rangeY; + this.rangeZ = rangeZ; + this.data = data; + } + + public void setEventType(byte eventType) { + + this.eventType = eventType; + } + + public void setOrigin(int originX, int originY, int originZ) { + + this.originX = originX; + this.originY = originY; + this.originZ = originZ; + } + + public void setSideHit(byte sideHit) { + this.sideHit = sideHit; + } + + public void setRange(byte rangeX, byte rangeY, byte rangeZ) { + + this.rangeX = rangeX; + this.rangeY = rangeY; + this.rangeZ = rangeZ; + } + + public void setData(String data) { + + this.data = data; + } + + public void writeData(DataOutputStream data) throws IOException { + + data.writeByte(eventType); + data.writeInt(originX); + data.writeInt(originY); + data.writeInt(originZ); + data.writeByte(sideHit); + data.writeByte(rangeX); + data.writeByte(rangeY); + data.writeByte(rangeZ); + data.writeUTF(this.data); + } + + public void readData(DataInputStream data) throws IOException { + + this.eventType = data.readByte(); + this.originX = data.readInt(); + this.originY = data.readInt(); + this.originZ = data.readInt(); + this.sideHit = data.readByte(); + this.rangeX = data.readByte(); + this.rangeY = data.readByte(); + this.rangeZ = data.readByte(); + this.data = data.readUTF(); + } + + public void execute(INetworkManager manager, Player player) { + + System.out.println("World Event Packet received"); + System.out.println("originX: " + originX); + System.out.println("originY: " + originY); + System.out.println("originZ: " + originZ); + System.out.println("sideHit: " + sideHit); + System.out.println("rangeX: " + rangeX); + System.out.println("rangeY: " + rangeY); + System.out.println("rangeZ: " + rangeZ); + System.out.println("data: " + data); + } + +} 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); 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); } } diff --git a/resources/ee3/art/sprites/ee3_items.png b/resources/ee3/art/sprites/ee3_items.png index 0294c74a..bbb839e0 100644 Binary files a/resources/ee3/art/sprites/ee3_items.png and b/resources/ee3/art/sprites/ee3_items.png differ diff --git a/resources/ee3/art/sprites/test-circle.png b/resources/ee3/art/sprites/test-circle.png new file mode 100644 index 00000000..5005589e Binary files /dev/null and b/resources/ee3/art/sprites/test-circle.png differ diff --git a/resources/ee3/art/sprites/xcf/ee3_items.xcf b/resources/ee3/art/sprites/xcf/ee3_items.xcf index 85bb2748..047419fa 100644 Binary files a/resources/ee3/art/sprites/xcf/ee3_items.xcf and b/resources/ee3/art/sprites/xcf/ee3_items.xcf differ diff --git a/resources/ee3/lang/cs_CZ.xml b/resources/ee3/lang/cs_CZ.xml index 0f4d5f02..ab1e846d 100644 --- a/resources/ee3/lang/cs_CZ.xml +++ b/resources/ee3/lang/cs_CZ.xml @@ -2,6 +2,10 @@ Czech (CS) Localization File + Extra + Vypustit + Přepnout + Nabít Úlomek suříku Kámen suříku Kámen mudrců @@ -12,10 +16,6 @@ Proud Zastaralé Chyba připojení - Extra - Vypustit - Přepnout - Nabít Kalcinátor Provádím kontrolu verze, vzdálený soubor umístěn na Kontrola verze neproběhla úspěšně (nezdařila se inicializace) 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 diff --git a/resources/ee3/lang/en_US.xml b/resources/ee3/lang/en_US.xml index 66e55db6..0f91b2bf 100644 --- a/resources/ee3/lang/en_US.xml +++ b/resources/ee3/lang/en_US.xml @@ -16,6 +16,22 @@ Azure Dust Amaranthine Dust Iridescent Dust + White Alchemical Bag + Orange Alchemical Bag + Magenta Alchemical Bag + Light Blue Alchemical Bag + Yellow Alchemical Bag + Lime Alchemical Bag + Pink Alchemical Bag + Gray Alchemical Bag + Light Gray Alchemical Bag + Cyan Alchemical Bag + Purple Alchemical Bag + Blue Alchemical Bag + Brown Alchemical Bag + Green Alchemical Bag + Red Alchemical Bag + Black Alchemical Bag Red Water (Still) Red Water (Flowing) Calcinator diff --git a/resources/ee3/lang/es_ES.xml b/resources/ee3/lang/es_ES.xml index a46bc07b..c3f574cb 100644 --- a/resources/ee3/lang/es_ES.xml +++ b/resources/ee3/lang/es_ES.xml @@ -12,10 +12,26 @@ Piedra Filosofal Ceniza Polvo de Minio - Polvo verdante - Polvo azur - Polvo purpúreo - Polvo iridiscente + Polvo Verdante + Polvo Azur + Polvo Purpúreo + Polvo Iridiscente + Bolsa de Alquimia Blanca + Bolsa de Alquimia Naranja + Bolsa de Alquimia Magenta + Bolsa de Alquimia Celeste + Bolsa de Alquimia Amarilla + Bolsa de Alquimia Verde Lima + Bolsa de Alquimia Rosa + Bolsa de Alquimia Gris + Bolsa de Alquimia Gris Claro + Bolsa de Alquimia Cian + Bolsa de Alquimia Púrpura + Bolsa de Alquimia Azul + Bolsa de Alquimia Marrón + Bolsa de Alquimia Verde + Bolsa de Alquimia Roja + Bolsa de Alquimia Negra Agua Roja (Quieta) Agua Roja (Fluyendo) Calcinador diff --git a/resources/ee3/lang/ja_JP.xml b/resources/ee3/lang/ja_JP.xml index 8b7806da..7f8506fa 100644 --- a/resources/ee3/lang/ja_JP.xml +++ b/resources/ee3/lang/ja_JP.xml @@ -16,6 +16,22 @@ 紺碧の粉末 紫赤色の粉末 玉虫色の粉末 + 白色の奇術袋 + 橙色の奇術袋 + 赤紫色の奇術袋 + 空色の奇術袋 + 黄色の奇術袋 + 黄緑色の奇術袋 + 桃色の奇術袋 + 灰色の奇術袋 + 薄灰色の奇術袋 + 水色の奇術袋 + 紫色の奇術袋 + 青色の奇術袋 + 茶色の奇術袋 + 緑色の奇術袋 + 赤色の奇術袋 + 黒色の奇術袋 赤い水 (水源) 赤い水 (流水) 煆焼器 diff --git a/resources/ee3/lang/nl_NL.xml b/resources/ee3/lang/nl_NL.xml index c9212884..1cacf575 100644 --- a/resources/ee3/lang/nl_NL.xml +++ b/resources/ee3/lang/nl_NL.xml @@ -1,4 +1,4 @@ - + Dutch (NL) Localization File @@ -16,8 +16,24 @@ Azuurblauw Stof Amarant Stof Iriserend Stof - Rood Water (Stilstaand) - Rood Water (Vloeiend) + Witte Alchemistische Zak + Oranje Alchemistische Zak + Magenta Alchemistische Zak + Licht Blauwe Alchemistische Zak + Gele Alchemistische Zak + Lime Alchemistische Zak + Roze Alchemistische Zak + Grijze Alchemistische Zak + Licht Grijze Alchemistische Zak + Cyaan Alchemistische Zak + Paarse Alchemistische Zak + Blauwe Alchemistische Zak + Bruine Alchemistische Zak + Groene Alchemistische Zak + Rode Alchemistische Zak + Zwarte Alchemistische Zak + Stilstaand Rood Water + Vloeiend Rood Water Calcinator Calcinator Equivalent Exchange 3 @@ -27,4 +43,4 @@ Een nieuwe @MOD_NAME@ versie bestaat (@REMOTE_MOD_VERSION@) voor @MINECRAFT_VERSION@. Je vindt deze hier: @MOD_UPDATE_LOCATION@ Er deed zich een fout voor tijdens de versiecontrole Externe versiecontrole uitgeschakeld, wordt overgeslagen - + \ No newline at end of file diff --git a/resources/ee3/lang/pt_BR.xml b/resources/ee3/lang/pt_BR.xml index 7e415f73..e6f0c436 100644 --- a/resources/ee3/lang/pt_BR.xml +++ b/resources/ee3/lang/pt_BR.xml @@ -16,6 +16,22 @@ Pó Índigo Pó Amarantino Pó Iridescente + Bolsa Alquímica Branca + Bolsa Alquímica Laranja + Bolsa Alquímica Magenta + Bolsa Alquímica Azul-Claro + Bolsa Alquímica Amarela + Bolsa Alquímica Lima + Bolsa Alquímica Rosa + Bolsa Alquímica Cinza + Bolsa Alquímica Cinza-Claro + Bolsa Alquímica Ciano + Bolsa Alquímica Roxa + Bolsa Alquímica Azul + Bolsa Alquímica Marrom + Bolsa Alquímica Verde + Bolsa Alquímica Vermelha + Bolsa Alquímica Negra Água Vermelha (Parada) Água Vermelha (Corrente) Calcinador diff --git a/resources/ee3/lang/ru_RU.xml b/resources/ee3/lang/ru_RU.xml index 86aec312..8dfae026 100644 --- a/resources/ee3/lang/ru_RU.xml +++ b/resources/ee3/lang/ru_RU.xml @@ -11,20 +11,36 @@ Сурик Философский Камень Пепел - Пыль Сурика + Толченый Сурик Изумрудная Пыль Лазурная Пыль Пурпурная Пыль Радужная Пыль + Белая Алхимическая Сумка + Оранжевая Alchemical Bag + Пурпурная Алхимическая Сумка + Светло-Синяя Алхимическая Сумка + Желтая Алхимическая Сумка + Лаймовая Алхимическая Сумка + Розовая Алхимическая Сумка + Серая Алхимическая Сумка + Светло-Серая Алхимическая Сумка + Голубая Алхимическая Сумка + Фиолетовая Алхимическая Сумка + Синяя Алхимическая Сумка + Коричневая Алхимическая Сумка + Зеленая Алхимическая Сумка + Красная Алхимическая Сумка + Черная Алхимическая Сумка Красная Вода (Стоящая) Красная Вода (Текущая) Кальцинатор Кальцинатор Equivalent Exchange 3 Инициализация проверки версии в удаленном файле, находящемся на - Проверка версии не была завершена успешно (проверка версии не инициализирована правильно) - Вы используете самую последнюю версию для вашей версии Minecraft - Вы используете устаревшую версию, обновите здесь - @MOD_UPDATE_LOCATION@ - Ошибка подключения к удаленному файлу (проверьте подключение к Интернету) + Проверка версии не инициализирована правильно + Вы используете последнюю версию @MOD_NAME@ (@REMOTE_MOD_VERSION@) для @MINECRAFT_VERSION@ + Новая версия @MOD_NAME@ (@REMOTE_MOD_VERSION@) для @MINECRAFT_VERSION@. Скачайте здесь: @MOD_UPDATE_LOCATION@ + Ошибка проверки версии Удаленная проверка версии отключена, пропуск diff --git a/resources/ee3/lang/zh_CN.xml b/resources/ee3/lang/zh_CN.xml index 88925d91..6003c7db 100644 --- a/resources/ee3/lang/zh_CN.xml +++ b/resources/ee3/lang/zh_CN.xml @@ -20,6 +20,22 @@ 蔚蓝灰 苋属灰 虹彩灰 + 白色魔力包 + 橙色魔力包 + 品红色魔力包 + 淡蓝色魔力包 + 黄色魔力包 + 黄绿色魔力包 + 粉红色魔力包 + 灰色魔力包 + 淡灰色魔力包 + 青色魔力包 + 紫色魔力包 + 蓝色魔力包 + 棕色魔力包 + 绿色魔力包 + 红色魔力包 + 黑色魔力包 Equivalent Exchange 3 Initializing version check against the remote version authority file, located at The version check did not complete successfully (version check did not initialize properly) diff --git a/resources/ee3/lang/zh_TW.xml b/resources/ee3/lang/zh_TW.xml index e2a18c46..9b49292e 100644 --- a/resources/ee3/lang/zh_TW.xml +++ b/resources/ee3/lang/zh_TW.xml @@ -20,6 +20,22 @@ 蔚藍灰 莧屬灰 虹彩灰 + 白色魔力包 + 橙色魔力包 + 品紅色魔力包 + 淡藍色魔力包 + 黄色魔力包 + 黃綠色魔力包 + 粉紅色魔力包 + 灰色魔力包 + 淡灰色魔力包 + 青色魔力包 + 紫色魔力包 + 藍色魔力包 + 棕色魔力包 + 綠色魔力包 + 紅色魔力包 + 黑色魔力包 Equivalent Exchange 3 Initializing version check against the remote version authority file, located at The version check did not complete successfully (version check did not initialize properly) diff --git a/resources/ee3/sound/break.ogg b/resources/ee3/sound/chargeDown.ogg similarity index 100% rename from resources/ee3/sound/break.ogg rename to resources/ee3/sound/chargeDown.ogg diff --git a/resources/ee3/sound/flash.ogg b/resources/ee3/sound/chargeUp.ogg similarity index 100% rename from resources/ee3/sound/flash.ogg rename to resources/ee3/sound/chargeUp.ogg diff --git a/resources/ee3/sound/chargetick.ogg b/resources/ee3/sound/chargetick.ogg deleted file mode 100644 index e2c7c1f6..00000000 Binary files a/resources/ee3/sound/chargetick.ogg and /dev/null differ