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.

Featured Replies

Posted

Code: https://pastebin.com/0qj3JfQP

 

I registered my class to fire the model event and the registry but, it appears it's not firing at all I printed "fire_event" 100 times didn't see it in the console and textures were not re-registered

  • Author
36 minutes ago, diesieben07 said:

Your registerModels method is static, but you never register it's containing class to the event bus, only an instance of that class.

ModelRegistryEvent and model registration in general is also a client-only process and must happen from your client proxy.

I work on proxies last I just need it to work for client without people going there is too many classes I am not looking at your code

  • Author
4 minutes ago, diesieben07 said:

O.o

Is it a bug that calling   ModelLoader.setCustomModelResourceLocation() in pre-init sometimes glitches out and only does the last call that you made during a for loop. I was using that before the register model event in pre-init. 

How do you change the static models resource location for the texture in code?

Edited by jredfox

  • Author
Just now, diesieben07 said:

setCustomModelResourceLocation should be called in ModelRegistryEvent only.

 

Please clarify what you mean.

Say I want to change the texture of a vanilla item but, I don't want to change the entire model. How do I get the model and from the model change it's resource location and or image? This use to be simple as block/item.setTextureName("");

  • Author
4 hours ago, diesieben07 said:

Your mod acts like a resource pack, you can just put a new model JSON for a vanilla item in the correct place in your assets.

same reason I am saying no to lang files I want to be able to do things in code through an array list

  • Author
12 minutes ago, diesieben07 said:

No.

if it's not your items or you want to make a mass amount of blocks/items then this is the only way to go

  • Author
20 hours ago, diesieben07 said:

No, it is not. You can generate JSONs using code if you do not want to write them by hand.

you can't do that without taking files to the resource pack folder or the jar itself will eventually become corrupt not a good method I would much rather have a static model in code and set them in code.

  • Author
1 minute ago, diesieben07 said:

What are you even talking about...

the only way to output jsons is overwrite the jar file every single time you launch the game or to output to a custom resource pack either solution isn't good I am going to try and make this a suggestion

Or generate them once and then remove the generation code...

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.