Dropped Items

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

    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!

J1nx1l

New Member
Jul 26, 2023
6
0
1
Is there a way to make it so any dropped items are invulnerable? Could I make them so they do not blow up or burn without removing the explosion effects? I cannot seem to figure it out, I don't get any errors but it doesn't save the items.
Code:
on damage of a entity:
   if "%victim%" is "dropped item":
       if "%damage type%" is "burning" or "lava" or "fire" or "explosion":
           cancel event
 
Is there a way to make it so any dropped items are invulnerable? Could I make them so they do not blow up or burn without removing the explosion effects? I cannot seem to figure it out, I don't get any errors but it doesn't save the items.
Code:
on damage of a entity:
   if "%victim%" is "dropped item":
       if "%damage type%" is "burning" or "lava" or "fire" or "explosion":
           cancel event
You could likely do this with NBT components (There is a nbt tag that makes it so that the lifetime of an item can be changed).