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.

IamMaxim

Members
  • Joined

  • Last visited

Everything posted by IamMaxim

  1. Here's my instantiation: and it works with vanilla EntityFireball
  2. But how does original minecraft fireball works? It is abstract too and contains
  3. When I'm trying to spawn entity my server is shutting down and throws this: My entity class: I tried to add constructor without arguments, but this changed nothing. Here's how I'm registering it: I added another entity based on EntityCreature and it works good. Where is the problem?
  4. I made my custom inventory GUI (extends GuiContainer). It uses mainInventory, but how can I access armorInventory? As I know Slot constructor takes an IInventory, slot index and position in pixels, but armorInventory is an ItemStack[].
  5. Thanks, I'll try it tomorrow
  6. I think I can even give player a default hotbar (up to 9 slots) without inventory.
  7. I'm developing an RPG mod, so player will have "strength" attribute that will affect count of inventory slots. Min count is 2, max is 12.
  8. I will try to make onPlayerTickEvent. Maybe this will be enough
  9. I want do decrease avaible slots in inventory to make game harder. The main problem is that item in hand is taken from standart inventory. Can I just replace standart ItemStack array with mine? Or the only way to fill standart inventory with empty items?
  10. By hotbar engine I mean item selection with keys and, if it is possible, with mouse wheel.
  11. I made custom inventory, hotbar GUI(it contains 2 items), overriden pickup. But I don't know how to override hotbar mechanics. It can render items from standart player inventory. Shound I extend InventoryPlayer and replace standart EntityPlayer.inventory, or is there another way?
  12. Thanks for help. I found my bug. it was in
  13. I tried to edit it, but I get this list of errors: and then it crashes with IndexOutOfBoundsException. I don't understand why it call setInventorySlotContents() more than 8 times. Can you explain how it works, because I couldn't get any info from stacktrace, please?
  14. If you're using Intellij IDEA, click "Run" in menu and then "debug...".
  15. I wrote this code: CustomPlayer.java CustomPlayerInventory.java CustomPlayerContainer.java according to https://github.com/coolAlias/Forge_Tutorials/blob/master/CustomPlayerInventory.java, but I get this error in console: and empty inventory. So, my question is: Are extended properties saved while exitting world? While I don't exit world, items are saved(or displayed as saved; for now I can't test it)
  16. Thanks for information. It's now works! Just my not completed inventory container exceptions, but I'll try to fix them myself.
  17. I register it from @EventHandler public void preInit(FMLInitializationEvent event) with NetworkRegistry.INSTANCE.registerGuiHandler(this, new CustomPlayerGUIHandler());
  18. No, I don't see anything. They're not working.
  19. Container: All I get when press key is
  20. Here's key listener: I don't close GUI, and problem is not in it, because it was working earlier. GUI:
  21. Here's GUI handler: , message handler: Registration of handlers: networkWrapper = NetworkRegistry.INSTANCE.newSimpleChannel("customPlayerChannel"); networkWrapper.registerMessage(CustomPlayerOpenInventoryHandler.class, CustomPlayerOpenInventoryMessage.class, 1, Side.SERVER); NetworkRegistry.INSTANCE.registerGuiHandler(this, new CustomPlayerGUIHandler()); It receives message, but GUI doesn't work

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.