2312511be6
Living: remove unnecessary double CompoundTag::getTag() call
2021-06-29 23:54:52 +01:00
316e2654cc
Fixed CS
2021-06-29 22:50:08 +01:00
94e16f416d
Added KnownTranslationKeys (generated) and start using it
2021-06-29 22:46:04 +01:00
f02817bcd3
Player: fixed toString() on TranslationContainer exposed by previous commit
...
this code looks smelly...
2021-06-29 20:14:11 +01:00
83332024df
TranslationContainer: remove __toString()
...
it doesn't make any sense to use TranslationContainer in this way.
2021-06-29 20:07:39 +01:00
1170c8fe13
EnumTrait: override __clone, __sleep, __wakeup to prevent duplication
2021-06-29 19:55:43 +01:00
7ba573db77
Added API method Item::canStackWith()
2021-06-29 19:52:52 +01:00
32d7b1e6af
Start using webmozart/pathutil for joining paths ( #4287 )
2021-06-29 19:40:43 +01:00
aee7b03c1d
changelog: fix outdated mention of ProjectileItem::getProjectileEntityClass()
...
[ci skip]
2021-06-29 19:26:02 +01:00
35ad199b11
changelog: mention Potion API changes
...
[ci skip]
2021-06-29 19:24:28 +01:00
7029f85c1c
Regenerated VanillaItems
2021-06-29 18:23:24 +01:00
0ec869823b
Added potion display names to Potion and SplashPotion
2021-06-29 18:21:41 +01:00
07d97bbdeb
PotionType: Added display names
2021-06-29 18:19:27 +01:00
f68caa878a
Potion: added getType()
2021-06-29 16:53:26 +01:00
6fb8ac211e
Make GameMode::fromString() and PluginEnableOrder::fromString() return null, instead of throwing exceptions
...
since these are always used for handling userdata, it doesn't make sense for them to throw exceptions.
2021-06-27 20:56:51 +01:00
3dd33cd35e
Get rid of EnumTrait::fromString()
...
it's better to just implement this for stuff where there's explicitly designated aliases, otherwise we could end up with unexpected BC breaks (e.g. hardcoding POSTWORLD in plugin.yml would suddenly break if the core enum was changed, even though it remained valid).
2021-06-27 20:52:56 +01:00
902ea515f7
Separate ID handling from GameMode
...
the aliases of 0,1,2,3 remain for user-interface level compatibility.
2021-06-27 20:32:35 +01:00
5cdf0b169f
PluginManager: Separate listener method filtering to its own method
...
this makes registerEvents() easier to read.
2021-06-27 20:25:28 +01:00
db28358316
Player: Assume that usedChunks was cleared by the previous loop
2021-06-27 17:50:39 +01:00
ede4d58394
Automatic permission calculation on PermissibleBase construction
...
thanks to the PermissibleInternal/PermissibleBase architectural change, there's no longer any concern regarding cyclic refs.
2021-06-26 22:15:22 +01:00
02fab77e55
World: change 'closed' to 'unloaded'
...
this makes more sense overall from a reader's perspective.
and also provide a rug-jerk for any idiots using World->close() when they aren't supposed to? ....
2021-06-26 21:54:18 +01:00
b8ebf8936e
InventoryManager: fix container open callbacks not working
...
this was reported to me on socials by multiple different people, but nobody reported an issue so I almost forgot. >.<
2021-06-26 21:21:23 +01:00
9b30c2feda
Extract a DelegateInventory from EnderChestInventory
2021-06-26 21:01:40 +01:00
8cd7cc7c00
pacify php-cs-fixer
2021-06-26 19:32:05 +01:00
e14bad4ea6
Rename CommandReader and friends to ConsoleReader
2021-06-26 19:29:58 +01:00
a70bd115f1
Moved console-specific stuff to its own namespace
...
this stuff has different functionality than everything else in the
command namespace (specifically console handling), so it doesn't belong
in here.
I know that this will probably break some plugins, but I don't care,
because plugins shouldn't have been abusing ConsoleCommandSender in the
first place.
2021-06-26 19:24:46 +01:00
bf7d69b69e
Stop hardcoding permission names everywhere
...
using strings for permission names is nearly as shitty, but this is at least cross-referencable and statically analysable.
2021-06-26 19:14:51 +01:00
0910054c41
NetworkSession: Fixed InventoryManager nullability disaster
...
fixes #4277
fixes #4275
fixes #3139
2021-06-26 17:44:42 +01:00
e43bca95bf
Fixed build
2021-06-26 17:40:43 +01:00
4a5bdefe8b
Player: Explicitly clear permission recalculation callbacks
...
this is necessary to get rid of the broadcast permission callbacks, which retain references to the Player itself, forming a cycle which would prevent PermissibleBase->__destruct() from cleaning up.
2021-06-26 17:18:17 +01:00
a6039ad733
Fixed InventoryHelpersTrait::addItem() cannot add items with a count greater than maxstack ( #4283 )
2021-06-26 16:48:53 +01:00
444d902990
Fix CS
2021-06-21 20:45:31 +01:00
2a6009f8bf
Check consistency of block remaps
2021-06-21 20:45:30 +01:00
85ee628a74
Player: remove sendPosition() from public API
...
plugins shouldn't be touching this for any reason now.
2021-06-21 20:08:43 +01:00
60d80e173b
Fixed player sounds not being broadcasted to the player itself
...
fixes #4259
fixes #4270
2021-06-21 20:03:32 +01:00
5d6146a01f
Register missing potion types
2021-06-19 21:53:08 +01:00
5387456e44
Move potion types to enum
2021-06-19 21:39:23 +01:00
908fa5f901
changelog: rewrite a whole lot of confusing bullshit
...
EntityFactory doesn't exist at all on PM3, so mentioning changes in its
behaviour here is only going to confuse people.
2021-06-19 19:53:55 +01:00
c07f3f5e12
fix CS
2021-06-19 19:48:30 +01:00
6fea09ded4
SplashPotion: Require potionId in constructor
2021-06-19 19:47:44 +01:00
fc70b625b3
ExperienceOrb: Require providing XP value in constructor
2021-06-19 19:42:13 +01:00
981b0285d1
Isolate config casting nastiness in one place
...
this doesn't solve the underlying problem, but it does reduce the amount of noise made by PHPStan about it, as well as avoiding code litter.
2021-06-19 19:14:02 +01:00
11b483f2dc
Inline EntityDataHelper::createBaseNBT()
...
this is only used for saving entity data now, and its presence here is allowing plugin devs to keep abusing it.
2021-06-19 18:45:21 +01:00
745f455bd2
Door: change thickness to match MCPE
...
since MCPE-19214 still hasn't been fixed after all these years, it's safe to say they won't fix it in the near future, and this causes placement glitches in PM.
2021-06-18 19:10:50 +01:00
d96fc17339
World: Check placed block collision boxes after place()
...
since we write these into a transaction instead of actually modifying the world directly, we can use the transaction to verify that the placement location is OK before setting the blocks.
closes #4248
2021-06-18 19:07:38 +01:00
735c656f9d
Merge remote-tracking branch 'origin/stable'
2021-06-18 18:52:04 +01:00
155e516f74
phpstan 0.12.90
2021-06-18 18:46:30 +01:00
ea0a47dff7
Updated transitive composer dependency junk
2021-06-18 18:42:08 +01:00
f1583f44df
LightArray: Avoid allocating 7 useless arrays for every node processed
...
instead, use a const array of the offsets and add them to the coordinates, which avoids the allocations.
In synthetic benchmarks, this method takes 40-50% less CPU time by eliding ZEND_INIT_ARRAY and ZEND_ADD_ARRAY opcodes. In practice, the benefit will likely be much smaller (perhaps even irrelevant).
2021-06-17 22:21:58 +01:00
15e5bdb210
BaseInventory::addItem(item1,item2,item3) now has the same behaviour as multiple separate addItem() calls ( #4237 )
...
fixes #1412
2021-06-17 21:05:24 +01:00