b3f15435cc
Projectile: clean up dodgy code
2025-01-08 02:31:50 +00:00
847ae26cad
PHPStan: don't remember possibly-impure function return values
...
I don't think we get much benefit from this, and the assumption that functions with a return value are pure is sketchy.
In any case, it's better to avoid these repeated calls anyway.
2025-01-08 02:04:06 +00:00
e77f2c5198
Implemented End Crystal ( #4715 )
...
Co-authored-by: Dylan T. <dktapps@pmmp.io >
2024-11-16 17:57:57 +00:00
fbcf4649eb
Avoid unnecessary Entity::getWorld() calls in loops
2023-11-17 13:58:41 +00:00
7cdab75b05
Merge branch 'minor-next' into major-next
2023-03-20 22:12:54 +00:00
2751e1ec02
replacing new Vector3(0, 0, 0) with Vector3::zero() ( #5640 )
2023-03-20 12:54:28 +00:00
607bdfa42f
Timings: added new timers for entity move collision checks and projectile move ray tracing
...
projectiles get their own distinct sub-timer, since the logic is completely different from regular entities.
2023-03-19 15:49:35 +00:00
6e2685cbbb
Merge branch 'next-minor' into next-major
2022-12-18 22:25:32 +00:00
bf44edd179
Constify a bunch of NBT keys, pass 1
2022-12-18 22:12:15 +00:00
a205d64732
Merge branch 'next-minor' into next-major
2022-11-12 17:02:56 +00:00
a7ac6070dc
Correct damage calculation for non-arrow projectiles ( #5394 )
2022-11-07 20:05:53 +00:00
c67e42a723
Add a hook to enable blocks to react to projectiles colliding with them
...
this enables implementing blocks such as the target block.
2022-07-07 01:44:13 +01:00
1ff69136a3
Merge branch 'next-major' into modern-world-support
2022-06-07 20:01:40 +01:00
aa9f8781ff
Merge branch 'next-minor' into next-major
2022-06-07 19:56:26 +01:00
5c85aa6e58
Eliminate remaining usages of legacy block ID+meta on disk
...
flower pots loaded from vanilla worlds should now correctly display the plant inside
2022-06-05 21:49:51 +01:00
38d6284671
Use PHP-CS-Fixer to enforce file header presence
2022-06-04 17:34:49 +01:00
7b8eeb42f6
Use typed properties in src/entity package
...
[bc break]
2022-06-01 21:19:02 +01:00
fc53f3721a
Avoid direct mutations of Entity->location
2022-01-20 21:49:14 +00:00
8f525ab399
Replace disallowed operators in src/entity/
2022-01-20 19:14:28 +00:00
b34e6f53eb
Changed visibility of Projectile->move to Protected. ( #4585 )
2021-11-19 23:21:10 +00:00
f827a555d5
Merge branch 'stable'
2021-11-01 18:13:24 +00:00
0ad663ff50
Merge remote-tracking branch 'origin/stable'
2021-10-05 01:17:59 +01:00
73cc841d0b
Entity: rename checkBlockCollisions() to checkBlockIntersections()
2021-09-05 14:00:27 +01:00
7fd712c1ff
Refactor Block & Tile: getPos() to getPosition() ( #4395 )
...
this also changes the name of the class property 'pos' to 'position' as well as Block->getPosOffset() to Block->getPositionOffset()
2021-08-23 14:01:32 +01:00
bcc3e87730
Timings: rename core timers to remove 'timer' from the names
...
this makes them shorter and more consistent.
2020-12-23 17:52:25 +00:00
e925423749
Entity: fix chunk tracking consistency issues, fixed attempted chunk loading in origin world when teleporting to a different position in a different world
2020-12-10 18:13:18 +00:00
626680c6c1
Use new Location objects instead of mutating Entity->location directly
...
I'm actually not a big fan of needing to recreate the whole thing just to modify the coordinates. This seems kind of stupid.
2020-09-25 18:43:49 +01:00
279abb871d
Remove all usages of CompoundTag->hasTag()
...
in pretty much every case, these usages really wanted to read the tag's contents anyway, which can be combined with a getTag() and instanceof call for more concise and static analysis friendly code.
In the few cases where the tag contents wasn't needed, it still wanted to check the type, which, again, can be done in a more static analysis friendly way by just using getTag() and instanceof.
2020-07-10 21:01:43 +01:00
ff00595a48
Remove some more Vector3 mutations
2020-06-27 20:58:02 +01:00
4b528aa637
NBT is no longer needed to create an entity
...
it's still able to be provided, but shouldn't be needed in the majority of cases (constructor args and/or API methods should be sufficient).
2020-06-19 10:51:27 +01:00
1205432c34
Extract mandatory parameters into constructor parameters
...
the goal is obviously to ditch NBT entirely here, but there's more work to be done before that becomes possible.
2020-06-19 10:51:27 +01:00
148228e360
update pocketmine/math, adapt to add() changes
2020-05-19 12:26:18 +01:00
13d784cd0c
Convert BlockFactory to singleton
2020-04-23 23:45:13 +01:00
055b13a6cf
strip extra blank lines (php-cs-fixer)
2020-01-22 15:14:10 +00:00
67bcc1c0fb
phpdoc armageddon for master, pass 1
2020-01-22 11:55:03 +00:00
6a4ae4cb94
remove position parameters from BlockFactory::get() and BlockFactory::fromFullBlock()
2019-08-24 17:19:27 +01:00
2d4a32fc77
first look at separating Entity and Location
2019-08-19 17:20:34 +01:00
53ab860db5
first shot making Block not extend Position
...
this makes some stuff a lot less pretty, but this seems to be the bare minimum necessary to do this task. It can be enhanced later.
2019-08-05 16:44:09 +01:00
5499ac620c
Removed pocketmine subdirectory, map PSR-4 style
2019-07-30 19:14:57 +01:00