-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Also, it seems that the experimental flag has changed
experimental_creator_camera
[02:22:45.755] [Server thread/CRITICAL]: TypeError: "pocketmine\network\mcpe\protocol\types\camera\CameraPreset::__construct(): Argument #18 ($yawLimitMax) must be of type ?float, false given, called in P:\ikou\pm5_server\Plugins\ModuleLoader\src\muqsit\libcamera\libcamera.php on line 35" (EXCEPTION) in "pmsrc/vendor/pocketmine/bedrock-protocol/src/types/camera/CameraPreset" at line 26
--- Stack trace ---
#0 P:/ikou/pm5_server/Plugins/ModuleLoader/src/muqsit/libcamera/libcamera(35): pocketmine\network\mcpe\protocol\types\camera\CameraPreset->__construct(string[14] minecraft:free, string[0] , null, null, null, null, null, null, null, null, null, null, null, null, null, null, float 0, false, false, null)
#1 P:/ikou/pm5_server/Plugins/ModuleLoader/src/sod/ModuleLoader/Main(21): muqsit\libcamera\libcamera::register(object sod\ModuleLoader\Main#62431)
#2 pmsrc/src/plugin/PluginBase(119): sod\ModuleLoader\Main->onEnable()
#3 pmsrc/src/plugin/PluginManager(461): pocketmine\plugin\PluginBase->onEnableStateChange(true)
#4 pmsrc/src/Server(1446): pocketmine\plugin\PluginManager->enablePlugin(object sod\ModuleLoader\Main#62431)
#5 pmsrc/src/Server(1073): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#62040)
#6 pmsrc/src/PocketMine(360): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#2, string[19] P:\ikou\pm5_server\, string[27] P:\ikou\pm5_server\Plugins\)
#7 pmsrc/src/PocketMine(383): pocketmine\server()
#8 pmsrc(170): require(string[102] phar://C:/Users/Owner/AppData/Local/Temp/PocketMine-MP-phar-cache.0/PMM9368.tmp.)
--- End of exception information ---
[02:22:45.755] [Server thread/EMERGENCY]: An unrecoverable error has occurred and the server has crashed. Creating a crash dump
[02:22:45.763] [Server thread/EMERGENCY]: Please upload the "P:/ikou/pm5_server/crashdumps/2025-07-15_02.22.45_UTC.log" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.
To make it more resilient to future changes, you can use named arguments like this:
However, this doesn't work:
$preset_registry = new CameraPresetRegistry([
"free" => new CameraPreset(
name: "minecraft:free",
parent: "",
xPosition: null,
yPosition: null,
zPosition: null,
pitch: null,
yaw: null,
rotationSpeed: null,
snapToTarget: null,
horizontalRotationLimit: null,
verticalRotationLimit: null,
continueTargeting: null,
blockListeningRadius: null,
viewOffset: null,
entityOffset: null,
radius: null,
yawLimitMin: null,
yawLimitMax: null,
audioListenerType: CameraPreset::AUDIO_LISTENER_TYPE_CAMERA,
playerEffects: false,
aimAssist: null,
controlScheme: null
),
"first_person" => new CameraPreset(
name: "minecraft:first_person",
parent: "",
xPosition: null,
yPosition: null,
zPosition: null,
pitch: null,
yaw: null,
rotationSpeed: null,
snapToTarget: null,
horizontalRotationLimit: null,
verticalRotationLimit: null,
continueTargeting: null,
blockListeningRadius: null,
viewOffset: null,
entityOffset: null,
radius: null,
yawLimitMin: null,
yawLimitMax: null,
audioListenerType: CameraPreset::AUDIO_LISTENER_TYPE_PLAYER,
playerEffects: false,
aimAssist: null,
controlScheme: null
),
"third_person" => new CameraPreset(
name: "minecraft:third_person",
parent: "",
xPosition: null,
yPosition: null,
zPosition: null,
pitch: null,
yaw: null,
rotationSpeed: null,
snapToTarget: null,
horizontalRotationLimit: null,
verticalRotationLimit: null,
continueTargeting: null,
blockListeningRadius: null,
viewOffset: null,
entityOffset: null,
radius: null,
yawLimitMin: null,
yawLimitMax: null,
audioListenerType: CameraPreset::AUDIO_LISTENER_TYPE_PLAYER,
playerEffects: false,
aimAssist: null,
controlScheme: null
),
"third_person_front" => new CameraPreset(
name: "minecraft:third_person_front",
parent: "",
xPosition: null,
yPosition: null,
zPosition: null,
pitch: null,
yaw: null,
rotationSpeed: null,
snapToTarget: null,
horizontalRotationLimit: null,
verticalRotationLimit: null,
continueTargeting: null,
blockListeningRadius: null,
viewOffset: null,
entityOffset: null,
radius: null,
yawLimitMin: null,
yawLimitMax: null,
audioListenerType: CameraPreset::AUDIO_LISTENER_TYPE_PLAYER,
playerEffects: false,
aimAssist: null,
controlScheme: null
),
"target" => new CameraPreset(
name: "minecraft:target",
parent: "minecraft:free",
xPosition: null,
yPosition: null,
zPosition: null,
pitch: null,
yaw: null,
rotationSpeed: 0.0,
snapToTarget: true,
horizontalRotationLimit: new Vector2(0.0, 360.0),
verticalRotationLimit: new Vector2(0.0, 180.0),
continueTargeting: true,
blockListeningRadius: 50.0,
viewOffset: null,
entityOffset: null,
radius: null,
yawLimitMin: null,
yawLimitMax: null,
audioListenerType: CameraPreset::AUDIO_LISTENER_TYPE_CAMERA,
playerEffects: false,
aimAssist: null,
controlScheme: null
)
]);Metadata
Metadata
Assignees
Labels
No labels