more entity stuff
This commit is contained in:
parent
8ed10d1c80
commit
4f9d056886
2 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
||||||
class Entity {
|
class Entity {
|
||||||
constructor(x = 0, y = 0, z = 0, yaw = 0, pitch = 0) {
|
constructor(x = 0, y = 0, z = 0, yaw = 0, pitch = 0) {
|
||||||
|
this.EID = global.fromIDPool();
|
||||||
|
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
this.z = z;
|
this.z = z;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const EntityLiving = require("./EntityLiving.js");
|
const EntityLiving = require("./EntityLiving.js");
|
||||||
|
|
||||||
class EntityPlayer extends EntityLiving {
|
class EntityPlayer extends EntityLiving {
|
||||||
constructor(itemID = 0x00, x = 0, y = 0, z = 0) {
|
constructor(x = 0, y = 0, z = 0) {
|
||||||
super(x, y, z);
|
super(x, y, z);
|
||||||
|
|
||||||
this.motionX = (Math.random() * 0.2 - 0.1);
|
this.motionX = (Math.random() * 0.2 - 0.1);
|
||||||
|
|
Loading…
Reference in a new issue