14027 Commits

Author SHA1 Message Date
Dylan K. Taylor
8221475ce2
BlockDataSerializer: fix wrong exception type being thrown 2021-08-02 19:20:19 +01:00
Dylan K. Taylor
bdac98beaf
Block: get rid of getNonPersistentStateBitmask(), add writeStateToItemMeta()
this is more flexible and less confusing.
2021-08-02 19:17:24 +01:00
Dylan K. Taylor
01b48a21d9
Simplify NetworkSession ticking
we need to tick sessions every tick anyway, because other stuff is happening (e.g. sync attributes/entity metadata, batch buffer flush).
2021-08-02 14:32:00 +01:00
dependabot[bot]
6a7196530c
Bump phpunit/phpunit from 9.5.7 to 9.5.8 (#4345)
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.7 to 9.5.8.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.7...9.5.8)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-02 11:52:17 +01:00
Dylan T
eb23d27004 composer: accept ext-leveldb ^0.3.0 2021-07-31 18:11:34 +01:00
Sensei Tarzan
1bbf739385
the function stringToLegacy gives already null useless to put a default null (#4338) 2021-07-31 16:54:31 +01:00
Dylan K. Taylor
22c3736d63
LightUpdate: micro optimisations opcache isn't smart enough for
this removes 6 unnecessary opcodes from computeSpreadLight() and 3 from computeRemoveLight(). Tested with opcache.opt_debug_level=0x20000.
2021-07-30 23:30:28 +01:00
Dylan K. Taylor
3319fad863
Fix build error 2021-07-26 20:33:44 +01:00
Dylan K. Taylor
2b5667a56b
Move PHP minimum to 8.0 2021-07-26 20:29:39 +01:00
Dylan K. Taylor
09eac0e129
Merge remote-tracking branch 'origin/stable' 2021-07-26 20:14:33 +01:00
Dylan K. Taylor
f9863acadc
Restart console reader subprocess if it dies
this can happen for a bunch of different reasons, which are all indistinguishable. This also fixes pmmp/PcntlSignalHandler#3.
2021-07-26 15:38:38 +01:00
Dylan T
c2c9132812 ConsoleReaderThread: say what actually happened when we fail to read commands 2021-07-26 15:17:24 +01:00
Dylan T
c7bb77e24a ConsoleReaderChildProcess: die voluntarily if connection to server process is closed
this happens if the parent process is killed via SIGINT, because its stdin will be closed, interrupting a blocking read. This might also happen if the user pressed CTRL+D, so we don't die unless end of socket stream was also detected.

closes #4335
2021-07-26 15:07:47 +01:00
Dylan K. Taylor
01fe497c49
phpstan: use PHP 8.0 as primary version
I'm using 8.0 for local development now, so having the phpstan configs targeted at 7.4 by default makes things inconvenient.
2021-07-26 14:34:47 +01:00
Dylan T
1afda04620 PrimedTNT: fixed fuse not getting updated client-side, closes #4333 2021-07-25 12:27:25 +01:00
Dylan K. Taylor
8f01caf335
Merge branch 'stable' 2021-07-24 22:42:06 +01:00
Dylan K. Taylor
3bbd088a09
Update build/php submodule to pmmp/php-build-scripts@280dd0524a 2021-07-24 22:40:28 +01:00
Dylan T
1246d1b7ef
Use a subprocess for reading lines from STDIN (#4332)
this FINALLY provides us with a way to deal with Windows without needing to forcibly terminate the entire server on shutdown.
2021-07-24 22:10:50 +01:00
Dylan K. Taylor
772935cd7e
Updated biome ID constants 2021-07-23 22:39:54 +01:00
Dylan K. Taylor
58498c2b0b
Merge remote-tracking branch 'origin/stable' 2021-07-23 16:40:19 +01:00
Dylan K. Taylor
f89e10e684
Silence openssl_free_key() deprecation warnings on 8.0
we don't give a shit and these calls are currently needed for 7.4.
2021-07-23 16:30:22 +01:00
Dylan K. Taylor
85effa5240
Remove junk from php8 baseline 2021-07-23 15:56:06 +01:00
Dylan K. Taylor
81c5b83bd9
actions: test on 8.0 2021-07-23 15:55:01 +01:00
Dylan T
ef31a9fc66
Update bug_report.md 2021-07-23 13:32:18 +01:00
Dylan K. Taylor
dc56a99473
3.22.2 is next 2021-07-23 13:03:27 +01:00
Dylan K. Taylor
9477034a4a
Release 3.22.1 3.22.1 2021-07-23 13:03:27 +01:00
Dylan K. Taylor
5844b59b12
Fixed incorrect encoding of NpcDialoguePacket
this is in fact an ActorUniqueID, but for some reason written as a uint64 instead of a varint.
2021-07-23 12:53:30 +01:00
Dylan T
0eb4231b51
Use OpenSSL for ECDH during client login, drop mdanter/ecc (#4328)
This brings a significant performance improvement to login sequence handling, reducing CPU cost of `PrepareEncryptionTask` by over 90% and `ProcessLoginTask` by over 60%. It also allows us to shed a dependency.
2021-07-22 23:04:00 +01:00
Dylan K. Taylor
3af18917f0
Player: remove note about bans from getUniqueId()
while it's true that you might be able to skip the CPU waste from verifying a player's login just to find out that they are banned, this is generally a minority case anyway, so it doesn't make a lot of difference overall. This additional note is essentially a recommendation premature optimisation, which will likely lead to people making security mistakes.
2021-07-22 22:14:14 +01:00
Dylan K. Taylor
61528393c2
Player: rewrite the confusing documentation of getUniqueId() 2021-07-22 21:14:31 +01:00
Dylan K. Taylor
59b8453228
Player: added extra debug message for XUID mismatches 2021-07-22 21:04:40 +01:00
Dylan K. Taylor
83016a97bd
Added getMushroomBlockType() / setMushroomBlockType() APIs to Red/BrownMushroomBlock 2021-07-22 19:13:26 +01:00
Dylan K. Taylor
41d9bf8a2e
PthreadsChannelWriter: remove unused import 2021-07-22 19:08:21 +01:00
Dylan K. Taylor
832a156fc7
RakLib: split PthreadsChannelWriter into two implementations
this gains a very small performance improvement by avoiding unnecessary !== null checks on every packet written in either direction. It's insignificant for sure, but I just found this code in an old stash, so what the heck.
2021-07-22 18:52:58 +01:00
Dylan K. Taylor
5c609cc1c1
Added getShape() and setShape() APIs to StraightOnlyRail and Rail 2021-07-22 18:37:30 +01:00
Dylan K. Taylor
e97234d420
Refactor Rail handling to allow LSP-complaint shape handling
the reason there hasn't been any API until now is because of how inconvenient it was to expose a LSP-compliant API _and_ use the same base class for handling all the connection logic. This commit fixes that problem by abstracting shape handling away from BaseRail entirely, so that now it deals exclusively with connections. Deciding the shape of rail to use is now the job of the subclasses.
2021-07-22 17:35:10 +01:00
Dylan K. Taylor
2476f40cc6
Rail: store shape instead of connections
shape is what we'll eventually expose on the API.
2021-07-22 16:45:42 +01:00
Dylan K. Taylor
77138c5c06
Living: changed bad parameter name 2021-07-22 15:46:08 +01:00
Dylan K. Taylor
e803ca0e06
Living: Limit vertical knockback to 0.4 by default
this will break non-standard use cases with large forces, but they only have to stick a 'null' at the end of the parameter list.
Since this function should be primarily used for vanilla knockback, it makes more sense to keep the default as vanilla, but allow people to change it if they want to.

closes #4106 (this is close to #4106 anyway, but small enough that it was easier to recreate it than pull and modify it)
closes #2707
2021-07-22 14:27:20 +01:00
Dylan K. Taylor
3466fbe3e3
MemoryManager: remove unused variable declaration
it's overwritten further down anyway.
2021-07-21 19:25:01 +01:00
Angel
309bed414f
Implemented sweet berries (#4164)
this doesn't implement the server-side logic for the "stickiness" (slowdown) because we don't have the system needed for it yet.
It also doesn't have parity with vanilla on the damage.
2021-07-19 20:01:33 +01:00
Dylan K. Taylor
f64ef50ce3
ShulkerBox: fixed incorrect block-picking behaviour 2021-07-19 18:08:13 +01:00
Dylan K. Taylor
dcbc0bc2a6
BrownMushroomBlock: remove useless function 2021-07-19 17:58:24 +01:00
Dylan K. Taylor
71df15b4cc
Removed FlowerPot update_bit hack 2021-07-19 17:39:35 +01:00
Dylan K. Taylor
5874ce582a
Implemented bells 2021-07-19 17:00:56 +01:00
dependabot[bot]
8cb48bfe1d
Bump phpunit/phpunit from 9.5.6 to 9.5.7 (#4322)
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.6 to 9.5.7.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.6...9.5.7)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-19 12:48:11 +01:00
Dylan K. Taylor
e0a9fb6eac
Merge remote-tracking branch 'origin/stable' 2021-07-19 00:16:04 +01:00
KygekDev
8fb4d7b982
BUILDING.md: Changed pre-requisites PHP version to 7.4 or newer (#4319)
[ci skip]
2021-07-18 00:08:14 +01:00
Dylan K. Taylor
c5abae9eaa
Fixed merge error in bbf3f4c476bb203f399b7631a7d69013980bbae8
the corresponding code on PM3 was originally removed here: 485f573955 (diff-cf181dff0292664e4aa13c8a1731dc62131489fa404f4ac1357493d320264cceL2263)
2021-07-17 22:59:45 +01:00
Dylan K. Taylor
13f114f30e
bootstrap: report loaded php.ini in error, as well as php binary path
in some cases extension loading issues are caused by incorrect php.ini path, which should be easy to spot if the path is given.
2021-07-17 21:50:30 +01:00