{"repo":"PrismarineJS/prismarine-physics","free":true,"listed":false,"github":"https://github.com/PrismarineJS/prismarine-physics","clone":"git clone https://github.com/PrismarineJS/prismarine-physics.git","description":"Provide the physics engine for minecraft entities","language":"JavaScript","stars":40,"topics":["prismarinejs","minecraft","physics-engine"],"license":"MIT","category":"game-templates","readme_excerpt":"prismarine-physics Provide the physics engine for minecraft entities Usage See examples/ for more. API Physics simulatePlayer(playerState, world) - playerState : instance of the PlayerState class - world : interface with a function getBlock(position) returning the prismarine-block at the given position PlayerState A player state is an object containing the properties: Read / Write properties: - pos : position (vec3) of the player entity - vel : velocity (vec3) of the player entity - onGround : (boolean) is the player touching ground ? - isInWater : (boolean) is the player in water ? - isInLava : (boolean) is the player in lava ? - isInWeb : (boolean) is the player in a web ? - isCollidedHorizontally : (boolean) is the player collided horizontally with a solid block ? - isCollidedVertically : (boolean) is the player collided vertically with a solid block ? - elytraFlying : (boolean) is the player elytra flying ? - jumpTicks : (integer) number of ticks before the player can auto-jump again - jumpQueued : (boolean) true if the jump control state was true between the last tick and the current one - fireworkRocketDuration : (number) how many ticks of firework boost are remaining ? Read only properties: - yaw : (float) the yaw angle, in radians, of the player entity - pitch: (float) the pitch angle, in radians, of the player entity - control : (object) control states vector with properties: - forward - back - left - right - jump - sprint - sneak","default_branch":null,"files":null,"tree":[],"storefront":"/r/PrismarineJS","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/PrismarineJS/prismarine-physics/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}