mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Start migrating EnumTrait enums to PHP 8.1 native enums
This commit is contained in:
@ -1069,7 +1069,7 @@ class NetworkSession{
|
||||
$this->logger->debug("Tried to send no-longer-active chunk $chunkX $chunkZ in world " . $world->getFolderName());
|
||||
return;
|
||||
}
|
||||
if(!$status->equals(UsedChunkStatus::REQUESTED_SENDING())){
|
||||
if($status !== UsedChunkStatus::REQUESTED_SENDING){
|
||||
//TODO: make this an error
|
||||
//this could be triggered due to the shitty way that chunk resends are handled
|
||||
//right now - not because of the spammy re-requesting, but because the chunk status reverts
|
||||
|
11
src/network/mcpe/cache/CraftingDataCache.php
vendored
11
src/network/mcpe/cache/CraftingDataCache.php
vendored
@ -81,12 +81,11 @@ final class CraftingDataCache{
|
||||
|
||||
foreach($manager->getCraftingRecipeIndex() as $index => $recipe){
|
||||
if($recipe instanceof ShapelessRecipe){
|
||||
$typeTag = match($recipe->getType()->id()){
|
||||
ShapelessRecipeType::CRAFTING()->id() => CraftingRecipeBlockName::CRAFTING_TABLE,
|
||||
ShapelessRecipeType::STONECUTTER()->id() => CraftingRecipeBlockName::STONECUTTER,
|
||||
ShapelessRecipeType::CARTOGRAPHY()->id() => CraftingRecipeBlockName::CARTOGRAPHY_TABLE,
|
||||
ShapelessRecipeType::SMITHING()->id() => CraftingRecipeBlockName::SMITHING_TABLE,
|
||||
default => throw new AssumptionFailedError("Unreachable"),
|
||||
$typeTag = match($recipe->getType()){
|
||||
ShapelessRecipeType::CRAFTING => CraftingRecipeBlockName::CRAFTING_TABLE,
|
||||
ShapelessRecipeType::STONECUTTER => CraftingRecipeBlockName::STONECUTTER,
|
||||
ShapelessRecipeType::CARTOGRAPHY => CraftingRecipeBlockName::CARTOGRAPHY_TABLE,
|
||||
ShapelessRecipeType::SMITHING => CraftingRecipeBlockName::SMITHING_TABLE,
|
||||
};
|
||||
$recipesWithTypeIds[] = new ProtocolShapelessRecipe(
|
||||
CraftingDataPacket::ENTRY_SHAPELESS,
|
||||
|
Reference in New Issue
Block a user