Skip to content

Doesn't work #1

Open
Open

Description

@DaisukeDaisuke

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
			)
		]);

Activity

  1. inxomnyaa commented on Jul 15, 2025

    @inxomnyaa
    Contributor

    Currently this virion is for Bedrock 1.21.50 - since i can't update my server currently without major changes, which i don't have the nerve for at the moment.
    As soon as i have some willpower and spare time i'll review these changes and test them.

    If anyone has an idea how to flag a specific Bedrock protocol version in the composer or virion/poggit files let me know, i haven't really used virion v3 yet

  2. DaisukeDaisuke commented on Jul 16, 2025

    @DaisukeDaisuke
    Author

    Create a tag/release of your choice in composer and point it to the previous tag
    For example, create a release tag called 1.0.0-bedrock1.21.50 and click update here
    please do this before merging the pull request

    https://packagist.org/packages/wolvesfortress/libcamera

    Then specify this in your composer.json:

    "wolvesfortress/libcamera": "1.0.0-bedrock1.21.50",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions