Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void buildSurfaces(int p_185937_1_, int p_185937_2_, ChunkPrimer primer)
- {
- if (!net.minecraftforge.event.ForgeEventFactory.onReplaceBiomeBlocks(this, p_185937_1_, p_185937_2_, primer, this.world)) return;
- int i = this.world.getSeaLevel() + 1;
- double d0 = 0.03125D;
- this.slowsandNoise = this.slowsandGravelNoiseGen.generateNoiseOctaves(this.slowsandNoise, p_185937_1_ * 16, p_185937_2_ * 16, 0, 16, 16, 1, 0.03125D, 0.03125D, 1.0D);
- this.gravelNoise = this.slowsandGravelNoiseGen.generateNoiseOctaves(this.gravelNoise, p_185937_1_ * 16, 109, p_185937_2_ * 16, 16, 1, 16, 0.03125D, 1.0D, 0.03125D);
- this.depthBuffer = this.netherrackExculsivityNoiseGen.generateNoiseOctaves(this.depthBuffer, p_185937_1_ * 16, p_185937_2_ * 16, 0, 16, 16, 1, 0.0625D, 0.0625D, 0.0625D);
- for (int j = 0; j < 16; ++j)
- {
- for (int k = 0; k < 16; ++k)
- {
- boolean flag = this.slowsandNoise[j + k * 16] + this.rand.nextDouble() * 0.2D > 0.0D;
- boolean flag1 = this.gravelNoise[j + k * 16] + this.rand.nextDouble() * 0.2D > 0.0D;
- int l = (int)(this.depthBuffer[j + k * 16] / 3.0D + 3.0D + this.rand.nextDouble() * 0.25D);
- int i1 = -1;
- IBlockState iblockstate = NETHERRACK;
- IBlockState iblockstate1 = NETHERRACK;
- for (int j1 = 127; j1 >= 0; --j1)
- {
- if (j1 < 127 - this.rand.nextInt(5) && j1 > this.rand.nextInt(5))
- {
- IBlockState iblockstate2 = primer.getBlockState(k, j1, j);
- if (iblockstate2.getBlock() != null && iblockstate2.getMaterial() != Material.AIR)
- {
- if (iblockstate2.getBlock() == Blocks.NETHERRACK)
- {
- if (i1 == -1)
- {
- if (l <= 0)
- {
- iblockstate = AIR;
- iblockstate1 = NETHERRACK;
- }
- else if (j1 >= i - 4 && j1 <= i + 1)
- {
- iblockstate = NETHERRACK;
- iblockstate1 = NETHERRACK;
- if (flag1)
- {
- iblockstate = GRAVEL;
- iblockstate1 = NETHERRACK;
- }
- if (flag)
- {
- iblockstate = SOUL_SAND;
- iblockstate1 = SOUL_SAND;
- }
- }
- if (j1 < i && (iblockstate == null || iblockstate.getMaterial() == Material.AIR))
- {
- iblockstate = LAVA;
- }
- i1 = l;
- if (j1 >= i - 1)
- {
- primer.setBlockState(k, j1, j, iblockstate);
- }
- else
- {
- primer.setBlockState(k, j1, j, iblockstate1);
- }
- }
- else if (i1 > 0)
- {
- --i1;
- primer.setBlockState(k, j1, j, iblockstate1);
- }
- }
- }
- else
- {
- i1 = -1;
- }
- }
- else
- {
- primer.setBlockState(k, j1, j, BEDROCK);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement