PTM173
PTM173 1.7.3 Terrain Generation
Notice
I'll be putting minecraft down for a while and will likely not be maintaining this project. I'll be passing the source on to others and putting up a stripped down version on this site so that others may continue if they chose to. I may come back to minecraft one day particularly when there is decent plugin support. In the mean time I recommend that everyone deprecate and move away from their existing 1.7.3 worlds. If someone produces a plugin of a similar nature I will provide a link at the top of this page.
In my opinion, the simplest thing to do if you really want to keep the world is to generate a ton of terrain then lock the borders so that no terrain can be generated.
If you have questions or concerns you are welcome to pm me. I'll get to them when I can. Remember if you have frustrations the best people to communicate those to are Jeb and the rest of Moyang team particularly about deobfuscating the code, including a reasonable license, and making plugin support a priority. We all love what minecraft represents as an open, modifiable, multiplayer, infinite world but it's just been slow to develop into a solid game that the community enjoys improving upon as much as playing. I'll be maintaining PTM1.7.3v3.x for CB 1.1-R1 and after that will no longer be creating artifacts.
Summary
Essentially this is a rework of Phoenix Terrain Mod to plug into the terrain generation from 1.7.3 so that future versions of craft bukkit servers can have older worlds that continue to generate proper terrain for new chunks without having to "fix" the terrain by smoothing between 1.7.3 and 1.0 terrain.
Here is a comparison of the terrain generation of a world originally created in 1.7.3 where I've gone to the border where new chunks are being generated: Terrain Comparison (the image shows 1.8.1 but looks the same with 1.1 .. I'm just lazy)
- 1rst image (top): 1.8.1 with PTM173 enabled
- 2nd image (middle): 1.8.1
- 3rd image (bottom): 1.7.3
Status
PTM173 has been through several comparison tests between 1.0 PTM173 and 1.7.3 itself on both a test world and on a live server. It is currently running on a live server. There may be known issues with the latest release and I am continuing to test. Please create tickets as you run into issues.
Installation
Setup
- download the latest version of PTM173.jar: PTM173v3.1
- source to start working on this yourself is here in truncated form: PTM173v3.1_src
- put PTM173.jar in your plugins dir for your bukkit craft installation
- if not running multiverse: change bukkit.yml so that the world generator is set to "PTM173" by adding this to the bottom of the file:
worlds: world: generator: PTM173
WARNING: be careful when typing this out by hand the space between "generator:" and "PTM173" is important. If you notice when starting up your server that "generator:PTM173" has been moved to be on the same line as "world:" then you are likely missing a space and are NOT generating PTM173 terrain.
- if running multiverse: change your generator in the plugins/Multiverse-Core/worlds.yml file to "PTM173" by adding this to the yml block for the world you want to generate 1.7.3 terrain. For example here's a test world config in worlds.yml:
worlds: test_world: gamemode: SURVIVAL keepspawninmemory: true scale: 1.0 animals: spawn: true pvp: true entryfee: amount: 0.0 currency: -1 alias: color: WHITE name: '' allowweather: true monsters: spawn: true hunger: true spawn: yaw: 0.0 pitch: 0.0 z: 0.0 y: 64.0 x: 0.0 environment: NORMAL respawnworld: '' tempspawn: '' generator: PTM173 seed: ''
Running
There are no special steps when running craft bukkit server to run PTM173; however, it's good to know what to look for to ensure that it has started up appropriately:
- This indicates PTM173 is recognized and has loaded properly: "[INFO] PTM173 v2.2 is now enabled"
- This indicates the world that PTM173 is running on : "[INFO] PTM173: enabled for 'world'"
Note by default craft bukkit runs on the world named 'world'
Upgrading
PTM173 does not generate files and therefore upgrading simply requires replacing the existing PTM173.jar
FAQ
Q: I'm having issue XXXX, and I'm stumped can you help me out?
A: I'd be more than happy to help you, but I do need some information. Before leaving comments, pming me, or creating a ticket please make sure you have following information ready and provide it as appropriate (it doesn't hurt to add tickets so please don't hesitate to do so):
- version of the craft bukkit server and PTM173
- are you running vanilla craft bukkit or do you have multiverse installed?
- bukkit.yml or worlds.yml (if running multiverse) file
- console logs specifically errors or exceptions
- a list of your currently installed plugins
- screenshots and/or a brief description of the problem so I can reproduce it
- anything special about your setup that I might not otherwise expect
Q: XXXX plugin conflicts with PTM173; I can't use one or the other or they just don't work together as expected. Can you help?
A: I'd be happy to help resolve these conflicts. In addition to the information I mentioned in the previous QA related to reporting an issue please also provide the following information so that we can track the issue:
- definitely create a ticket (because there will probably be several interactions it's nice to have some place to track the progress)
- the conflicting plugin and it's version
- a description of how to reproduce the conflicting behavior
- a description of the expected behavior
Q: Does this mod conflict with Phoenix Terrain Mod?
A: No, I changed the package names to allow for both to coexist, removed the "ptm" commands, and have added all relevant terrain generation source under a package that does not conflict with PTM, craft bukkit, or minecraft.
Q: How much of this plugin uses Phoenix Terrain Mod, Minecraft 1.7.3, and craft bukkit?
A: This is my first plugin so I based it around the Phoenix Terrain Mod code, but it doesn't really utilize any of that functionality; it was just nice to have the framework in place to see how to handle object and chunk generation. Minecraft 1.7.3 class files are used to generate chunks and objects. Craft Bukkit is the framework on which all of this is allowed to function. Major props go to each of these communities.
Q: Does this mod support the Nether and/or will it in the future?
A: It currently does not support Nether chunk generation. Currently there is no demand for this. In the future I may investigate it further, but for now there isn't enough of a problem to warrant spending time on this.
Q: Will this mod be updated for future versions of minecraft and craft bukkit?
A: No, I'll be passing off the source shortly so that others may continue the work if they chose. I'm putting minecraft mod development down for awhile.
Known Issues
Biomes, particularly swamp biomes now have discolored grass, trees, etc, which often times is unexpected and just looks bad.
This issue is new in MC 1.0.0 and specific, unfortunately, to the client side code. It's basically just a visual artifact. The only way around this is to mod the client side using something like this: http://www.minecraftforum.net/topic/820720-100-swamp-color-reverter/
This issue also seems to affect rainfall/snow. Not what actually accumulates so much as what gets rendered on the client side. From what I can tell this is not a server side issue but again I'll see if I can work around it.
I've been unable to figure out a way to trick the client side from the server. I don't believe these issues will be fixed any time soon and likely not at all.
Yea snowfall is definitely controlled on the server side by regulating temperature at x,y,z coordinates. But everything I've seen so far indicates that it's snowing where it's supposed to be snowing. If you can pm me with some small world where you can show me this behavior I'll look into it more. You might also just double check that PTM173 is running correctly.
Just so you have some idea, what I've done to verify that chunks and biomes on those chunks are generating correctly is take a known, somewhat small single player map and then throw it onto a server and run around the edges verifying that what is rendered (that was already there) and what gets newly generated is the same as it was in 1.7.3.
I'm looking into "telling" the client that there are no swamp biomes but I'm not sure that's possible. There are two potential problems with that: one swamp biomes are in 1.7.3 (most of us probably just didn't know that) removing them may have unintended consequences, and two I have no idea how the client is coming up with that information. The whole terrain generation is coordinate based, so there's actually no reason why they couldn't just be handling all the coloration code by coordinate instead of by a "biome flag." With all the layers + obfuscation + the fact that all chunks get rendered from byte arrays (as opposed to say Objects) makes it kinda hard to tell if I'll ever be able to fix this (or what's going on for that matter :p).
@whitecloudboy00
Thanks for the news.
Just a question regarding that, and please pardon my ignorance because I don't know a lot about the coding behind all of this. Does the server side biome generator tell the client where all the swamps are? If the server basically told the client there were no swamps on the map would the client still generate dark areas as if they were still there? I still question whether the 1.7.3 biome generator in PTM173 is accurate according to the original biome generator in the actual Minecraft 1.7.3 server. The reason why I say this is that with our map now has areas of snowfall where there wasn't in the original 1.7.3 and areas that used to snow no longer do.
Anyway, it's actually no big deal because I really appreciate what you've done, but I'd still value your opinion on this. Thanks heaps.
Alright everyone I have good news and bad news.
The good news is I've spent several more hours testing and haven't run into any problems with the latest release PTMv2.1.
The bad news is the biome coloration issue is something that is completely handled by the client. I've tried everything I can think of to force it from the server side, but it just isn't going to happen. The only way to fix this is to mod the client, which is unfortunate for two reasons: one it's just hard to get users synced up with the same set of client-side mods, and two, and most importantly, any mods on the client side affect all worlds.
Looks like we're going to have to live with the biome coloration issues in the older maps. I've linked to the work around on the client side on the main page in the Known Issues section, though I don't recommend it. It's important to note that biome generation and chunk generation are all still handled by 1.7.3. It's simply the code that does things like change the color of the grass that's client side (for who knows what reason). As always your complaints are best directed toward Mojang so they can produce something better for us all. If anyone comes across a solution such as forcing the client side to respect terrain generation without client-side modding let me know and I'll see about working it in.
@Pjstaab yes it's called PTM simply for historical reasons and out of respect. This is not a rework of Phoenix Terrain Mod.
So is it just PTM in name from being based off of PTM but not allowing to adjust terrain generation variables?
I can confirm that the conflict with Dynmap is fixed in version v2.1. Thanks!
As was noted already in the "Known Issues" it seems that v1.0.1 Biomes are being generated on the 1.7.3 map. Areas where it should snow are not snowing, and swamps being placed where they shouldn't be.
Thanks for your efforts.
@BioRage
To add to the last post, if you got a plugin like WorldBorder you could force generate a large square or circular world, limit travel distance from spawn so no new chunks can be generated, and remove the plugin.
@BioRage the short answer is no you can not remove PTM173.
The long answer is yes, once terrain is generated you can remove the plugin. But remember terrain is generated when you visit it not all at once when you first create a map. So there is an area of 16x16 chunks each 16x16 blocks in size (someone double check me on that) that gets generated when you create a map, but if you move 16 blocks in any directions then additional chunks start to get generated. So, I would recommend leaving the plugin installed.
Thank you very much for this release.
Unfortunately still having problems with this plugin conflicting with dynmap.
Have submitted support ticket.
Problems occur when dynmap has to update the web map.
Thanks heaps
@whitecloudboy00
Once generated, can we remove the plugin simply? Hypothetically;
I've uploaded a build against the latest recommended build of craft bukkit 1.0.1 rc. Please update to this and create tickets as you run into issues including compatibility issues with other mods. I'll try to address them as soon as I have free time to do so.
Hi there,
Just out of interest I thought you might like to know the following:
PTM173 works fine generating 1.7.3 landscape in Minecraft 1.0.0 with CraftBukkit dev build 1550 upwards.
PTM173 seems to clash with dynmap, particularly if hi-res map rendering has been enabled. I get the following errors:
2011-12-10 01:47:16 [SEVERE] [dynmap] Exception occured:
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at org.bukkit.craftbukkit.scheduler.CraftFuture.getResult(CraftFuture.java:67)
at org.bukkit.craftbukkit.scheduler.CraftFuture.get(CraftFuture.java:58)
at org.bukkit.craftbukkit.scheduler.CraftFuture.get(CraftFuture.java:47)
at org.dynmap.MapManager.createMapChunkCache(MapManager.java:1123)
at org.dynmap.MapManager$FullWorldRenderState.processTile(MapManager.java:510)
at org.dynmap.MapManager$FullWorldRenderState.run(MapManager.java:473)
at org.dynmap.MapManager$DynmapScheduledThreadPoolExecutor$1.run(MapManager.java:136)
at org.dynmap.MapManager$DynmapScheduledThreadPoolExecutor$2.run(MapManager.java:152)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.minecraft.server.WorldChunkManager.a(SourceFile:157)
at org.orangecloud00.ptmbukkit.mc173.WorldChunkManager.a(WorldChunkManager.java:114)
at net.minecraft.server.BiomeCacheBlock.<init>(SourceFile:30)
at net.minecraft.server.BiomeCache.a(SourceFile:59)
at net.minecraft.server.BiomeCache.d(SourceFile:99)
at net.minecraft.server.WorldChunkManager.a(SourceFile:152)
at org.orangecloud00.ptmbukkit.mc173.WorldChunkManager.a(WorldChunkManager.java:114)
at net.minecraft.server.WorldChunkManager.a(SourceFile:142)
at org.orangecloud00.ptmbukkit.mc173.WorldChunkManager.a(WorldChunkManager.java:107)
at org.bukkit.craftbukkit.CraftChunk.getChunkSnapshot(CraftChunk.java:151)
at org.dynmap.utils.NewMapChunkCache.loadChunks(NewMapChunkCache.java:487)
at org.dynmap.MapManager$2.call(MapManager.java:1115)
at org.dynmap.MapManager$2.call(MapManager.java:1110)
at org.bukkit.craftbukkit.scheduler.CraftFuture.run(CraftFuture.java:34)
at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:487)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:419)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
Also I was kind of hoping we wouldn't see ugly swamp biomes being dumped in the middle of nowhere, but we're still getting them.
@whitecloudboy00
Thanks for your reply. PTM173 wasn't actually installed. I was commenting on the negative affects of the biome changes in 1.0.0 on our existing map and just wanted to find out if PTM173 would fix that. But from what you tell me it sounds like it will, which is great. I'm eager to give your alpha version a test, and I do understand you won't officially support it. Nevertheless I'll let you know how I go. Thanks once again. :)
An alpha release is available for those following the comments. Please see the Status section above. I am not responsible for it breaking your production servers. I do not recommend using it.
@seanskroht
The short answer is yes. I can not easily use any of the new biomes so they don't render. What you get with PTM17.3 is pure 1.7.3 chunk generation, no new biomes.
If you are seeing differences you likely are not using PTM173 or have improperly configured. Note PTM173 does not fix existing terrain. If you generate terrain in 1.8.1 or 1.0 and then install PTM173 you have to use something like world edit to remove the old terrain so that PTM173 can regenerate new terrain. Other than that I would need more information to help debug though. Please see the instructions above.
Just a question whitecloudboy00,
Will PTM173 generate the correct 1.7.3 biomes that originally coincided with the 1.7.3 map, using our original seed? The issue we have at the moment is that we are getting biomes positioned on the map that are totally unrelated to the terrain. So, for instance, at the moment we have a nice looking forest that has, all of a sudden, developed this horrible dark green/grey swamp biome color scheme. It's just really awful. Prior to 1.8 it seemed swamp biomes weren't so prominent and we didn't really have any generate on our map from what I recall.
@whitecloudboy00 I hope you get it working, really miss this plugin :(
@whitecloudboy00
Thanks for the heads up!! It's great to get some news on what's going on, and we really appreciate what you've explained so far. We're managing with what we've got and have urged the users to hold off from exploring new areas of the map for the time being :). Keep up the excellent work!
For all those who are looking for PTM173 that works with later craftbukkit builds, from what I can tell craftbukkit api's are not fully mapped into the mc classes yet. I get multiple null pointer exceptions after trying to update the code to fix obvious issues beyond what others like seanskroht have reported. I will continue to try to work around the problems in my spare time so that you can have an alpha release of PTM173 on craftbukkit 1.0, but please keep in mind that I can't nor do I want to force the craftbukkit team to make changes any faster than they already are. My recommendation for the time being is that you remain patient and create a new world for your users to play on since there are significant changes anyway. Hopefully, eventually, we will get back the 1.7.3 worlds, but for now please again remain patient; Notch sure as hell doesn't make it easy. If you want to bitch to anyone I recommend going and bitching to him to make it easier to mod the code. Know that as soon as I have a functioning build of PTM173 you will as well even if it's just a preliminary, alpha, not recommended version. I am working with build's greater than 1550 right now, but still strongly suggest that you be cautious about updating your server until a recommend craftbukkit build becomes available.
@whitecloudboy00
First off, thank you very much for this plugin, it is exactly what our server needed. We created our server back in the early alpha days and since that time our original map has grown extremely large and has become very well established to the point that our users don't want to start over with a new map. So your plugin has been invaluable.
But I was hoping you would reconsider your stance on not supporting the dev builds of Craftbukkit. We were persuaded to finally update to Minecraft v1.0.0 due to user request and the fact that some players don't know how to press the "Not Now" button when asked to upgrade.
We're currently using Craftbukkit build 1550 with PTM173 1.2 with no multiworld. We tested with no other plugins installed. As a result we're getting the following errors:
2011-12-04 15:18:14 [INFO] PTM173 v1.2 is now enabled
2011-12-04 15:18:14 [INFO] Preparing level "world"
2011-12-04 15:18:14 [INFO] Default game type: 0
2011-12-04 15:18:14 [INFO] PTM173: enabled for 'world'
2011-12-04 15:18:14 [INFO] initing chunk provider
2011-12-04 15:18:14 [INFO] PTM173: world seed is 4580899268973138743
2011-12-04 15:18:14 [INFO] Unable to find spawn biome
2011-12-04 15:18:14 [INFO] Preparing start region for level 0 (Seed: 4580899268973138743)
2011-12-04 15:18:14 [INFO] PTM173 ERROR: calling unknown method in worldChunkManager: float[] getTemperatures 5
2011-12-04 15:18:14 [SEVERE] java.lang.NullPointerException
2011-12-04 15:18:14 [SEVERE] at net.minecraft.server.WorldChunkManager.getTemperatures(SourceFile:103)
2011-12-04 15:18:14 [SEVERE] at org.orangecloud00.ptmbukkit.mc173.WorldChunkManager.getTemperatures(WorldChunkManager.java:183)
2011-12-04 15:18:14 [SEVERE] at net.minecraft.server.BiomeCacheBlock.<init>(SourceFile:28)
2011-12-04 15:18:14 [SEVERE] at net.minecraft.server.BiomeCache.a(SourceFile:59)
2011-12-04 15:18:14 [SEVERE] at net.minecraft.server.BiomeCache.c(SourceFile:72)
2011-12-04 15:18:14 [SEVERE] at net.minecraft.server.WorldChunkManager.a(SourceFile:85)
2011-12-04 15:18:14 [SEVERE] at net.minecraft.server.World.c(World.java:2001)
2011-12-04 15:18:14 [SEVERE] at net.minecraft.server.World.p(World.java:1993)
2011-12-04 15:18:14 [SEVERE] at net.minecraft.server.WorldGenLakes.a(SourceFile:122)
2011-12-04 15:18:14 [SEVERE] at org.orangecloud00.ptmbukkit.generator.ChunkProviderGenerate.getChunkAt(ChunkProviderGenerate.java:429)
2011-12-04 15:18:14 [SEVERE] at org.orangecloud00.ptmbukkit.generator.ObjectSpawner.populate(ObjectSpawner.java:20)
2011-12-04 15:18:14 [SEVERE] at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:178)
2011-12-04 15:18:14 [SEVERE] at net.minecraft.server.Chunk.a(Chunk.java:820)
2011-12-04 15:18:14 [SEVERE] at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:96)
2011-12-04 15:18:14 [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:308)
2011-12-04 15:18:14 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:161)
2011-12-04 15:18:14 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:388)
2011-12-04 15:18:14 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
2011-12-04 15:18:14 [SEVERE] Unexpected exception
java.lang.NullPointerException
at net.minecraft.server.WorldChunkManager.getTemperatures(SourceFile:103)
at org.orangecloud00.ptmbukkit.mc173.WorldChunkManager.getTemperatures(WorldChunkManager.java:183)
at net.minecraft.server.BiomeCacheBlock.<init>(SourceFile:28)
at net.minecraft.server.BiomeCache.a(SourceFile:59)
at net.minecraft.server.BiomeCache.c(SourceFile:72)
at net.minecraft.server.WorldChunkManager.a(SourceFile:85)
at net.minecraft.server.World.c(World.java:2001)
at net.minecraft.server.World.p(World.java:1993)
at net.minecraft.server.WorldGenLakes.a(SourceFile:122)
at org.orangecloud00.ptmbukkit.generator.ChunkProviderGenerate.getChunkAt(ChunkProviderGenerate.java:429)
at org.orangecloud00.ptmbukkit.generator.ObjectSpawner.populate(ObjectSpawner.java:20)
at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:178)
at net.minecraft.server.Chunk.a(Chunk.java:820)
at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:96)
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:308)
at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:161)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:388)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
Any help would be greatly appreciated. Once again, thanks for an awesome plugin.