DrasticDemise Posted March 16, 2016 Share Posted March 16, 2016 Hello! I am creating an item that is able to change the biome type in a given location when used, however I have run into quite a few issues and am now at a complete loss. I have a few suspicions for implementation and access, but they have all led to dead ends. It appears as though (PLEASE correct me if I am wrong) biomes are stored by chunk, however there are only accessors for obtaining information about biomes in a given chunk, no mutators. The one mutator I see is "setBiomeArray" which takes a sized 256 byte array and sets the new biome array to the one given in the method call. 1. Does setBiomeArray allow me to change the ID and information of a given chunk to a new biome and will it then have the properties of the biome like normal? 2. If so, how do I obtain a byte Array of the given type I need? If I want to change one biome into a desert biome always, how do I get the mappings of a desert biome? I have peeked a bit at 1.7.10 Blood Magic, Random Things and Witchery to attempt to learn how they modified biomes, however I was largely unsuccessful. Any information at all would be extremely useful. Thank you! Quote Link to comment Share on other sites More sharing options...
Elix_x Posted March 16, 2016 Share Posted March 16, 2016 What you said is mostly correct. Get biome array from chunk, set biome at location to what you want and than set chunk's biome array to it. If i remember correctly, to transform x and z to index in array, you have to do x << 4 | z, where x and z are internal chunk coordinates (global coordinates bitwise anded with 15). Quote Check out my mods: BTAM Armor sets Avoid Exploding Creepers Tools compressor Anti Id Conflict Key bindings overhaul Colourfull blocks Invisi Zones Link to comment Share on other sites More sharing options...
Draco18s Posted March 16, 2016 Share Posted March 16, 2016 If you follow the World#getBiomeForCoordinates() call stack you'll see how it gets access to the biome stored at a particular coordinate. You'll then have to write your own method(s) to change the value. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
Recommended Posts
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.