more entity stuff

This commit is contained in:
Holly Stubbs 2021-08-18 01:26:04 +01:00
parent 8ed10d1c80
commit 4f9d056886
2 changed files with 3 additions and 1 deletions

View file

@ -1,5 +1,7 @@
class Entity {
constructor(x = 0, y = 0, z = 0, yaw = 0, pitch = 0) {
this.EID = global.fromIDPool();
this.x = x;
this.y = y;
this.z = z;

View file

@ -1,7 +1,7 @@
const EntityLiving = require("./EntityLiving.js");
class EntityPlayer extends EntityLiving {
constructor(itemID = 0x00, x = 0, y = 0, z = 0) {
constructor(x = 0, y = 0, z = 0) {
super(x, y, z);
this.motionX = (Math.random() * 0.2 - 0.1);