on block break:
player is sneaking
player is op
if any:
event-block is any ore
event-block is any log
then:
set {_name::*} to split "%type of player's tool%" at " "
broadcast "%{_name::2}%"
if event-block is any ore:
set {_requiredTool} to "pickaxe"
if event-block is any log:
set {_requiredTool} to "axe"
if {_name::2} is {_requiredTool}:
add event-block to {Vein::%player%::*}
if event-block is any ore:
set {fortune::%player%} to level of fortune of player' tool or 0
else:
set {fortune::%player%} to 0
VeinMine(player, event-block)
else:
send "&cYou must use a %{_requiredTool}% to vein mine this" to player
cancel event
function VeinMine(plr: player, blk: block):
loop blocks in radius 1.5 around {_blk}:
if {Vein::%{_plr}%::*} does not contain loop-block:
if loop-block's type is {_blk}'s type:
#set block at loop-block's position to stone
add loop-block to {Vein::%{_plr}%::*}
if {fortune::%{_plr}%} is 0:
break block at loop-block's location
VeinMine({_plr}, loop-block)
broadcast "%loop-block%"
#vein miner script
1 messages · Page 1 of 1 (latest)
Well for one thing why are you including a player in a list of blocks that can be broken by the vein miner? I think that would then mean every player has a separate list of blocks that it would work for
as well what I just said could be completely wrong with what your doing
But I would say the reason why it is crashing is because you are running the function inside of the function creating an infinite loop
second to last line
i know that's happening, how else am i supposeed to get all the blocks in the vein without making a loop that checks for the blocks next to eachother then checks if its already checked that block
im just trying to make a normal vein miner is all
but make it as if it was vanilla mining
but in a vein
its hard to explain