Jump to content

Recommended Posts

Posted
2 minutes ago, Animefan8888 said:

Simply return true and that should work. In your GlassSlab class.

Iv'e done that but it keeps wanting me to remove my override and when I run without it, it still does the same thing.

Posted
1 minute ago, trolio said:

Iv'e done that but it keeps wanting me to remove my override and when I run without it, it still does the same thing.

Well if it's telling you to remove the override you don't have the right parameters look in BlockSlab they override it.

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
2 hours ago, Big_Bad_E said:

What I mean by it's forge code is that the class was edited by forge, not the class is completely made by forge.

I'm assuming Minecraft BlockGlass code isn't a copy of the Forge BlockGlass code.

You're confusing things. Most of the source code in any of the minecraft packages is minecraft code -- meaning those lines were written by minecraft coders, not forge coders. Forge does apply patches to many of the classes, but only very few lines. In fact if you contribute to Forge you are specifically asked to minimize the amount of change including even avoiding adding any extra whitespace.

 

The methods being discussed in this thread are minecraft methods.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted
28 minutes ago, jabelar said:

You're confusing things. Most of the source code in any of the minecraft packages is minecraft code -- meaning those lines were written by minecraft coders, not forge coders. Forge does apply patches to many of the classes, but only very few lines. In fact if you contribute to Forge you are specifically asked to minimize the amount of change including even avoiding adding any extra whitespace.

 

The methods being discussed in this thread are minecraft methods.

Oh, did not know that. I had assumed forge was completely different. Good to know I guess.

Posted
18 minutes ago, Big_Bad_E said:

Oh, did not know that. I had assumed forge was completely different. Good to know I guess.

The way modding works is actually pretty interesting. Java is a weird language because it was designed originally to be interpreted in real time by a "virtual machine". This had the advantage that the same program file (in this case the JAR) could be used on any type of computer -- you don't have to download different one for Windows, Android, Linux, Mac, etc. or different hardware targets (like x86 versus 64-bit, ARM, SPARC, MIPS, etc.) because the Java virtual machine and related runtime environment would take care of doing the final step of turning your program into machine language.

 

The downside of this approach is that it is easier to reverse-engineer the code because the program contains information at the higher level language rather than machine bytecode. You can try to make it difficult for people to reverse-engineer by obfuscating the code meaning to take all your code and turn the names into meaningless things, and making all the formatting sort of random. For example, instead of having a field called firstNameString it will be changed to something like f_354356_b. The computer doesn't care because a field can have any name, but it makes it harder for any humans to guess at the functionality. However, it isn't impossible to guess. So you can basically de-obfuscate if you have a list of better names.

 

So modding starts with that idea -- you can take the minecraft JAR and de-obfuscate it and start to understand it. Once you have the deobfuscated code, you can modify it and run it yourself except each modification would be on its own and you couldn't combine them. So instead people decided to add patches to the code that provided "hooks" (an API) that then allow code in your own source to execute in line with the vanilla code. Forge events are a good example -- the patch to the minecraft source just adds a call to a forge event post method in a forge source class. Then modders can run their own code without actually modifying the minecraft source.

 

From a licensing point of view, forge is still honoring the fact that you are not allowed to redistribute the minecraft source. Instead, it relies on people getting the minecraft jar and going through the deobfuscation step to make it accessible to modding.

 

So it SEEMS like Forge is giving you all that source code, but really it is just aiding the process of making it available to be human-readable in your programming environment.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted
2 minutes ago, trolio said:

I am still having issues getting my glass slab to work if anyone new could take a look at it to see if anything was missed here is my github link again that houses all of my source code https://github.com/trolio/morethings1/tree/master/master

Either you didn't push your code to github or you didn't do what I said.

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 (edited)
2 minutes ago, Animefan8888 said:

Either you didn't push your code to github or you didn't do what I said.

I had not pushed out what I did to github not to used to using it yet but I had tried what you said and that did not work either I am at a complete loss for why it is not working. I am fixing things now to get it pushed out to github.

Edited by trolio
Posted
29 minutes ago, trolio said:

ok updated my github to include what my code currently looks like and the new github link is https://github.com/trolio/morethings this should include all of my current code.

Your gonna want to override doesSideBlockRendering to fix the seeing through the world, not sure if shouldSideBeRendered needs to be overriden anymore, but it is less checks run if you do. And then override getLightOpacity and return 0 this will fix a lighting glitch you will have/do have.

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

so light opacity aside I override side rendering and still same exact thing is happening, if you have working source code for a glass related block I could take a look at that might be able to help if not its no big deal.

Posted
7 minutes ago, trolio said:

so light opacity aside I override side rendering and still same exact thing is happening, if you have working source code for a glass related block I could take a look at that might be able to help if not its no big deal.

Push you updated code, because what I said worked for me.

 

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
3 minutes ago, trolio said:

I did push my code took me a minute to get it there, light opacity is not in there atm side rendering is.

I don't see doesSideBlockRendering method in your GlassSlab class. You need to override this method and return false.

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 (edited)

ok, it was in there, I just removed re added it and restarted my eclipse and now it is working, now with the lighting i've looked and can not find how I would add that as well as I noticed a new thing came about with double slabs rendering no texture, also I can not place a slab under a upper slab.

Edited by trolio

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.