{"name":"prismarine-entity","version":"2.5.0","keywords":["minecraft","entity","prismarine"],"author":{"name":"Romain Beaumont","email":"romain.rom1@gmail.com"},"license":"MIT","_id":"prismarine-entity@2.5.0","maintainers":[{"name":"rom1504","email":"romain.rom1@gmail.com"}],"homepage":"https://github.com/PrismarineJS/prismarine-entity#readme","bugs":{"url":"https://github.com/PrismarineJS/prismarine-entity/issues"},"dist":{"shasum":"59a6415fc2b7465747c43174ca28cd4f9920a92e","tarball":"http://registry-npm.ywwl.com/prismarine-entity/download/prismarine-entity-2.5.0.tgz","fileCount":9,"integrity":"sha512-nRPCawUwf9r3iKqi4I7mZRlir1Ix+DffWYdWq6p/KNnmiXve+xHE5zv8XCdhZlUmOshugHv5ONl9o6ORAkCNIA==","signatures":[{"sig":"MEQCIHoXdlDATXkwWgFDALtX3EP1/DIwF/syymkw1kx1AGEkAiAlaV65CF+pfWscHz4D6lsOPu2jKoPDeOD6Oj5z5W5WMA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12201,"size":4593,"noattachment":false,"key":"/prismarine-entity/-/prismarine-entity-2.5.0.tgz"},"main":"index.js","types":"index.d.ts","gitHead":"01d360a065cb924fe6d140437326c55173ba12a2","scripts":{"lint":"standard","test":"npm run lint"},"_npmUser":{"name":"rom1504","email":"romain.rom1@gmail.com"},"repository":{"url":"git+https://github.com/PrismarineJS/prismarine-entity.git","type":"git"},"_npmVersion":"8.6.0","description":"Represent a minecraft entity","directories":{},"_nodeVersion":"18.0.0","dependencies":{"vec3":"^0.1.4","prismarine-chat":"^1.4.1","prismarine-item":"^1.11.2","prismarine-registry":"^1.4.0"},"_hasShrinkwrap":false,"devDependencies":{"standard":"^17.0.0","@types/node":"^22.2.0","prismarine-entity":"file:."},"_npmOperationalInternal":{"tmp":"tmp/prismarine-entity_2.5.0_1737310551572_0.9894394891656142","host":"s3://npm-registry-packages-npm-production"},"readme":"# prismarine-entity\n[![NPM version](https://img.shields.io/npm/v/prismarine-entity.svg)](http://npmjs.com/package/prismarine-entity)\n[![Build Status](https://github.com/PrismarineJS/prismarine-entity/workflows/CI/badge.svg)](https://github.com/PrismarineJS/prismarine-entity/actions?query=workflow%3A%22CI%22)\n\nRepresent a minecraft entity\n\n## Usage\n\n```js\nconst Entity = require(\"prismarine-entity\")('1.8.9')\n\nconst entity = new Entity(0)\nconsole.log(entity)\n```\n\n## API\n\n### Entity\n\nEntities represent players, mobs, and objects.\n\n#### entity.id\n\n#### entity.type\n\nChoices:\n\n * `player`\n * `mob`\n * `object`\n * `global` - lightning\n * `orb` - experience orb.\n * `other` - introduced with a recent Minecraft update and not yet recognized or used by a third-party mod\n\n#### entity.username\n\nIf the entity type is `player`, this field will be set.\n\n#### entity.mobType\n\nIf the entity type is `mob`, this field will be set.\n\n#### entity.displayName\n\nField set for mob and object. A long name in multiple words.\n\n#### entity.entityType\n\nField set for mob and object. The numerical type of the entity (1,2,...)\n\n#### entity.kind\n\nField set for mob and object. The kind of entity (for example Hostile mobs, Passive mobs, NPCs).\n\n#### entity.name\n\nField set for mob and object. A short name for the entity.\n\n#### entity.objectType\n\nIf the entity type is `object`, this field will be set.\n\n#### entity.count\n\nIf the entity type is `orb`, this field will be how much experience you\nget from collecting the orb.\n\n#### entity.position\n\n#### entity.velocity\n\n#### entity.yaw\n\n#### entity.pitch\n\n#### entity.height\n\n#### entity.width\n\n#### entity.onGround\n\n#### entity.equipment[5]\n\nVersion dependent. \n\n1.8 Layout:\n\n * `0` - held item\n * `1` - shoes\n * `2` - legging\n * `3` - torso\n * `4` - head\n\n1.9 and later:\n\n * `0` - held item\n * `1` - off-hand\n * `2` - shoes\n * `3` - legging\n * `4` - torso\n * `5` - head \n\n#### entity.heldItem\n\nEquivalent to `entity.equipment[0]`.\n\n#### entity.metadata\n\nSee http://wiki.vg/Entities#Entity_Metadata_Format for more details.\n\n#### entity.noClip\n\n#### entity.vehicle\n\nEntity that this entity is riding on\n\n#### entity.passenger\n\nEntity that is riding on this entity\n\n#### entity.health\n\nThe health of the player, default: 20\n\n#### entity.food\n\nThe food of the player, default: 20\n\n#### entity.elytraFlying\n\nWhether or not the entity is elytra flying.\n\n#### entity.player\n\nThe player\n\n#### entity.getCustomName()\n\nreturns a `prismarine-chat` ChatMessage object for the name of the entity or null if there isn't one\n\n#### entity.getDroppedItem()\n\nreturns a `prismarine-item` Item object for the dropped item, if this is a dropped item, or it will return null\n\n## History\n\n### 2.6.0\n* [Update CI to Node 24 (#136)](https://github.com/PrismarineJS/prismarine-entity/commit/09b796f821e990c6409dc710235e1bd678c1cd62) (thanks @rom1504)\n* [Fix publish condition for npm-publish v4 (#135)](https://github.com/PrismarineJS/prismarine-entity/commit/4ae0714edf4265e5ae39af6f3a0b634c311f25ba) (thanks @rom1504)\n* [Switch to trusted publishing via OIDC (#134)](https://github.com/PrismarineJS/prismarine-entity/commit/e9bfe269b486e3be90e5fb13d8dcd2ee20a73760) (thanks @rom1504)\n* [node 22 (#82)](https://github.com/PrismarineJS/prismarine-entity/commit/2869cd63a21e7cc08d4b0ba12d9c2914db95ee8a) (thanks @rom1504)\n\n### 2.5.0\n* [add Entity.passengers and Entity.vehicle (#75)](https://github.com/PrismarineJS/prismarine-entity/commit/e45c544e7df6ae69239d1d23473c82805d5134b9) (thanks @qwqtoday)\n* [Bump @types/node from 20.14.15 to 22.2.0 (#80)](https://github.com/PrismarineJS/prismarine-entity/commit/47b7167630665b1d95b5a88c0e985355a640a012) (thanks @dependabot[bot])\n\n### 2.4.0\n* [use getter for  `.heldItem` (#73)](https://github.com/PrismarineJS/prismarine-entity/commit/4694438ab733ea3e2d5414d3330ae295ff85b660) (thanks @szdytom)\n\n### 2.3.1\n* [Use console.trace instead of console.log for deprecation message (#71)](https://github.com/PrismarineJS/prismarine-entity/commit/7262fcf02d6656c663f876d513d84cc7266a3903) (thanks @extremeheat)\n\n### 2.3.0\n* [Add default elytra flying value (#69)](https://github.com/PrismarineJS/prismarine-entity/commit/f124abd47b42a908a676b91b0fcb55b1fd1a77b9) (thanks @lkwilson)\n* [Fix equipment documentation for other versions (#67)](https://github.com/PrismarineJS/prismarine-entity/commit/b2f756de52fa7ceb2675fe9c2f950fa7398bc425) (thanks @IceTank)\n* [Add command gh workflow allowing to use release command in comments (#66)](https://github.com/PrismarineJS/prismarine-entity/commit/4dffa63e3dd45b8f3a42575a2f6f3c2fa47d1d50) (thanks @rom1504)\n* [Update to node 18.0.0 (#65)](https://github.com/PrismarineJS/prismarine-entity/commit/7fe14b95f82089b27e20f12a14f709bc8bd5c206) (thanks @rom1504)\n* [Bump @types/node from 18.16.13 to 20.2.1 (#64)](https://github.com/PrismarineJS/prismarine-entity/commit/887737f531d89b25e045c4f0db4ec66497eba9f8) (thanks @dependabot[bot])\n* [Add missing type (#55)](https://github.com/PrismarineJS/prismarine-entity/commit/87a94dbaf698497f56968efbb396c3692431ae6f) (thanks @sefirosweb)\n* [deprecate objectType and mobType (#53)](https://github.com/PrismarineJS/prismarine-entity/commit/e3aadc7e51dccc645d81825aa0bd40b3be88cb05) (thanks @Epirito)\n* [Update package.json (#52)](https://github.com/PrismarineJS/prismarine-entity/commit/1156c9b9ae76b3e82ea57348c0f4e0cbdcb6216a) (thanks @Epirito)\n\n### 2.2.0\n\n* mcData to registry refactoring (step towards #2450)\n\n### 2.1.1\n\n* Update mcdata\n\n### 2.1.0\n\n* Adds Entity#getDroppedItem\n\n### 2.0.0\n\n* require mcversion in constructor\n* add Entity#getCustomName()\n* Add attributes for entity entity collision calculation (thanks @O-of)\n\n### 1.2.0\n\n* Add food saturation to typings\n* Add id to typings\n* Add effects to typings\n\n### 1.1.0\n\n* Added entity width property\n\n### 1.0.0\n\n* typescript definitions (thanks @IdanHo)\n\n### 0.2.0\n\n* extend EventEmitter\n\n### 0.1.0\n\n* Import from mineflayer\n","publish_time":1737310551733,"_cnpm_publish_time":1737310551733,"dist-tags":{"latest":"2.6.0"}}