Unbreakable blocks

  • 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!

xSummons

Member
Apr 14, 2025
12
1
3
I'm trying to figure out how to make unbreakable blocks, but the catch is it's only unbreakable to other players not the player that placed it. I also need the block to still be able to be exploded by TNT.
Anyone have any ideas?
 
I'm trying to figure out how to make unbreakable blocks, but the catch is it's only unbreakable to other players not the player that placed it. I also need the block to still be able to be exploded by TNT.
Anyone have any ideas?
Python:
on break:
    cancel event if boolean tag "isUnbreakable" of nbt of event-block is true



on place:
    set boolean tag "isUnbreakable" of nbt of event-block to true if boolean tag "isUnbreakable" of custom nbt of event-item is true

It should be able to exploded by tnt.

You can get an unbreakable block by using:

set boolean tag "isUnbreakable" of custom nbt of %item% to true
 
Python:
on break:
    cancel event if boolean tag "isUnbreakable" of nbt of event-block is true



on place:
    set boolean tag "isUnbreakable" of nbt of event-block to true if boolean tag "isUnbreakable" of custom nbt of event-item is true

It should be able to exploded by tnt.

You can get an unbreakable block by using:

set boolean tag "isUnbreakable" of custom nbt of %item% to true
Is there a way to also make the tnt have a different blast strength?