" Can't compare 'items within entity event-entity" with an item type"

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

Status
Not open for further replies.

TimCom228

Member
Dec 26, 2019
31
0
6
24
Skript gives an error:

"Can't compare 'items within entity event-entity' with an item type (deldrop.sk, line 7: items within entity event-entity is planks or stone brick or iron block or diamond block')"

Script:

Code:
on explode:
    set {explosion::%event-location%} to event-location
    wait 0.5 second
    delete {explosion::%event-location%}

on item spawn:
    items within entity event-entity is planks or stone brick or iron block or diamond block
    loop {explosion::*}:
        distance between loop-value and event-location is less than 5
        cancel event

This is a script that removes a drop within a radius of 5 blocks around the explosion. My version 1.13. On version 1.12, everything works fine

Please help solve the problem.
 
Skript gives an error:

"Can't compare 'items within entity event-entity' with an item type (deldrop.sk, line 7: items within entity event-entity is planks or stone brick or iron block or diamond block')"

Script:

Code:
on explode:
    set {explosion::%event-location%} to event-location
    wait 0.5 second
    delete {explosion::%event-location%}

on item spawn:
    items within entity event-entity is planks or stone brick or iron block or diamond block
    loop {explosion::*}:
        distance between loop-value and event-location is less than 5
        cancel event

This is a script that removes a drop within a radius of 5 blocks around the explosion. My version 1.13. On version 1.12, everything works fine

Please help solve the problem.

what u trying to do a item spawn event is only 1 item there can't be more items within a item (except nbt stored chests shulkerboxes etc but that is not done this way)
 
what u trying to do a item spawn event is only 1 item there can't be more items within a item (except nbt stored chests shulkerboxes etc but that is not done this way)
You can write a script that will delete certain items after the explosion. Please.
 
I can't think of a better way than this rn:

so wenn a explosion happens u can get all blocks that get exploded.

So here u can set all blocks u don't want to drop to air.

so now the blocks don't exist anymore and can't drop the item but the other blocks still will.

Code:
on explosion:
    loop exploded blocks:
        if loop-blocks is planks or stone brick or iron block or diamond block:
            set loop-block to air
 
Status
Not open for further replies.