Flurry Posted October 14, 2019 Share Posted October 14, 2019 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.) Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted October 14, 2019 Share Posted October 14, 2019 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. Quote 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 More sharing options...
Flurry Posted October 14, 2019 Author Share Posted October 14, 2019 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? Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted October 14, 2019 Share Posted October 14, 2019 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? Quote 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 More sharing options...
Flurry Posted October 14, 2019 Author Share Posted October 14, 2019 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? Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted October 14, 2019 Share Posted October 14, 2019 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, Quote 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 More sharing options...
Flurry Posted October 14, 2019 Author Share Posted October 14, 2019 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? Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted October 14, 2019 Share Posted October 14, 2019 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. Quote 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 More sharing options...
Flurry Posted October 14, 2019 Author Share Posted October 14, 2019 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.) Quote Link to comment Share on other sites More sharing options...
Draco18s Posted October 14, 2019 Share Posted October 14, 2019 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. Quote 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 More sharing options...
Flurry Posted October 14, 2019 Author Share Posted October 14, 2019 5 minutes ago, Draco18s said: You need to override the named method correctly. So how would that go? Quote Link to comment Share on other sites More sharing options...
Draco18s Posted October 14, 2019 Share Posted October 14, 2019 (edited) 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 October 14, 2019 by Draco18s Quote 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 More sharing options...
Flurry Posted October 14, 2019 Author Share Posted October 14, 2019 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.) Quote Link to comment Share on other sites More sharing options...
Draco18s Posted October 14, 2019 Share Posted October 14, 2019 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! Quote 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 More sharing options...
Flurry Posted October 14, 2019 Author Share Posted October 14, 2019 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? Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted October 14, 2019 Share Posted October 14, 2019 33 minutes ago, Flurry said: assets:blocks/hardened_clay_stained_silver What is the actual file path you have these in? Quote 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 More sharing options...
Draco18s Posted October 14, 2019 Share Posted October 14, 2019 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? Quote 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 More sharing options...
Recommended Posts
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.