Commit Graph

21 Commits

Author SHA1 Message Date
2a3e6dcf00 Rename BlockIds -> BlockLegacyIds 2019-03-23 19:46:31 +00:00
79ef8e0803 Replace all legacy blockID references with BlockIds:: 2019-03-23 19:44:33 +00:00
d4fe004375 More consistent fluency in Item API 2019-03-23 12:20:35 +00:00
8c536c248d Updating for latest PocketMine-NBT changes 2019-03-21 15:58:22 +00:00
8de9e61651 Item: Remove get/set/removeNamedTagEntry() 2019-03-17 17:49:09 +00:00
e9125af51d Revamp Banner API (still rather ghetto)
this needs more work, like signs do.
2019-03-01 17:57:07 +00:00
97687f2236 Dye, banner and bed items now store DyeColor objects instead of using magic meta values 2019-02-24 10:48:40 +00:00
36e9db4c07 Generate methods for surrogate enums, nip stupidity in the bud
this also allows changing the internal implementation later without breaking plugins.
2019-02-20 11:09:22 +00:00
55be0716d8 Use DyeColor instead of ints for banners 2019-02-13 13:49:44 +00:00
7b3993730a Block: Replace Color and WoodType magic numbers with type-safe objects
this provides automatic type safety without the need for magic number value checking everywhere.
2019-02-12 13:52:59 +00:00
adc1069ed2 Merge branch '3.5' 2019-01-04 23:28:44 +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
ff3d2ba19e Fixed no-NBT banner items always placing black banners, closes #2624 2018-12-31 22:04:08 +00:00
d72e4cb9a1 Tile: remove createNBT(), add create(), createFromData(), createFromItem() 2018-12-10 19:40:37 +00:00
93131b4d92 Rename some meta usages to variant 2018-10-26 18:20:37 +01:00
f438736af5 Make some item constructor variant parameters mandatory 2018-10-26 16:51:02 +01:00
88a05845c2 Item: Removed protected block field, items should now override getBlock() 2018-02-16 11:06:29 +00:00
9abfd54cc1 Updated with ListTag changes from PocketMine-NBT 2018-02-13 16:50:49 +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
74b074753f Bulk addition of constant visibilities
thanks PhpStorm inspections plugin for annoying the shit out of me until
I did this.
2017-11-21 14:44:10 +00:00
2794df34ab Basic implementation of banners, including API to modify them with ease. (#1331)
Banner crafting is NOT implemented yet.
2017-11-15 11:10:46 +00:00