diff --git a/src/inventory/transaction/CraftingTransaction.php b/src/inventory/transaction/CraftingTransaction.php index c7f71723f..5a36061f7 100644 --- a/src/inventory/transaction/CraftingTransaction.php +++ b/src/inventory/transaction/CraftingTransaction.php @@ -48,8 +48,8 @@ use function intdiv; * results, with no remainder. Any leftovers are expected to be emitted back to the crafting grid. */ class CraftingTransaction extends InventoryTransaction{ - protected ?CraftingRecipe $recipe; - protected ?int $repetitions; + protected ?CraftingRecipe $recipe = null; + protected ?int $repetitions = null; /** @var Item[] */ protected array $inputs = []; diff --git a/src/thread/CommonThreadPartsTrait.php b/src/thread/CommonThreadPartsTrait.php index 8085cf8d6..283d4ea39 100644 --- a/src/thread/CommonThreadPartsTrait.php +++ b/src/thread/CommonThreadPartsTrait.php @@ -30,7 +30,7 @@ use function error_reporting; trait CommonThreadPartsTrait{ /** @var \Threaded|\ClassLoader[]|null */ private ?\Threaded $classLoaders = null; - protected ?string $composerAutoloaderPath; + protected ?string $composerAutoloaderPath = null; protected bool $isKilled = false; diff --git a/src/world/utils/SubChunkExplorer.php b/src/world/utils/SubChunkExplorer.php index d4275e951..97ba3cff5 100644 --- a/src/world/utils/SubChunkExplorer.php +++ b/src/world/utils/SubChunkExplorer.php @@ -28,8 +28,8 @@ use pocketmine\world\format\Chunk; use pocketmine\world\format\SubChunk; class SubChunkExplorer{ - public ?Chunk $currentChunk; - public ?SubChunk $currentSubChunk; + public ?Chunk $currentChunk = null; + public ?SubChunk $currentSubChunk = null; protected int $currentX; protected int $currentY;