• 0

    posted a message on 1.16.1 Question about FillerBlockTypes when generating ores
    Quote from V5_»

    You cannot make another filler block type. If you want ores to generate and replace different blocks, then you'll have to copy the ore feature code and then just replace the FillerBlockType with a way of testing if the ore can generate there. You'll also need to register the feature.


    Ok thanks, i will try that!
    Quote from V5_»
    Do you mean like adjacent to water or within a few blocks?

    Adjacent to water is what I meant.
    Posted in: Modification Development
  • 0

    posted a message on 1.16.1 Question about FillerBlockTypes when generating ores

    A new modder here and pretty novice in java coding in general so sorry if I ask stupid questions!


    Is there a way to add more than one FillerBlockType in the same method if I wanted to generate my ore for example in ocean floor?

    The method works just fine, but only generates ores near stone. If I would like the ore to be generated near gravel and sand as well how to I do it? I got my own FillerBlockTypes made for them but it says I can't add operators to the arguments when calling the genOre method. Do I just call my genOre method multiple times for each FillerBlockType I want?

    Another question I have is how to make an ore to generate only near water sources? If I set the FillerBlockType to WATER the ore would presumable generate where water normally does and I want it to generate like normal stone in underground in caves, but only near water (talking about a different ore here).


    My method looks like this:


    @SubscribeEvent
    public static void generateOres(FMLLoadCompleteEvent event) {

    for (Biome biome : ForgeRegistries.BIOMES) {

    if (biome.getCategory() == Biome.Category.OCEAN) {
    genOre(biome, 15, 1, 5, 65, OreFeatureConfig.FillerBlockType.NATURAL_STONE, RegistryHandler.CORAL_RAG_BLOCK.get().getDefaultState(), 50);
    }
    }
    }
    Posted in: Modification Development
  • To post a comment, please or register a new account.