Jump to content

jbko6

Members
  • Posts

    3
  • Joined

  • Last visited

jbko6's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Welp, that was dumb of me. I've been working on this for ~8 hours so I think my brains a bit melted. Time to take a walk I suppose.
  2. I'm having trouble registering a feature and using it in json files. I have a "AsteroidFeature" class: public class AsteroidFeature<C extends IFeatureConfig> extends Feature<NoFeatureConfig> { int steps; int check; ArrayList<BlockPos> plannedPos = new ArrayList<>(); ArrayList<BlockPos> plannedPosDone = new ArrayList<>(); public AsteroidFeature(Codec<NoFeatureConfig> codec) { super(codec); } @Override public boolean func_241855_a(ISeedReader reader , ChunkGenerator generator, Random rand, BlockPos pos, NoFeatureConfig config) { if (pos.getY() <= 60) {return false;} // do stuff return true; } } ... and a registering class: public abstract class Feature<FC extends IFeatureConfig> extends net.minecraftforge.registries.ForgeRegistryEntry<Feature<?>> { public static final AsteroidFeature<IFeatureConfig> ASTEROID = register(new ResourceLocation(VanillaSpace.MOD_ID, "asteroid"), new AsteroidFeature<>(NoFeatureConfig.field_236558_a_)); private static <C extends IFeatureConfig, F extends net.minecraft.world.gen.feature.Feature<C>> F register(ResourceLocation key, F value) { return Registry.register(Registry.FEATURE, key, value); } } I've been basing these classes off of the "ForestRock" feature. I am adding the feature to a custom biome I created so I don't think I need to do any of the BiomeLoadingEvent stuff (correct me if I'm wrong about that). However, when I try and create a world, I get this error: [17:14:09] [Render thread/ERROR] [minecraft/BiomeGenerationSettings]: Feature: Not a JSON object: "vspace:asteroid" [17:14:09] [Render thread/ERROR] [minecraft/DynamicRegistries]: Error loading registry data: Unknown registry key: vspace:asteroid Honestly, I'm not sure what to do about this anymore.
  3. I have a mod in which I have a "Space" dimension. I created several asteroid NBT files and I wish to have them generate naturally. I created the dimension using the new JSON system and there are spaces for adding features or structures to generate in the dimension. However, I'm really unsure as to how I can register either structures or features of my asteroids. I heard that using features for small objects is better than using structures (my biggest asteroid is 20x20x20 or so). I've been unable to find any clear documentation on how feature or structure generation works in 1.16.3. Please be patient with me as I am a bit of a newbie when it comes to modding.
×
×
  • Create New...

Important Information

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