-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Comments
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. |
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. |
Problem fixed just by adding cave air and vode air to condition. Thank you for your help. I'll go ahead closing the issue! |
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 |
Skript/Server Version
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
The text was updated successfully, but these errors were encountered: