{"name":"prismarine-entity","version":"2.2.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":{"minecraft-data":"^3.0.0","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":"^18.6.4","prismarine-entity":"file:.","standard":"^17.0.0"},"gitHead":"099d9bcd4fd075d263dc31dd96fe5d73446f0d15","homepage":"https://github.com/PrismarineJS/prismarine-entity#readme","_id":"prismarine-entity@2.2.0","_nodeVersion":"14.0.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-boqJbMpGHG2ddFUUo9aKkKPUHQbFMWkUCw8SRdZ+jrZxABsstL9619I8ujwPYoOMJjMyfYWgdEPNyHGiUqqukA==","shasum":"87dd40954964e1ca9c000950963cb7dfbb49759b","tarball":"http://registry-npm.ywwl.com/prismarine-entity/download/prismarine-entity-2.2.0.tgz","fileCount":8,"unpackedSize":8355,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFsuz1QLw1lUElE1zPM/l+wm1A6pVNOGSKWbG+BYjKMMAiEAjgVEWKOxS1NKqxFiMc4RpyRs+YSxfnPaNOxNF8FQIBw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRYCdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqPoxAAoOT9DC6b6wv+8UASmcxSvgKCJf4f8/jCDXZqNCj2usASqoyH\r\nuZKWREVfTwhuz1jFPHSKSv5NTwHl9QxXkBvGLQsqbsF55pGvK7QXN+EGv25/\r\ncVZDJG33YJYZ8cSZKuMyteeVrdP8IfkqAtX3sOfkn0pxfjogRNstz5SLrRLV\r\nzZeYnWMrI5twLqmREdYxfAcSC/NtDOhL8M+vkkUNC4WXWJkuG/qAHhU7hhuL\r\nrZtu0lMMhi2KFAyCjDPl6VrhiN3gcyrHMfGyGOM4FDuTDZ5IeMUGAGYB1VFe\r\nBOkjRNjke7NXNAQw+Cfeu4b2fKm5T/wtFntkd178fUJU0W7wfcXxqX1K1FYu\r\njRjvxAqBQgnmOt6ygasmvYAAVU00FgjOOK2UGKwl6lAzRbIB+hD2J3+4b/NR\r\ngip9nsgya3M5KQBmoNJLKuuYd5OyLdCvAAaxHgOq29fQOwlCNVqfuEmmObp4\r\nI07i1BfYy04ZGss452oiP6THZUAyDmaDFEYHj9L0HjwQav2fE/TiPpm/+YBO\r\nnTvRbD/A/IN0nfiwjLfzfuWHyFOHDxf5Ip4vcTfGMFNSdOV4u75owe2boQzf\r\nnrO9Iups2wgSXbUTS+pqOn5ReRyJJE9DLLMOsELjFpWCrNiXS3rspWNTz5xL\r\n799wKl5o87uLoJzmy9MYSFNgHlSUAVtmeZc=\r\n=5O/N\r\n-----END PGP SIGNATURE-----\r\n","size":3254,"noattachment":false,"key":"/prismarine-entity/-/prismarine-entity-2.2.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.2.0_1665499293526_0.7614767594156344"},"_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":1665499293763,"_cnpm_publish_time":1665499293763,"dist-tags":{"latest":"2.6.0"}}