554 Commits

Author SHA1 Message Date
Dylan K. Taylor
b14ecc18c4 Remove unused imports 2017-09-20 12:24:44 +01:00
Dylan K. Taylor
cb7911ee9c Improved Absorption, now only applies to living entities, now controllable by plugins 2017-09-03 12:37:34 +01:00
Dylan K. Taylor
7483f22e8b Fixed a PhpStorm inspection 2017-09-03 12:10:56 +01:00
Dylan K. Taylor
120cf56a47 Misc return typehints 2017-08-30 12:59:26 +01:00
Dylan K. Taylor
21f09d5fdb Cleaned up Effect handling and replacement 2017-08-30 12:53:41 +01:00
Dylan K. Taylor
fd52022065 Refactor of health int -> float and fixed armor being useless when
computed damage reduction is less than 1
2017-08-30 11:03:07 +01:00
Dylan K. Taylor
0f2ca99c67 Merge remote-tracking branch 'origin/pr/1310' 2017-08-23 10:44:33 +01:00
Dylan K. Taylor
a7674c52e6 Micro optimization to movement update checking
No need to keep abs()ing this, because next time we have a movement update, motion < 0.00001 will be flattened to zero anyway.
2017-08-23 10:42:23 +01:00
Muqsit
a52fa93998 Remove Entity->length 2017-08-23 02:21:33 -04:00
Dylan K. Taylor
3a5fc78c53 Fixed players getting kicked for flying when standing still when blocks near them get updated, fixed item movement being too slippery 2017-08-22 17:47:48 +01:00
Dylan K. Taylor
c32b75fa18 Further (major!) performance enhancements to entity ticking 2017-08-21 20:28:56 +01:00
Dylan K. Taylor
876659cc73 Item factory refactor and added capability to register custom items 2017-08-21 17:49:26 +01:00
Dylan K. Taylor
456ddd3fb3 Removed obsolete parameters from Entity->attack() and Entity->heal() 2017-08-21 13:25:11 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
02f42eba48 Move block registration to its own class 2017-08-20 18:05:01 +01:00
Dylan K. Taylor
f73d3d086e Added some new blocks, fixed collisions not being detected when standing on top of a full block 2017-08-18 13:58:05 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
6320a63ca5 Use standard format for color hex, some minor name alteration 2017-08-17 13:08:18 +01:00
Dylan K. Taylor
77376d3e33 No idea how this happened 2017-08-17 11:15:42 +01:00
Dylan K. Taylor
21a1e0eb6b Player API typehints 2017-08-17 11:08:54 +01:00
Dylan K. Taylor
670a9fe44f Fix some crashy issues when incompatible players get disconnected 2017-08-17 10:29:12 +01:00
Dylan K. Taylor
b4c4005009 Some condition simplifications suggested by static analysis 2017-08-16 20:06:48 +01:00
Dylan K. Taylor
eebc52e00b Added API method Entity->isClosed() and made Entity->closed protected 2017-08-16 19:30:23 +01:00
Dylan K. Taylor
20aa519f3a Added capability to remove owners/target entities 2017-08-16 19:14:15 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
0c798222a4 ... blame PhpStorm EAP 2017-08-10 18:04:44 +01:00
Dylan K. Taylor
e8bd0c3e09 add typehints to Metadatable interface and implementations, fix missing return for Block->hasMetadata() reported in #1285 2017-08-10 18:02:01 +01:00
Dylan K. Taylor
2d8395f70e Absorption should be a float. Fixed #1071 2017-08-07 16:09:10 +01:00
Dylan K. Taylor
6b5c0af161 Separation of effect handling from Entity, fixes #886 2017-08-07 16:03:54 +01:00
Dylan K. Taylor
54b6a5710e Fixed entityBaseTickTimer doesn't cover child overrides 2017-08-07 14:21:06 +01:00
Dylan K. Taylor
aa6eef26e9 Fixed #1255 2017-07-28 14:23:27 +01:00
Dylan K. Taylor
e8be8550a0 Fixed possible issues with tick counters being inaccurate when the server lags 2017-07-27 10:58:34 +01:00
Dylan K. Taylor
dbb92096e4 More typehints, documentation fixes and static analysis cleanup 2017-07-15 12:12:06 +01:00
Dylan K. Taylor
c3b8be3f60 and more typehints 2017-07-14 10:56:51 +01:00
Dylan K. Taylor
2a7b736f18 Heap of bugfixes, cleanup and PHP 7 upgrades 2017-07-13 19:18:56 +01:00
Dylan K. Taylor
4d874e7e78 static analysis 2017-07-13 16:45:24 +01:00
Dylan K. Taylor
6504fdabab Fixed squid not updating and added some debug 2017-07-05 11:42:24 +01:00
Dylan K. Taylor
394f420059 Fixed chunks not loading when respawning and some minor spawn sequence cleanup (#1153)
* Fixed chunks not loading when respawning and some minor spawn sequence cleanup

* This causes too much unexpected behaviour to be useful

Revert "Make use of Mojang's pitch hack, close #821"

This reverts commit c2dfef700feaf7235ece2fc140e93d02ae3f4af4.

* Removed delayed-teleport system and cleaned up movement reset for dead players

* Fixed health resetting to max when quitting and rejoining
2017-07-05 10:31:16 +01:00
Dylan K. Taylor
d474f73665 Move base offset to Human from Player
fixes jojoe77777/Slapper#58
2017-07-03 19:58:07 +01:00
Dylan K. Taylor
b4a149cce8 Fix some issues with entities in leveldb worlds 2017-07-02 13:37:30 +01:00
Dylan K. Taylor
a73c6f1861 Fixed some unnecessary FQNs in docs 2017-06-25 12:43:04 +01:00
Dylan K. Taylor
a365c831a8 Fixed some doc problems 2017-06-25 12:07:28 +01:00
Dylan K. Taylor
a4b8dd43e6 Removed useless confusing array indices in CompoundTag constructors (#1116) 2017-06-20 12:11:24 +01:00
Dylan K. Taylor
be7b057fa5 Improved metadata sending and made it less spammy
Add changed properties to a list to send in a group on tick in a single packet
2017-06-17 20:00:45 +01:00
Dylan K. Taylor
e3b3f60c66 Fixed item stack count and effect amplifier overflows, close #1072 2017-06-17 12:22:38 +01:00
Dylan K. Taylor
313fdb9e87 Added INT32_MIN and INT32_MAX constants and an exception throw for out-of-range effect amplifiers 2017-06-14 19:38:39 +01:00
Dylan K. Taylor
4341fb8347 AddEntityPacket's attributes encoding is still non-standard -_-
I thought they fixed this...
2017-06-11 18:09:58 +01:00
Dylan K. Taylor
cd66f58526 Restrict XpSeed to the bounds of an int32, close #1040 2017-06-09 16:05:28 +01:00
Dylan K. Taylor
eac756470a Fixed trying to save health as a ShortTag, close #1039 2017-06-09 09:11:02 +01:00
Dylan K. Taylor
890f72dbf2 Type-hinted NBT tag constructors, made getValue() and setValue() more strict, fix dozens of assorted related bugs 2017-06-08 19:17:52 +01:00