Jump to content

[1.15.2] Replace water in nether with lava


RobinCirex

Recommended Posts

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?

Link to comment
Share on other sites

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.

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

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 :D 

Edited by RobinCirex
Link to comment
Share on other sites

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.

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:

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 !

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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 by hohserg
Link to comment
Share on other sites

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 ! 

  • Like 1
Link to comment
Share on other sites

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.

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

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 :D 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 :D

Link to comment
Share on other sites

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 :D 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 :D

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 !

Link to comment
Share on other sites

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 

  • Haha 1
Link to comment
Share on other sites

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 by imacatlolol

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

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...

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

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!

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

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.