I'm back! And I'm rewriting the mod from scratch! Sorry for the gap in updates the past couple months, started a new job in June and have been working like crazy.
The Reason for the Rewrite
Back in 2013, I decided to create this mod to add more content to the oceans (and beaches) of minecraft. At the time, ocean monuments weren't in the game so oceans were pretty much useless.
However, the code behind it was janky. It was the first coding project I had ever undertaken and I had no design in mind when I started. I just figured out how to add a block to world generation and went from there. Which became more and more of a problem as I went along. I grew increasingly frustrated with my own work and didn't have the time to actually fix the underlying problems with the code. Two weeks ago, I decided to plan out what I wanted and needed from the mod and start fresh.
These are the current things that I have working:
- Shipwrecks are now generated from a JSON file instead of hardcoded in. This will allow determined people to add their own structures that the mod can generate (it's time consuming to create one of these files though).
- Instead of having a different set of coordinates for every ship orientation (i.e. North, South, East, and West facing ships), the rotation is done through code. It handles most blocks with faces currently but I haven't added stuctures larger than a block (e.g. doors and beds).
- Biome checking is done slightly differently. Instead of checking for specific biome names, the mod just checks to see if the word "ocean" or "beach" appears in the biome name. This means it should work with mods that add custom biomes (though I haven't tested it yet). Hopefully they don't add a lava ocean biome... This one will require more testing before I will leave it in though.
- The rowboat and sailboat spawn correctly.
- Config files are working. Wrecks spawn using a list of names corresponding to the json files and you can adjust the spawn weights to your liking (including disabling them with a value of 0 and having a chance for no wreck to spawn in a spot).
- Added code so chests have loot and the "tier" of chest loot can be specified as a value in the Json file.
- Sloop spawning correctly.
- I completely forgot that 1.8 introduced changes to blocks (particularly with properties). I've spent a bit of time reworking the generation code and json to support different properties.
- I skipped over the Schooner and did the Waverunner! The largest ship is complete.
- Schooner is now complete as well!
- I adjusted the world generation a bit to reduce the chance of causing extra chunks to load. Helps for the smaller wrecks but the larger ones are going to cause an extra chunk or two to load.
- Got wrecks spawning correctly above and below the surface.
- The diving suit is back with some changes! Instead of the helmet giving nightvision and the full set preventing your breath from decreasing, the full set gives waterbreathing so you have limited visibility underwater without nightvision potions. In addition, wearing less than the full set will give you a random chance of gaining some breath so your breath will decrease at a slower rate overall (the more pieces you have on the greater the chance). The suit still slows you down out of the water.
These are the features I'm still working on:
- Creating the JSON files for the other wrecks:
Sailboat Sideways Sloop Schooner Waverunner
- Stone Spire
Adding fields in JSON files so blocks can spawn in a random range from the center of the spawn. Writing the wreck generation code so the min/max spawn distances actually work correctly. I was doing something stupid before.
- Adding the Piranhas again.
Adding the diving suit again. Adding the ability to spawn doors and beds Look into the config files more (need to make sure it is possible to add fields for new wrecks without needing to hardcode that in. I assume it is but I will have to code my own solution if it isn't). Add fields to JSON files for loot generation tiers for chests.
- (Long term) create a tool to convert .schematic files to the correct format.
- Create a template/how to on adding new structure JSON files.
So, there is quite a bit of work I still need to do before I am going to release it. I'm also going to have to test the performance. With wrecks in every chunk, the server starts to lag quite a bit.
Sorry I've been MIA for the past year and a half. I quit my job as a paramedic, got a degree in CS, and got married since I last worked on the mod. I should be able to keep this mod up to date this time around and, if I don't, it will also be open source this time around. I will update this post as I finish features and will create a new post when everything is finally complete