Multiple "`MATERIAL_NAME` isn't an item" exceptions in 1.21 when placing a block
MrPowerGamerBR opened this issue · 1 comments
WorldEdit Version
WorldEdit version 7.3.4-SNAPSHOT
WorldGuard Version
WorldGuard 7.0.11-SNAPSHOT
Platform Version
This server is running Paper version 1.21-6-master@126f6d7 (2024-06-18T20:03:56Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
Confirmations
- I am using the most recent Minecraft release.
- I am using a version of WorldEdit compatible with my Minecraft version.
- I am using a version of WorldGuard compatible with my Minecraft version.
- I am using the latest or recommended version of my platform software.
- I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
- I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)
Bug Description
When you place a block that its material does NOT have a item counterpart (like WATER
or COCOA
), WorldGuard throws an exception
I'm using the feat/mc-1.21
branch, commit 2bd426b
(This is exception is from my public server that is running my own Paper fork, but this also happens in Paper 1.21 build 6, if needed I can spin up a test server just to get the exception triggered by a "vanilla" Paper install)
[00:52:04] [Server thread/ERROR]: Could not pass event BlockPlaceEvent to WorldGuard v7.0.11-SNAPSHOT+2276-2bd426b
java.lang.IllegalArgumentException: BEETROOTS isn't an item
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:143) ~[guava-32.1.2-jre.jar:?]
at org.bukkit.inventory.ItemStack.of(ItemStack.java:58) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:138) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:117) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:104) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
at WorldGuard.jar/com.sk89q.worldguard.bukkit.listener.EventAbstractionListener.onBlockPlace(EventAbstractionListener.java:222) ~[WorldGuard.jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor141.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:1.21-DEV-1b63d66]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(CraftEventFactory.java:449) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.world.item.ItemStack.useOn(ItemStack.java:487) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.server.level.ServerPlayerGameMode.useItemOn(ServerPlayerGameMode.java:607) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItemOn(ServerGamePacketListenerImpl.java:1871) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:44) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:11) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:36) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1483) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1461) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1454) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:114) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1563) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1251) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:334) ~[sparklypaper-1.21.jar:1.21-DEV-1b63d66]
Expected Behavior
That it just works™
Reproduction Steps
- Just place a block that doesn't have a item counterpart
Optional WorldGuard-Report
No response
Anything Else?
Here's a similar bug affecting GriefPrevention: GriefPrevention/GriefPrevention#2308