Hello, will someone help me with script to detect the number of bookshelfs around the enchant table?
my line currently detecting bookshelf but not detecting quantity, e.g. 15:
if blocks around target block in radius 3 contains 15 of bookshelf:
all code:
my line currently detecting bookshelf but not detecting quantity, e.g. 15:
if blocks around target block in radius 3 contains 15 of bookshelf:
all code:
Code:
on inventory click:
clicked inventory is not player's inventory
if name of player's current inventory is "&6&lSmyf &7|| &5&lEnchanting":
cancel event
if clicked slot is barrier:
wait 1 tick
close inventory of player
if clicked slot is 1:
if blocks around target block in radius 3 contains 15 of bookshelf:
if player's level is higher or equal to 3:
if player has 1 of lapis lazuli:
if player's tool is any pickaxe:
wait 1 tick
close inventory of player
remove 1 of lapis lazuli from player
remove 3 from player's level
play sound "block_enchantment_table_use" at player for player
enchant player's tool with efficiency 1
stop
else:
send "&cW twojej rece musi znajdowac sie kilof!" to player
else:
send "&cNie masz wystarczajacej ilosci lapisu!" to player
else:
send "&cNie masz za niski poziom doswiadczenia!" to player
else:
send "&cW poblizu znajduje sie za malo biblioteczek!" to player