#Detect if a conduit block is active

12 messages · Page 1 of 1 (latest)

thorn bolt
#

Hi, I am making a script so that if the player right clicks an active conduit with a Heart of the Sea while in a Deep Ocean, it spawns an Elder Guardian.

Is there a way to detect if a conduit is active?

viscid turtleBOT
#

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

thorn bolt
#

For reference, here is a draft of what I have as a server script:

#
BlockEvents.rightClicked('minecraft:conduit', e => {
    const item = e.player.mainHandItem;
    if (e.player.block.biomeId != 'minecraft:deep_ocean') return
    if(item.id != 'minecraft:heart_of_the_sea') return

    item.count--;
    e.server.runCommand(`summon elder_guardian ~30 ~ ~30 {PersistenceRequired:1}`)
})
unique marlin
#

Does it have an active block state?

#

You could check for that

thorn bolt
unique marlin
#

Unsure then, unless it has nbt you might have to check for the entire structure

elder tide
#

detect conduit power effect would be easier

#

condiut gives effect for player in water or rain, in 5x5x5 range

#

and itself needs to be surrounded with water

#

5 > player's reach