Jump to content

Imported a block into Forge but it's not doing it as I guessed + Icon


Flurry

Recommended Posts

The image that I have provided shows the Blockbench model I have loaded in, I don't know why it's showing an empty space underneath, also I wanted to know how to set an icon for the certain block. I have a BlockItem + Block itself to make it work.

 

Does anybody have solutions towards both of these?

(P.S I watched Harry Talks tutorials, but I tried to make it from block bench instead of other resources.)

Screen Shot 2019-10-13 at 7.02.53 PM.png

Link to comment
Share on other sites

20 minutes ago, Flurry said:

(P.S I watched Harry Talks tutorials

His tutorials are notoriously bad there have been several posts on here where they've said they've followed them and many bad practices later they end up with problems and come here.

 

You need a model for the item as well if you need an example take a look in the minecraft jars under assets/models/items/any_block.json where any_block is any block in the game.

 

The problem you are having with seeing through the world is solved by overriding getRenderLayer in your blocks class. If it doesn't have a class right now make one. The return value for this method should be BlockRenderLayer.CUTOUT.

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.

Link to comment
Share on other sites

 
 
 
 
2 hours ago, Animefan8888 said:

The problem you are having with seeing through the world is solved by overriding getRenderLayer in your blocks class. If it doesn't have a class right now make one. The return value for this method should be BlockRenderLayer.CUTOUT.

I understand the rest, yet I don't know what you mean by this?

Link to comment
Share on other sites

3 minutes ago, Flurry said:

I understand the rest, yet I don't know what you mean by this?

That was basic Java. What specifically are you having problems with?

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.

Link to comment
Share on other sites

22 minutes ago, Animefan8888 said:

That was basic Java. What specifically are you having problems with?

public class BlockList 

{

public static Block dog_house;

 

public BlockRenderLayer getRenderLayer()

{

return BlockRenderLayer.CUTOUT;

}

}

 

Is this the way you wanted it to be?

Link to comment
Share on other sites

Just now, Flurry said:

Is this the way you wanted it to be?

No.

 

2 hours ago, Animefan8888 said:

overriding getRenderLayer in your blocks class.

Aka when you give dog_house a value you need to use your own class and that class needs to override getRenderLayer. If this is something you don't understand I recommend that you look up some tutorials on Java,

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.

Link to comment
Share on other sites

4 minutes ago, Animefan8888 said:

No.

 

Aka when you give dog_house a value you need to use your own class and that class needs to override getRenderLayer. If this is something you don't understand I recommend that you look up some tutorials on Java,

What would be some tutorials that would match with what I need to know?

Link to comment
Share on other sites

Just now, Flurry said:

What would be some tutorials that would match with what I need to know?

Anything that talks about inheritance, classes, and objects.

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.

Link to comment
Share on other sites

9 hours ago, Animefan8888 said:

Anything that talks about inheritance, classes, and objects.

I was looking at some tutorials (thanks to thenewboston), and the discussion about inheritance was good.

 

So what would I need to inherit in my block class specifically and such? 
(P.S, I'm still looking into the classes & objects.)

Link to comment
Share on other sites

39 minutes ago, Flurry said:

So what would I need to inherit in my block class specifically and such? 

You need to override the named method correctly.

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.

Link to comment
Share on other sites

Generally speaking, you can only override a method in a class that is, itself, a subclass of the class where the method to be overridden is found. So in order to override a method in the Block class you have to do so in a subclass that extends Block.

 

You would know this if you had any knowledge of object oriented programming already. A thing that we here at Forge, don't teach, because there's already a billion other resources for it, like Stack Overflow. All we help people with is finding the right method in Minecraft or Forge that does the thing that they need. We've done that, we've told you to override getRenderLayer, what to return, and where it goes.

 

(Oh, by the way, if you show up at Stack Overflow and post this exact question, I'll see it and almost certainly vote to close it for being unclear or too broad or looking for off-site resources)

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.

Link to comment
Share on other sites

13 minutes ago, Draco18s said:

Generally speaking, you can only override a method in a class that is, itself, a subclass of the class where the method to be overridden is found. So in order to override a method in the Block class you have to do so in a subclass that extends Block.

 

You would know this if you had any knowledge of object oriented programming already. A thing that we here at Forge, don't teach, because there's already a billion other resources for it, like Stack Overflow. All we help people with is finding the right method in Minecraft or Forge that does the thing that they need. We've done that, we've told you to override getRenderLayer, what to return, and where it goes.

 

(Oh, by the way, if you show up at Stack Overflow and post this exact question, I'll see it and almost certainly vote to close it for being unclear or too broad or looking for off-site resources)

Do you think I should make a block class for the specific block that I'm wanting to be put into the game itself? Or have a BlockList?

(I forgot to mention this.)

Link to comment
Share on other sites

Lets follow the logic here.

 

"I need to override this method in my block class in order to get the behavior I want."

 

Now answer the question, "Do I need my own block class?"

 

Yes:

Spoiler

Of course, where else would you put the overridden method?

No:

Spoiler

I'm open to suggestions on how you're going to accomplish this. Good luck, have fun!

 

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.

Link to comment
Share on other sites

24 minutes ago, Draco18s said:

Lets follow the logic here.

 

"I need to override this method in my block class in order to get the behavior I want."

 

Now answer the question, "Do I need my own block class?"

 

Yes:

  Reveal hidden contents

Of course, where else would you put the overridden method?

No:

  Reveal hidden contents

I'm open to suggestions on how you're going to accomplish this. Good luck, have fun!

 

Thank you so much!
One more thing before I hit the road (is that how people say it?)

 

"1": "assets:blocks/hardened_clay_stained_silver",

"2": "assets:blocks/hardened_clay_stained_purple"

 

These are the textures I selected for the certain model I wanted, (changed up the colors cause why not)

But yet they won't go in, is it because I selected some of the default textures from Minecraft client itself or?

If so, what do I put to resolve this issue?

Link to comment
Share on other sites

33 minutes ago, Flurry said:

assets:blocks/hardened_clay_stained_silver

What is the actual file path you have these in?

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.

Link to comment
Share on other sites

43 minutes ago, Flurry said:

"1": "assets:blocks/hardened_clay_stained_silver",

"2": "assets:blocks/hardened_clay_stained_purple"

 

These are the textures I selected for the certain model I wanted, (changed up the colors cause why not)

But yet they won't go in, is it because I selected some of the default textures from Minecraft client itself or?

If so, what do I put to resolve this issue?

 

I suspect the problem here is that "assets" is not a proper domain name. But yes, as Animefan8888 asks, can you post the entire json file in question?

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.

Link to comment
Share on other sites

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.