mc-beta-server/server/Entities/EntityItem.js

20 lines
475 B
JavaScript
Raw Normal View History

2021-08-24 15:29:46 +01:00
/*
============- EntityItem.js -===========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
2021-08-12 05:13:25 +01:00
const Entity = require("./Entity.js");
class EntityItem extends Entity {
2021-08-21 09:38:25 +01:00
constructor(itemStack, x = 0, y = 0, z = 0) {
2021-08-20 22:42:00 +01:00
super(global.fromIDPool(), x, y, z);
2021-08-12 05:13:25 +01:00
2021-08-21 09:38:25 +01:00
this.itemStack = itemStack;
2021-08-12 05:13:25 +01:00
this.motionX = (Math.random() * 0.2 - 0.1);
this.motionY = 0.2;
this.motionZ = (Math.random() * 0.2 - 0.1);
}
}