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

Cannot drop air #4757

Closed
1 task done
LegitAlts opened this issue May 17, 2022 · 5 comments
Closed
1 task done

Cannot drop air #4757

LegitAlts opened this issue May 17, 2022 · 5 comments
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. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@LegitAlts
Copy link

Skript/Server Version

[04:17:38 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[04:17:38 INFO]: [Skript] Skript's documentation can be found here: https://skriptlang.github.io/Skript
[04:17:38 INFO]: [Skript] Server Version: git-Paper-333 (MC: 1.18.2)
[04:17:38 INFO]: [Skript] Skript Version: 2.6.1
[04:17:38 INFO]: [Skript] Installed Skript Addons: None
[04:17:38 INFO]: [Skript] Installed dependencies:
[04:17:38 INFO]: [Skript]  - Vault v1.7.3-b131
[04:17:38 INFO]: [Skript]  - WorldGuard v7.0.6+1cff55f
>

Bug Description

I tried making a skript that dig out all the blocks from player's targeted block till bedroock. When i do it and the skript meet lava/water source it stop and print this error in console.

Expected Behavior

It should just remove air/lava and keep digging

Steps to Reproduce

Copy and paste my skript, find a water/lava source, place a block above it and right click the block you placed with a gold ingot.

Errors or Screenshots

[04:13:14 ERROR]: #!#! [Skript] Severe Error:
[04:13:14 ERROR]: #!#!
[04:13:14 ERROR]: #!#! Something went horribly wrong with Skript.
[04:13:14 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[04:13:14 ERROR]: #!#! You should report it at https://github.com/SkriptLang/Skript/issues. Please copy paste this report there (or use paste service).
[04:13:14 ERROR]: #!#! This ensures that your issue is noticed and will be fixed as soon as possible.
[04:13:14 ERROR]: #!#!
[04:13:14 ERROR]: #!#! Stack trace:
[04:13:14 ERROR]: #!#! java.lang.IllegalArgumentException: Cannot drop air
[04:13:14 ERROR]: #!#! at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
[04:13:14 ERROR]: #!#! at net.minecraft.world.entity.item.EntityItem.a(EntityItem.java:506)
[04:13:14 ERROR]: #!#! at net.minecraft.world.entity.item.EntityItem.(EntityItem.java:74)
[04:13:14 ERROR]: #!#! at net.minecraft.world.entity.item.EntityItem.(EntityItem.java:67)
[04:13:14 ERROR]: #!#! at org.bukkit.craftbukkit.v1_18_R2.CraftWorld.dropItem(CraftWorld.java:704)
[04:13:14 ERROR]: #!#! at org.bukkit.craftbukkit.v1_18_R2.CraftWorld.dropItem(CraftWorld.java:698)
[04:13:14 ERROR]: #!#! at Skript_12.jar//ch.njol.skript.effects.EffDrop.execute(EffDrop.java:92)
[04:13:14 ERROR]: #!#! at Skript_12.jar//ch.njol.skript.lang.Effect.run(Effect.java:51)
[04:13:14 ERROR]: #!#! at Skript_12.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:60)
[04:13:14 ERROR]: #!#! at Skript_12.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
[04:13:14 ERROR]: #!#! at Skript_12.jar//ch.njol.skript.effects.Delay$1.run(Delay.java:109)
[04:13:14 ERROR]: #!#! at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101)
[04:13:14 ERROR]: #!#! at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483)
[04:13:14 ERROR]: #!#! at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1531)
[04:13:14 ERROR]: #!#! at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:483)
[04:13:14 ERROR]: #!#! at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1455)
[04:13:14 ERROR]: #!#! at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1225)
[04:13:14 ERROR]: #!#! at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315)
[04:13:14 ERROR]: #!#! at java.base/java.lang.Thread.run(Thread.java:833)
[04:13:14 ERROR]: #!#!
[04:13:14 ERROR]: #!#! Version Information:
[04:13:14 ERROR]: #!#! Skript: 2.6.1 (latest)
[04:13:14 ERROR]: #!#! Flavor: skriptlang-github
[04:13:14 ERROR]: #!#! Date: 22:18:42.554713200
[04:13:14 ERROR]: #!#! Bukkit: 1.18.2-R0.1-SNAPSHOT
[04:13:14 ERROR]: #!#! Minecraft: 1.18.2
[04:13:14 ERROR]: #!#! Java: 17.0.3.1 (Java HotSpot(TM) 64-Bit Server VM 17.0.3.1+2-LTS-6)
[04:13:14 ERROR]: #!#! OS: Windows 11 amd64 10.0
[04:13:14 ERROR]: #!#!
[04:13:14 ERROR]: #!#! Server platform: Paper
[04:13:14 ERROR]: #!#!
[04:13:14 ERROR]: #!#! Current node: null
[04:13:14 ERROR]: #!#! Current item: drop (the block (at {_loc2} (as org.bukkit.Location) >> ch.njol.skript.expressions.ExprBlock$1@3fcea898: location -> block))->ch.njol.skript.aliases.ItemType [[long:1]] meter(s) above {_loc} (as org.bukkit.Location)
[04:13:14 ERROR]: #!#! Current trigger: right click (rightclick) (superminatore.sk, line 1)
[04:13:14 ERROR]: #!#!
[04:13:14 ERROR]: #!#! Thread: Server thread
[04:13:14 ERROR]: #!#!
[04:13:14 ERROR]: #!#! Language: english
[04:13:14 ERROR]: #!#! Link parse mode: DISABLED
[04:13:14 ERROR]: #!#!
[04:13:14 ERROR]: #!#! End of Error.
[04:13:14 ERROR]: #!#!

Other

Skript:

on right click:
if player's tool is gold ingot:
if event-block is bedrock:
cancel event
stop
else:
set {_loc} to location of player's targeted block
drop block at {_loc} 1 block above {_loc} without velocity
set {_loc2} to location of player's targeted block
set block at {_loc} to glass
loop 500 times:
subtract 1 from {_loc2}'s y-coordinate
wait 1 tick
if block at {_loc2} is bedrock:
exit loop
else if block at {_loc2} is water or lava:
set block at {_loc2} to air
else if block at {_loc2} is not water or lava or bedrock:
drop block at {_loc2} 1 block above {_loc} without velocity
set block at {_loc2} to air

Agreement

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

Please format your code inside codeblocks or use a code paste website to paste your code, to help us reproduce your issue with the exact code and its indentation.

@LegitAlts
Copy link
Author

@LegitAlts
Copy link
Author

Give your self the custom pickaxe by /testgivesalo, find a water or lava pool in spectator gamemode, go to the top and right click above the pool. Wait for the skript to reach the pool and check the console.

@LegitAlts
Copy link
Author

Problem fixed just by adding cave air and vode air to condition. Thank you for your help. I'll go ahead closing the issue!

@APickledWalrus
Copy link
Member

I'm reopening this issue as it shouldn't be possible to cause an error like this (you shouldn't have to worry about adding different air types to the condition)

For the air check in the effect, Skript should probably be checking Material#isAir instead of doing a check against Material.AIR

@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. labels May 17, 2022
@TPGamesNL TPGamesNL added the good first issue An issue that would be good for a first-time contributor to make a PR for label May 23, 2022
@TPGamesNL TPGamesNL added PR available Issues which have a yet-to-be merged PR resolving it completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Jun 9, 2022
@TheLimeGlass TheLimeGlass removed the good first issue An issue that would be good for a first-time contributor to make a PR for label Mar 25, 2023
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. 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

5 participants