Posted August 28, 20205 yr I am new to modding, and was attempting to create custom blocks. I am able to create the blocks, but am having a lot of trouble creating the slabs and stairs. I cant find a tutorial that goes through all the steps, and the ones i do find are outdated. If someone could help me with this, that would be great. Thanks. Please do not get mad at me. I am new to Forge modding. Thanks.
August 28, 20205 yr I did see the SlabBlock class. Maybe try making your own Slab class and extend it? I'm pretty sure if you search for classes you will find a couple examples of slabs in the Minecraft source.
August 28, 20205 yr Author Ok thanks I'll try that! Please do not get mad at me. I am new to Forge modding. Thanks.
August 28, 20205 yr IIRC you shouldn't even need to extend the vanilla Slab or Stair block class, you should be able to create your own just by passing in parameter data. 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.
August 28, 20205 yr If you aren't doing anything that is going to be "custom" to the slab, you could just directly use the constructor from the class and pass in some params (as what Draco18s said). That would be much simpler and easier to read. If you wanted to change how certain functions and methods work in the slab, you would have to extend the class.
August 28, 20205 yr Author I've got the slab class done, but I can't seem to figure out the ForgeRegistries for it. I've got this, public static DeferredRegister<SlabBlock> SLABS = DeferredRegister.create(ForgeRegistries.???????, .MorePolishedBlocks.MOD_ID); but can't find a class under ForgeRegistries that would make sense. Also, thanks for telling me about the SlabBlock class. Again, I'm new to this. Please do not get mad at me. I am new to Forge modding. Thanks.
August 28, 20205 yr ....ForgeRegistries.BLOCKS? 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.
August 28, 20205 yr Author When i attempt to create (I used TestBlockSlab as a placeholde) : public static final RegistryObject<SlabBlock> TEST_BLOCK_SLAB = BLOCKS.register("test_block_slab", TestBlockSlab::new); It gives me this error: Inferred type 'I' for type parameter 'I' is not within its bound; Should extend 'net.minecraft.block.Block' Am i missing something? Edited August 28, 20205 yr by Jackson Lambert Please do not get mad at me. I am new to Forge modding. Thanks.
August 28, 20205 yr 1 hour ago, Jackson Lambert said: TestBlockSlab And does this class extend anything? If so, what? 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.
August 28, 20205 yr Author 1 minute ago, Draco18s said: And does this class extend anything? If so, what? Yes, it extends Block and implements IWaterLoggable. Please do not get mad at me. I am new to Forge modding. Thanks.
August 28, 20205 yr 1 hour ago, Jackson Lambert said: RegistryObject<SlabBlock> I think the error means this part, then. Change from <SlabBlock> to <Block> 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.
August 28, 20205 yr Author 14 minutes ago, Draco18s said: I think the error means this part, then. Change from <SlabBlock> to <Block> Already tried that. it gives me the same error. Here's my RegistryHandler: https://pastebin.com/CG6sHSmQ Edited August 28, 20205 yr by Jackson Lambert Please do not get mad at me. I am new to Forge modding. Thanks.
August 28, 20205 yr Author Nevermind! Fixed it! Thanks so much! Please do not get mad at me. I am new to Forge modding. Thanks.
November 12, 20204 yr On 8/29/2020 at 4:02 AM, Jackson Lambert said: Nevermind! Fixed it! Thanks so much! You willing to share what the problem was/how you fixed it?
November 12, 20204 yr 2 hours ago, trashraccoon42 said: You willing to share what the problem was/how you fixed it? Not to necro a dead thread, but the easiest way to do this if you're simply just making a slab that does nothing but be a slab would just register it as such. public static final RegistryObject<Block> CUSTOM_SLAB = CUSTOM_BLOCKS.register("custom_slab", () -> new SlabBlock(properties)); where CUSTOM_BLOCKS is your DeferredRegister for your blocks and properties are whatever properties (hardness/material/etc.) you want your slab to integrate. Edited November 12, 20204 yr by ModMCdl Follow these rules when talking to me, and we'll get along fine. 1).I know Java fairly well. I don't know as much about modding. They are not the same, don't compare them. 2). I consider myself to always be learning. I make mistakes, you make mistakes. Who doesn't? 3). Insult me, and I will leave the thread. I have a real life, I don't have time to throw petty insults in a Minecraft Modding forum. ModMCdl - Co-Founder and Director of Design for Artemis Game Studios
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.