312 Commits

Author SHA1 Message Date
Cubitect
eecaa764e9 add missing version string 2023-01-22 14:11:39 +01:00
Cubitect
bdec4f5ce8 1.19.2 vs 1.19.3
1) add support for 1.19.2 along side 1.19.3
2) get approx stronghold positions in 1.19.3 without biome check
2023-01-22 14:01:56 +01:00
Kai Sandstrom
6f790f4fa5 Add biome table, new funcs for beta climate maps
(biome_tree.c)
- Add lookup table for pre-B1.8 biomes
- Add getOldBetaBiome function to look up biome from climate noise values

(layers.h)
- Add header for getOldBetaBiome function defined in biome_tree.c
- Fix small error from previous commit (semicolons instead of commas)

(noise.c)
- Add new octaveInitOldBetaBiome function
- Add new sampleOctaveOldBetaBiome function

(noise.h)
- Add headers for two new functions defined in noise.c

This commit adds new functions required to generate Alpha 1.2 - Beta 1.7
climate maps, as well as a lookup table for biomes.

The pre- Beta 1.8 biome system uses three 2D simplex noise maps to determine
biomes -- two 4-octave maps for temperature and humidity, and an additional
2-octave map as a source of high-frequency noise that is applied to the raw
output of both climate maps as they are mapped to the range [-1, 1] before
being used to determine the biome at each coordinate sample.

Beta 1.7.3's NoiseGeneratorOctaves2 class defines the lacunarity and
amplitude of each octave of a map in a way that seems incompatible with the
existing octaveInit function. The lacunarity of each octave is the provided
starting value multiplied by a power of a provided modifier value, starting
at modifier^0 and ending at modifier^(octcnt-1). Amplitude works similarly, but
the starting value and modifier are hardcoded. As far as I can tell, there's no
way to get the correct results using octaveInit, so a new
octaveInitOldBetaBiome is used here to initialize the octaves correctly.

Given that Cubiomes has no pre-existing function for sampling simplex
OctaveNoise, I added sampleOctaveOldBetaBiome. It works the same as
sampleOctave, except that it calls sampleSimplex2D instead of samplePerlin,
and it adds the noisemap's random values 'a' and 'b' onto ax and az
respectively in order to match Minecraft b1.7's simplex sampling algorithm.
2023-01-19 20:02:29 -05:00
Kai Sandstrom
3bfdd1d056 Add Beta 1.7 and its unique biomes to enums, util
(layers.h)
- Add MC_B1_7 to MCVersion enum
- Add name mappings for B1.7 biomes to BiomeID enum

(util.c)
- Add Beta 1.7 to mc2str and str2mc functions
- Add name mappings for B1.7 biomes to biome2str function
2023-01-19 15:13:58 -05:00
Cubitect
03895e6c22 Refactored some of the MC version checks paving the way for distinct minor versions. 2023-01-16 20:47:12 +01:00
Cubitect
42924426d0
Merge pull request #86 from KaiSandstrom/master
Support Beta 1.8 (Closes #67)
2023-01-16 20:27:56 +01:00
Cubitect
15434e622d Treat approximate surface height as float and include shift for slightly better accuracy 2023-01-15 19:44:14 +01:00
KaiSandstrom
c9fc194cde
Merge branch 'Cubitect:master' into master 2023-01-15 11:30:53 -05:00
Cubitect
231ee62abe Performance improvements and separate climate min/max finders 2023-01-15 14:01:57 +01:00
Kai Sandstrom
720fa2d3fb getStructureConfig now returns 0 for Fortress when MC is Beta 1.8 2023-01-09 12:00:35 -05:00
Kai Sandstrom
fffa4d78a5 update mc2str and str2mc functions 2023-01-09 11:59:29 -05:00
Kai Sandstrom
93d7d02d58 Changed layer stack for Beta 1.8 2023-01-08 18:42:42 -05:00
Kai Sandstrom
88503edc2c Added new mapLandB18 function that uses Beta 1.8's different method of handling returned RNG values, and introduces the plains/ocean bug at 1:32 2023-01-08 18:41:58 -05:00
Kai Sandstrom
833e13516d Added new entries in MCVersion and LayerID enumerations 2023-01-08 17:32:59 -05:00
Cubitect
c2442e0c94 Fix lookup table for large biome noise 2023-01-08 16:14:08 +01:00
Cubitect
859c039392 Update stronghold positions for 1.19.3 2023-01-05 16:07:23 +01:00
Cubitect
49658d7100 Better height estimation for 1.18+ 2023-01-05 14:24:46 +01:00
Cubitect
47b45a33f2 Updated 1.19 biome generation to 1.19.3 2023-01-05 11:02:02 +01:00
Cubitect
a7df5c6916 Approxmate surface height + improved accuracy of getSpawn 2022-12-30 13:20:29 +01:00
Cubitect
da965eed28 Fixing 1.14 and 1.15 outposts 2022-11-14 20:29:37 +01:00
Cubitect
10e297d17d Fixed some biome checks and added 1:256 biome locator
* fixed biomeExists() for 1.19 end dimension
* fixed biome check position for village and bastion in 1.18+
* added support for 1:256 scale of biome locator in 1.17-
2022-11-13 15:43:24 +01:00
Cubitect
0bf8cb0cce Fixed uninitialized state for biome center finder 2022-10-03 13:32:09 +02:00
Cubitect
90bfe9a904 avoid overflow on small area limit 2022-10-01 20:37:15 +02:00
Cubitect
d3112ca416 avoid recursion floodfill exceeding stack limit (crashes on windows) 2022-10-01 19:39:40 +02:00
Cubitect
6989510924 header update 2022-10-01 15:36:26 +02:00
Cubitect
2dbece7363 Added biome center finder 2022-10-01 15:14:37 +02:00
Cubitect
6f2ef55b73 Fixes, performance improvements and changes
1) fixed inaccuracy in village bounding boxes (1.18+)
2) fixed 2 block voronoi offset for end dimension
3) made monument biome check significantly faster (1.18+)
4) removed structure configurations from global scope
5) renamed biome filter flags
2022-09-25 22:35:40 +02:00
Cubitect
99a2e1718e fixed variable name 2022-09-12 21:34:12 +02:00
Cubitect
d4afdbf19e Fixed nether portal variants for 1.17- + support arbitrary end biome scales 2022-09-12 21:12:49 +02:00
Cubitect
8b87d9379a Added fortress piece generator + fixed inverted terrain viability check 2022-09-11 12:30:05 +02:00
Cubitect
ff13e171c8 Fixed end city pieces generation 2022-09-05 20:46:24 +02:00
Cubitect
b9d374445b Structure variants and fixes
expanded support for structure variants
added end city pieces generation (WIP)
added outer end voids (MC-159283)
fixed several issues with the availablity of biomes for layered generation
fixed that about half of 1.18/1.19 end gateways have wrong positions
2022-09-04 22:40:19 +02:00
Cubitect
469f4d144b Do special sampling for layered biome exclusions 2022-08-21 10:59:24 +02:00
Cubitect
20ce76677f Example should use quadbase header 2022-08-21 00:23:01 +02:00
Cubitect
b9d28f2700
Merge pull request #73 from Nel-S/patch-1
Readme.md: Fixed several typos + copyedit and light rewording
2022-08-21 00:19:03 +02:00
Cubitect
f5ba788e08 C++ compatibility 2022-08-21 00:16:12 +02:00
Cubitect
73a2d212ca Fixes and file separation
1) fixed biome exclusion filter no longer working for 1.17-
2) fixed ruined portal variations
3) separted quad base code with threading and filesystem dependencies into its own source file
2022-08-21 00:01:04 +02:00
Nel-S
f1b4b45d15
Fixed several typos + copyedit and light rewording
Fixed a few typos ("Riggerously," "Luckly", "Handfull", "Seperately", "Attemps", "Stongholds") and added several commas. Did some rewording in a few sections, but overall did not change the meaning of any sentences.
2022-08-15 23:17:01 -07:00
Cubitect
3b5fd73e59 Fix typo 2022-08-14 22:24:38 +02:00
Cubitect
fc4604447b Improve accuracy of 1.18+ temple surface check (still far from perfect though) 2022-08-14 22:16:47 +02:00
Cubitect
a89d2cf9c9 More expressive dimensions 2022-08-14 18:00:23 +02:00
Cubitect
81adef19bf Avoid nonsensical warning about unary unsigned negation 2022-08-14 17:22:50 +02:00
Cubitect
d0e3d4456c More compatibility fixes 2022-08-14 16:50:57 +02:00
Cubitect
e05b57ae3d Removed debugging statement 2022-08-14 13:55:47 +02:00
Cubitect
5644cb1c22 Improved compatibility with non-GNU environments 2022-08-14 13:52:26 +02:00
Cubitect
aa0a6203b6 Made NP_DEPTH work for individual climate parameter generation 2022-08-07 12:40:22 +02:00
Cubitect
a81171f5ef Made it possible to generate climates parameters individually 2022-08-03 20:10:50 +02:00
Cubitect
b2c433004d Fixed biome exclusion filter and struct bounding boxes (affects ancient_cities) 2022-08-01 19:19:16 +02:00
Cubitect
0477b60c10
Merge pull request #69 from alex-chew/patch-1
fix: correct write count in savePPM
2022-07-29 19:04:54 +02:00
Cubitect
3ba5347451 Expanded support of the match-any biome filter to the layered biome gen 2022-07-29 18:26:16 +02:00