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

I'd like to have better way of making model for an item using BLOCKSTATES. I know it's possible, but i don't know how, because there is a lot of methods which are defined for blocks, or use block as on of the parameters, so i can't use them.

Does anyone have any experience with this?

I couldn't find anything on the internet

 

Thanks in advance

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.

  • Author

Thanks, after weeks of misery possibility of solution appears :D


I can't understand that file properly, so, could you explain me what does this do?


Here is some info about what i want to do:

I have item called item detector which can be assembled from 4 different parts, and also show some information when it detects something. So there is a lot of combinations for using normal model file and predicates. So i was trying to use MULTIPART blockstates, but the item just didn't render at all even when i put just one apply in it without any conditions. Here is one of the topics i made on fore forum about this:

And i want to try to use FORGE BLOCKSTATE JSON for this, because something should work. I looked at TConstruct github and the mod uses the forge blockstates for making the tools, but the code is too advanced and complicated to understand it, so i couldn't learn from that.

THANKS once more and please explain it little bit more please.

 

 

 

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.

1 hour ago, Villfuk02 said:

Btw, what is the ItemMeshDefinition for?

It's for passing in a resource location to the ModelBakery:

ModelBakery.registerItemVariants((Item)item, meshDef.getModelLocation(variantStack));

 

And here's the various models:

https://github.com/Draco18s/ReasonableRealism/tree/master/src/main/resources/assets/expindustry/models/item

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.

  • Author

Ok, so what am i supposed to do?

 

I can't use IItemWithMeshDefinition because it's your own interface, so will you please explain to me what am i supposed to do?

Or should i just copy everything from you and try to stich it together myself using my own intuition?

Edited by Villfuk02
NGAAAAHHHHH

It was an interface I created to handle the types of operations I was doing.

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.

  • Author
21 hours ago, Villfuk02 said:

Ok, so what am i supposed to do?

 

I can't use IItemWithMeshDefinition because it's your own interface, so will you please explain to me what am i supposed to do?

Or should i just copy everything from you and try to stich it together myself using my own intuition?

 

16 hours ago, Draco18s said:

It was an interface I created to handle the types of operations I was doing.

Seriously, do you have ping like 20 000 000 miliseconds????? (approx. 5,5 hours)
Or why are you answering something else than i asked?

Ok, seriously, this isn't that hard.  And I'm not always here.  Your posts two hours ago I was asleep.

 

This is the important part: You need to pass a mesh definition to the ModelBakery:

https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L123

 

Because of how I want my code set up I created an interface to get this information from an item rather than creating it at the point of registration.

 

What's an item mesh definition?

https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/industry/item/ItemCastingMold.java#L81

That. That is a vanilla class/interface. And everything that happens inside is is the part you will need to write yourself.

 

IItemWithMeshDefinition is the only thing I made (plus how to turn my NBT data into a model resource location), you don't have to recreate it if you don't want to.

Edited by Draco18s

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.

  • Author

I started setting this up, and if i understand this correctly, you're just making multiple different models.

I need one model for every combination - that makes  7 093 or 63 837 different models.

(depends if i want one part to be visible or not)

 

R E A L L Y   N O T

F E E L  I N G   U P

T O   I T  R  I G H T

N O W .  S O R R Y .

That's the whole reason i was trying to use multipart / forge blockstate JSON

Please correct me, if am i understanding this wrong

Edited by Villfuk02

Blockstates don't solve the models problem. All it does is solve the mapping (the Cartesian product of multiple properties) from state to model.

 

If you want to do models, you're going to need to make your own IModel (possibly with some other interfaces, like IPerspectiveAwareModel) implementation.

Edited by Draco18s

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.

Blockstates != Models.

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.