Jump to content

Recommended Posts

Posted

So by reading source someone can figure out what to do by themselves to a certain extent right? But when source code fails you, the documentation can tell you all about registries and the like.

 

The problem is that there are things that are necessary like the .json files for models and recipes which are not mentioned in the documentation and can only be seen in tutorials which can only take you so far, especially when working with newer and newer versions which will make past tutorials obsolete. In other words, tutorials are slightly bad practice (?)

 

My question is, is there a possible way for me to know about stuff like this  (the .json files) without having to look at tutorials? Or can I access the vanilla .json files to see how they do it? And if so, how could I know that that is something I'm missing if no errors are shown and normal source code navigation can't take you there because they're not referenced?

 

Sorry for the long post but replies to this would be much obliged! :)

Posted
7 minutes ago, chubel10 said:

how could I know that that is something I'm missing if no errors are shown

If the game can't find a json file it is looking for 99% of the time there will be an error in the log. Same with textures.

8 minutes ago, chubel10 said:

In other words, tutorials are slightly bad practice (?)

No tutorials are not slightly bad practice. Tutorials are perfectly fine it's a great way of passing along information. It's bad tutorials which are bad practice. You shouldn't make tutorials if you don't fully understand a concept or what your code does.

 

9 minutes ago, chubel10 said:

Or can I access the vanilla .json files to see how they do it?

You can access the vanilla's json files. If you are in eclipse(I don't use any other IDE for Java) under the Referenced Libraries there is a jar called client-extra.jar this contains all of the textures and jsons. If you can't/don't want to use this then you can always go to the .minecraft/versions folder and look in the jar file. And thirdly if a mod has already done something similar and is open source you can look at theirs.

  • Like 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
4 hours ago, chubel10 said:

My question is, is there a possible way for me to know about stuff like this  (the .json files) without having to look at tutorials?

So Animefan already told you about the client-jar, and that you can go into .minecraft/versions to directly open the client jar.

The minecraft wiki is also useful, as it breaks down the json formats and tells you what is available and what each element does. https://minecraft.gamepedia.com/Model

 

Also make good use of google, and the search bar right on these forums. Try asking your question in different ways, class and method names are typically helpful when searching for stuff to help narrow it down.

I think the main thing is to not get frustrated, nor to give up. And of course, once you really feel that you've looked and tried your best, you can always come and post on here, just make sure your explanation is complete, and you provide code and logs (github is your best friend for this), and people here are usually good at spotting things we miss. :)

 

  • Like 1
Posted
2 minutes ago, Ugdhar said:

And of course, once you really feel that you've looked and tried your best, you can always come and post on here,

I would just add onto this with make sure you take breaks and get sleep before you post here too because honestly we all know that really helps you spot the logic mistakes.

  • Like 3

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

Thank you for the replies.

 

I wouldn't have expected that the answers to my (many) questions would lie in getting sleep and not giving up but then again, that really is what it comes down to huh?

 

Again, thanks!

 

Posted (edited)

And sometimes, there's multiple ways to solve a problem, that's just what you have to do when working in someone else's codebase that you aren't allowed to modify. When you're stuck with one solution to a problem, think of another, get creative. You can often come up with a better solution this way. It's helped me with a lot of things

Edited by Turtledove
  • Like 1
  • chubel10 changed the title to [Solved]Reading source code and tutorials.

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.