mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-23 14:11:16 -09:00
add fix for creative
This commit is contained in:
parent
a1ee9be716
commit
b8811e8f1e
@ -61,11 +61,18 @@
|
||||
var statusTag = Object.keys(packet.$status).find(x => { return x.startsWith("$name") });
|
||||
var positionTag = Object.keys(packet).filter(x => { return x.startsWith("$position") })[0];
|
||||
var stat = ModAPI.util.unstr(packet.$status[statusTag]);
|
||||
if (stat !== "START_DESTROY_BLOCK") {
|
||||
if (stat === "STOP_DESTROY_BLOCK") {
|
||||
if ($this.$playerEntity.$capabilities.$isCreativeMode){
|
||||
if (stat === "START_DESTROY_BLOCK") {
|
||||
sendPacket($this, packetblockchange($this.$serverController.$worldServerForDimension($this.$playerEntity.$dimension), packet[positionTag]));
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
if (stat !== "START_DESTROY_BLOCK") {
|
||||
if (stat === "STOP_DESTROY_BLOCK") {
|
||||
sendPacket($this, packetblockchange($this.$serverController.$worldServerForDimension($this.$playerEntity.$dimension), packet[positionTag]));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
var r = globalThis.LCI_LMBEVENTS[cid].call(globalThis,
|
||||
@ -140,4 +147,4 @@
|
||||
LCI_registerItem(data);
|
||||
}
|
||||
ModAPI.events.callEvent("lib:libcustomitems:loaded", {});
|
||||
})();
|
||||
})();
|
||||
|
Loading…
x
Reference in New Issue
Block a user