request to revive a biome plugin, willing to pay.

Discussion in 'Archived: Plugin Requests' started by BlockCat, Nov 22, 2011.

  1. I've searched already for some biome plugins, because my city appeared to be in a frozen ocean biome and i'd really like to change that.
    the plugin i found is Biome
    http://forums.bukkit.org/threads/edit-biome-v0-3-1-change-biomes-permissions-953.24634/
    but it is outdated, i tried to update it myself but I'm too experienced, so i wondered if someone could update it and give me the updated source code, so i could learn from it.
    I would fairly appreciate it if someone wants to do it.

    p.s.
    paying ingame, on my server.
     
  2. Offline

    Indeleble

    I want it too!
     
  3. me too,

    nobody interested?

    someone?

    can somebody update this, or is this not possible?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  4. Offline

    efstajas

    Would like, too.
     
  5. Offline

    Neils

    Pls it seems like 1.8-Maps are full of Swamps in 1.0.0
    We do need this
     
  6. Offline

    iidunno

    I'll pick this up when I have time so I'll most likly start it on friday.
     
    efstajas and Zino like this.
  7. thank you!
    that would be great.
     
  8. Offline

    iidunno

    Just a warning though I haven't done plugins in a long time but since I need this too I'll try hard.
     
  9. A lot of people are asking for this kinda plugin. So good luck @iidunno !

    Just replied here so I can check the updates ;)
     
  10. Offline

    obnoxint

    I just refactored the LocationSet class:
    Show Spoiler

    Code:
    import java.io.Serializable;
    import java.util.Arrays;
    
    import org.bukkit.Location;
    
    // Values must be stored in order of z from smallest to largest, then x from
    // smallest to largest, with no duplicates.
    /**
     *
     */
    public class LocationSet implements Serializable {
    
        private static final long serialVersionUID = 1089403588038901633L;
    
        /**
         * @author obnoxint ([email protected])
         * @return a new LocationSet containing no coordinates.
         */
        public static LocationSet getEmptyLocationSet() {
            return new LocationSet(new int[0], new int[0]);
        }
    
        /**
         * @author obnoxint ([email protected])
         * @param chunkX
         *            x-coordinate of the chunk.
         * @param chunkZ
         *            z-coordinate of the chunk.
         * @return a three dimensional array containing the block coordinates of the chunk as an offset. <I>int[0]</I>
         *         contains the x-values and <I>int[1]</I> contains the z-values.
         */
        public static int[][] getLocationsInChunk(int chunkX, int chunkZ) {
            int[][] r = new int[2][256];
            int[] xPos = new int[256];
            int[] zPos = new int[256];
            for (int i = 0; i < 16; i++) {
                for (int j = 0; j < 16; j++) {
                    xPos[i + (j * 16)] = (chunkX * 16) + i;
                    zPos[i + (j * 16)] = (chunkZ * 16) + j;
                }
            }
            r[0] = xPos;
            r[1] = xPos;
            return r;
        }
    
        private final int   length;
    
        private final int[] x;
    
        private final int[] z;
    
        /**
         * Creates a new LocationSet based on the given chunk-coordinates.
         * 
         * @author obnoxint ([email protected])
         * @param chunkX
         *            x-coordinate of the chunk.
         * @param chunkZ
         *            z-coordinate of the chunk.
         */
        public LocationSet(int chunkX, int chunkZ) {
            this(LocationSet.getLocationsInChunk(chunkX, chunkZ)[0], LocationSet.getLocationsInChunk(chunkX, chunkZ)[1]);
        }
    
        private LocationSet(int[] xPos, int[] zPos) {
            int[] _xPos = new int[xPos.length];
            int[] _zPos = new int[zPos.length];
            int points = 0;
    
            blockloop: for (int i = 0; i < xPos.length; i++) {
                if (xPos[i] == Integer.MAX_VALUE || zPos[i] == Integer.MAX_VALUE) {
                    continue;
                }
                for (int j = 0; j < points; j++) {
                    if (_xPos[j] == xPos[i] && _zPos[j] == zPos[i]) {
                        continue blockloop;
                    }
                }
                _xPos[points] = xPos[i];
                _zPos[points] = zPos[i];
                points++;
            }
    
            x = new int[points];
            z = new int[points];
            length = points;
    
            for (int i = 0; i < points; i++) {
                int best = 0;
                for (int j = 1; j < points; j++) {
                    if (_zPos[best] > _zPos[j]) {
                        best = j;
                        continue;
                    }
                    if (_zPos[best] == _zPos[j] && _xPos[best] > _xPos[j]) {
                        best = j;
                    }
                }
                x[i] = _xPos[best];
                z[i] = _zPos[best];
                _xPos[best] = Integer.MAX_VALUE;
                _zPos[best] = Integer.MAX_VALUE;
            }
        }
    
        /**
         * Adds another LocationSet to this LocationSet and returns the resulting LocationSet. *
         * 
         * @param other
         *            another LocationSet to add this one to.
         * @return the new LocationSet.
         */
        public LocationSet addTo(LocationSet other) {
            int[] _xPos = new int[getX().length + other.getX().length];
            int[] _zPos = new int[getZ().length + other.getZ().length];
    
            for (int i = 0; i < getX().length; i++) {
                _xPos[i] = getX()[i];
                _zPos[i] = getZ()[i];
            }
    
            int start = getX().length;
            for (int i = 0; i < other.getX().length; i++) {
                _xPos[i + start] = other.getX()[i];
                _zPos[i + start] = other.getZ()[i];
            }
    
            return new LocationSet(_xPos, _zPos);
        }
    
        /**
         * @param blockX
         *            the x-coordinate.
         * @param blockZ
         *            the z-coordinate.
         * @return true if this LocationSet contains the given coordinates.
         */
        public boolean contains(int blockX, int blockZ) {
            for (int i = 0; i < getX().length; i++) {
                if (getX()[i] == blockX && getZ()[i] == blockZ) {
                    return true;
                }
            }
            return false;
        }
    
        /**
         * @param location
         *            the Location.
         * @return true if this LocationSet contains the given Location.
         */
        public boolean contains(Location location) {
            return contains(location.getBlockX(), location.getBlockZ());
        }
    
        /**
         * @author obnoxint ([email protected])
         */
        @Override
        public boolean equals(Object obj) {
            if (obj instanceof LocationSet) {
                LocationSet o = (LocationSet) obj;
                return (o.getX().equals(getX()) && o.getZ().equals(getZ()) && o.getLength() == getLength());
            }
            return false;
        }
    
        /**
         * @return the lenght.
         */
        public int getLength() {
            return length;
        }
    
        /**
         * @return the x-coordinates.
         */
        public int[] getX() {
            return x;
        }
    
        /**
         * @return the z-coordinates.
         */
        public int[] getZ() {
            return z;
        }
    
        @Override
        public int hashCode() {
            final int prime = 31;
            int result = 1;
            result = prime * result + Arrays.hashCode(x);
            result = prime * result + Arrays.hashCode(z);
            return result;
        }
    
        /**
         * @author obnoxint ([email protected])
         * @return true if this LocationSet contains no coordinates.
         */
        public boolean isEmpty() {
            return (getX().length == 0 && getZ().length == 0);
        }
    
        /**
         * Substracts another LocationSet from this LocationSet and returns the resulting LocationSet.
         * 
         * @param other
         *            another LocationSet to substract from this one.
         * @return the new LocationSet.
         */
        public LocationSet remove(LocationSet other) {
            int[] _xPos = new int[getX().length];
            int[] _zPos = new int[getZ().length];
    
            for (int i = 0; i < getX().length; i++) {
                if (other.contains(getX()[i], getZ()[i])) {
                    _xPos[i] = Integer.MAX_VALUE;
                    _zPos[i] = Integer.MAX_VALUE;
                } else {
                    _xPos[i] = getX()[i];
                    _zPos[i] = getZ()[i];
                }
            }
            return new LocationSet(_xPos, _zPos);
        }
    
        /**
         * Unions this LocationSet with another LocationSet by overwriting existing values in the given LocationSet and
         * return the resulting LocationSet.
         * 
         * @param other
         *            another LocationSet to unify with this one.
         * @return the new LocationSet.
         */
        public LocationSet union(LocationSet other) {
            int[] _xPos = new int[getX().length];
            int[] _zPos = new int[getZ().length];
    
            for (int i = 0; i < getX().length; i++) {
                if (other.contains(getX()[i], getZ()[i])) {
                    _xPos[i] = getX()[i];
                    _zPos[i] = getZ()[i];
                } else {
                    _xPos[i] = Integer.MAX_VALUE;
                    _zPos[i] = Integer.MAX_VALUE;
                }
            }
            return new LocationSet(_xPos, _zPos);
        }
    }

    Now I'm going to figure out the best way to refactor and update the BiomeChunkManager class.
     
  11. Offline

    obnoxint

    The BiomeChunkManager class compiles but contains a lot of spaghetti code. I'll clean up this mess and test tomorrow. If there is someone who likes to contribute something here in the thread, then do so.
     
  12. Offline

    obnoxint

    Bad news: Nothing works. Potencial to destroy world files.

    A lot of changes were made to the mc-dev repository since the plugin came out. It seems like some fields which were public before are now private and can therefore not being accessed by subclasses. My first intention was to modify the code of the mc-dev repo. This is a No-Go, because basically it's Notchs code.

    If there is someone who can give me some inspiration and useful hints, I can pick the idea up again. But until then I do not want to be blamed for destroyed worlds and I also don't want to support a plugin that might break with each RB.

    Sorry.
     
  13. @obnoxint Did you found anything out about biomes? And maybe how to set them? Maybe I can have a look at the docs and such...
     
  14. Offline

    obnoxint

    What I found out is, I need to find another way to some fields of the ChunkManagerClass (package net.minecraft.server). The deobfuscation process seems to cause different output and member names than earlier deobfuscation processes. Actually the obfuscated result (and therefore the deobfuscated code also) depends on the machine on which the obfuscation takes place. This means a method (or member in general) called a() can be called b(), c(), d(), etc. after the code obfuscation on another machine.

    To get the chunk and override its WorldChunkManager you have to get the handle of the world via the CraftWorld class, like this:
    Code:
    WorldServer ws = ((CraftWorld) world).getHandle();
    This returns an instance of WorldServer which you can use to access the world provider and by this access the biome data:
    Code:
    ws.worldProvider.b
    Note: 'b' is a field not a method. However, no problems until this point. But when I am extending the WorldChunkManager class like the original author did, I am unable to access some fields (because they are private now). I think I don't need to, but I'm not sure: there are well-named methods that return arrays, but I don't know hoew to handle them, because I don't understand the obfuscated parameter names.

    This is the WorldChunkManager class, if somebody wants to take a look at the code: https://github.com/Bukkit/mc-dev/blob/master/net/minecraft/server/WorldChunkManager.java

    It's seems to be impossible to assign a biome type to a particular chunk. Instead one has to assign an WorldChunkManager to the world provider. The WorldChunkManager handles the assignment of biomes based on temperature and such. And this is the source of my paranoia: do one mistake, produce one bug and the world is destroyed forever.

    If I at least knew where to start...
     
  15. Offline

    _Martinius_

    It seems to be possible to change the seed so that the biome is changing,too!
    so we could change the seed. But the we musst know how to calculate it

    PS i need the code where:
    a(world.getSeed())
    is to find
     
  16. Offline

    AbsolutelyZer0

    Watching this thread now, waiting for an update.
     
  17. Offline

    iidunno

    I thought someone stole this plugin from me and I haven't even worked on it yet.
     
  18. Offline

    AbsolutelyZer0

    What do you mean? Can you start soon? I REALLY need an updated version so I can fix the snow biome on my Creative server, otherwise that server may never return with the same map. :(
     
  19. Offline

    Aprime

    You don't wanna trust that faggot.
    He came on my server offering to assist with work on a plugin we're doing to sorta reestablish the old armor system, but with enchants.

    I tried it on a local Ham machine at first, didn't think much of it, claimed it wasn't done.

    Pushes for testing on the server, I'm like okay.

    I installed it, first time doesn't work.

    He sends me an 'update'.

    Oh suddenly he's Blue (color for admins).

    I killed the machine before he could do anything, banned him and what not but I overlooked something, he added himself and some other players to the OP list.

    So they came on and started trying fucking with shit. Only had enough time to unban iidunno and WE grief the spawn (as if we couldn't revert the damage), we banned them again IP too, went and checked all our config files and reopened the server.

    tl;dr he makes 'plugins' that give him and his buttbuddies OP powers on a server.

    I'm never falling for shit like this again.
     
  20. Offline

    AbsolutelyZer0

    As long as he can re-do the plugin without asking me for any IPs, Usernames, Server Info, etc...I trust him.
     
  21. Offline

    Karl Marx

    I got this...

    http://dev.bukkit.org/server-mods/biomed/

    EDIT: It looks like the mods didn't like my description, so I've re-written it and I'm now waiting for approval. If you can't wait, PM me for a direct download. You can also check out my previous (now outdated) work in the old Biome thread, starting around page 6.

    2ND EDIT: I spoke too soon... APPROVED!
    Get downloading!
     
    dadaemon likes this.
  22. Offline

    AbsolutelyZer0

    As long as it has compatibility with Essentials, unlike the oudated Biome v0.3.1, you may be my savior...

    EDIT: Love the plugin, but it doesn't do what I needed it for in the first place: Fix the snow biome that the outdated Biome plugin broke. It still rains instead of snowing, and it's done that since I first tried using that outdated plugin. Is there ANY WAY you can add the power to fix this to your plugin, PLEASE?!
     
  23. No... This is IMPOSSIBRRRUUUUU! Snow/rain is client side. The client takes the level seed and based on that it will check if it should rain or snow. All client side!
     
  24. Offline

    AbsolutelyZer0

    Okay, so how did a server-side plugin screw that up and how do I fix it?
     
  25. Offline

    gyroninja

    Well if you put snow on the ground dles it snow no it rains. Depending what the biome was orriganally is whether you get snow or rain. Thats just my $0.64
     
  26. Offline

    AbsolutelyZer0

    No, see, look...I tried using the outdated Biome plugin to expand my pre-genereated snow biome on my Creative server. The plugin failed and instead broke the snow biome and made it rain instead of snow. It's been raining ever since...
     
  27. Offline

    Karl Marx

    The old plugin was incapable of doing this, as it wasn't capable of even loading in the first place. It is purely coincidence that your biome changed through a game update at the same time.

    Since biome data is re-generated every time the map loads, it will change every time the map generation code changes, even in pre-existing chunks- causing deserts to be covered in snow, etc.

    Use the "/biome get" command to see what biome you are in. If it gives you whatever you changed it too, then the plugin is working. Graphics on the client side are incapable of reflecting the changed biome; it will look like rain if the original biome wasn't cold, but it's really snowing. Snow should even pile up on the ground over time. If you want the opposite, and need to thaw an area that was frozen by a game update, you will have to do this manually as snow and ice do not melt on their own. WorldEdit has a "/thaw" command that makes this easier. If you don't use BioMed to change the biome to something warmer, however, it will keep on re-freezing every time.

    Also, the tundra biome is broken. If you were trying to use it previously, try frozen river or something else cold instead.
     
  28. Offline

    fromgate

    Here is my plugin WeatherMan. I hope it will help you )
     

Share This Page