Commit Graph

39 Commits

Author SHA1 Message Date
f624871b3f strip extra blank lines (php-cs-fixer) 2020-01-22 14:50:29 +00:00
c4793241f5 Mass removal of useless @param/@return PHPDoc annotations, pass 1 2020-01-21 15:10:18 +00:00
aa7d55e21d level/generator: populate missing return type information 2020-01-19 18:07:54 +00:00
3fff0a0656 BigTree: evict unmaintained dead code
phpstan whines about all this stuff, and everything left is private, so we can get rid of it. Sadly we can't ditch the class without breaking BC, so that sticks with 4.0.
2020-01-09 14:26:46 +00:00
1eedac87b2 added missing @var property types (reported by phpstan) 2020-01-09 14:13:54 +00:00
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
f704061618 Tree: fixed being able to overwrite other trees
this was observable by planting a sapling underneath an existing tree and punching it with bone meal.

This change will also prevent trees generating too close together.
2018-12-09 19:26:48 +00:00
05af87e1d4 Strip empty lines at the end of classes 2018-06-11 13:19:23 +01:00
ed65e91a3c Tree: avoid astonishing behaviour with dark-oak and acacia saplings
ref #1973, these should simply not grow at all since they are not implemented yet.
2018-05-12 10:03:20 +01:00
e48ec9fb71 Ore: replaced a sub-optimal multiply()->divide() on Vector2 2018-03-18 18:06:04 +00:00
95606b6e04 Generator: fixed a couple of hardcoded block IDs 2018-03-18 18:03:23 +00:00
4f8e4f0522 Add EOF newlines where missing (bulk) (#1836)
This should solve issues with people making GitHub PRs and having the web editor messing things up. GitHub Web Editor sucks :(
2017-12-20 11:56:36 +00:00
251d5d7946 Fixed some hardcoded values in Tree 2017-10-16 12:30:46 +01:00
ddfe828445 Require PHP 7.2, bump PocketMine-MP version to 1.7dev 2017-08-31 20:27:05 +01:00
02f42eba48 Move block registration to its own class 2017-08-20 18:05:01 +01:00
dbb92096e4 More typehints, documentation fixes and static analysis cleanup 2017-07-15 12:12:06 +01:00
c3b8be3f60 and more typehints 2017-07-14 10:56:51 +01:00
8fc38c36f9 Fixed some derp Vector3 aliases 2017-06-16 13:48:53 +01:00
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
f98a964cdc Fixed and silenced some inspections 2017-02-23 15:17:28 +00:00
9004417456 Fixed file headers (#255) 2017-01-13 16:57:05 +00:00
4133f98b23 Updated a few tabs, updated SPL submodule 2016-10-03 01:59:06 +08:00
e913b16804 Fixed some lines indented with 4 spaces rather than tabs 2016-10-03 00:58:34 +08:00
cbb1c55a06 Improved biome generation, get grass color from gradient interpolation, improved performance of generation, try to recreate grass colors from imported chunks, closes #2845, closes #1792 2015-06-07 15:17:02 +02:00
fc2e4ddc63 Fixed long trunk generation 2015-04-15 20:47:18 +02:00
79adbdeafe Fixed trees not generating trunk 2015-04-15 11:04:00 +02:00
0a85ad0d1f Improved trees, improved inventory transactions, improved snowball/bow usage 2015-03-28 16:59:15 +01:00
08f2b7f291 Moved chunk population to async tasks, and no more cut trees! 2015-03-27 01:57:08 +01:00
9da26fdb88 World generation with biomes! 2015-03-22 22:57:40 +01:00
a98da3bab1 Renamed old getID() calls to getId() 2014-12-07 15:21:32 +01:00
5b6b789ab3 Improved exponentiation 2014-09-29 13:24:25 +02:00
b9111b6f52 Fixed #1992 2014-08-28 23:19:44 +02:00
eab86f5f90 Replaced array() with [] 2014-08-28 17:04:22 +02:00
6983ddf509 Added new implemented blocks to Creative menu 2014-06-16 16:41:49 +02:00
b6ef52e89c Updated Normal generator 2014-06-11 00:29:01 +02:00
fa50cbf4b3 Working Threaded Generation 2014-06-10 20:45:09 +02:00
115b4cf4ac Updated Levels :D 2014-06-09 11:35:52 +02:00
2566f2c4cb Worked on chunk loading 2014-06-07 22:29:45 +02:00
dd17652aca Fixed wrong paths 2014-04-01 05:06:12 +02:00