Dylan K. Taylor
4221e274d6
Merge branch 'release/3.3' into release/3.4
2018-10-16 18:20:14 +01:00
Dylan K. Taylor
839d5eab7b
Protocol changes for 1.7
...
there's also some new cases in stats, but we don't care about those anyway.
2018-10-16 17:13:52 +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
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
8daf3dc8b4
Merge branch 'release/3.1' into release/3.2
2018-08-22 15:41:52 +01:00
Dylan K. Taylor
4cc7573a64
Merge branch 'release/3.0' into release/3.1
2018-08-22 15:40:43 +01:00
Dylan K. Taylor
ec1e257e21
Entity: Fixed fire damage not taking effect in the void
...
this is an absurd bug that nobody would ever otherwise notice, but the problem is that the doOnFireTick() call isn't evaluated if hasUpdate is already true.
2018-08-22 15:36:31 +01:00
Dylan K. Taylor
2eda8cfad3
Merge branch 'release/3.1' into release/3.2
2018-08-19 16:01:47 +01:00
Dylan K. Taylor
91be5aba0c
Merge branch 'release/3.0' into release/3.1
2018-08-19 16:00:25 +01:00
Dylan K. Taylor
5df601c817
Add @see docs so PhpStorm can see dynamic constructor usages
...
PhpStorm can't see constructor usages when the class name is dynamic. This causes maintenance problems because cross-referencing constructors called like this doesn't show up dynamic calls.
2018-08-19 16:00:15 +01:00
Enes
99045fe21a
Entity: Implement setting score tag
2018-07-30 09:36:32 +01:00
Sandertv
d0339796b4
Added DATA_FLAG_SHOW_TRIDENT_ROPE
2018-07-24 17:19:06 +01:00
Dylan K. Taylor
93a2f397c6
Merge branch 'mc-broken-ed-1.5' into release/3.1
2018-07-17 18:13:06 +01:00
Dylan K. Taylor
710e1d014d
Entity: fixed 0-length motion vectors being passed to move()
...
this was an interesting bug.
This was discovered by making a projectile's drag 0, making its gravity a factor of its throw force (such that force / gravity = integer value), and then throwing it directly up. At the apex, an error would occur due to trying to do a ray trace with a zero vector.
This also led me to realize that there's an edge case in the current movement system - if an entity's motion reaches 0, it will stop getting movement updates. This can be undesirable when things such as gravity cause motion to become zero when throwing a projectile directly upwards. This will need to be fixed separately.
2018-07-16 12:08:13 +01:00
Dylan K. Taylor
165aac1ba3
Merge branch 'release/3.0' into mc-broken-ed-1.5
2018-07-14 16:09:57 +01:00
Dylan K. Taylor
7fc22d3227
Entity: fixed setNameTagAlwaysVisible()
...
mojang >.<
this doesn't fix the problem of invisibility making nametags hidden though.
2018-07-14 16:05:46 +01:00
Dylan K. Taylor
b5dcdea6d8
Protocol changes for 1.5.0 "release"
...
what a piece of shit this version is...
2018-07-11 10:00:15 +01:00
Dylan K. Taylor
905259a4e1
Fixed not being able to place blocks inside dead players
...
closes #2265
2018-06-29 16:38:35 +01:00
Dylan K. Taylor
05af87e1d4
Strip empty lines at the end of classes
2018-06-11 13:19:23 +01:00
Dylan K. Taylor
85136b7b4a
Entity: Attach to level & chunk after initEntity() call, not before
...
this avoids leaving garbage entities attached to chunks when exceptions are thrown during initEntity().
2018-06-09 16:59:22 +01:00
Dylan K. Taylor
37b445f210
Updated Math dependency
2018-06-09 13:05:25 +01:00
Dylan K. Taylor
fb484087a8
Entity: Remove unnecessary scheduleUpdate() call from initEntity()
...
this is already done by the constructor
2018-06-07 12:53:59 +01:00
Dylan K. Taylor
14914781fc
Added exception throws when a closed tile or entity attempts to schedule itself for updating
...
I can't believe it took so long to find what was causing these stdClass bugs.
2018-06-07 12:37:26 +01:00
Dylan K. Taylor
fdd5b7b9c9
Entity: Fixed despawn flagging not kicking in until scheduling updates on entities
2018-06-07 12:34:23 +01:00
Dylan K. Taylor
c83c0eb935
Entity: Move responsibility of checking for despawn to Level
...
this ensures that flagging for despawn will always work as intended, including when onUpdate() is overridden.
2018-06-07 12:31:21 +01:00
Dylan K. Taylor
0d177d5219
Entity: Clear dirty properties at the end of the constructor
...
this prevents sending duplicate properties immediately after entity spawn (due to properties getting set in the constructor).
2018-06-04 11:18:42 +01:00
Dylan K. Taylor
0a50b8cb9b
Removed imports left over from 4f8f334436c69336d1bc2811717983544eda41e8
2018-05-29 11:42:12 +01:00
Dylan K. Taylor
4f8f334436
Replaced usages of Math::floorFloat() with (int) floor() and Math::ceilFloat() with (int) ceil()
...
Once upon a time, these userland functions were faster than calling builtins, but not anymore. According to my test the Math functions are twice slower in PHP 7.2 with typehints and 50% slower without typehints.
Inlining is slightly faster than using builtins, but the difference is very small - not worth making the code look any more ugly than it does already.
2018-05-28 18:54:35 +01:00
Dylan K. Taylor
c18ba38b74
Entity: avoid astonishing behaviour with motion vector modifications
2018-05-26 10:40:04 +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
adb9390b53
Entity: Rename isInsideOfWater() to isUnderwater()
2018-05-19 18:10:43 +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
389990e0a8
Entity: remove useless functions
...
these may be TODOs but I have no idea why or where they need to be implemented, so until they do they are useless clutter.
2018-05-18 20:09:55 +01:00
Dylan K. Taylor
8b225fc4ef
New entity metadata flags and properties
2018-05-02 12:03:29 +01:00
Dylan K. Taylor
a889a0e517
Workaround for player hitbox bug on respawn
...
this happens when a player respawns before their death animation ends. I don't know why, but their bounding box height suddenly becomes zero. This solves the bug by simply resending the height and width properties to viewers on respawn.
Closes #2135 .
2018-04-04 20:11:16 +01:00
Dylan K. Taylor
9ed0d9d36f
added some data properties
2018-04-04 19:40:12 +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
526f05631e
fix metadata properties for new beta
...
there are more things than this, but I don't have time to figure them all out.
2018-04-04 11:03:05 +01:00
Dylan K. Taylor
4b03dbebba
Entity: use temporalVector in checkBlockCollision() instead of creating a new Vector3
2018-03-30 12:21:37 +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
eb9f60f41c
Entity: some minor cleanup to constructor
2018-03-24 11:52:23 +00:00
Dylan K. Taylor
1648fff916
Replaced Position->getLevel() null checks with isValid()
2018-03-20 11:10:36 +00:00
Dylan K. Taylor
73e09392b6
Timings: Clean up some terrible code, move namespaces
2018-03-19 19:05:51 +00:00
Dylan K. Taylor
ac5a91b67e
Cleaned up bool comparison mess
2018-03-19 14:10:55 +00:00
Dylan K. Taylor
fa644edef3
Entity: removed redundant return values for move()
2018-03-14 13:39:23 +00: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