Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manipulating the y (vector expression) of a block throws error #6385

Closed
1 task done
ShaneBeee opened this issue Feb 2, 2024 · 1 comment
Closed
1 task done

Manipulating the y (vector expression) of a block throws error #6385

ShaneBeee opened this issue Feb 2, 2024 · 1 comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@ShaneBeee
Copy link
Contributor

Skript/Server Version

[16:47:42 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[16:47:42 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[16:47:42 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[16:47:42 INFO]: [Skript] Server Version: git-Paper-405 (MC: 1.20.4)
[16:47:42 INFO]: [Skript] Skript Version: 2.8.1 (skriptlang-github)
[16:47:42 INFO]: [Skript] Installed Skript Addons: 
[16:47:42 INFO]: [Skript]  - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[16:47:42 INFO]: [Skript]  - SkBee v3.2.1 (https://github.com/ShaneBeee/SkBee)
[16:47:42 INFO]: [Skript] Installed dependencies: 
[16:47:42 INFO]: [Skript]  - Vault v1.7.3-b131

Bug Description

This was found in a help channel
using this code:

on load:
	set {_b} to block at location(1,1,1)
	add 1 to y of {_b}

throws an error in console

error:

[16:45:20 ERROR]: #!#! 
[16:45:20 ERROR]: #!#! [Skript] Severe Error:
[16:45:20 ERROR]: #!#! 
[16:45:20 ERROR]: #!#! Something went horribly wrong with Skript.
[16:45:20 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[16:45:20 ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
[16:45:20 ERROR]: #!#! Here is full list of them:
[16:45:20 ERROR]: #!#! skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect) SkBee v3.2.1 (https://github.com/ShaneBeee/SkBee) 
[16:45:20 ERROR]: #!#! We could not identify which of those are specially related, so this might also be Skript issue.
[16:45:20 ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
[16:45:20 ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
[16:45:20 ERROR]: #!#! In that case, you will be given instruction on how should you report it.
[16:45:20 ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
[16:45:20 ERROR]: #!#! Only if the author tells you to do so, report it to Skript's issue tracker.
[16:45:20 ERROR]: #!#! 
[16:45:20 ERROR]: #!#! Stack trace:
[16:45:20 ERROR]: #!#! java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
[16:45:20 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.Variable.change(Variable.java:550)
[16:45:20 ERROR]: #!#!     at Skript.jar//ch.njol.skript.expressions.ExprVectorXYZ.change(ExprVectorXYZ.java:116)
[16:45:20 ERROR]: #!#!     at Skript.jar//ch.njol.skript.effects.EffChange.execute(EffChange.java:292)
[16:45:20 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.Effect.run(Effect.java:49)
[16:45:20 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
[16:45:20 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
[16:45:20 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.Trigger.execute(Trigger.java:52)
[16:45:20 ERROR]: #!#!     at Skript.jar//ch.njol.skript.events.EvtScript.runTrigger(EvtScript.java:88)
[16:45:20 ERROR]: #!#!     at Skript.jar//ch.njol.skript.events.EvtScript.postLoad(EvtScript.java:61)
[16:45:20 ERROR]: #!#!     at Skript.jar//ch.njol.skript.structures.StructEvent.postLoad(StructEvent.java:79)
[16:45:20 ERROR]: #!#!     at Skript.jar//ch.njol.skript.ScriptLoader.lambda$loadScripts$9(ScriptLoader.java:589)
[16:45:20 ERROR]: #!#!     at java.base/java.util.ArrayList.removeIf(ArrayList.java:1672)
[16:45:20 ERROR]: #!#!     at java.base/java.util.ArrayList.removeIf(ArrayList.java:1660)
[16:45:20 ERROR]: #!#!     at Skript.jar//ch.njol.skript.ScriptLoader.lambda$loadScripts$10(ScriptLoader.java:581)
[16:45:20 ERROR]: #!#!     at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:684)
[16:45:20 ERROR]: #!#!     at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:662)
[16:45:20 ERROR]: #!#!     at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2200)
[16:45:20 ERROR]: #!#!     at Skript.jar//ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:511)
[16:45:20 ERROR]: #!#!     at Skript.jar//ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:457)
[16:45:20 ERROR]: #!#!     at Skript.jar//ch.njol.skript.SkriptCommand.onCommand(SkriptCommand.java:190)
[16:45:20 ERROR]: #!#!     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[16:45:20 ERROR]: #!#!     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155)
[16:45:20 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchCommand(CraftServer.java:987)
[16:45:20 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchServerCommand(CraftServer.java:972)
[16:45:20 ERROR]: #!#!     at net.minecraft.server.dedicated.DedicatedServer.bk(DedicatedServer.java:500)
[16:45:20 ERROR]: #!#!     at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:447)
[16:45:20 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1515)
[16:45:20 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1216)
[16:45:20 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
[16:45:20 ERROR]: #!#!     at java.base/java.lang.Thread.run(Thread.java:1623)
[16:45:20 ERROR]: #!#! 
[16:45:20 ERROR]: #!#! Version Information:
[16:45:20 ERROR]: #!#!   Skript: 2.8.1 (latest)
[16:45:20 ERROR]: #!#!     Flavor: skriptlang-github
[16:45:20 ERROR]: #!#!     Date: 18:12:02.401265400
[16:45:20 ERROR]: #!#!   Bukkit: 1.20.4-R0.1-SNAPSHOT
[16:45:20 ERROR]: #!#!   Minecraft: 1.20.4
[16:45:20 ERROR]: #!#!   Java: 20.0.2 (OpenJDK 64-Bit Server VM 20.0.2+9)
[16:45:20 ERROR]: #!#!   OS: Mac OS X aarch64 14.3
[16:45:20 ERROR]: #!#! 
[16:45:20 ERROR]: #!#! Server platform: Paper
[16:45:20 ERROR]: #!#! 
[16:45:20 ERROR]: #!#! Current node: on load: (test.sk, line 2)
[16:45:20 ERROR]: #!#! Current item: add [[long:1]] to y component of {_v} (as org.bukkit.util.Vector)
[16:45:20 ERROR]: #!#! Current trigger: load (script load) (test.sk, line 2)
[16:45:20 ERROR]: #!#! 
[16:45:20 ERROR]: #!#! Thread: Server thread
[16:45:20 ERROR]: #!#! 
[16:45:20 ERROR]: #!#! Language: english
[16:45:20 ERROR]: #!#! Link parse mode: DISABLED
[16:45:20 ERROR]: #!#! 
[16:45:20 ERROR]: #!#! End of Error.
[16:45:20 ERROR]: #!#! 

Expected Behavior

no error

Steps to Reproduce

see above

Errors or Screenshots

No response

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@APickledWalrus
Copy link
Member

It looks like it's a simple fix of checking that vectors array is not empty

@APickledWalrus APickledWalrus added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. good first issue An issue that would be good for a first-time contributor to make a PR for labels Feb 2, 2024
@sovdeeth sovdeeth added PR available Issues which have a yet-to-be merged PR resolving it patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. completed The issue has been fully resolved and the change will be in the next Skript update. and removed good first issue An issue that would be good for a first-time contributor to make a PR for PR available Issues which have a yet-to-be merged PR resolving it labels Feb 2, 2024
@sovdeeth sovdeeth closed this as completed Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

3 participants