26 Commits

Author SHA1 Message Date
Dylan K. Taylor
2a3e6dcf00 Rename BlockIds -> BlockLegacyIds 2019-03-23 19:46:31 +00:00
Dylan K. Taylor
79ef8e0803 Replace all legacy blockID references with BlockIds:: 2019-03-23 19:44:33 +00:00
Dylan K. Taylor
5830ca958b Further out-phasing of legacy ID/meta
this paves the way for making internal IDs fully dynamic.
2019-03-17 16:01:04 +00:00
Dylan K. Taylor
c124aae219 Merge branch '3.5' 2019-01-30 13:09:43 +00:00
Dylan K. Taylor
331ae5498f Crash the generator when encountering invalid presets
this is a partial fix for #2717, but still not ideal because it'll spam whenever a chunk is attempted to be generated. However, fixing this properly requires potentially breaking API changes.
2019-01-30 12:29:04 +00:00
Dylan K. Taylor
adc1069ed2 Merge branch '3.5' 2019-01-04 23:28:44 +00:00
Dylan K. Taylor
4b9a142a5d Import global functions and constants for enhanced performance
This is better for performance because these then don't need to be reevaluated every time they are called.

When encountering an unqualified function or constant reference, PHP will first try to locate a symbol in the current namespace by that name, and then fall back to the global namespace.
This short-circuits the check, which has substantial performance effects in some cases - in particular, ord(), chr() and strlen() show ~1500x faster calls when they are fully qualified.

However, this doesn't mean that PM is getting a massive amount faster. In real world terms, this translates to about 10-15% performance improvement.
But before anyone gets excited, you should know that the CodeOptimizer in the PreProcessor repo has been applying fully-qualified symbol optimizations to Jenkins builds for years, which is one of the reasons why Jenkins builds have better performance than home-built or source installations.
We're choosing to do this for the sake of future SafePHP integration and also to be able to get rid of the buggy CodeOptimizer, so that phar and source are more consistent.
2019-01-04 20:43:15 +00:00
Dylan K. Taylor
98efd27543 Remove ability to set blockID and blockdata independently
This was the cause of many inconsistency and broken world bugs. In the future (once we switch to paletted chunks) this won't be possible anyway. For now, some temporary API is provided to allow modifying chunkdata directly, but it is required that **both** must be provided.
2018-11-22 16:53:22 +00:00
Dylan K. Taylor
f03ab76c83 Remove imports left over from 5ce2d5e072e8659190d1111cd394ebb8f78db4dc 2018-09-10 17:51:13 +01:00
Dylan K. Taylor
5ce2d5e072 Clean up to Generator creation, remove getSeed() from ChunkManager interface
it's the generator's responsibility to know about the seed, not the chunkmanager's. This now reduces the complexity of implementing and using a chunkmanager.
2018-09-10 13:28:15 +01:00
Dylan K. Taylor
05af87e1d4 Strip empty lines at the end of classes 2018-06-11 13:19:23 +01:00
Dylan K. Taylor
8fca7cc68d Apply some typehints to generators 2018-06-07 20:22:35 +01:00
Dylan K. Taylor
428ca29e4b Remove dead bedrockDepth fields from generator
yes, this is not implemented yet. fields for this can be added when proper bedrock generation is implemented. For now, it's just dead code.
2018-06-07 19:52:56 +01:00
Dylan K. Taylor
f61ad20f6b Remove a whole bunch of dead copy-pasted code from Nether generator 2018-06-07 19:51:27 +01:00
Dylan K. Taylor
3c9af5cd6d Generator: small reduction of code duplication 2018-06-07 19:49:51 +01:00
Dylan K. Taylor
0bca3cd481 Generator: Move static noise functions to Noise instance methods 2018-06-07 13:40:10 +01:00
Dylan K. Taylor
dfa6cd2b7e Biome: Moved biome classes from level\generator\* to level\biome 2018-05-01 14:07:46 +01:00
Dylan K. Taylor
dbb92096e4 More typehints, documentation fixes and static analysis cleanup 2017-07-15 12:12:06 +01:00
Dylan K. Taylor
c3b8be3f60 and more typehints 2017-07-14 10:56:51 +01:00
GamakCZ
caa229a25f Fix wrong generator name returned for Nether->getName() (#1194) 2017-07-12 18:10:54 +01:00
Dylan K. Taylor
8fc38c36f9 Fixed some derp Vector3 aliases 2017-06-16 13:48:53 +01:00
Dylan K. Taylor
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
Dylan K. Taylor
9004417456 Fixed file headers (#255) 2017-01-13 16:57:05 +00:00
Dylan K. Taylor
aafe0c4f69 Remove biome colours and fix biome id arrays 2016-12-04 15:12:23 +00:00
SOF3
6fc435da0e
Imports rearrangement 2016-10-03 00:43:46 +08:00
Shoghi Cervantes
534b988a1c Added basic Nether generator 2015-08-09 00:38:23 +02:00