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

[Bug]: bait cant put on fishing rod if it is enchanted #397

Open
lackooka opened this issue Jul 23, 2024 · 7 comments
Open

[Bug]: bait cant put on fishing rod if it is enchanted #397

lackooka opened this issue Jul 23, 2024 · 7 comments
Assignees
Labels
bug: confirmed A bug that was replicated in a test environment at least once.

Comments

@lackooka
Copy link

Contact Details

discord: dlacoo

What happened?

I want to put a bait into my fishing rod and I cant do it because i get a console error. I can put this same bait into a normal (not enchanted) fishing rod.

Version

1.7 (latest)

Development Version

No response

Server Version

Purpur 1.21-2258

Java Version

21

Relevant log output

java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
        at even-more-fish-1.7.2.jar/com.oheers.fish.baits.BaitNBTManager.newApplyLore(BaitNBTManager.java:361) ~[even-more-fish-1.7.2.jar:?]
        at even-more-fish-1.7.2.jar/com.oheers.fish.baits.BaitNBTManager.applyBaitedRodNBT(BaitNBTManager.java:205) ~[even-more-fish-1.7.2.jar:?]
        at even-more-fish-1.7.2.jar/com.oheers.fish.baits.BaitListener.onClickEvent(BaitListener.java:65) ~[even-more-fish-1.7.2.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1468.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-2258-ff19bcc]
        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) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3204) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:69) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:33) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:36) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1576) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1553) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1546) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:114) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1656) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1337) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:332) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

Relevant screenshots

image
image

@lackooka lackooka added the bug: unconfirmed A bug that hasn't yet been recreated in a test environment. label Jul 23, 2024
@sarhatabaot sarhatabaot added bug: confirmed A bug that was replicated in a test environment at least once. bug: unconfirmed A bug that hasn't yet been recreated in a test environment. and removed bug: unconfirmed A bug that hasn't yet been recreated in a test environment. bug: confirmed A bug that was replicated in a test environment at least once. labels Jul 24, 2024
@sarhatabaot
Copy link
Collaborator

Can you try using the latest dev build first?

@lackooka
Copy link
Author

I tried with 1.7.3, but it still have a problem:

[12:23:27 ERROR]: Could not pass event InventoryClickEvent to EvenMoreFish v1.7.3
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at even-more-fish-1.7.3-1722169370397.jar/com.oheers.fish.baits.BaitNBTManager.newApplyLore(BaitNBTManager.java:360) ~[even-more-fish-1.7.3-1722169370397.jar:?]
at even-more-fish-1.7.3-1722169370397.jar/com.oheers.fish.baits.BaitNBTManager.applyBaitedRodNBT(BaitNBTManager.java:204) ~[even-more-fish-1.7.3-1722169370397.jar:?]
at even-more-fish-1.7.3-1722169370397.jar/com.oheers.fish.baits.BaitListener.onClickEvent(BaitListener.java:64) ~[even-more-fish-1.7.3-1722169370397.jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1774.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-2258-ff19bcc]
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) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3204) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:69) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:33) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:36) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1576) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1553) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1546) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1505) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1627) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1337) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:332) ~[purpur-1.21.jar:1.21-2258-ff19bcc]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

@sarhatabaot
Copy link
Collaborator

Noticed this issue with a lot of other ones, so closing everything else and linking them here:
#248
#352

@sarhatabaot sarhatabaot added bug: confirmed A bug that was replicated in a test environment at least once. and removed bug: unconfirmed A bug that hasn't yet been recreated in a test environment. labels Jul 30, 2024
@lackooka
Copy link
Author

lackooka commented Aug 5, 2024

is it fixed or not?

@sarhatabaot sarhatabaot self-assigned this Sep 5, 2024
@sarhatabaot
Copy link
Collaborator

is it fixed or not?

We are working on a fix. When it's fixed, I'll post here 😁

@DavidDoesCode
Copy link

DavidDoesCode commented Nov 6, 2024

@lackooka @sarhatabaot
I think this commit will fix this issue:
master...DavidDoesCode:EvenMoreFish:FIX-nbt-conversion-with-existing-meta-data

It does not currently save lore AFTER the item.
Also I do not know what other potential issue I may have caused with this.

image

@sarhatabaot
Copy link
Collaborator

@lackooka @sarhatabaot I think this commit will fix this issue: master...DavidDoesCode:EvenMoreFish:FIX-nbt-conversion-with-existing-meta-data

It does not currently save lore AFTER the item. Also I do not know what other potential issue I may have caused with this.

image

Great! Can you submit a PR? I will merge it
Since it's just for legacy nbt, I doubt it will cause any compat issues, but we will see with time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed A bug that was replicated in a test environment at least once.
Projects
None yet
Development

No branches or pull requests

3 participants