Jump to content

[1.14]+[1.15] Differences of (biome.addFeature) and (TAIGA.addFeature)


Recommended Posts

Posted

Please explain for me, why there is so much differences in generation between biome.addFeature and TAIGA.addFeature?? :D
 

Spoiler

if (biome == TAIGA|| biome == ICE_SPIKES)

{

biome.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, GrandLifeBlocks.mythril_shard_ore.getDefaultState(), 22)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(22, 23, 23, 42))));

}

biome.addFeature.thumb.jpg.5c315fd261a5da4a8c5c31cc4602fc78.jpg

and

Spoiler

TAIGA.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, GrandLifeBlocks.mythril_shard_ore.getDefaultState(), 22)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(22, 23, 23, 42))));

TAIGA.addFeature.thumb.jpg.2a1e6dab410c6e942976a7247ed19164.jpg

All the Best for You :)

Posted

Anyway, I'm using - if (biome == TAIGA)

Just interesting why this is happened..


Is it enough?

 

if (biome)...

biome.addFeature

Spoiler

package com.grandlifemod.world;


import com.grandlifemod.content.GrandLifeBlocks;
import net.minecraft.world.biome.*;
import net.minecraft.world.gen.GenerationStage;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.OreFeatureConfig;
import net.minecraft.world.gen.placement.*;
import net.minecraftforge.registries.ForgeRegistries;

import static net.minecraft.world.biome.Biomes.*;


public class GrandLifeShardOreGenerations {


    public static void setupOreGeneration2() {


        for (Biome biome : ForgeRegistries.BIOMES) {

            //Mythril
            if (biome == TAIGA || biome == TAIGA_HILLS || biome == TAIGA_MOUNTAINS || biome == SNOWY_TAIGA || biome == SNOWY_TAIGA_HILLS || biome == SNOWY_TAIGA_MOUNTAINS || biome == SNOWY_TUNDRA || biome == SNOWY_MOUNTAINS || biome == ICE_SPIKES || biome == GIANT_SPRUCE_TAIGA || biome == GIANT_SPRUCE_TAIGA_HILLS || biome == GIANT_TREE_TAIGA || biome == GIANT_TREE_TAIGA_HILLS) {
                biome.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, GrandLifeBlocks.mythril_shard_ore.getDefaultState(), 4)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(6, 8, 8, 32))));
            }
        }
    }
}

 

TAIGA.addFeature

Spoiler

package com.grandlifemod.world;


import com.grandlifemod.content.GrandLifeBlocks;
import net.minecraft.world.gen.GenerationStage;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.OreFeatureConfig;
import net.minecraft.world.gen.placement.*;

import static net.minecraft.world.biome.Biomes.*;


public class GrandLifeShardOreGenerations {


    public static void setupOreGeneration2() {
        
        TAIGA.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, GrandLifeBlocks.mythril_shard_ore.getDefaultState(), 3)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(8, 10, 6, 32))));
        TAIGA_HILLS.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, GrandLifeBlocks.mythril_shard_ore.getDefaultState(), 3)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(8, 10, 6, 32))));
        TAIGA_MOUNTAINS.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, GrandLifeBlocks.mythril_shard_ore.getDefaultState(), 3)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(8, 10, 6, 32))));
    }
}

 

 

24 minutes ago, diesieben07 said:

Show more of your code.

Posted
4 minutes ago, diesieben07 said:

Well... the first one adds it to way more biomes than the 2nd one...?

I don't about that.
If I use this only for Taiga: if (biome == TAIGA) - It generates normal amount of ore (For example, 10 blocks)

But if I use: TAIGA.addFeature - This generates ore several times more than normal (For example, 50 blocks with the same config)

Posted
13 minutes ago, diesieben07 said:

setupOreGeneration2 where is this called from?

Call from Main class in FMLCommonEvent.
But, If I write setup with TAIGA.addFreature in FMLClient, it works better than before with (biome==TAIGA)

But If i write setup with (biome ==TAIGA) in FMLClient, it don't generate ore

Posted
package com.grandlifemod;

import com.grandlifemod.additions.BlockRenders;
import com.grandlifemod.proxy.GrandLifeSetup;
import com.grandlifemod.world.GrandLifeShardOreGenerations;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLDedicatedServerSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

@Mod(GrandLifeMod.MODID)
public class GrandLifeMod
{
    public static GrandLifeMod instance;

    public static final String MODID = "grandlifemod";
    private static final Logger LOGGER = LogManager.getLogger();

    public static GrandLifeSetup setup = new GrandLifeSetup();

    public GrandLifeMod()
    {
        instance = this;

        MinecraftForge.EVENT_BUS.register(this);
        
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::modSetup);
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::clientSetup);
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::serverSetup);
    }

    private void modSetup(final FMLCommonSetupEvent event)
    {
        GrandLifeShardOreGenerations.setupOreGeneration2();

        LOGGER.info("GLife common setup");
    }

    private void clientSetup(final FMLClientSetupEvent event)
    {
        BlockRenders.defineRenders();

        LOGGER.info("GLife client setup");
    }

    private void serverSetup(final FMLDedicatedServerSetupEvent event)
    {

        LOGGER.info("GLife server setup");
    }

}
package com.grandlifemod.world;


import com.grandlifemod.content.GrandLifeBlocks;
import net.minecraft.world.gen.GenerationStage;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.OreFeatureConfig;
import net.minecraft.world.gen.placement.*;

import static net.minecraft.world.biome.Biomes.*;


public class GrandLifeShardOreGenerations
{

    public static void setupOreGeneration2()
    {
        TAIGA.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, GrandLifeBlocks.mythril_shard_ore.getDefaultState(), 3)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(6, 8, 8, 32))));
        TAIGA_HILLS.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, GrandLifeBlocks.mythril_shard_ore.getDefaultState(), 3)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(6, 8, 8, 32))));
        TAIGA_MOUNTAINS.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, GrandLifeBlocks.mythril_shard_ore.getDefaultState(), 3)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(6, 8, 8, 32))));

    }

}

 

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.