#Actually prevent block placement
16 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
Paste version of zt8nps3.js from @vital glen
BlockEvents.placed(e => {
const { block, player } = e
if (!block.id.startsWith("ae2:")) {
player.tell("not ae 2")
return
}
if (block.id.includes('cable')) {
player.tell('Use a different kind of cable')
e.cancel()
}
})```
Put the same code in a client script to stop the block appearing briefly and the item being consumed (not really, once you pick up the item or something. Like that the count should update)
I tried copying over the same file to the client, but still the same effect occurs
Is there a different event?
Also the item actually does disappear, an update doesnt restore consumed item
Which was thw weirdest for me
Also is there a neat way/reason to condense the two conditions into one?
okay all this event does while both on client and server is not consume item only when stacksize is greater than 1
That's weird