Jump to content

Budschie

Members
  • Posts

    172
  • Joined

  • Last visited

Everything posted by Budschie

  1. @Shaunak I'm a bit confused. What do you mean with "tweaking your settings to your computer needs"?
  2. Hello! As the title suggests, I have a problem with structure generation using features. The problem is following: Everytime my test structure should generate, the game "freezes" in a strange manner. It is pretty much unresponsive to any input, but it doesn't say that it crashed either. I located the problem in this file: https://github.com/Budschie/Deepnether-Mod/blob/master/src/main/java/de/budschie/deepnether/worldgen/TestFeature.java#L46 Due to some debugging I know that code that comes after this won't execute. To be a bit more precice: It freezes after this line: https://github.com/Budschie/Deepnether-Mod/blob/master/src/main/java/de/budschie/deepnether/structures/StructureBase.java#L210 But I have no idea what causes this "crash". Thanks for any help.
  3. @QuantumSoul Yes, pretty much the same.
  4. @QuantumSoul I found out that there is no deferred register of dimension types, so I use DimensionManager.registerOrGetDimension(DEEPNETHER_MOD_DIM.getId(), DEEPNETHER_MOD_DIM.get(), null, false);
  5. @diesieben07 Thanks. It works now.
  6. Hello. Currently I have following problem: I register my Feature like this: public static final RegistryObject<TestFeature> TEST = FEATURES.register("test", () -> new TestFeature(NoFeatureConfig::deserialize)); public static final DeferredRegister<Feature<?>> FEATURES = new DeferredRegister<>(ForgeRegistries.FEATURES, References.MODID); And I attach the feature to a biome with the following code: this.addFeature(Decoration.UNDERGROUND_ORES, Features.TEST.get().withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG).withPlacement(placement)); But it keeps crashing because the biome registry event seems to be fired first. ("java.lang.NullPointerException: Registry Object not present.") How can I fix that issue?
  7. Thanks to everybody who replied, especially to @Ugdhar for encouraging me to use github.
  8. I found my mistake: It were theses lines in my biome code: ConfiguredPlacement<CountRangeConfig> placement = Placement.COUNT_RANGE.configure(new CountRangeConfig(10, 0, 0, 140)); this.addFeature(Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(COMPRESSED_NETHERRACK, BlockInit.AMYLITHE_ORE.getDefaultState(), 6)).withPlacement(placement)); this.addFeature(Decoration.SURFACE_STRUCTURES, Features.DEEPNETHER_TEST.withPlacement(Placement.DUNGEONS.configure(new ChanceConfig(25))));
  9. @QuantumSoul That code snippet isn't up to date anymore. Look into my github for up-todate-code: https://github.com/Budschie/Deepnether-Mod By the way, I think the problem is my custom structure saving system... But I am not quite sure at the moment if that is really the issue.
  10. @Novârch You just registered the ModDimension.
  11. @Ugdhar Thanks. How do I register my DimensionType with a deferred register?
  12. @Ugdhar I think I have now set up my github repo, please tell me if I did something wrong. Link: https://github.com/Budschie/Deepnether-Mod
  13. @Ugdhar I sadly have no github.
  14. And I have to terminate the process manually, I can't exit the application with the red X button.
  15. By the way, java doesn't "crash" like it is usually the case (The message "javaw.exe" doesn't react anymore doesn't appear)
  16. @Ugdhar It gets stuck after the dimension is initialized and after the chunk generator is created. Some network stuff can also be processed and recieved on the main thread.
  17. @Novârch Thats a bit long. You can do this shorter: public static final RegistryObject<ModDimension> D4C_DIMENSION = DIMENSIONS.register("d4c_dimension", D4CDimensionType::new);
  18. Thanks. I successfully switched to DeferredRegister, but the problem still persists...
  19. I'm pretty sure I've done something wrong while registering my dimension. If I try to teleport to my dimension on the client, it "works", but gets stuck. On the server, my dimension isn't even shown in the autocomplete of the /forge setdimension command.
  20. Thanks. But the problem I've mentioned above still persists.
  21. Well, now I teleport with this code: ServerWorld worldnew = DeepnetherMain.server.getWorld(cmdContext.getArgument("dim", DimensionType.class)); player.teleport(worldnew, player.getPosX(), player.getPosY(), player.getPosZ(), player.rotationYaw, player.rotationPitch); but I will still get stuck.
  22. I recently found out that the world is already loaded (an ambient cave noise played), but the rendering thread is most probably stuck.
  23. So, I recently tried to add a dimension. But when I try to teleport to it with a command, it will get stuck, without any log output. I also have a feeling that I didin't register my dimension stuff properly. DimensionInit.java: ModDimensionInit.java: CommandTpDim.java:
  24. This is the (working) code that I have now: @SubscribeEvent public static void onLoadChunk(ChunkEvent.Load event) { if(event.getWorld() == null) return; if(event.getWorld().getWorld() == null) return; if(event.getWorld().getWorld().isRemote) return; StructureDataHandler.readChunk(event.getChunk().getPos(), event.getChunk().getWorldForge().getWorld()); } Thanks.
×
×
  • Create New...

Important Information

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