RobinCirex Posted March 28, 2020 Share Posted March 28, 2020 Hey, I want to replace all the lava in the nether with water when a world is generated. Does anyone have a clue how I could do that? Quote Link to comment Share on other sites More sharing options...
Wintersky20 Posted March 29, 2020 Share Posted March 29, 2020 20 hours ago, RobinCirex said: Hey, I want to replace all the lava in the nether with water when a world is generated. Does anyone have a clue how I could do that? Why you want to do that ? NVM Make a new dimension , same as the nether ! The only way ! Quote Link to comment Share on other sites More sharing options...
RobinCirex Posted March 30, 2020 Author Share Posted March 30, 2020 On 3/29/2020 at 4:39 PM, Wintersky20 said: Why you want to do that ? NVM Make a new dimension , same as the nether ! The only way ! Hey I did that now and everything works, the only thing I don't know is how to change the "destination" of the nether portal. Do you know that? Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted March 30, 2020 Share Posted March 30, 2020 3 minutes ago, RobinCirex said: Hey I did that now and everything works, the only thing I don't know is how to change the "destination" of the nether portal. Do you know that? Override the nether portal block in the block registry with your own that sends you to your dimension. However I'm not sure creating your own dimension is the only way. Not that I have an alternate way to propose. 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...
RobinCirex Posted March 30, 2020 Author Share Posted March 30, 2020 (edited) 15 minutes ago, Animefan8888 said: Override the nether portal block in the block registry with your own that sends you to your dimension. However I'm not sure creating your own dimension is the only way. Not that I have an alternate way to propose. Oh, i didn't know overwriting blocks in the registry works. Can you tell me how? Pretty sure that'll help me in the future, thanks for that Edited March 30, 2020 by RobinCirex Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted March 30, 2020 Share Posted March 30, 2020 Just now, RobinCirex said: Can you tell me how? I believe you just need to register a Block with the same registry name and it must have all the same block properties IE it's BlockState properties must all be the same. 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...
imacatlolol Posted March 30, 2020 Share Posted March 30, 2020 I think you can do the same for the Nether's dimension type; override it in the registry. Not sure if it's great for cross-mod compatibility, but it should be a little cleaner. Quote I'm eager to learn and am prone to mistakes. Don't hesitate to tell me how I can improve. Link to comment Share on other sites More sharing options...
Wintersky20 Posted March 30, 2020 Share Posted March 30, 2020 2 hours ago, Animefan8888 said: Override the nether portal block in the block registry with your own that sends you to your dimension. However I'm not sure creating your own dimension is the only way. Not that I have an alternate way to propose. In 1.13-1.15 its harder to change vanilla blocks .. without chrashing your game ! 2 hours ago, Animefan8888 said: I believe you just need to register a Block with the same registry name and it must have all the same block properties IE it's BlockState properties must all be the same. Registering blocks with the same name will crash your game 2 hours ago, imacatlolol said: I think you can do the same for the Nether's dimension type; override it in the registry. Not sure if it's great for cross-mod compatibility, but it should be a little cleaner. Overriding a whole dimension is harder then changing vanilla blocks ! 2 hours ago, RobinCirex said: However I'm not sure creating your own dimension is the only way you are right Another idea is to change water behavior using som events ! then try to spawn the water in the same way that lava is spawned using world generator Search the water and lava classes and nether dimension class , for more information ! Quote Link to comment Share on other sites More sharing options...
hohserg Posted March 30, 2020 Share Posted March 30, 2020 (edited) Why noone do not suggest to use implementation IWorldGenerator for replace all generated lava? It's may be lagged? Edited March 30, 2020 by hohserg Quote Link to comment Share on other sites More sharing options...
Wintersky20 Posted March 30, 2020 Share Posted March 30, 2020 1 minute ago, hohserg said: Why noone do not suggest to use implementation IWorldGenerator for replace all generated lava? Actuall , if you look above @diesieben07 comment , I sad that in another format! But you need to change water behavior if you wanna keep the water in the nether! If I remember correctly , is not possible to place water in nether ..right ? Quote Link to comment Share on other sites More sharing options...
Wintersky20 Posted March 30, 2020 Share Posted March 30, 2020 3 hours ago, diesieben07 said: If it does that is a bug and you should report it properly, with code and logs (make a thread here). Actually , I think this is intended .. you cannot have 2 or more blocks with the same registry name and the same id .. @Animefan8888 suggest to 6 hours ago, Animefan8888 said: register a Block with the same registry name But , as I seid , It will crash! Quote Link to comment Share on other sites More sharing options...
hohserg Posted March 30, 2020 Share Posted March 30, 2020 (edited) Yeah, I see it now, sorry. But it's not have mention to concrete classes(like ReplaceBiomeBlocks?). 11 minutes ago, Wintersky20 said: to change water behavior if you wanna keep the water in the nether! Logic of vaporizing located in ItemBucket, so generated water can be keep, but players can't add more water Edited March 30, 2020 by hohserg Quote Link to comment Share on other sites More sharing options...
Wintersky20 Posted March 30, 2020 Share Posted March 30, 2020 6 minutes ago, hohserg said: Yeah, I see it now, sorry. But it's not have mention to concrete classes(like ReplaceBiomeBlocks?). Logic of vaporizing located in ItemBucket, so generated water can be keep, but players can't add more water Oh , ok , you are right I miss that piece of code in the BucketItem: if (worldIn.dimension.doesWaterVaporize() && this.containedBlock.isIn(FluidTags.WATER)) But he can add an event like : PlayerInteractEvent.RightClickBlock just for the nether dimension to place a water source and stop the actual water from the bucket to be placed , if i'm correct ! 15 minutes ago, hohserg said: But it's not have mention to concrete classes(like ReplaceBiomeBlocks?). Yeh , you are right , i dont give him the correct classes to look! My bad, sorry ! 1 Quote Link to comment Share on other sites More sharing options...
hohserg Posted March 30, 2020 Share Posted March 30, 2020 1 minute ago, Wintersky20 said: PlayerInteractEvent.RightClickBlock Yeah, it may useful for accept water in nether 1 Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted March 31, 2020 Share Posted March 31, 2020 1 hour ago, Wintersky20 said: Actually , I think this is intended .. you cannot have 2 or more blocks with the same registry name and the same id .. @Animefan8888 suggest to No this is wrong. You are allowed to override the registry of other mods/Minecraft itself. It would not be intended behavior to crash. It would be intended behavior to crash if you registered a block from your modid twice. 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...
RobinCirex Posted March 31, 2020 Author Share Posted March 31, 2020 13 hours ago, Wintersky20 said: Oh , ok , you are right I miss that piece of code in the BucketItem: if (worldIn.dimension.doesWaterVaporize() && this.containedBlock.isIn(FluidTags.WATER)) But he can add an event like : PlayerInteractEvent.RightClickBlock just for the nether dimension to place a water source and stop the actual water from the bucket to be placed , if i'm correct ! Yeh , you are right , i dont give him the correct classes to look! My bad, sorry ! 13 hours ago, hohserg said: Yeah, it may useful for accept water in nether 11 hours ago, Animefan8888 said: No this is wrong. You are allowed to override the registry of other mods/Minecraft itself. It would not be intended behavior to crash. It would be intended behavior to crash if you registered a block from your modid twice. Just to clear everything up: I have already done it, as said before, here's my code https://github.com/RobinCirex/WaterNether It's not that clean but it works Water doesn't vaporize immediately, it only does when placed by a player, not when spawned. I had to overwrite a lot of things because the chunk generation has a lot of different classes and properties Quote Link to comment Share on other sites More sharing options...
Wintersky20 Posted March 31, 2020 Share Posted March 31, 2020 18 minutes ago, RobinCirex said: Just to clear everything up: I have already done it, as said before, here's my code https://github.com/RobinCirex/WaterNether It's not that clean but it works Water doesn't vaporize immediately, it only does when placed by a player, not when spawned. I had to overwrite a lot of things because the chunk generation has a lot of different classes and properties Oh , ok .. It's a good point ! you make that when player is changing dimension instead of spawning in nether , you spawn in the new dimension ! And i think it's clean enough for a mod that do just one thing ! Quote Link to comment Share on other sites More sharing options...
RobinCirex Posted March 31, 2020 Author Share Posted March 31, 2020 15 minutes ago, Wintersky20 said: Oh , ok .. It's a good point ! you make that when player is changing dimension instead of spawning in nether , you spawn in the new dimension ! And i think it's clean enough for a mod that do just one thing ! yea, as you said, I think "cleanness" doesn't really matter for small mods lol 1 Quote Link to comment Share on other sites More sharing options...
imacatlolol Posted March 31, 2020 Share Posted March 31, 2020 (edited) If you want to prevent water from vaporizing, set doesWaterVaporize to false in the dimension's constructor method. Additionally, you should really be using DimensionManager's register methods for the sake of compatibility. Edited March 31, 2020 by imacatlolol Quote I'm eager to learn and am prone to mistakes. Don't hesitate to tell me how I can improve. Link to comment Share on other sites More sharing options...
Animefan8888 Posted March 31, 2020 Share Posted March 31, 2020 5 hours ago, imacatlolol said: Additionally, you should really be using DimensionManager's register methods for the sake of compatibility. They also should be using the Registry Events to register things that belong in a registry... 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...
imacatlolol Posted April 1, 2020 Share Posted April 1, 2020 1 hour ago, Animefan8888 said: They also should be using the Registry Events to register things that belong in a registry... Oh dang, that's become so second-nature to me that I didn't even notice! Quote I'm eager to learn and am prone to mistakes. Don't hesitate to tell me how I can improve. 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.