Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Some issues with the Entity Type with Amount

Open NiaSwift opened this issue 3 years ago • 2 comments

Skript/Server Version

[08:24:44 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[08:24:44 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[08:24:44 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[08:24:44 INFO]: [Skript] Server Version: git-Paper-131 (MC: 1.19.2)
[08:24:44 INFO]: [Skript] Skript Version: 2.6.3
[08:24:44 INFO]: [Skript] Installed Skript Addons: 
[08:24:44 INFO]: [Skript]  - skript-reflect v2.3 (https://github.com/TPGamesNL/skript-reflect)
[08:24:44 INFO]: [Skript]  - SkBee v2.1.0 (https://github.com/ShaneBeee/SkBee)
[08:24:44 INFO]: [Skript] Installed dependencies: 
[08:24:44 INFO]: [Skript]  - Vault v1.7.3-b131

Bug Description

I've been messing around with this syntax since yesterday and have found some problems, but don't remember all of them. Here are the ones that I do remember:

[1] You can't spawn multiple of the same mob from a variable.

  • This means that if I were to do !set {a} to 2 of cod and then !spawn {a} at player, it would not do anything, but it does send me "2 cods" if I do !send {a} to player.
  • However, I have found a way to do this, but it's a bit weird. What you can do is this:
    • !spawn (item amount of {a}) of ("%type of {a}%" parsed as entity type) at player

[2] Frogs are weird.

  • You can't just spawn a frog, that'd be too easy. You have to do the following:
    • !spawn ("temperate frog" parsed as entity type) at player
  • Also, type of doesn't work with frogs. If I do !set {a} to 2 of ("temperate frog" parsed as entity type), and then !send {a} it will return "2 temperate frogs", but won't return anything if I do !send type of {a}.

Expected Behavior

[1] I should be able to do !set {a} to 2 of cod and then !spawn {a} at player and it'd spawn 2 cods.

[2] I should be able to do !set {a} to temperate frog and then it'd work like any other entity.

[3] I should be able to do !set {a} to 2 of temperate frog and then !send type of {a} to get the type of the entity (without the amount).

Steps to Reproduce

Already mentioned above.

Errors or Screenshots

No response

Other

Thanks for reading. Took me like 30 minutes to make this post lol

Agreement

  • [X] I have read the guidelines above and affirm I am following them with this report.

NiaSwift avatar Sep 16 '22 08:09 NiaSwift

BTW you can't do item amount of {a} if {a} is set to 2 frogs or something like that

NiaSwift avatar Sep 16 '22 09:09 NiaSwift

I don't believe you should of had any issues with frogs as that is already parsed as an entity it's just that cod takes item priority over entity so I'm not sure how they could really fix this type of issue

Fusezion avatar Sep 16 '22 09:09 Fusezion

Can probably be looked at and changed.

TheLimeGlass avatar Sep 24 '22 08:09 TheLimeGlass

Cannot replicate.

TheLimeGlass avatar Jan 02 '23 15:01 TheLimeGlass

EffSecSpawn already accounts for multiple entities, and also I tested with Frogs.

TheLimeGlass avatar Jan 02 '23 15:01 TheLimeGlass

Could potentially be because 2 of cod is not a valid syntax and errors. The classic error with of. Probably already an issue.

TheLimeGlass avatar Jan 02 '23 15:01 TheLimeGlass

This hasn't had any more input since being marked unable to replicate so I'm going to close it.

I think it's very likely that, if there was an issue, it's going to be that the variable was set to two cod items (I presume there are cod items in Minecraft?), which then obviously isn't the correct input for the spawn entity syntax. This ambiguity has been a pervasive problem forever and there isn't really a way to fix it perfectly. That's just the result of having multiple things that can be expressed in the same way.

That having been said, I don't really understand how this is supposed to work with entities in theory at all. Programmatically-speaking, what are 2 of frogs? They're obviously not two actual entities in the world, and since the collective thing is being stuffed into a single variable here, it shouldn't be two separate objects, so it's not two un-spawned entities either. Item types are really the only thing we want multiple of going into a single non-list variable, so I'm a bit concerned that something else is being permitted here that shouldn't be, but that's probably out of the scope of this issue.

Moderocky avatar Apr 13 '24 07:04 Moderocky