I've been trying to loop blocks around the enchantment table.
The problem is that the loop-region is too big and the bookshelves that will be in the floor also count.
No matter how much I searched, I can't find a guide on how to correctly specify the region/zone for loop blocks.
i need loop blocks scan only 3x2x3 zone/region (enchanted table in the center of the region)
The problem is that the loop-region is too big and the bookshelves that will be in the floor also count.
No matter how much I searched, I can't find a guide on how to correctly specify the region/zone for loop blocks.
i need loop blocks scan only 3x2x3 zone/region (enchanted table in the center of the region)
Code:
on rightclick on a enchanting table:
if player isn't sneaking:
cancel event
set {_bs} to 0
loop all blocks in radius 2.5 around the event-block:
if loop-block is book shelf:
add 1 to {_bs}
if {_bs} >= 22:
send "all ok" to player