Jump to content

sidestepper

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by sidestepper

  1. Thanks, Syndaryl, that does make sense. I have confirmed that if I reduced the weight to 10 I get a not found, putting it to 100 works. Even understanding the weight system it seems broken that I have to raise the weight to force the spawn biome, but I guess that goes back to how Minecraft finds the spawn biome rather than generates it intentionally. Knowing that in practice you don't(And shouldn't) force a biome spawn on the final mod release, then I'll just move on. At least I got it working so I can test more easily.
  2. Hold up - after setting weight from 10 to 100(Set to 10 originally because that seemed to be the norm when looking at the others added in BiomeManager) - now I've got my spawn biome. What exactly does weight define? I'm used to percentages being expressed in floating point between 0 and 1 - but it does seem a lot of the chances for things in minecraft are actually int-based - how did changing weight from integer 10 to integer 100 fix the not found problem? Thanks in advance
  3. Thanks, but unfortunately this did not seem to have an effect. I did some more digging and found the error is being logged in WorldServer, function createSpawnPosition(). The variable chunkposition must be coming back null from the call to worldchunkmanager.findBiomePosition(). It seems odd to me that the game actually looks to be creating the world first, then it locates a nearby biome of the selected spawn biome type to drop you in, rather than just force the first biome it generates to be the selected spawn biome then building the world out from there - but that's beside the point. However this does mean the biome I created must not be working because it's not being created anywhere nearby and thus not found. It seems the function findBiomePosition is all obfuscated in my source, so I can't tell entirely what it is doing. While I am able to edit the java WorldServer, it's not a class file, so it ends up not recompiling. So I can't even logger.debug or logger.warn to get some answers. Tracing back it looks like findBiomePosition is drawing data from a class variable called genBiomes which is a GenLayer, generated from sub 0 of "agenlayer" which is an array of GenLayers pulled from two steps, firstly a declaration from GenLayer.initializeAllBiomGenerators, and then assigned a second time from a call to getModdedBiomeGenerators, which also accepts the array as a parameter, only to pass it to WorldTypeEvent.InitBiomeGens(). From there it just gets worse. So... Anyways, I'm getting pretty confused by all the code - if it had comments maybe it wouldn't be so bad, or if I wasn't new to modding minecraft and had a better idea of why certain things were happening I don't know - either way, this is getting frustrating and I can't help but think there must be an easier way to do this. Could it be @GotoLink was right? Do I need to create/register a new world type? Is this a simpler process? Additionally, I don't want to do anything that couldn't end up being easily dropped into existing mod packs like Tekkit or FTB, so I don't want super shortcut answers that ruin the potential of the mod to play well with others.
  4. Hello, all! I am brand new and this is my first post. I am also new to modding Minecraft(But certainly not new to programming). I hope this isn't considered resurrecting an old thread, seems recent enough. I am using Forge Source 1.7.2-10.12.2.1121.jar(Not sure if that's the best way to get the version, just looked in my reference libraries in eclipse to get this filename). Anyways - I have been trying to add a custom biome, following the advice on this thread(And some others I have found), I think I am doing every step required, but I could never find my biome, so I tried to short circuit the system and force my biome to be the spawn biome - in which case I get a cannot find spawn biome error and it drops me in some other random biome. This leads me to believe the biome is still not registered correctly, especially since I have successfully forced other biomes to be the spawn biome. @Mod file import static net.minecraft.world.biome.BiomeGenBase.forestHills; ... @Mod(modid = Utilities.MODID, version = Utilities.VERSION) public class MyModName { public static final BiomeGenBase _myBiome = new MyBiomeGen(150).setBiomeName("MyBiome"); @EventHandler public void preInit(FMLInitializationEvent event) { BiomeDictionary.registerBiomeType(_myBiome, Type.DESERT, Type.WASTELAND); BiomeManager.addSpawnBiome(_myBiome); // This is how I force spawn biome, again this works with forestHills, but if it rolls my biome it cannot find it WorldChunkManager.allowedBiomes.clear(); WorldChunkManager.allowedBiomes = new ArrayList<BiomeGenBase>(Arrays.asList(forestHills, _myBiome)); } ... } The biome code itself is very simple, but if it works, it should be quite obvious with a top layer of glass: public class MyBiomeGen extends BiomeGenBase { public MyBiomeGen(int id) { super(id); this.topBlock = Blocks.glass; this.fillerBlock = Blocks.sand; } } Thank you in advance for any assistance - let me know if you need me to post additional information.
×
×
  • Create New...

Important Information

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