Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

zenmogwai

Members
  • Joined

  • Last visited

Everything posted by zenmogwai

  1. It just doesn't read the first line. This localizes nothing: This localizes Wand but not TestItem: This localized Wand and TestItem:
  2. It looks like the lowercase might just be coincidence. While we were talking I had also added another item with just the most bare basic code to test. I can now see that the problem is that the first line of my en_US.lang file is not being read for some reason. When there was only one item in the file it didn't localize. When I added another item, the second item localized but not the first. If I just type garbage on the first line of the file and push everything down a line, they both localize.
  3. LOL well that worked thanks! But why??? All lowercase is a requirement?
  4. Yes, here is the project workspace
  5. src\main\resources\assets\<mod>\lang But I had to create the assets folder and I could have sworn it is normally there... maybe I'm just totally overlooking something.
  6. I forgot to add that I ran gradlew setupDecompWorkspace and then gradlew eclipse as well.
  7. My en_US.lang localization is not working. I think it has something to do with how I set up forge or eclipse because I just started a new project and workspace. Is there something I need to do to make eclipse or forge look for the assets in the right location when I start a new project? I created a folder; unzipped the forge mdk; then opened a new eclipse workspace pointed at the eclipse folder.
  8. Here is what I mean. I create a field to hold the TestContainer created by the server and pass it to the client to create the GUI. This results in the TestContainer code only being called once. Again this may not matter but I just want to make sure I understand what is happening and why. public static TestContainer serverContainer; @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { BlockPos pos = new BlockPos(x, y, z); TileEntity te = world.getTileEntity(pos); if (te instanceof TestContainerTileEntity) { serverContainer = new TestContainer(player.inventory, (TestContainerTileEntity) te, world); return serverContainer; } return null; } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { BlockPos pos = new BlockPos(x, y, z); TileEntity te = world.getTileEntity(pos); if (te instanceof TestContainerTileEntity) { TestContainerTileEntity containerTileEntity = (TestContainerTileEntity) te; return new TestContainerGui((TestContainerTileEntity)te, serverContainer); } return null; }
  9. Thanks, that's kind of my understanding as well - which is kind of why I ask the question. Maybe I totally misunderstand the concepts but the TestContainerGui creates a "new" TestContainer as an argument. So even though it only needs to return a GUI, it still goes through all the code to create an additional container. The server code creates and returns a new TestContainer. Then the Client code creates another new TestContainer as an argument that then gets passed to the TestContainerGui. So all the code to create a TestContainer gets called twice by both methods. Would it be better to output the TestContainer created by the server code and use it as the argument for the TestContainerGui rather than create a new container inside the TestContainerGui? Or does it just not even matter? I only noticed this because I put some tracers in the methods and I can see that all the TestContainer code gets called twice every time a new container is created - once by the server and then again by the client.
  10. I'm learning how to code for Minecraft so I'm following tutorials and trying to understand every method. The code below is from http://modwiki.temporal-reality.com/mw/index.php/Main_Page I noticed that the container is created twice in the methods, once server side and once client side. Is it supposed to be created twice or is it preferable to create it only once? Line 19 creates a new TestContainer server side. Then line 30 creates another new TestContainer client side. The author says you need both containers - one client and one server. Why? It is possible for me to pass the TestContainer created from the server method down to the client method and then only create one container. Then the client gets the GUI and the server gets the container. Both approaches (one or two containers) don't appear to cause any errors. Which is preferable? Is there a reason why you would want to create only one or to specifically create two containers? I'm just trying to understand how the code works. 12 public class GuiProxy implements IGuiHandler { 13 14 @Override 15 public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { 16 BlockPos pos = new BlockPos(x, y, z); 17 TileEntity te = world.getTileEntity(pos); 18 if (te instanceof TestContainerTileEntity) { 19 return new TestContainer(player.inventory, (TestContainerTileEntity) te); 20 } 21 return null; 22 } 23 24 @Override 25 public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { 26 BlockPos pos = new BlockPos(x, y, z); 27 TileEntity te = world.getTileEntity(pos); 28 if (te instanceof TestContainerTileEntity) { 29 TestContainerTileEntity containerTileEntity = (TestContainerTileEntity) te; 30 return new TestContainerGui(containerTileEntity, new TestContainer(player.inventory, containerTileEntity)); 31 } 32 return null; 33 }
  11. Thank you, fixed. This is closed
  12. Hi, I've been working to teach myself modding. A few months ago I successfully installed Eclipse and Forge for 1.9.4. Today I am trying to install Forge for 1.10.2. I followed the exact same steps but I am getting the error below. There are several old posts about but I tried all those recommendations and they didn't work (clean, cleanCache, --refresh-dependencies, etc). Can anybody help me get this installed? I previously installed ################################################# ForgeGradle 2.2-SNAPSHOT-ccb1196 https://github.com/MinecraftForge/ForgeGradle ################################################# Powered by MCP unknown http://modcoderpack.com by: Searge, ProfMobius, Fesh0r, R4wk, ZeuX, IngisKahn, bspkrs ################################################# :deobfCompileDummyTask :deobfProvidedDummyTask :getVersionJson :extractUserdev UP-TO-DATE :extractDependencyATs SKIPPED :extractMcpData SKIPPED :extractMcpMappings SKIPPED :genSrgs SKIPPED :downloadClient SKIPPED :downloadServer SKIPPED :splitServerJar SKIPPED :mergeJars SKIPPED :deobfMcSRG SKIPPED :decompileMc SKIPPED :fixMcSources SKIPPED :applySourcePatchesPatching failed: net/minecraft/client/gui/GuiMainMenu.java Cannot find hunk target 6: Cannot find hunk target @ 0 1/7 failed Patching failed: net/minecraft/client/gui/achievement/GuiAchievements.java Cannot find hunk target 3: Cannot find hunk target @ 0 4: Cannot find hunk target @ 0 2/10 failed Patching failed: net/minecraft/client/gui/inventory/GuiContainer.java Cannot find hunk target 3: Cannot find hunk target @ 0 10: Cannot find hunk target @ 0 2/13 failed Patching failed: net/minecraft/client/gui/inventory/GuiContainerCreative.java Cannot find hunk target 3: Cannot find hunk target @ 0 1/16 failed FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':applySourcePatches'. > com.cloudbees.diff.PatchException: Cannot find hunk target * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 10.579 secs

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.