Jump to content

CrueltE

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by CrueltE

  1. Thanks so much for the quick reply! This does indeed look like quite the amount of fun haha. Will post back if I can get my idea working. Thanks again!
  2. I'm looking to override the vanilla ore generation strategy. I've been digging through all of the forge/minecraft source code, and scoured github looking for a solution, but I'm unable to find one. I saw there is an ORE feature that is used to add all of the ores to the different biomes In Feature.java public static final Feature<OreFeatureConfig> ORE = register("ore", new OreFeature(OreFeatureConfig::deserialize)); In DefaultBiomeFeatures.java public static void addStoneVariants(Biome biomeIn) { biomeIn.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.func_225566_b_(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, field_226786_au_, 33)).func_227228_a_(Placement.COUNT_RANGE.func_227446_a_(new CountRangeConfig(10, 0, 0, 256)))); ... etc for other ore types } The default OreFeature.java that gets registered has a place method and a giant formula. I'm assuming this is how it ends up generating the ore. At the end of the formula it ends up calling worldIn.setBlockState(blockpos$mutable, config.state, 2); So I thought I would go ahead and create my own CustomOreFeature which extends OreFeature (I just copied the exact formula from the original OreFeature), then register it private static final DeferredRegister<Feature<?>> FEATURES = new DeferredRegister<>(ForgeRegistries.FEATURES, "minecraft"); public ExampleMod() { IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); FEATURES.register("ore", () -> new CustomOreFeature(OreFeatureConfig::deserialize)); FEATURES.register(modEventBus); } When i start up the client it says that is overrided the original ORE feature, which is good. [21:49:06] [Render thread/INFO] [ne.mi.re.GameData/]: Potentially Dangerous alternative prefix `minecraft` for name `ore`, expected `examplemod`. This could be a intended override, but in most cases indicates a broken mod. [21:49:06] [Render thread/DEBUG] [ne.mi.re.ForgeRegistry/REGISTRIES]: Registry Feature Override: minecraft:ore net.minecraft.world.gen.feature.OreFeature@57ac2910 -> com.example.examplemod.CustomOreFeature@67c1fc9b However, no matter what i change in my CustomOreFeature class, it doesn't seems to affect the default ore generation (Altering the formula i copied, or just removing the formula entirely). I'm brand new to modding minecraft, so any help or direction is greatly appreciated. Thanks in advance! CrueltE
  3. I want to create a server where stone is disabled to make it so people can't just strip mine. Does anyone know of any mods or how this could be done? Thanks!
×
×
  • Create New...

Important Information

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