Posted September 10, 20196 yr Hi I would like to make some vanilla blocks water loggable, how would I go about doing that? I have to add the property WATERLOGGED to the block first, then I have to add the IWaterLoggable interface together with its methods. Making my own block class adding that is super easy, but adding it to vanilla blocks I have no idea how to do.
September 10, 20196 yr Author 2 hours ago, diesieben07 said: You need to replace the registry entries for the blocks. Basically just give your own block instance the same registry name of the one you want to overwrite. Note that: Only one mod can do this per block (obviously). Your block cannot change the block state properties of the original block, because that would break world saves. Ok, so tried that, but it ended up with it complaining that I can't change the order of block properties, so I changed the order of it, same thing. Then I removed it just to see what it said then and then the game crashed due to it not finding the waterlogged property on the block. @Override protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) { super.fillStateContainer(builder); // Doesn't matter which order they are in, still complains. Removing WATERLOGGED crashes the game. builder.add(WATERLOGGED); } How do I avoid that?
September 10, 20196 yr Author 2 hours ago, diesieben07 said: Your block cannot change the block state properties of the original block, because that would break world saves. Or do you mean by that I can't add new properties to it? I thought you meant I can't remove existing block properties or change how they behave and the range of example an int range.
September 10, 20196 yr 19 minutes ago, Simon_kungen said: Or do you mean by that I can't add new properties to it? I thought you meant I can't remove existing block properties or change how they behave and the range of example an int range. You can't CHANGE them. That means no adding, no removing. 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.
September 10, 20196 yr Author 9 minutes ago, Draco18s said: You can't CHANGE them. That means no adding, no removing. Hmm... so my best bet is to just make a new block under my mod id and replace the vanilla block recipe to give my block instead?
September 10, 20196 yr Author Ok, so I have made so it uses the parent models of the original vanilla block + item. How do I replace an item in its Creative Tab with my version? So players will be encouraged to use my version.
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.