FallenMoonNetwork / CanaryMod

Server administration mod and API for Minecraft beta multiplayer server
http://canarymod.net
GNU Lesser General Public License v3.0
20 stars 14 forks source link

request - building additions #96

Closed spenk closed 11 years ago

spenk commented 11 years ago

could we also have a method to

thank you.

shadow386 commented 11 years ago

What would be the reason for such requests?

spenk commented 11 years ago

for plug in development i guess

ayyron-dev commented 11 years ago

I just feel like this isn't something Cagney should do. I'll leave the decision up to shadow.

14mRh4X0r commented 11 years ago

I think it would be useful to have a way to invoke OWorldGen* classes in Canary.

spenk commented 11 years ago

well i mean to have methods to create buildings and other stuff referring to http://jd.bukkit.org/rb/doxygen/dd/daa/interfaceorg_1_1bukkit_1_1World.html#a3620704a47026ea23c5dae5be5feaa29

BluXDragon commented 11 years ago

Have someone create a jar file with these methods in them, and then use the fancy new URLClassLoader to access these methods. You could check and then addURL if you don't want this jar to be installed like a plugin, otherwise you can just make it install.

I get the impression throwing this into Canary will simply result in increased update time while being rarely used (excluding testing and "lololol I can spawn a house"). Some things it's best to leave to the plugin developers. To be honest, even the method I suggested is over the top and unnecessary, but even so. You get the point.

Just my opinion anyway.

However, do throw in the tree generation.

By the way, here's some related things I've been playing with;

if (split[0].equalsIgnoreCase("/create")){
            int x;
            int y;
            int z;
            Block hb = new HitBlox(player).getTargetBlock();
            if (hb == null)return true;
            x = hb.getX();
            y = hb.getY();
            z = hb.getZ();
            Random rand = new Random();
            boolean success = false;
            if (split[1].equalsIgnoreCase("desertwell")){
                //if (split.length == 2){player.sendMessage("/create desertwell"); return true;}
                OWorldGenDesertWells well = new OWorldGenDesertWells();
                success = well.a(player.getWorld().getWorld(), rand, x, y, z);
            }
            if (split[1].equalsIgnoreCase("mineable")){
                if (split.length == 2){player.sendMessage("/create mineable int? int?"); return true;}
                OWorldGenMinable mine = new OWorldGenMinable(Integer.valueOf(split[2]), Integer.valueOf(split[3]));
                success = mine.a(player.getWorld().getWorld(), rand, x, y, z);
            }
            if (split[1].equalsIgnoreCase("lake")){
                if (split.length == 2){player.sendMessage("/create lake intMaterial"); return true;}
                OWorldGenLakes lake = new OWorldGenLakes(Integer.valueOf(split[2]));
                success = lake.a(player.getWorld().getWorld(), rand, x, y, z);
            }
            if (split[1].equalsIgnoreCase("forest")){
                if (split.length == 2){player.sendMessage("/create forest boolean?"); return true;}
                OWorldGenForest forest = new OWorldGenForest(Boolean.valueOf(split[2]));
                success = forest.a(player.getWorld().getWorld(), rand, x, y, z);
            }
            //OWorldGenDungeons owg = new OWorldGenDungeons();
            //boolean hasADungeon = owg.a(player.getWorld().getWorld(), rand, x, y, z);
            player.sendMessage("Generation Success? " + success);
            return true;
        }

The "mineable" did not work, I think everything else did. I don't recall if I got forest to ever generate however. Mineable returns true for success but never does anything.

14mRh4X0r commented 11 years ago

Won't fix; Canary Classic is now deprecated.