@boem312/minecraft-server
Version:
A pure JS library to create Minecraft Java 1.16.3 servers
22 lines (18 loc) • 654 B
JavaScript
const { sneaking } = require('../properties/public/dynamic/sneaking.js');
const { sprinting } = require('../properties/public/dynamic/sprinting.js');
module.exports = {
// entity_action({ entityId, actionId, jumpBoost }) {
entity_action({ actionId }) {
//sneaking
if (actionId === 0)
sneaking.set.call(this, true);
else if (actionId === 1)
sneaking.set.call(this, false);
//sprinting
else if (actionId === 3)
sprinting.set.call(this, true);
else if (actionId === 4)
sprinting.set.call(this, false);
//todo: implement other actions
}
}