mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-24 22:51:18 -09:00
add fix for both creative and 1 hit blocks
This commit is contained in:
parent
b8811e8f1e
commit
6746649096
@ -61,19 +61,16 @@
|
|||||||
var statusTag = Object.keys(packet.$status).find(x => { return x.startsWith("$name") });
|
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 positionTag = Object.keys(packet).filter(x => { return x.startsWith("$position") })[0];
|
||||||
var stat = ModAPI.util.unstr(packet.$status[statusTag]);
|
var stat = ModAPI.util.unstr(packet.$status[statusTag]);
|
||||||
if ($this.$playerEntity.$capabilities.$isCreativeMode){
|
|
||||||
if (stat === "START_DESTROY_BLOCK") {
|
if (stat === "START_DESTROY_BLOCK") {
|
||||||
sendPacket($this, packetblockchange($this.$serverController.$worldServerForDimension($this.$playerEntity.$dimension), packet[positionTag]));
|
sendPacket($this, packetblockchange($this.$serverController.$worldServerForDimension($this.$playerEntity.$dimension), packet[positionTag]));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (stat !== "START_DESTROY_BLOCK") {
|
if (stat !== "START_DESTROY_BLOCK") {
|
||||||
if (stat === "STOP_DESTROY_BLOCK") {
|
if (stat === "STOP_DESTROY_BLOCK") {
|
||||||
sendPacket($this, packetblockchange($this.$serverController.$worldServerForDimension($this.$playerEntity.$dimension), packet[positionTag]));
|
sendPacket($this, packetblockchange($this.$serverController.$worldServerForDimension($this.$playerEntity.$dimension), packet[positionTag]));
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
var r = globalThis.LCI_LMBEVENTS[cid].call(globalThis,
|
var r = globalThis.LCI_LMBEVENTS[cid].call(globalThis,
|
||||||
new Proxy($this.$playerEntity, ModAPI.util.TeaVM_to_Recursive_BaseData_ProxyConf),
|
new Proxy($this.$playerEntity, ModAPI.util.TeaVM_to_Recursive_BaseData_ProxyConf),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user