How to replace air with water in a nether-like dimension?

Started by TheCatalystGaming on Fri, 08/23/2019 - 23:13

Topic category: Advanced modding

Last seen on 23:48, 23. Aug 2019
Joined Nov 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
How to replace air with water in a nether-like dimension?
Fri, 08/23/2019 - 23:13

Basically what the title says. I'm creating an ocean-based mod, and I need to be able to replace the air in a nether-like dimension with water source blocks.

Last seen on 18:59, 23. Sep 2019
Joined Apr 2010
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
  • developer
I don't think you can do…
Sat, 08/24/2019 - 18:12

I don't think you can do this without some major changes to the world gen code.

Last seen on 08:45, 21. Sep 2019
Joined Dec 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Couldn't it basically work…
Tue, 08/27/2019 - 10:35

Couldn't it basically work if you do this in the ChunkProvider?

public static class ChunkProviderModded implements IChunkGenerator {

 

        protected static final IBlockState STONE = <Block>();
        protected static final IBlockState LAVA = <Block>();
        protected static final IBlockState GRAVEL = <Block>();
        protected static final IBlockState SOUL_SAND = <Block>();
        private final WorldGenerator quartzGen = new WorldGenMinable(<Block>(), 14, BlockMatcher.forBlock(STONE
                .getBlock()));
        private final WorldGenerator magmaGen = new WorldGenMinable(STONE, 33, BlockMatcher.forBlock(STONE.getBlock()));
        protected static final IBlockState BEDROCK = Blocks.BEDROCK.getDefaultState();
        protected static final IBlockState AIR = Blocks.WATER.getDefaultState();

Last seen on 18:59, 23. Sep 2019
Joined Apr 2010
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
  • developer
This would need to be tested…
Tue, 08/27/2019 - 10:48

This would need to be tested, but could work. I will check and possibly add a box to select this if this will work.

Last seen on 18:00, 23. Sep 2019
Joined Jun 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I can think of a way to do…
Sun, 09/08/2019 - 12:39

I can think of a way to do this with procedures, but it would lag a LOT. Create a block (texture doesn't matter) that spawns on the player when they enter the dimension (using procedures). Add a procedure to this block's tick update so that it places itself on any air blocks touching it, and then turns into water. This would (unless you have a really good computer) cause extreme lag when generating chunks, but it is a currently possible method.

Last seen on 18:59, 23. Sep 2019
Joined Apr 2010
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
  • developer
Yes, that would lag a lot. I…
Sun, 09/08/2019 - 13:08

Yes, that would lag a lot.

I have tried replacing AIR block with WATER and it did not work properly, so there is still research that needs to be done to find a good way to do this.