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.

DiabolusNeil

Members
  • Joined

  • Last visited

Everything posted by DiabolusNeil

  1. 314owen? I recognize you from PlanetMinecraft. Well, welcome to to the forums. Like what Angus Young said, you need a GuiHandler. Here's an example: // Lots of imports public class GuiHandler implements IGuiHandler { @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { TileEntity tile = world.getTileEntity(x, y, z); if (tile != null && tile instanceof TileEntityDNAExtractor && ID == 0) { return new GuiDNAExtractor(player.inventory, (TileEntityDNAExtractor) tile); } return null; } @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { TileEntity tile = world.getTileEntity(x, y, z); if (tile != null && tile instanceof TileEntityDNAExtractor && ID == 0) { return new ContainerDNAExtractor(player.inventory, (TileEntityDNAExtractor) tile); } return null; } }
  2. Override the hitEntity method. Example: @Override public boolean hitEntity(ItemStack itemStack, EntityLivingBase living1, EntityLivingBase living2) { if (itemStack.getItemDamage() > 0) { itemStack.setItemDamage(itemStack.getItemDamage() - 1); } return true; }
  3. I made a 1.6.4 mod a little bit ago dealing with simple inventories. This: https://github.com/DiabolusNeil/MoreStorage/tree/master/common/diabolusneil/morestorage should help you greatly.
  4. Just look at the source code for the Minecraft generator. You can learn a ton of stuff from the source code.
  5. This might answer your questions: http://minecraft.gamepedia.com/Tick
  6. Could you please post the code for the TileEntity? I think your problem is in there.
  7. You can look at the code for the BlockWorkbench (net.minecraft.block), and InventoryWorkbench (net.minecraft.inventory). You can learn how those work and learn from that code.
  8. This thread might help you: http://stackoverflow.com/questions/585599/whats-causing-my-java-net-socketexception-connection-reset
  9. Thank you. This is exactly what I needed.
  10. You (or some form of malware) must have edited or deleted some of the files. For a last resort, consider deleting the old ForgeGradle files, and starting fresh. I also recommend using Forge build 1060.
  11. Override the breakBlock() method and put your code in that.
  12. Why have separate inventories for each upgrade applied? Just have the container initialize certain slots based on the upgrades found to be present in the backpack. You're making this process too complicated than it has to be.
  13. I like the effort you put into your tutorials, but I want to render a texture that requires multiple images that come together to form a single texture. Example for items: Tinkers' Construct's special tools.
  14. As far as I can tell, there's no up-to-date tutorials for this. I know it has something to do with Multi-Pass Rendering, but the tutorial on the wiki doesn't work. Could someone help me?
  15. Take a look in the ItemBlock class.
  16. Well, maybe the 1.6.4 tutorial would work for 1.7.2. There's still plenty of 1.6.4 modding tutorials that are still viable to use for 1.7.2. Try following the tutorial and see what you can come up with.
  17. You should register them during FMLServerStartingEvent. Example: public class MyMainModClass { // Additional code ... @EventHandler public void serverStarting(FMLServerStartingEvent event) { event.registerServerCommand(new MyCustomCommand()); // MyCustomCommand must inherit the CommandBase class } }
  18. Try pre-declaring the variables. If the controllerid is not declared, it's assumed to be null. It seems you have the solution in the current code, but you commented it out.
  19. Override the onInventoryChanged() method wherever you're using the IInventory method, and do some extra processing in that. It gets called every time any part of the inventory is changed.
  20. Like what diesieben07 said, use build 964. Forge has upgraded to using Gradle, which 964 implements, and 965 doesn't.
  21. Thanks! I was taking MachineMuse's advice from here: https://github.com/MachineMuse/MachineMusePowersuits/blob/master/src/minecraft/net/machinemuse/powersuits/common/ModularPowersuits.java though it is for 1.6.4.
  22. Using: Forge 10.12.0.1024 on a Windows 7 64 bit Java with JDK 7_51 Okay, inside of my custom Block class, I have this code: @Override public void registerBlockIcons(IIconRegister iconRegister) { System.out.println("TRIGGER1"); super.registerBlockIcons(iconRegister); } @Override public IIcon getIcon(int side, int meta) { System.out.println("TRIGGER2"); return super.getIcon(side, meta); } Whenever I go inside my testing world, the texture doesn't show, and only TRIGGER2 appears in the console, never TRIGGER1. I've actually gotten this to work earlier, but I accidentally deleted the code. What am I doing wrong?
  23. I've used the simple addName() method in the past, and wanted to use the localization system. Got to know the system, updated my development environment to 1.7, and now all of the methods are depreciated. It seems I'm supposed to use the loadLanguagesFor() method, but I don't understand it and can't find any good tutorials for it. Could someone point me in the right direction?
  24. So what would be a good example of that?

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.