Commit Graph

45 Commits

Author SHA1 Message Date
32ad9d0c1a Squid: fix spammy rotation in enclosed spaces
this bug was caused by 2f3c77c68a. It looks unrelated to the commit title, so it may have been committed by mistake.
2019-10-22 22:50:35 +01:00
c58a1bf9b7 Protocol changes for 1.12.0.28 2019-07-12 19:00:15 +01: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
9dd0ee7f05 Entity: replaced motion and lastMotion fields with vectors 2018-05-24 12:11:41 +01:00
adb9390b53 Entity: Rename isInsideOfWater() to isUnderwater() 2018-05-19 18:10:43 +01:00
0bb5e88b5c Hinting up Entity API to PHP 7.2 standards 2018-05-19 10:46:47 +01:00
ac5a91b67e Cleaned up bool comparison mess 2018-03-19 14:10:55 +00:00
b39bbffdc5 Entity: Moved and renamed entity\Item to entity\object\ItemEntity 2018-03-10 12:36:46 +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
a66a757f56 Cleaned up EntityEventPacket handling 2017-11-04 18:31:35 +00:00
9fb93985d6 Cleaned up Entity->spawnTo() 2017-10-19 16:13:09 +01:00
2b22d5d8cc Added EntityIds interface with constants 2017-10-19 15:43:55 +01:00
95752ef542 Merge branch 'master' into mcpe-1.2 2017-08-23 13:20:35 +01:00
a52fa93998 Remove Entity->length 2017-08-23 02:21:33 -04:00
445a67954d Merge changes from master 2017-08-22 14:13:31 +01:00
876659cc73 Item factory refactor and added capability to register custom items 2017-08-21 17:49:26 +01:00
456ddd3fb3 Removed obsolete parameters from Entity->attack() and Entity->heal() 2017-08-21 13:25:11 +01:00
1f70a7830e Branch merge 2017-08-20 21:07:19 +01:00
2f3c77c68a Fixed entity move performance issue and a ton of entity movement bugs
- fixed zombies and villagers movement not updating
- fixed dropped items "movement" lagging the living **** out of the server when not actually moving
- fixed arrows not falling when the supporting block is removed
- fixed knockback
- fixed zombies + villagers being un-attackable after hitting them

... the list goes on
2017-08-20 20:31:09 +01:00
4f1302adf2 Merge branch 'master' into mcpe-1.2 2017-08-17 17:14:16 +01:00
741394dab1 Typehinted up entity API
Did you guys think ALPHA7 changes were done?!
Sone stuff still needs some work, most notably data-properties can't be typed yet because they are just mushed into a couple of methods.
2017-08-16 19:04:30 +01:00
9be1b929a5 Added PhpDoc for packet field types and changed float x,y,z to Vector3 2017-08-13 20:02:07 +01:00
c3b8be3f60 and more typehints 2017-07-14 10:56:51 +01:00
2a7b736f18 Heap of bugfixes, cleanup and PHP 7 upgrades 2017-07-13 19:18:56 +01:00
6504fdabab Fixed squid not updating and added some debug 2017-07-05 11:42:24 +01:00
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
54453d0b0a Refactored entity IDs in packets for consistency and to clarify on types 2017-06-05 15:41:27 +01:00
0a4d62b405 Added encode and decode methods for more packets 2017-05-15 15:56:59 +01:00
e7406ba096 Fixed squid health attribute errors 2017-04-21 14:42:19 +01:00
8114ceaf68 Merge branch 'master' into api3/network 2017-03-18 16:29:38 +00:00
92193fd27b Use entity IDs in EntityDamageBy*EntityEvents, fixed memory leaks related to PvP/PvE/PvM (#418) 2017-03-13 10:30:31 +00:00
56990eb28b MCPE protocol gets its own namespace 2017-03-08 20:28:39 +00:00
9004417456 Fixed file headers (#255) 2017-01-13 16:57:05 +00:00
598e7aac8f More PhpStorm inspections, import cleanup 2017-01-04 14:55:11 +00:00
0bd7ea211d Refactored Server::broadcastPacket() to be non-static
Why the hell was this static at all? Seriously Shoghi?
2017-01-03 22:24:40 +00:00
6fc435da0e Imports rearrangement 2016-10-03 00:43:46 +08:00
dd22e4963f Fixed #4051 2016-03-09 18:02:35 +08:00
31ef7721b1 Removed network channels, bumped protocol 2015-08-12 14:59:48 +02:00
03f178379e Fixed items getting corrupted pickup delay, not being able to be killed by other damage sources 2015-05-28 22:17:12 +02:00
9a2170d296 protocol 27, added player spawn events after death from new protocol, added EntityEvent constants 2015-05-28 14:19:00 +02:00
44b5c23ee1 Fixed dead entities and Item picking, improved timing reports 2015-05-06 16:21:35 +02:00
b2c25eaf36 Added MemoryManager, new memory properties, improved performance, updated RakLib, fixed misc. bugs 2015-04-18 20:13:52 +02:00
0b176b3fe0 Implemented Channeled packet sending 2015-04-14 18:24:40 +02:00
f2e2cec024 Removed entity mask 2015-04-09 14:23:37 +02:00
69f841a00c Added Squids with basic AI 2015-04-09 00:12:50 +02:00