Posted July 30, 20169 yr Hi! I'm trying to unregister the Nether dimension ID and create a new dimension with the same chunk provider, but with some minor edits. I've done just that, but the Nether is still using the same default chunk provider instead of the one I set it to use. I basically replaced all Netherrack with Bedrock as a test to see if it would work, but it's still Netherrack. PreInit(Un-register the Nether dimension ID): https://github.com/Dizzlepop12/Journey/blob/b1c0b5ffad4da86f12dfec5820a59f10cce16012/main/java/net/journey/proxy/CommonProxy.java#L47 DimensionHelper(To register the new dimension, line 130 and 145): https://github.com/Dizzlepop12/Journey/blob/b1c0b5ffad4da86f12dfec5820a59f10cce16012/main/java/net/journey/dimension/DimensionHelper.java#L130 New ChunkProvider(Changes Netherrack to Bedrock as a test): https://github.com/Dizzlepop12/Journey/blob/81c781ef9081752c23de41a0bcae190e9e6ae640/main/java/net/journey/dimension/nether/ChunkProviderNether.java New WorldProvider(Essentially the same, but replaces the ChunkProvider with the new one): https://github.com/Dizzlepop12/Journey/blob/b1c0b5ffad4da86f12dfec5820a59f10cce16012/main/java/net/journey/dimension/nether/WorldProviderNetherJourney.java Thanks, -Ryan
July 30, 20169 yr Have you tried to do any debugging and have you looked into unregistering a vanilla dimension cause I'm not sure if that is possible as it would cause a huge problem. Plus DimensionManager.registerDimension() is only ever called in DimensionMessageHandler in the forge source. Not sure when the packet is sent though. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 30, 20169 yr Author Just about all mods that change the Nether's generation in some way unregister the Nether and recreate the entire dimension using the same ID, BoP is a good example of this. I'm just not sure what other steps need to be made. If I unregister the dimension and don't do anything else, the Nether portal does not work (which means unregistering the dimension is possible without having any issues). But if I try re-adding the dimension, it uses the standard ChunkProvider instead of the custom one I created. I believe the issue has to do with the original ChunkProvider being re-initialized once the DimensionHelper class is loaded, but I'm not sure how to fix that.
July 30, 20169 yr You also need to override the dimension type for the Nether. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 30, 20169 yr DimensionType.register(); I believe just use the same ID as the nether. Disregard this, unless I am wrong and that does exist in 1.8.9. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 30, 20169 yr You should also unregister the ProviderType. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 30, 20169 yr Author DimensionType.register(); I believe just use the same ID as the nether. Disregard this, unless I am wrong and that does exist in 1.8.9. The class and method have a different name but it has the same variables. What do I use for the provider type? Do I even need this if I already set the WorldProvider in the DimensionHelper class?
July 30, 20169 yr If you didn't see the disregard, DimensionType doesn't exist in 1.8.9, but if you are talking about my last post you do need to unregister the provider because it doesn't override. DimensionManager.registerProvider() public static boolean registerProviderType(int id, Class<? extends WorldProvider> provider, boolean keepLoaded) { if (providers.containsKey(id)) { return false; } providers.put(id, provider); spawnSettings.put(id, keepLoaded); return true; } VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 30, 20169 yr Author If you didn't see the disregard, DimensionType doesn't exist in 1.8.9, but if you are talking about my last post you do need to unregister the provider because it doesn't override. DimensionManager.registerProvider() public static boolean registerProviderType(int id, Class<? extends WorldProvider> provider, boolean keepLoaded) { if (providers.containsKey(id)) { return false; } providers.put(id, provider); spawnSettings.put(id, keepLoaded); return true; } It works wonderfully, thank you! Do you know how I could get a certain set of blocks to generate below a certain level in the Nether, like Natura's Tainted Soil? I'm not fond of chunk providers, so I'm a little stuck here. I already successfully achieved it by using worldGenMinable and generating large amounts of blocks below a certain level, but this results in a lot of lag. The main reason I'm creating a new ChunkProvider is so I can fix this and have a lag-free solution.
July 30, 20169 yr Well since I am not the best when it comes to this, Natura has a github, and it is a mod you are using as a reference. Take this it is dangerous to go alone. https://github.com/progwml6/Natura/blob/master/src/main/java/mods/natura/dimension/NetheriteChunkProvider.java *edit It might be something as simple as checking if the y level is less than a number and set the block you want though. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 30, 20169 yr Oh also mark it as solved please. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 30, 20169 yr Author Oh also mark it as solved please. I have one last problem though; It seems that my Nether mobs aren't spawning at all, which is weird because I used the BiomeDictionary.getBiomesForType() method, with the type being Type.NETHER. This worked in the past, but it won't work now. I'm sure I could find a loophole somewhere to fix this, but it would make the Nether incompatible with other mods that add entities to the Nether, and only the mobs in my mod would be able to spawn there.
July 30, 20169 yr Updated code please. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 30, 20169 yr Author Updated code please. This is where the mobs are set to spawn: https://github.com/Dizzlepop12/Journey/blob/master/main/java/net/journey/dimension/DimensionHelper.java#L268-L273 WorldProvider again: https://github.com/Dizzlepop12/Journey/blob/ab6bc84ab53a4244bd50800f47f8db6052f642b9/main/java/net/journey/dimension/nether/WorldProviderNetherJourney.java ChunkProvider again: https://github.com/Dizzlepop12/Journey/blob/0eeeae05436d8a5530dda56e9ce0e8ad7c2fc2cf/main/java/net/journey/dimension/nether/ChunkProviderNether.java Natura seems to spawn it's entities the exact same way, so not sure why it's not working for me anymore.
July 30, 20169 yr I don't have a 1.8 workspace setup atm, so could you check if NetherMobs are registered using the BiomeDictionary? *edit Ignore me I'm a little tired It's like 1:30 over here. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 30, 20169 yr Are vannila mobs spawning in the nether atleast? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 30, 20169 yr Author I don't have a 1.8 workspace setup atm, so could you check if NetherMobs are registered using the BiomeDictionary? *edit Ignore me I'm a little tired It's like 1:30 over here. They are spawned using BiomeDictionary, but not registered.
July 30, 20169 yr Could you do a check to see if the Biome is registered to the type? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 30, 20169 yr Author Could you do a check to see if the Biome is registered to the type? Is that something that I need to do? Do I need to register it like you would if it was a biome? I don't 100% understand.
July 30, 20169 yr If you are using the vanilla biomeHell then no, but it could be that you are adding your spawns before it has been initialized I think. Were they working before overriding the The Nether Dimension? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 30, 20169 yr Author If you are using the vanilla biomeHell then no, but it could be that you are adding your spawns before it has been initialized I think. Were they working before overriding the The Nether Dimension? They were spawning before I tried override the Nether. I tried moving the addSpawns to the top of preInit so it would get registered first, but that caused all mobs in the mod to not spawn. I then tried arranging it like so: http://prntscr.com/bzerc1 but that wouldn't work either.
July 30, 20169 yr I'm sorry I should have been more specific, but how about you try moving addSpawns() to your init method? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 30, 20169 yr Author I'm sorry I should have been more specific, but how about you try moving addSpawns() to your init method? It seems to crash if I do that. I tried putting the addSpawns and init above the unregisters, but that caused it to crash also. The only way to prevent it from crashing is if I put the unregisterDimension and unregisterProvider below the addSpawns and init from the DimensionHelper... http://prntscr.com/bzeve5 It's like a never ending paradox... Edit: Other mobs spawn if I put addSpawns before the unregistering of the Nether, but mobs still don't spawn in the Nether, which leads me to believe the issue lies somewhere else.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.