{"name":"prismarine-entity","version":"2.4.0","description":"Represent a minecraft entity","main":"index.js","types":"index.d.ts","scripts":{"test":"npm run lint","lint":"standard"},"repository":{"type":"git","url":"git+https://github.com/PrismarineJS/prismarine-entity.git"},"dependencies":{"prismarine-chat":"^1.4.1","prismarine-item":"^1.11.2","prismarine-registry":"^1.4.0","vec3":"^0.1.4"},"keywords":["minecraft","entity","prismarine"],"author":{"name":"Romain Beaumont","email":"romain.rom1@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/PrismarineJS/prismarine-entity/issues"},"devDependencies":{"@types/node":"^20.2.1","prismarine-entity":"file:.","standard":"^17.0.0"},"gitHead":"ffc476041490c4220c879b34ca543bacb5c068c2","homepage":"https://github.com/PrismarineJS/prismarine-entity#readme","_id":"prismarine-entity@2.4.0","_nodeVersion":"18.0.0","_npmVersion":"8.6.0","dist":{"integrity":"sha512-DBwjmoCX1IYAhN99KwYkk2rMArn65JHTzuuGXchr4GLWQs7UN4Pf9tELqBwNOu4r57x3RaW0+9+0sI3FvJQWzQ==","shasum":"37bf8e15650c5672fadc092acda393f86d7ddda0","tarball":"http://registry-npm.ywwl.com/prismarine-entity/download/prismarine-entity-2.4.0.tgz","fileCount":9,"unpackedSize":11737,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDVggEy3640sw9Ox3fhJOWKI7XH+cjdUDEiYWO83g6efAiEArTXF4A2+o6pQZ0FRbI+YYa7/maqOS4RjGbKnCbBNhlU="}],"size":4446,"noattachment":false,"key":"/prismarine-entity/-/prismarine-entity-2.4.0.tgz"},"_npmUser":{"name":"rom1504","email":"romain.rom1@gmail.com"},"directories":{},"maintainers":[{"name":"rom1504","email":"romain.rom1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prismarine-entity_2.4.0_1704024285726_0.853811516214547"},"_hasShrinkwrap":false,"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.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":1704024285920,"_cnpm_publish_time":1704024285920,"dist-tags":{"latest":"2.6.0"}}