Commit Graph

136 Commits

Author SHA1 Message Date
9fb93985d6 Cleaned up Entity->spawnTo() 2017-10-19 16:13:09 +01:00
584810780a Moved projectile-related classes to their own namespace 2017-10-19 12:27:44 +01:00
3b5eb45ff5 More usages of Item->isNull() 2017-10-16 12:29:39 +01:00
68809d992b Added BaseInventory->removeAllViewers() 2017-10-16 11:15:03 +01:00
246c6daef6 how irritating 2017-10-09 11:30:11 +01:00
2601e35990 Cleaned up and added API for entity air supply, fixed oxygen being used in creative/spectator
this commit also includes respiration checks because it's cherry-picked
from api3/blocks, but respiration won't work until it's registered.
2017-10-09 11:28:40 +01:00
8fafef2f7f Added tagType parameter to ListTag constructor, remove some boilerplate code 2017-10-08 13:28:01 +01:00
e6cecabf3f New skin API, add support for custom capes & custom geometry (#1416)
* Added support for changing skins ingame, custom capes & geometry
* Use PlayerSkinPacket for setting Human skin instead of PlayerList hack
2017-09-29 14:09:00 +01:00
38fad4b963 Implement difficulty per-world (#878)
* Moved Server::getDifficultyFromString() to Level
* Added ability to set difficulty in worlds section of pocketmine.yml for generation
2017-09-26 11:16:51 +01:00
6aa9b081e9 Cleanup unused imports 2017-09-21 12:26:41 +01:00
8cae20e818 Removed hotbar slot linking (works like PC now) 2017-09-19 18:36:57 +01:00
5d75d3d5b6 Merge branch 'php/7.0' into mcpe-1.2 2017-09-01 23:10:58 +01:00
120cf56a47 Misc return typehints 2017-08-30 12:59:26 +01:00
95752ef542 Merge branch 'master' into mcpe-1.2 2017-08-23 13:20:35 +01:00
da4c9cf404 Fixed inventory cyclic references causing players to not get garbage-collected 2017-08-23 13:13:15 +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
456ddd3fb3 Removed obsolete parameters from Entity->attack() and Entity->heal() 2017-08-21 13:25:11 +01:00
4f1302adf2 Merge branch 'master' into mcpe-1.2 2017-08-17 17:14:16 +01:00
e825ebd8fa Added some wrapper methods to make data flags less of a pain in the ass to work with 2017-08-17 16:52:17 +01:00
21a1e0eb6b Player API typehints 2017-08-17 11:08:54 +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
b4c2305c7f Minor cleanup of Human->initEntity() 2017-08-08 10:44:11 +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
2a7b736f18 Heap of bugfixes, cleanup and PHP 7 upgrades 2017-07-13 19:18:56 +01:00
d474f73665 Move base offset to Human from Player
fixes jojoe77777/Slapper#58
2017-07-03 19:58:07 +01:00
a4b8dd43e6 Removed useless confusing array indices in CompoundTag constructors (#1116) 2017-06-20 12:11:24 +01:00
cd66f58526 Restrict XpSeed to the bounds of an int32, close #1040 2017-06-09 16:05:28 +01:00
e18a3ac933 Fixed UUID-related issues 2017-06-07 13:11:03 +01:00
cf07af8b55 Fix some strict type violations reported by PhpStorm (strict types <3) 2017-06-07 12:54:12 +01:00
51091fe87b Fix player data saving 2017-06-07 12:54:12 +01:00
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
8382970d56 Merge branch 'master' into mcpe-1.1 2017-05-30 16:09:46 +01:00
86f3b257a7 Remove unneeded foreach loop in Human::getDrops() (#941)
* Remove unneeded foreach loop in Human::getDrops()

* Use array_values() for backwards compatibility.
2017-05-30 13:27:47 +01:00
0a4d62b405 Added encode and decode methods for more packets 2017-05-15 15:56:59 +01:00
d682fdfdf0 Food and exhaustion should not apply in creative, close #860 2017-04-24 13:31:05 +01:00
559504225a Throw an exception before calling base entity constructor if skin is not set or invalid, close #835 (#855) 2017-04-24 09:50:55 +01:00
2204942338 Fixed the half-done hunger implementation, fixed lots of bugs related to hunger
- Fixed starvation doesn't deal any damage at all (Human->getFood() returns a float, not an int, === 0 won't work so great)
- Added exhaustion for sprinting, walking, jumping and sprint-jumping as per MCPE (these use MCPE values, and yes MCPE does walking exhaustion!)
- Fixed attributes don't get reset after player death
- Added food and hunger regeneration in peaceful difficulty
- Added API methods Living->jump() (motion isn't updated yet, so this won't actually do much if plugins try to use it) and Living->getJumpVelocity()

TODO: implement exhaustion for swimming
2017-04-21 19:48:25 +01:00
69ac80518c some improvements to the horrendous mess that is the handling of joining and quitting, fixed some crashes, probably caused some other crashes
I can't fix this completely because it's just too much of a fucking mess. NEED to separate network stuff from Player.
2017-03-30 19:33:47 +01:00
cb059ea713 fix some PhpStorm inspections 2017-03-30 12:10:59 +01:00
52f2596dc5 Merge branch 'master' into api3/network 2017-03-28 12:27:40 +01:00
217f66e180 Removed redundant method override leftover from 0.15 2017-03-28 12:25:54 +01:00
4245274aec Merge branch 'master' into api3/network 2017-03-25 21:26:46 +00:00
34f833fa79 Do not save empty inventory slots 2017-03-25 12:02:09 +00:00
66fbfdd47b Fixed hunger not saving, resolves 1 of #435 (#439) 2017-03-18 21:58:02 +00:00
6c5dbd7359 Merge branch 'master' into api3/network 2017-03-12 12:22:11 +00:00
132e04fdbb Hotbar/inventory bugfixes (#399)
- Fixed most issues with item equipment in creative
- Added save and restore of currently-held item
- Reset hotbar on death, added API method PlayerInventory->resetHotbar()
- Creative players now have more leeway to get items, alleviates issues with item equipment in desktop GUI
- Fixed creative players wearing armour
- Found unknown field in ContainerSetSlotPacket
- Removed outdated/redundant constants
- Use a case statement in ContainerSetSlotPacket handler, added handling for 0x7a hotbar slot link update
2017-03-09 20:31:55 +00:00
56990eb28b MCPE protocol gets its own namespace 2017-03-08 20:28:39 +00:00