Compare commits

..

6 Commits
4.4.1 ... 4.4.2

Author SHA1 Message Date
bcb0e2ff1f Release 4.4.2 2022-06-07 15:54:55 +01:00
1584768c80 PaintingMotive: fixed botched painting fix from 0ea3861d43
I knew I should have used a singleton for this ...
2022-06-07 15:48:20 +01:00
5fd685e07d TypeConverter: fix crash on arbitrary out-of-bounds item IDs
I don't know why I didn't consider this fix necessary when the item meta bug was originally discovered.
2022-06-06 19:29:44 +01:00
6ecfbd1bde FishingRod: make class less useless 2022-06-05 20:20:16 +01:00
b661097c51 changelog: fix mistake
[ci skip]
2022-06-05 17:59:36 +01:00
0771295899 4.4.2 is next 2022-06-05 16:15:38 +01:00
5 changed files with 29 additions and 3 deletions

View File

@ -84,6 +84,14 @@ Released 5th June 2022.
## Fixes
- Fixed graylisted plugins preventing the server from starting.
- Fixed `composer make-server` command.
- Fixed `composer make-devtools` command.
- Fixed the `Maximum memory (manager)` units being incorrectly displayed in `/status`.
- Fixed `Player->removeCurrentWindow()` breaking inventory windows.
# 4.4.2
Released 7th June 2022.
## Fixes
- Fixed a crash when arbitrary item IDs appeared in network items in some cases.
- Fixed saved paintings being deleted when loaded from disk (regression from 4.3.4).
- Fixed max stack size of fishing rods.

View File

@ -31,7 +31,7 @@ use function str_repeat;
final class VersionInfo{
public const NAME = "PocketMine-MP";
public const BASE_VERSION = "4.4.1";
public const BASE_VERSION = "4.4.2";
public const IS_DEVELOPMENT_BUILD = false;
public const BUILD_CHANNEL = "stable";

View File

@ -30,6 +30,7 @@ class PaintingMotive{
protected static $motives = [];
public static function init() : void{
self::$initialized = true;
foreach([
new PaintingMotive(1, 1, "Alban"),
new PaintingMotive(1, 1, "Aztec"),
@ -67,10 +68,16 @@ class PaintingMotive{
}
public static function registerMotive(PaintingMotive $motive) : void{
if(!self::$initialized){
self::init();
}
self::$motives[$motive->getName()] = $motive;
}
public static function getMotiveByName(string $name) : ?PaintingMotive{
if(!self::$initialized){
self::init();
}
return self::$motives[$name] ?? null;
}

View File

@ -23,7 +23,15 @@ declare(strict_types=1);
namespace pocketmine\item;
class FishingRod extends Item{
class FishingRod extends Durable{
public function getMaxStackSize() : int{
return 1;
}
public function getMaxDurability() : int{
return 384;
}
//TODO
}

View File

@ -234,6 +234,9 @@ class TypeConverter{
$compound = null;
}
}
if($id < -0x8000 || $id >= 0x7fff){
throw new TypeConversionException("Item ID must be in range " . -0x8000 . " ... " . 0x7fff . " (received $id)");
}
if($meta < 0 || $meta >= 0x7fff){ //this meta value may have been restored from the NBT
throw new TypeConversionException("Item meta must be in range 0 ... " . 0x7fff . " (received $meta)");
}