Dylan K. Taylor
1eedac87b2
added missing @var property types (reported by phpstan)
2020-01-09 14:13:54 +00:00
Dylan K. Taylor
6b61efcfc8
remove unused imports
2019-12-09 19:49:21 +00:00
Dylan K. Taylor
cac3c356a5
Painting: fix dropping multiple items when multiple blockupdates occur in the same tick
...
test case: place sand on top of a line of signs, put a painting on the sand and break the supporting sign
fixes #2774 for stable
2019-11-06 14:29:43 -05:00
Dylan K. Taylor
092edc9d43
avoid breaking concrete powder
2019-08-16 17:41:50 +01:00
Dylan K. Taylor
2ba8eac27f
FallingBlock: fix endless falling on top of fences
...
this is a shitty fix, but I don't think there's a better way to do it on 3.x. This also fixes dropping on cactus.
close #2449 , close #2895
2019-08-16 17:27:41 +01:00
Dylan K. Taylor
2f61d42518
backport d23eeff8324e51ea1a902271603c50551e074c1b: FallingBlock: remove useless check
2019-08-11 19:38:12 +01:00
Dylan K. Taylor
d874be99a6
PrimedTNT: fix explosion position, close #3037
2019-07-16 13:55:31 +01:00
Dylan K. Taylor
c58a1bf9b7
Protocol changes for 1.12.0.28
2019-07-12 19:00:15 +01:00
Dylan K. Taylor
187f36fe38
ExperienceOrb: clean up some confusing code
2019-01-23 16:46:18 +00:00
Dylan K. Taylor
a27c9409f1
ExperienceOrb: fixed wrong condition
2019-01-20 12:30:24 +00:00
Dylan K. Taylor
854f851525
ExperienceOrb: don't follow players in other worlds
2019-01-20 12:30:09 +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
055ba6aa7c
Merge branch 'release/3.3' into release/3.4
2018-11-04 11:57:35 +00:00
Dylan K. Taylor
3e5237b6e0
ItemEntity: remove useless instanceof
2018-11-04 11:57:22 +00:00
Dylan K. Taylor
6dd2597934
Merge branch 'release/3.3' into release/3.4
2018-10-21 18:17:07 +01:00
Dylan K. Taylor
45c9caa38c
Fixup some formatting issues
2018-10-21 18:15:25 +01:00
Dylan K. Taylor
1dd6591ac1
Migrate a bunch of PluginManager->callEvent() usages to Event->call
...
This has the triple bonus effect of a) making a lot of code easier to read, b) reducing Server::getInstance() usages, and c) removing a whole bunch of Server dependencies.
The network and block namespaces are untouched by this commit due to potential for merge conflicts. These should be dealt with separately on master.
2018-10-05 17:30:06 +01:00
Dylan K. Taylor
8db1ccc1ae
Merge branch 'release/3.1' into release/3.2
2018-09-20 19:02:09 +01:00
Dylan K. Taylor
5d56030afa
Item: make nbtDeserialize() return AIR when reading an unknown PC item
...
This is scummy, but it's better than crashing the whole server just because a chest contained an unknown item.
2018-09-20 19:00:44 +01:00
Dylan K. Taylor
a0bb747d6d
Merge branch 'release/3.1' into release/3.2
2018-09-19 16:16:18 +01:00
Dylan K. Taylor
4bc0d850b1
Added Block->getRuntimeId(), clean up some mess
2018-09-19 16:16:10 +01:00
Dylan K. Taylor
5af4dd20df
Merge branch 'release/3.1' into release/3.2
2018-09-08 14:25:11 +01:00
Dylan K. Taylor
c7d58db7eb
Cleanup Entity age handling, fixed arrows despawning too quickly after long flight
2018-09-08 14:23:06 +01:00
Dylan K. Taylor
032b20f659
Server: remove premature optimization of findEntity()
2018-08-25 18:37:18 +01:00
Dylan K. Taylor
0336ae8229
Merge branch 'release/3.1' into release/3.2
2018-08-17 19:47:41 +01:00
Dylan K. Taylor
b4694092b7
Painting: fix motive not being saved
2018-08-17 19:47:26 +01:00
Dylan K. Taylor
5424644ca1
Merge branch 'release/3.1' into release/3.2
2018-08-16 15:52:19 +01:00
Frago9876543210
a5e38576ef
ItemEntity: fixed using -1 for infinite pickup delay not working
...
closes #2382 (squash-merge)
2018-08-16 15:52:05 +01:00
Dylan K. Taylor
c5c5a53a13
Merge branch 'release/3.1' into release/3.2
2018-08-07 18:49:13 +01:00
Dylan K. Taylor
8fa196efc9
FallingBlock: fixed state not being saved
2018-08-07 18:48:52 +01:00
Dylan K. Taylor
32574118ea
Implemented Mending enchantment ( #2257 )
2018-07-06 13:28:33 +01:00
Dylan K. Taylor
d3e54db146
ExperienceOrb: stop tracking targets if they die while being tracked
2018-06-23 16:41:21 +01:00
Dylan K. Taylor
8e5aca70b4
Entity: Avoid using close() during initEntity()
...
this simply conceals bugs and will cause astonishing behaviour.
2018-06-09 17:06:15 +01:00
Dylan K. Taylor
9dd0ee7f05
Entity: replaced motion and lastMotion fields with vectors
2018-05-24 12:11:41 +01:00
Dylan K. Taylor
0bb5e88b5c
Hinting up Entity API to PHP 7.2 standards
2018-05-19 10:46:47 +01:00
Dylan K. Taylor
dd1dfefd83
ItemEntity: remove unnecessary damage types restrictions
...
Invalid damage types are all restricted by other means anyway. This fixes items not getting killed by fire (close #2143 ) and cacti.
2018-05-04 22:57:28 +01:00
Dylan K. Taylor
646455f6e8
fixed painting particles, removed DestroyParticle
...
it didn't last long because they changed how this works... yuk
2018-04-09 16:26:15 +01:00
Dylan K. Taylor
05a1e61e5b
Painting: polyfill height and width
2018-04-09 16:20:46 +01:00
Dylan K. Taylor
5b7b2dd0e2
Merge changes from ALPHA11 for 1.2.13
2018-04-04 11:31:39 +01:00
Dylan K. Taylor
1d5978df98
Fixed falling blocks getting moved by currents, closes #2080
2018-03-30 12:20:59 +01:00
Dylan K. Taylor
c0c684b12e
Removed the need for paintings to check for destruction on schedule
...
Since we have a mechanism for triggering things on entities anyway, make use of it to do more than just forcing movement updates.
2018-03-25 13:15:10 +01:00
Dylan K. Taylor
924334a776
Painting: fixed performance bug, close #2117
2018-03-25 13:06:02 +01:00
Dylan K. Taylor
8a86e0825b
Entity: Moved PrimedTNT and FallingSand to object\PrimedTNT and object\FallingBlock
2018-03-10 16:25:07 +00:00
Dylan K. Taylor
b39bbffdc5
Entity: Moved and renamed entity\Item to entity\object\ItemEntity
2018-03-10 12:36:46 +00:00
Dylan K. Taylor
c7f8796136
Implemented Paintings ( #2073 )
...
This supports vanilla placement of paintings, with overlap and collision checking.
Paintings are removed when a block is placed inside them or if any of their supporting blocks are removed.
As per vanilla, a random painting is chosen from the largest subset that will fit into the given space.
2018-03-07 09:03:30 +00:00
Dylan K. Taylor
2e4519cb36
ExperienceOrb: fixed behaviour when placing blocks on top of them
2018-03-04 12:47:09 +00:00
Dylan K. Taylor
a3fa8adf4a
Fixed XP orbs trying to track players after teleport
...
closes #2028
@mal0ne-23, you are today's MVP.
2018-02-17 10:58:54 +00:00
Dylan K. Taylor
4943ff9dfc
Not sure how this got missed :<
2018-01-21 19:36:42 +00:00
Dylan K. Taylor
03fda936a8
Added XP level-up sounds and refactored XP gain sound handling
2018-01-05 11:58:54 +00:00
Dylan K. Taylor
0f30467f62
Added Level->dropExperience() and API for splitting XP into orb sizes
2018-01-04 19:32:54 +00:00