Skip to content

Instantly share code, notes, and snippets.

@Corosauce Corosauce/itemerror.js Secret
Created Jan 3, 2019

Embed
What would you like to do?
var system = server.registerSystem(0,0);
var gameStaticVars = {};
gameStaticVars.posEntitySpawnStartX = 1063;
gameStaticVars.posEntitySpawnStartY = 64;
gameStaticVars.posEntitySpawnStartZ = -26;
var queryGetAllEntities = {};
var queryGetGameStartEntity = {};
// MINECRAFT METHOD HOOKS \\
system.initialize = function () {
this.listenForEvent("minecraft:entity_death", (eventData) => this.onEntityDeath(eventData));
queryGetAllEntities = this.registerQuery();
queryGetGameStartEntity = this.registerQuery("minecraft:position");
};
system.update = function () {
let entities = this.getEntitiesFromQuery(queryGetGameStartEntity,
gameStaticVars.posEntitySpawnStartX - 2, gameStaticVars.posEntitySpawnStartY - 2, gameStaticVars.posEntitySpawnStartZ - 2,
gameStaticVars.posEntitySpawnStartX + 2, gameStaticVars.posEntitySpawnStartY + 2, gameStaticVars.posEntitySpawnStartZ + 2);
};
system.onEntityDeath = function (eventData) {
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.