#Actually prevent block placement

16 messages · Page 1 of 1 (latest)

vital glen
#

This sctipt works almost fine, but item is still consumed in survival and you can briefly see a block thats placed
actual file has player.tell() wrapped around "not ae2" but for some reason it doesnt show here??

vague idolBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

chrome sonnetBOT
#

Paste version of zt8nps3.js from @vital glen

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()
    }
})```
hot hatch
#

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)

vital glen
#

I tried copying over the same file to the client, but still the same effect occurs

#

Is there a different event?

vital glen
#

Which was thw weirdest for me

#

Also is there a neat way/reason to condense the two conditions into one?

vital glen
hot hatch
#

That's weird

vital glen
#

maybe that's because ae cables have non standard placement logic?

#

also this entire idea is to be scrapped as block id for all the cables and busses is ae2:cable_or_bus

#

so by doing that I would disable all terminals and busses as well

#

welp