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.

cxminer

Members
  • Joined

  • Last visited

  1. OMG it works, so happy! My first banana! Sorry I guess I posted too soon, should have investigated further before posting. So if anyone has a similar problem here is what the problem was. I was checking variable isRemote on a world that doesn't exist at that stage yet. So I implemented proxies and put the renders in the ClientProxy and it works! Thanks for the link Choonster, very helpful, now I understand how model loading works.
  2. Provided more info, I am using ModelLoader (check my first post), getting null pointer exception. Gonna debug now to see where the problem is. Thanks for the link!
  3. Hi everyone, my first post I'm working on my first mod, just got started and I'm having trouble showing textures. I'm trying to add a Banana ItemFood to the game. I've created a class ItemBanana that extends ItemFood, set the super(4, false) and registered the item to GameRegistry, copied my banana.png to ./resources/assets/[modid]/textures/items/banana.png and created a model for it (do I need it?) in ./resources/assets/[modid]/models/item/banana.json. I can give myself the item in game and can eat it but it is missing the texture so I think the problem is that I didn't register renders anywhere and I'm not sure how to do that, can someone help? Edit: Giving more info on my renders. I tried this code: if (!Minecraft.getMinecraft().world.isRemote) { ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); } So if I understand correctly I'm checking if the code is running on the client and if so I'm providing location to banana resource and binding it to ItemBanana, but this gives an error Caused by: java.lang.NullPointerException, I think its because I'm doing this in preInit or is that ok?

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.