B1n-ry / Youre-in-grave-danger

A minecraft mod which adds one single block. The grave, which will generate when you die, and store your items
https://www.curseforge.com/minecraft/mc-mods/youre-in-grave-danger
MIT License
59 stars 16 forks source link

Travelers Backpack - NoSuchMethodError #138

Closed dark-swordsman closed 6 months ago

dark-swordsman commented 6 months ago

We had a server crash after a user tried to pick up their grave with an Iron Golem backpack from Traveler's Backpack. I checked the log and this was the error:

java.lang.NoSuchMethodError: 'void com.tiviacz.travelersbackpack.component.ITravelersBackpackComponent.syncToTracking(net.minecraft.class_3222)'
    at com.b1n_ry.yigd.compat.TravelersBackpackCompat$TBCompatComponent.storeToPlayer(TravelersBackpackCompat.java:81)
    at com.b1n_ry.yigd.components.InventoryComponent.applyToPlayer(InventoryComponent.java:443)
    at com.b1n_ry.yigd.components.GraveComponent.applyToPlayer(GraveComponent.java:480)
    at com.b1n_ry.yigd.components.GraveComponent.claim(GraveComponent.java:335)
    at com.b1n_ry.yigd.block.GraveBlock.method_9534(GraveBlock.java:152)
    at net.minecraft.class_4970$class_4971.method_26174(class_4970.java:1133)

I checked both this repo and the TravelersBackpack repo with the corresponding lines.

It seems TravelersBackpack doesn't have a syncToPlayer() method in that file. But it was strange because that apparently hasn't existed in the past few versions of travelers, at least since 1.16.

I am not sure if we didn't install the right mods or something. We're running 1.20.1 with 0.15.3 Fabric. Let me know if I can provide anything else to help.

I also was considering grabbing this repo, removing that line and building a custom JAR, but I was worried about breaking the functionality of both mods.

B1n-ry commented 6 months ago

Seems like it's been deleted in the last update. It was present before a commit to the 1.20 branch 17 hours ago. I will fix it on my end

mike1000195 commented 6 months ago

actually came here looking to see if someone else had this issue, and if not open a ticket. if you're wearing the backpack when you collect the grave, all of the inventory stuff gets transferred as usual, and the backpack is being worn by the person. The only issue, is it immediately crashes the server I'm hosting whenever that happens. It also does not delete the grave on the ground, despite having the items in the inventory already. let me know if you need the server crash files and i can help in any way that i can! we're looking forward to a mod update!

update: i also see someone saying they had memory leak fix in #115, i'm also running memory leak fix

endigma commented 6 months ago

Any update on a fix for this?

B1n-ry commented 6 months ago

Related to another issue, I'm changing how some things (most importantly drop rules) are handled, which in time improve the backup system. I'll release a fix for this issue once that change is done. And that will probably wait until next weekend, as I have upcoming exams this week I need to study for

mike1000195 commented 6 months ago

sounds good, thanks for the update. school comes first, no rush. good luck on the exams!

endigma commented 6 months ago

what is the backup system? we have recently lost a lot of items to a broken grave

B1n-ry commented 6 months ago

Sorry for not answering your question @endigma. The mod stores all items that would end up in your grave, in a data file. You can access this data through commands, with GUIs to restore graves and such. In previous versions only items ending up in your grave would be stored, but now (as of yigd 2.0.0-beta.7) all items will. Even soulbound and curse of vanishing and similar. This is filterable through GUI before restoring/robbing graves.

This new version (yigd 2.0.0-beta.7) will also fix the issue noted in this report (crash with travelers backpack)

endigma commented 6 months ago

How do I access the GUI or commands? Is there documentation? I have deathlog but it sometimes messes up travelers backpack restores.

B1n-ry commented 6 months ago

There is the /yigd grave [optional|user] command to view all graves of a player. You can then click any grave (displayed as a button) to view the contents of this grave. Graves can be filtered based on their status (if they are destroyed, due to a bug or something that should not be supposed to happen, if they are claimed, or unclaimed). Then there is the /yigd moderate command to get a list of all players (searchable). Clicking on a user will open the same menu as would have opened if running /yigd grave [user] on that person. I believe these instructions should be pretty easy to follow (at least when you open the gui and try it. If not, please do let me know what else I need to clear up). All permissions for each of the commands are configurable through the config. I might open a new wiki page with more detailed instructions however, possibly with a few images and such