set breakable blocks of item

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

smikkiekind

Member
Nov 15, 2023
3
0
1
Hello, i was trying to create a adventure mining server but im trying to give a starter item when joined for the first time, but when i test it, it says "Can't understand this condition/effect: set breakable blocks of {_item} to oak log"

on join:
if {joined::%player%} doesn't exist:
set {joined::%player%} to true
set {_item} to stick
set breakable blocks of {_item} to oak log
give {_item} to player
 
Hey, i dont really understand the point of this, can you describe little bit better please?
 
Hello, i was trying to create a adventure mining server but im trying to give a starter item when joined for the first time, but when i test it, it says "Can't understand this condition/effect: set breakable blocks of {_item} to oak log"

on join:
if {joined::%player%} doesn't exist:
set {joined::%player%} to true
set {_item} to stick
set breakable blocks of {_item} to oak log
give {_item} to player
Not sure why you’d even need to code this. Vanilla items allow you to modify their NBT by using a command. That being said, there’s a NBT modifier for ‘On Break’ which can achieve the effect you want without using Skript.
 
Are you are trying to make blocks breakable with specific items? So like you can only mine oak logs with a stick or higher?

If so:
on leftclick on oak log:
if player is not holding (a?) stick:
cancel event
send "You need a stick to mine this!" to player

And if you want to make items above a stick mine it:

on load:
if player is holding (a?) stick:
set {mine.level} to 3

on leftclick on oak log:
if {mine.level} is < 3:
cancel event
send "You need a stick to mine this!" to player
Then you could repeat this with other items

I don't fully know if this works so tell me the errors