Skip to content

Commit

Permalink
add fix for both creative and 1 hit blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
radmanplays authored Sep 12, 2024
1 parent b8811e8 commit 6746649
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions examplemods/lib.customitems.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,16 @@
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 ($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;
}
}

var r = globalThis.LCI_LMBEVENTS[cid].call(globalThis,
new Proxy($this.$playerEntity, ModAPI.util.TeaVM_to_Recursive_BaseData_ProxyConf),
Expand Down

0 comments on commit 6746649

Please sign in to comment.