Jump to content

JamFactory

Members
  • Posts

    4
  • Joined

  • Last visited

JamFactory's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Good question. I don't really understand features at all so all I can offer you is that in the line addBiome("caelum_forest", Category.SWAMP, .15f, .8f, BiomeTemplate.DEFAULT_OVERWORLD_SKY_COLOR, BiomeTemplate.DEFAULT_OVERWORLD_FOG_COLOR, BiomeTemplate.DEFAULT_OVERWORLD_WATER_COLOR, BiomeTemplate.DEFAULT_OVERWORLD_WATER_FOG_COLOR, color(0,50, 70), color(0, 100, 150), GrassColorModifier.NONE, ParticleTypes.ENCHANT, .01f, 0f, .8f, new ConfiguredFeature<?, ?>[] {Features.field_243934_cq, features.get("test").get().withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG) }, new StructureFeature<?,?>[] {StructureFeatures.field_244151_q}); ".withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG)" is underlined and it says "The method withConfiguration(capture#3-of ?) in the type Feature<capture#3-of ?> is not applicable for the arguments (NoFeatureConfig)." If I cast features.get("test").get() as a Feature<NoFeatureConfig> the red line goes away but the game crashes on load with only the message "Mod Loading has failed" and points to the line that I pasted above I don't even need help with this specifically, I just need a working example of features using deferred registries
  2. Helo! I've gotten custom biomes down and have them generating with vanilla features, but defining new features is giving me hell and I can't find good resources on them (Thank you forge docs for not even mentioning world gen). I created the deferred registry and have the `.register(id, () -> new AbstractFeatureBase(NoFeatureConfig.field_236558_a_)));` pattern and finally I have `genBuilder.func_242513_a(GenerationStage.Decoration.VEGETAL_DECORATION, feature);` where `genBuilder` is of type `BiomeGenerationSettingsBuilder` and `feature` is of type `ConfiguredFeature<?,?>` I guess all I need to do is turn the `Feature<?>` that is created with `register()` into a `ConfiguredFeature<?,?>`. I think I have to use `.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG)` but it's not working. Here's my repo. I just realized that my features are in net.minecraft instead of jam.jamfactory so I'll fix that in a bit. If you need more explanation of what I'm asking for I'll try to give it, but I don't quite understand this yet 😛 Any help is appreciated!
  3. Welp I fixed it by putting the call in an onBlocksRegistry event. I tried this earlier but it didn't work, but regardless I appreciate the coding style help. I'm no longer using Bases
  4. I usually don't ask forums unless I've been stuck for a number of days, and so here I am. I'm new to the modding scene and trying to put together my first mod with basic world gen but I can't get it to work. INFO: I've followed this and this tutorial about world gen, and I've got it to the point where I can spawn vanilla blocks just fine. I tested and the blocks I added-- Tungsten Block and Tungsten Ore-- work fine and can be placed/mined and whatnot. I made a test with gold blocks spawning underground and that's all fine and dandy, however PROBLEM: When I attempt to use `RegistryHandler.EXAMPLE_ORE.get(), the game crashes with the message "Registry Object not Present," which according to the registry object code just means that the registry object field is null. Where I'm confused is at a different point in the code I have the line `...ITEMS.register("example_ore", () -> new BlockItemBase(EXAMPLE_ORE.get()));` which has that same `EXAMPLE_ORE.get()` expression but when I went into the constructor of BlockItemBase and printed what it had passed into it, it displayed it just fine. I tried doing a sysout of the `EXAMPLE_ORE.get()` expression immediately before and after this `...ITEMS.register("example_ore", () -> new BlockItemBase(EXAMPLE_ORE.get()));` line but they both returned null. I was wondering if it was a timing/threading thing Here's the git repo, and to make it not crash just replace `RegistryHandler.TUNGSTEN_ORE.get()` on line util.RegistryHandler.java:55 with `Blocks.GOLD_BLOCK` Any help is greatly appreciated. I've been at this for a while heh
×
×
  • Create New...

Important Information

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