Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SkySibe

Members
  • Joined

Everything posted by SkySibe

  1. I didn't find any and didn't manage it to work, I'll appreciate your help thanks by far.
  2. What should I need to do? I didn't understand... do I need to delete this function?: @SubscribeEvent public static void loadCompleteEvent() { genOre.addRubyOre(); } and insteand in this what should I call and how? private void setup(final FMLCommonSetupEvent event) { } and what should I change here except unusing extents? and how do I use DeferredWorkQueue insteand of addFeature?? public class genOre{ private static final BlockState RUBY_ORE = BlockInit.ruby_ore.getDefaultState(); public static void addRubyOre() { for (Biome biomeIn : ForgeRegistries.BIOMES) { if (biomeIn == Biomes.DARK_FOREST || biomeIn == Biomes.DARK_FOREST_HILLS) { biomeIn.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, RUBY_ORE, 12)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(0, 3, 9, 40)))); } else { biomeIn.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, RUBY_ORE, 9)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(0, 1, 6, 40)))); } } } }
  3. I've looked at the DefaultBiomeFeatures class of the vanilla code and created this class in the mod folder in the world.gen packages: package com.SkySibe.testmod.world.gen; import com.SkySibe.testmod.init.BlockInit; import net.minecraft.block.BlockState; import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.Biomes; import net.minecraft.world.biome.DefaultBiomeFeatures; 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.CountRangeConfig; import net.minecraft.world.gen.placement.Placement; import net.minecraftforge.registries.ForgeRegistries; public class genOre extends DefaultBiomeFeatures{ private static final BlockState RUBY_ORE = BlockInit.ruby_ore.getDefaultState(); public static void addRubyOre() { for (Biome biomeIn : ForgeRegistries.BIOMES) { if (biomeIn == Biomes.DARK_FOREST || biomeIn == Biomes.DARK_FOREST_HILLS) { biomeIn.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, RUBY_ORE, 12)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(0, 3, 9, 40)))); } else { biomeIn.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, RUBY_ORE, 9)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(0, 1, 6, 40)))); } } } } In the mod folder in the main mod class I've created the function 'loadCompleteEvent': package com.SkySibe.testmod; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import com.SkySibe.testmod.world.gen.genOre; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.SubscribeEvent; 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.FMLLoadCompleteEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; // The value here should match an entry in the META-INF/mods.toml file @Mod("testmod") public class TestMod { // Directly reference a log4j logger. private static final Logger LOGGER = LogManager.getLogger(); public static final String MOD_ID = "testmod"; public static TestMod instance; public TestMod() { // Register the setup method for modloading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); // Register the doClientStuff method for modloading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); instance = this; // Register ourselves for server and other game events we are interested in MinecraftForge.EVENT_BUS.register(this); } private void setup(final FMLCommonSetupEvent event) { } private void doClientStuff(final FMLClientSetupEvent event) { } @SubscribeEvent public static void loadCompleteEvent() { genOre.addRubyOre(); } } I would like some help I'm pretty new to this although I've some experience with Java. btw I need help with adding xp to the ore mining, if you can tell me where do I find the vanilla class that doing it and how to modify it, it will help a lot. Thank.

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.