<!-- =================================================================
     Custom Ore Generation "Special Rules" Module: This configuration
     covers mantle, water table, igneous dikes, and supplemental
     caves.
     ================================================================= -->


<!-- Several special rules that can alter the playstyle in the world.
     Is disabled by default.  Configuration by Reteo. -->




<!-- Starting Configuration for Custom Ore Generation. -->
<ConfigSection>





    <!-- Setup Screen Configuration -->
    <ConfigSection>
        <OptionDisplayGroup name='groupSpecialRules' displayName='Special Rules' displayState='shown'>
            <Description>
                Distribution options for Special Rules Ores.
            </Description>
        </OptionDisplayGroup>

	<OptionChoice name='spruShown' default='false'
		      displayState='shown_dynamic'
		      displayGroup='groupSpecialRules'>
	  <Description> 
                Show options for special rules.
          </Description>
	  <DisplayName>Show special rules</DisplayName>
          <Choice value='true' displayValue='Shown'/>
          <Choice value='false' displayValue='Hidden'/>
	</OptionChoice>

        <!-- Supplemental Caves Configuration UI Starting -->
        <ConfigSection>
            <OptionChoice name='spruSupplementalCavesDist' default='none'  displayState=':= if(?spruShown,"shown","hidden")' displayGroup='groupSpecialRules'>
                <!-- EDITED: Changed description to match original -->
                <Description> Enables/disables COG cave generation.  This does not affect the vanilla cave generator. </Description>
                <DisplayName>Supplemental Caves</DisplayName>
                <IfCondition condition=':= (?blockExists("minecraft:air")) '>

                <!-- EDITED: Changed display value to match original -->
                <Choice value='CustomVeins' displayValue='True'>
                    <!-- EDITED: Changed description value to clarify option -->
                    <Description>
                        Enable the COG cave generation.
                    </Description>
                </Choice>
                </IfCondition>

                <!-- EDITED: Changed display value and description to clarify option -->
                <Choice value='none' displayValue='False' description='Disable the COG cave generation.'/>
            </OptionChoice>
            <OptionNumeric name='spruSupplementalCavesFreq'
			   default='1'  min='0' max='5'
			   displayState=':= if(?advOptions &amp; ?spruShown, "shown", "hidden")' displayGroup='groupSpecialRules'>
                <Description> Frequency multiplier for Supplemental Caves distributions </Description>
                <DisplayName>Supplemental Caves Freq.</DisplayName>
            </OptionNumeric>
            <OptionNumeric name='spruSupplementalCavesSize' default='1'
			   min='0' max='5'
			   displayState=':= if(?advOptions &amp; ?spruShown, "shown", "hidden")' displayGroup='groupSpecialRules'>
                <Description> Size multiplier for Supplemental Caves distributions </Description>
                <DisplayName>Supplemental Caves Size</DisplayName>
            </OptionNumeric>
        </ConfigSection>
        <!-- Supplemental Caves Configuration UI Complete -->


        <!-- Mantle Configuration UI Starting -->
        <ConfigSection>
            <OptionChoice name='spruMantleDist' default='none'  displayState=':= if(?spruShown,"shown","hidden")' displayGroup='groupSpecialRules'>
                <Description> Controls how Mantle is generated </Description>
                <DisplayName>Mantle</DisplayName>
                <IfCondition condition=':= (?blockExists("minecraft:lava")) '>

                <Choice value='Substitution' displayValue='Substitution'>
                    <Description>
                        Universal Block Replacement.
                    </Description>
                </Choice>
                </IfCondition>

                <Choice value='none' displayValue='None' description='Mantle is not generated in the world.'/>
            </OptionChoice>
            <OptionNumeric name='spruMantleFreq' default='1'  min='0' max='5'
			   displayState=':= if(?advOptions &amp; ?spruShown, "shown", "hidden")' displayGroup='groupSpecialRules'>
                <Description> Frequency multiplier for Mantle distributions </Description>
                <DisplayName>Mantle Freq.</DisplayName>
            </OptionNumeric>
            <OptionNumeric name='spruMantleSize' default='1'  min='0' max='5'
			   displayState=':= if(?advOptions &amp; ?spruShown, "shown", "hidden")' displayGroup='groupSpecialRules'>
                <Description> Size multiplier for Mantle distributions </Description>
                <DisplayName>Mantle Size</DisplayName>
            </OptionNumeric>
            <!-- EDITED: Added new slider to set the lava level in caves. -->
            <OptionNumeric name='spruMantleLevel' default='8'  min='1' max='64'    displayState=':= if(?spruShown,"shown","hidden")' displayGroup='groupSpecialRules'>
                <Description> How high should the mantle be? </Description>
                <DisplayName>Mantle Level</DisplayName>
            </OptionNumeric>
        </ConfigSection>
        <!-- Mantle Configuration UI Complete -->


        <!-- Water Table Configuration UI Starting -->
        <ConfigSection>
            <OptionChoice name='spruWaterTableDist' default='none'  displayState=':= if(?spruShown,"shown","hidden")' displayGroup='groupSpecialRules'>
                <Description> Controls how Water Table is generated </Description>
                <DisplayName>Water Table</DisplayName>
                <IfCondition condition=':= (?blockExists("minecraft:water")) '>

                <Choice value='Substitution' displayValue='Substitution'>
                    <Description>
                        Universal Block Replacement.
                    </Description>
                </Choice>
                </IfCondition>

                <Choice value='none' displayValue='None' description='Water Table is not generated in the world.'/>
            </OptionChoice>
            <OptionNumeric name='spruWaterTableFreq' default='1' min='0' max='5'
			   displayState=':= if(?advOptions &amp; ?spruShown, "shown", "hidden")' displayGroup='groupSpecialRules'>
                <Description> Frequency multiplier for Water Table distributions </Description>
                <DisplayName>Water Table Freq.</DisplayName>
            </OptionNumeric>
            <OptionNumeric name='spruWaterTableSize' default='1' min='0' max='5'
			   displayState=':= if(?advOptions &amp; ?spruShown, "shown", "hidden")' displayGroup='groupSpecialRules'>
                <Description> Size multiplier for Water Table distributions </Description>
                <DisplayName>Water Table Size</DisplayName>
            </OptionNumeric>
            <!-- EDITED: Added new slider to set the water level in caves. -->
            <OptionNumeric name='spruWaterTableLevel' default='8'  min='1' max='64'  displayState=':= if(?spruShown,"shown","hidden")' displayGroup='groupSpecialRules'>
                <Description> How high should the water table be? </Description>
                <DisplayName>Water Table Level</DisplayName>
            </OptionNumeric>
        </ConfigSection>
        <!-- Water Table Configuration UI Complete -->


        <!-- Igneous Dikes Configuration UI Starting -->
        <ConfigSection>
            <OptionChoice name='spruIgneousDikesDist' default='none'  displayState=':= if(?spruShown,"shown","hidden")' displayGroup='groupSpecialRules'>
                <Description> Controls how Igneous Dikes is generated </Description>
                <DisplayName>Igneous Dikes</DisplayName>
                <IfCondition condition=':= (?blockExists("minecraft:lava")) '>

                <Choice value='StrategicClouds' displayValue='Strategic Clouds'>
                    <!-- EDITED: Described igneous dikes. -->
                    <Description>
                        Giant intrusion of lava from the mantle in a great big bump at bedrock level.
                    </Description>
                </Choice>
                </IfCondition>

                <Choice value='none' displayValue='None' description='Igneous Dikes is not generated in the world.'/>
            </OptionChoice>
            <OptionNumeric name='spruIgneousDikesFreq' default='1'
			   min='0' max='5'
			   displayState=':= if(?advOptions &amp; ?spruShown, "shown", "hidden")' displayGroup='groupSpecialRules'>
                <Description> Frequency multiplier for Igneous Dikes distributions </Description>
                <DisplayName>Igneous Dikes Freq.</DisplayName>
            </OptionNumeric>
            <OptionNumeric name='spruIgneousDikesSize' default='1'
			   min='0' max='5'
			   displayState=':= if(?advOptions &amp; ?spruShown, "shown", "hidden")' displayGroup='groupSpecialRules'>
                <Description> Size multiplier for Igneous Dikes distributions </Description>
                <DisplayName>Igneous Dikes Size</DisplayName>
            </OptionNumeric>
        </ConfigSection>
        <!-- Igneous Dikes Configuration UI Complete -->

    </ConfigSection>
    <!-- Setup Screen Complete -->





    <!-- Overworld Setup Beginning -->

    <IfCondition condition=':= ?COGActive'>

        <!-- Starting Original "Overworld" Block Removal -->
        <!-- Original "Overworld" Block Removal Complete -->

        <!-- Adding blocks -->


        <!-- Begin Supplemental Caves Generation -->

        <!-- Starting CustomVeins Preset for Supplemental Caves. -->
        <ConfigSection>
            <IfCondition condition=':= spruSupplementalCavesDist = "CustomVeins"'>
                <Veins name='spruSupplementalCavesVeins'  minHeight='0'  maxHeight='60'   branchType='Bezier' drawWireframe='true' wireframeColor='0x60888888' drawBoundBox='false' boundBoxColor='0x60888888'>
                    <!-- EDITED: Changed description to match the original -->
                    <Description>
                        Very large veins intended for generating caves, supplementary to the vanilla cave generator.
                        Note that these caves won't have lava or water springs, vines, or any of the other special 
                        features that the vanilla cave generator adds.  Also note that hese caves won't replace water,
                        to avoid carving huge holes in the ocean.
                        Credit: based on feedback by dyrewulf from the MC forums.
                    </Description>
                    <OreBlock block='minecraft:air' weight='1.0' />
                    <!-- EDITED: Changed "Replaces" to "ReplacesRegexp" -->
                    <ReplacesRegexp block='.*' weight='1' />
                    <ReplacesRegexp block='minecraft:.*water' weight='-1' />
                    <ReplacesRegexp block='minecraft:.*bedrock' weight='-1' />
                    <Biome name='.*'  />
                    <Setting name='MotherlodeFrequency' avg=':= 0.002 * spruSupplementalCavesFreq ' range=':= 0 * spruSupplementalCavesFreq ' type='normal' scaleTo='base' />
                    <Setting name='MotherlodeSize' avg=':= 10 * spruSupplementalCavesSize ' range=':= 8 * spruSupplementalCavesSize ' type='uniform' />
                    <Setting name='MotherlodeHeight' avg=':= 32 ' range=':= 10.5 ' type='uniform' scaleTo='base' />
                    <Setting name='MotherlodeRangeLimit' avg=':= 32 ' range=':= 32 ' type='normal' />
                    <Setting name='BranchFrequency' avg=':= 3 ' range=':= 2 ' type='normal' />
                    <Setting name='BranchInclination' avg=':= 0 ' range=':= 0.55 ' type='normal' />
                    <Setting name='BranchLength' avg=':= 500 ' range=':= 280 ' type='normal' />
                    <Setting name='BranchHeightLimit' avg=':= 1000 ' range=':= 0 ' type='normal' scaleTo='base' />
                    <Setting name='SegmentForkFrequency' avg=':= 0.08 ' range=':= 0 ' type='normal' />
                    <Setting name='SegmentForkLengthMult' avg=':= 0.75 ' range=':= 0.25 ' type='normal' />
                    <Setting name='SegmentLength' avg=':= 30 * spruSupplementalCavesSize ' range=':= 6 * spruSupplementalCavesSize ' type='normal' />
                    <Setting name='SegmentAngle' avg=':= 0.70 ' range=':= 0.70 ' type='normal' />
                    <Setting name='SegmentPitch' avg=':= 0.70 ' range=':= 0.70 ' type='normal' />
                    <Setting name='SegmentRadius' avg=':= 6 * spruSupplementalCavesSize ' range=':= 3.8 * spruSupplementalCavesSize ' type='normal' />
                    <Setting name='OreDensity' avg=':= 1 ' range=':= 0 ' type='normal' />
                    <Setting name='OreRadiusMult' avg=':= 1 ' range=':= 0.1 ' type='normal' />
                </Veins>
            </IfCondition>
        </ConfigSection>
        <!-- CustomVeins Preset for Supplemental Caves is complete. -->

        <!-- End Supplemental Caves Generation -->

        <!-- Begin Mantle Generation -->

        <!-- Starting Substitution Preset for Mantle. -->
        <ConfigSection>
            <IfCondition condition=':= spruMantleDist = "Substitution"'>
                <Substitute name='spruMantleSubstitute'  minHeight='0'  maxHeight='8' >
                    <Description>
                        This is a global replacement of one block
                        with another.  Height clamping is needed  to
                        keep the substitution from being  universal.
                    </Description>
                    <OreBlock block='minecraft:lava' weight='1.0' />
                    <Replaces block='minecraft:air' weight='1.0' />
                    <ReplacesOre block='dirt' weight='1.0' />
                    <ReplacesOre block='gravel' weight='1.0' />
                    <Replaces block='minecraft:water' weight='1.0' />
                    <Biome name='.*'  />
                </Substitute>
            </IfCondition>
        </ConfigSection>
        <!-- Substitution Preset for Mantle is complete. -->

        <!-- End Mantle Generation -->


        <!-- Begin Water Table Generation -->

        <!-- Starting Substitution Preset for Water Table. -->
        <ConfigSection>
            <IfCondition condition=':= spruWaterTableDist = "Substitution"'>
                <Substitute name='spruWaterTableSubstitute'  minHeight='0'  maxHeight='8' >
                    <Description>
                        This is a global replacement of one block
                        with another.  Height clamping is needed  to
                        keep the substitution from being  universal.
                    </Description>
                    <OreBlock block='minecraft:water' weight='1.0' />
                    <Replaces block='minecraft:air' weight='1.0' />
                    <Biome name='.*'  />
                </Substitute>
            </IfCondition>
        </ConfigSection>
        <!-- Substitution Preset for Water Table is complete. -->

        <!-- End Water Table Generation -->


        <!-- Begin Igneous Dikes Generation -->

        <!-- Starting StrategicClouds Preset for Igneous Dikes. -->
        <ConfigSection>
            <IfCondition condition=':= spruIgneousDikesDist = "StrategicClouds"'>
                <Cloud name='spruIgneousDikesCloud'  inherits='PresetStrategicCloud' drawWireframe='true' wireframeColor='0x60FF4400' drawBoundBox='false' boundBoxColor='0x60FF4400'>
                    <Description>
                        Large irregular clouds filled lightly  with
                        ore.  These are huge, spanning  several
                        adjacent chunks, and consequently  rather
                        rare.  They contain a sizeable  amount of ore,
                        but it takes some time and  effort to mine due
                        to low density. The  intent for strategic
                        clouds is that the  player will need to
                        actively search for  one and then set up a
                        semi-permanent  mining base and spend some
                        time actually  mining the ore.
                    </Description>
                    <OreBlock block='minecraft:lava' weight='1.0' />
                    <Replaces block='minecraft:air' weight='1.0' />
                    <ReplacesOre block='stone' weight='1.0' />
                    <ReplacesOre block='dirt' weight='1.0' />
                    <ReplacesOre block='gravel' weight='1.0' />
                    <Replaces block='minecraft:water' weight='1.0' />
                    <Biome name='.*'  />
                    <Setting name='CloudRadius' avg=':= 40 * spruIgneousDikesSize ' range=':= 20 * spruIgneousDikesSize ' type='normal' />
                    <Setting name='CloudThickness' avg=':= 20 * spruIgneousDikesSize ' range=':= 10 * spruIgneousDikesSize ' type='normal' scaleTo='base' />
                    <Setting name='DistributionFrequency' avg=':= _default_ * spruIgneousDikesFreq ' range=':= _default_ * spruIgneousDikesFreq ' type='normal' scaleTo='base' />
                    <Setting name='CloudHeight' avg=':= 0 ' range=':= 0 ' type='normal' scaleTo='base' />
                    <Setting name='ParentRangeLimit' avg=':= _default_ ' range=':= _default_ ' type='normal' />
                    <Setting name='CloudSizeNoise' avg=':= _default_ ' range=':= _default_ ' type='normal' />
                    <Setting name='CloudInclination' avg=':= 0 ' range=':= 90 ' type='normal' />
                    <Setting name='OreDensity' avg=':= 1 ' range=':= 0 ' type='normal' scaleTo='base' />
                    <Setting name='OreVolumeNoiseCutoff' avg=':= 0 ' range=':= 0 ' type='normal' />
                    <Setting name='OreRadiusMult' avg=':= 1 ' range=':= 0 ' type='normal' />
                </Cloud>
            </IfCondition>
        </ConfigSection>
        <!-- StrategicClouds Preset for Igneous Dikes is complete. -->

        <!-- End Igneous Dikes Generation -->

        <!-- Finished adding blocks -->

    </IfCondition>
    <!-- Overworld Setup Complete -->




</ConfigSection>
<!-- Configuration for Custom Ore Generation Complete! -->




<!-- =================================================================
     This file was made using the Sprocket Configuration Generator.
     If you wish to make your own configurations for a mod not
     currently supported by Custom Ore Generation, and you don't want
     the hassle of writing XML, you can find the generator script at
     its GitHub page: http://https://github.com/reteo/Sprocket
     ================================================================= -->
