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))));
}
}