Skript

Skript

743k Downloads

EffSecDrop

TheAbsolutionism opened this issue ยท 11 comments

commented

Suggestion

To add or change the drop effect to match the spawn effect.
With the Spawn effect, you have both
Effect
(spawn|summon) %entitytypes% [%directions% %locations%]
Effect Section

(spawn|summon) %entitytypes% [%directions% %locations%]:
    # entity expression

Im proposing for the drop effect to also have a section

drop %itemtypes/experiences% [%directions% %locations%] [(without velocity)]:
     # dropped entity expression

Why?

This would allow users to add/set NBT+values of the dropped entity with a higher sense of accuracy.
Following suit of the spawn effect, minimalizing the usage of the last spawned %entitytype%

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this suggestion.
commented
commented

Concurrency โ€” some might have some beefs with last dropped item expression due to this

Skript does not run any code in parallel, so concurrency is not a concern. Also, you don't have to use last dropped item if you use the spawn section.

commented

I dont know if maybe I am just doing it wrong. But https://github.com/SkriptLang/Skript/assets/82696841/daa9f0ec-e67f-423c-a581-771cbb62d121

You need to use an item type, eg dropped stone

commented

Hmm I'll have to look into that tonight, it should be valid.

commented

I don't see the point of this. You can just spawn a dropped item with the spawn section and set the NBT of that just as easily via item of %entity%. What would this gain over that?

commented

Concurrency โ€” some might have some beefs with last dropped item expression due to this

commented

Looks like dropped items aren't spawnable through the normal methods, however, I think we should override the spawning method for DroppedItemData to allow it to be spawned normally via World#dropItem().

commented

Looks like dropped items aren't spawnable through the normal methods, however, I think we should override the spawning method for DroppedItemData to allow it to be spawned normally via World#dropItem().

I think this is an issue from my EntityData#canSpawn thing. I'm starting to regret that.

commented

No, no, it's working properly! Bukkit doesn't allow you to spawn Item entities with World#spawn. I'm adding an override to the spawn method of its entityData so it can use dropItem right now :)

commented

Spawning item entities is valid after 2.8.6, so I'm closing this for now. If there's some feature that you think a drop section would have over the spawn section, please reopen or make a new PR!