Inactive [INACTIVE][WGEN] BananaImageToMap v3.1 - now with proper ores! [1000]

Discussion in 'Inactive/Unsupported Plugins' started by codename_B, Jun 22, 2011.

  1. Offline

    codename_B

    BananaImageToMap
    turn any image into a world!

    Version 3.1
    Download Here
    Github


    Configuration options:
    • image to use
    This plugin allows you to turn any image into a world - this means it can be generated with, for example, BananaMapRender, and do stuff like this!



    That's right, heightmaps translated to maps in-game, for zero effort, just configure the worldname and the image and you're away!

    Remember:
    You need to configure your bukkit.yml correctly and start with a fresh world before using this or it will not work.
    Code:
    worlds:
          worldname:
                 generator: BananaImageToMap
    
    Includes:
    • CavePopulator
    • DesertPopulator
    • DungeonPopulator
    • FlowerPopulator
    • LakePopulator
    • Mushroom Populator
    • QuarryPopulator
    • Ruins Populator - thanks @Nightgunner5
    • Snow Populator
    • SpookyRoomPopulator
    • TorchPopulator - thanks @Nightgunner5
    • Tree Populator - thanks @heldplayer and @SpaceManiac
    • Ores! - thanks @Notch
    Fun extras:
    • Will generate a heightmap image if you don't specify any!
    Screenshots:
    [​IMG]

    [​IMG]

    Changelog:
    • v1 - released awesome plugins
    • v2 - added block populator for ores, thanks @Pandarr also added awesome cavegen, thanks me!
    • v3 - added fixed populators and cleaned up code, thanks @SpaceManiac (no extra configuration options this time - sorry) :p
    • v3.1 - re-added caves (minus the memory leak) - added proper ore population :D
     
    glen3b, hammale, TAT and 9 others like this.
  2. Offline

    nightpool

    Does this work with the custom generator options in MultiVerse V2?
     
  3. Offline

    codename_B

    Should do - why not test it and let me know?
     
  4. Offline

    nightpool

    Well, after some testing, it seems both features work, importing the world it generates, and generating a new one, but not in a user friendly way.
    EDIT: I also ran out of memory generating your default 'earth' map, but that seems to be a problem with my java settings, not your plugin.

    Some suggestions:
    -not auto generating the world, waiting for it to be called, either from bukkit or from external world managers, such as MV2
    -instead of using a config, have the user pass the image name (probably relative to the bananaImageToMap folder in plugins, rather then the server root) through the id parameter, see CleanroomGenerator for an example of a simple chunk generator that makes heavy use of the id parameter.
    - Doing both of these gets rid of the config file which is really serves very little purpose, and hampers using the plugin in the way that I want to, creating worlds based on images on the fly.

    Another idea that I just came up with, is to let users make multiple 'presets', config files like fire.yml or fun.yml, customizing other options then just the image, then pass those filenames in the id parameter.
     
  5. Offline

    codename_B

    I'll have a look, if you want to contribute any code to help me do this, that's also welcome :D there are some things I just am not able to do.
     
  6. Offline

    nightpool

    Sure. Except for the presets one, they're really quite simple changes. The presets one would require you to expose more of your populator options, which from your OP it seems like you're planning to do anyway :). Do you have a Github I could use?
     
  7. Offline

    codename_B

    First on the new RB? ;)
     
  8. Offline

    Styx Reborn

    Damn you
     
  9. Offline

    Psychoma

    yay *happy happy*

    going to try it tomorrow :p
     
  10. Offline

    Psychoma

    dunno if you want it this way, but i have torches generated randomly everywhere
    on the grounds, or in caves

    i also have stone trees with ores sometimes instead of leaf
    [​IMG]

    [​IMG]

    [​IMG]
     
  11. Offline

    codename_B

    Yep, that's all intentional lol. They're not trees, they're stone mushrooms ;)

    Also the torches give it a fun "OMG WHO WAS HERE BEFORE ME?!" feel
     
  12. Offline

    Psychoma

    ok thanks
    just gotta to remove all of this then =)
     
  13. Offline

    codename_B

    I have a github for a reason! Fork me :D
     
  14. Offline

    sfxworks

    Waiting on support...
     
  15. Offline

    codename_B

    Just added github @everyone
     
  16. Offline

    Grrrr159

  17. Offline

    sfxworks

    Got it. I have the best Idea of how to make my continents now. All I need to know is what is the color for water? Just blue?
     
  18. Offline

    codename_B

    Why would it be blue? Haven't you been paying attention to this, it's a HEIGHTMAP.
     
  19. Offline

    IncendiaDrakon

    After I define a world in my bukkit.yml does the world generate, or do I have to use a plugin like multiverse to generate a new world using the name defined?

    Edit: Forget it, I figured it out. After editing my bukkit.yml then starting up and issuing /mvcreate for multiverse I got [BananaImageToMap] Reading heightmap from plugins/BananaImageToMap/earth.jpg... :D

    Aaaaand looks like I broke it. I'm using this heightmap, just to test it: http://www.johnbenzies.com/images/HeightMap.jpg
    Running CB1000 and the latest version of BananImageToMap. This happens every time I try logging in. My last connection was on this map. Help?

    Code:
    2011-07-28 03:54:34 [INFO] IncendiaDrakon [/192.168.1.120:63173] logged in with entity id 1128 at ([maptest] 99.21889185806569, 87.67647087614428, -247.67326488111453)
    2011-07-28 03:54:35 [INFO] Disconnecting IncendiaDrakon [/192.168.1.120:63173]: Internal server error
    2011-07-28 03:54:35 [WARNING] Failed to handle packet: java.lang.ArrayIndexOutOfBoundsException: 262144
    java.lang.ArrayIndexOutOfBoundsException: 262144
        at com.ubempire.map.HeightMap.get(HeightMap.java:64)
        at com.ubempire.map.HeightMapGenerator.generate(HeightMapGenerator.java:92)
        at org.bukkit.craftbukkit.generator.CustomChunkGenerator.getOrCreateChunk(CustomChunkGenerator.java:31)
        at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:70)
        at net.minecraft.server.PlayerInstance.<init>(PlayerInstance.java:31)
        at net.minecraft.server.PlayerManager.a(PlayerManager.java:45)
        at net.minecraft.server.PlayerManager.addPlayer(PlayerManager.java:84)
        at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:134)
        at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:97)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-07-28 03:54:35 [INFO] SirZeliek [/99.25.113.82:55394] logged in with entity id 1378 at ([survival] -318.95979540764006, 87.0, -334.4820025459957)
    2011-07-28 03:54:36 [INFO] [BukkitContrib] Successfully authenticated SirZeliek's BukkitContrib client. Running client version: 17
    2011-07-28 03:54:38 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    2011-07-28 03:54:38 [INFO] [dynmap] Biome data support is enabled
    2011-07-28 03:54:48 [SEVERE] Could not pass event PLAYER_QUIT to PermissionsBukkit
    java.lang.IllegalArgumentException: Attachment cannot be null
        at org.bukkit.permissions.PermissibleBase.removeAttachment(PermissibleBase.java:134)
        at org.bukkitcontrib.player.ContribCraftPlayer.removeAttachment(ContribCraftPlayer.java:140)
        at com.platymuus.bukkit.permissions.PermissionsPlugin.unregisterPlayer(PermissionsPlugin.java:137)
        at com.platymuus.bukkit.permissions.PlayerListener.onPlayerQuit(PlayerListener.java:24)
        at org.bukkit.plugin.java.JavaPluginLoader$2.execute(JavaPluginLoader.java:251)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
        at net.minecraft.server.ServerConfigurationManager.disconnect(ServerConfigurationManager.java:146)
        at net.minecraft.server.NetServerHandler.disconnect(NetServerHandler.java:117)
        at net.minecraft.server.ServerConfigurationManager.a(ServerConfigurationManager.java:194)
        at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:82)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-07-28 03:54:48 [INFO] IncendiaDrakon [/192.168.1.120:63178] logged in with entity id 2864 at ([maptest] 99.21889185806569, 87.67647087614428, -247.67326488111453)
    2011-07-28 03:54:48 [INFO] Disconnecting IncendiaDrakon [/192.168.1.120:63178]: Internal server error
    2011-07-28 03:54:48 [WARNING] Failed to handle packet: java.lang.ArrayIndexOutOfBoundsException: 262144
    java.lang.ArrayIndexOutOfBoundsException: 262144
        at com.ubempire.map.HeightMap.get(HeightMap.java:64)
        at com.ubempire.map.HeightMapGenerator.generate(HeightMapGenerator.java:92)
        at org.bukkit.craftbukkit.generator.CustomChunkGenerator.getOrCreateChunk(CustomChunkGenerator.java:31)
        at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:70)
        at net.minecraft.server.PlayerInstance.<init>(PlayerInstance.java:31)
        at net.minecraft.server.PlayerManager.a(PlayerManager.java:45)
        at net.minecraft.server.PlayerManager.addPlayer(PlayerManager.java:84)
        at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:134)
        at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:97)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-07-28 03:55:09 [SEVERE] Could not pass event PLAYER_QUIT to PermissionsBukkit
    java.lang.IllegalArgumentException: Attachment cannot be null
        at org.bukkit.permissions.PermissibleBase.removeAttachment(PermissibleBase.java:134)
        at org.bukkitcontrib.player.ContribCraftPlayer.removeAttachment(ContribCraftPlayer.java:140)
        at com.platymuus.bukkit.permissions.PermissionsPlugin.unregisterPlayer(PermissionsPlugin.java:137)
        at com.platymuus.bukkit.permissions.PlayerListener.onPlayerQuit(PlayerListener.java:24)
        at org.bukkit.plugin.java.JavaPluginLoader$2.execute(JavaPluginLoader.java:251)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
        at net.minecraft.server.ServerConfigurationManager.disconnect(ServerConfigurationManager.java:146)
        at net.minecraft.server.NetServerHandler.disconnect(NetServerHandler.java:117)
        at net.minecraft.server.ServerConfigurationManager.a(ServerConfigurationManager.java:194)
        at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:82)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-07-28 03:55:09 [INFO] IncendiaDrakon [/192.168.1.120:63183] logged in with entity id 2887 at ([maptest] 99.21875, 87.65625, -247.6875)
    2011-07-28 03:55:09 [INFO] Disconnecting IncendiaDrakon [/192.168.1.120:63183]: Internal server error
    2011-07-28 03:55:09 [WARNING] Failed to handle packet: java.lang.ArrayIndexOutOfBoundsException: 262144
    java.lang.ArrayIndexOutOfBoundsException: 262144
        at com.ubempire.map.HeightMap.get(HeightMap.java:64)
        at com.ubempire.map.HeightMapGenerator.generate(HeightMapGenerator.java:92)
        at org.bukkit.craftbukkit.generator.CustomChunkGenerator.getOrCreateChunk(CustomChunkGenerator.java:31)
        at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:70)
        at net.minecraft.server.PlayerInstance.<init>(PlayerInstance.java:31)
        at net.minecraft.server.PlayerManager.a(PlayerManager.java:45)
        at net.minecraft.server.PlayerManager.addPlayer(PlayerManager.java:84)
        at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:134)
        at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:97)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  20. Er. I have a list of questions.

    Anyway to make the map...not tile? I've read through the whole thread and it looks like it was a feature at some point. I inserted a 1024x768 maze, and I don't want it to repeat itself.

    Also, not all of us (myself included) know how heightmaps work. People are confusing it with colour. All I know is that it works on a scaling contrast=height system, but how? What contrast corresponds to what height? Would it be possible to make a diagram or illustration explaining this? (Maybe a set of colour-pickable swatches with "This generates blocks at layer 10. This generates blocks at layer 30. This generates blocks at sea level. This generates blocks at 70." and so on).
    The first attempt had the map inverted because the artist had the audacity to do the wall-lines in black.

    It also kind of threw me off that the map is generated sideways. I had to rotate my map 90 degrees left to make it 'upright'. Oh, well. Hardly a problem

    Finally, I don't suppose it's possible to leave some elements out of the generation, right? Mazes typically don't need water. Or subterranean dungeons. Or magma cauldera. Or vegetation. I suppose you could say I'm looking for a no-frills generation. Maybe make this a configuration.

    Apart from all of these, a really good generator.
     
  21. Offline

    KingHarper

    http://www.scocode.com/minecraft/colours.php

    Just a simple list of the exact colours(shades) used to create heightmaps with their minecraft player level (shown by pushing F3 and checking the Y value(rounded down)).

    It's calculated using the RGB colour by adding R + G + B then diving by 12 & finally adding 52, as seen on line 52 of HeightMap.java on github
     
    Nox13last likes this.
  22. That's exactly what I'm looking for. I still have other problems. Like all those icky trees and loamy grass. The maze of Theseus did not have these things in them (far as I know).
    And there certainly were no identical mazes next to it. Unfortunately, WorldBorder can only seem to restrict the area based on a 2:2 aspect ratio. Seeing as the maze area is 1024x768 (16:9 aspect ratio, I think), this presents a problem.
     
  23. Offline

    KingHarper

    just make your image file larger, for example the map I made is 3000 x 1300, and i wanted to use worldborder too, so to stop the tile effect, i just edited my image to be ~3200 x 3200 and filled in all the new parts black, causing my land to be surrounded by water.

    Alternatively, you could use the WorldBorder git hub and hard code the exact co-ordinates you wanted to use for your border.

    Regarding the trees etc, if you pm me exactly which features(quarry, lake, desert, ruins, trees, mushrooms, snow, flowers, spookyrooms, dungeons, caves, ores & torches) you want turned off, I could compile a version for you to use which won't generate them.
     
    Nox13last likes this.
  24. Offline

    IncendiaDrakon

    What exactly are spookyrooms? Are they those spherical caves?
     
  25. Offline

    codename_B

    No, no they are not.
     
  26. Offline

    IncendiaDrakon

    Anyone have a screenshot?
     
  27. Offline

    codename_B

    Last edited by a moderator: May 16, 2016
  28. I didn't think of that... I did make a border, but it was only about 15 pixels wide.

    No point showing me those. I'm not illiterate, but that stuff's just in another language to me. It might's well be Greek.

    For reals? Well, thanks. I thought it'd be easier to use the config file to specify what you want/don't want on a per-generation basis, but that's cool too.
    I already said that I want a no-frills setup. But I'll send you a PM anyway.
     
  29. Offline

    nintendoto

    Error when generating the world?

    EDIT: Fixed the problem.
     
  30. Offline

    brotato

    Very nice plugin, my problem is this

    [​IMG]
    [​IMG]
    very odd

    using 3200x3200 heightmap, with black around so it's water (That works fine)
    but this looks pretty bad in my opinion, is there a way to make this look better?
    (is there also a way to configure it so there's no netherrack/cobweb/lighstone spawning?)

    my heightmap: http://www.zimg.eu/i/1255955696
     

Share This Page