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

Tool stats are not loaded when connecting to a server #5309

Open
Paka069 opened this issue Jan 15, 2025 · 9 comments
Open

Tool stats are not loaded when connecting to a server #5309

Paka069 opened this issue Jan 15, 2025 · 9 comments
Labels
1.19 Issue affects 1.19 1.20 Issue affects 1.20 Backport This issue is considered for backport to the previous supported version. Bug Issue describes unintended or broken behavior Confirmed Issue has been verified as being caused by Tinkers, or an enhancement is planned to be added

Comments

@Paka069
Copy link

Paka069 commented Jan 15, 2025

Minecraft Version

1.20.1

Modloader

Forge

Modloader Version

47.3.22

Mantle Version

Mantle-1.20.1-1.11.28

Tinkers' Construct Version

TConstruct-1.20.1-3.9.0.6

Describe your issue

My mod isn't working correctly, I made a new one and after reconnecting to the server the durability became 0.

Crash Report

None

Other mods

AdvancementPlaques-1.20.1-forge-1.6.7.jar
203.96 КиБ
Jan 10th, 2025 18:58:56
advancementscreenshot-1.20.1-4.9.jar
28.89 КиБ
Jan 10th, 2025 19:12:05
alexsmobs-1.22.9.jar
25.13 МиБ
Jan 10th, 2025 18:59:07
appleskin-forge-mc1.20.1-2.5.1.jar
46.32 КиБ
Jan 10th, 2025 18:58:56
architectury-9.2.14-forge.jar
566.99 КиБ
Jan 10th, 2025 18:58:57
awesomedungeonnether-forge-1.20.1-3.1.1.jar
229.16 КиБ
Jan 10th, 2025 18:58:57
badpackets-forge-0.4.3.jar
27.26 КиБ
Jan 10th, 2025 19:16:19
betterfpsdist-1.20.1-6.0.jar
19.45 КиБ
Jan 10th, 2025 18:58:57
BiomesOPlenty-1.20.1-18.0.0.592.jar
20.79 МиБ
Jan 10th, 2025 18:59:06
Botania-1.20.1-446-FORGE.jar
11.61 МиБ
Jan 10th, 2025 18:59:04
botaniadelight-1.0.3.4-1.20.1.jar
43.28 КиБ
Jan 10th, 2025 18:58:57
bygonenether-1.3.2-1.20.x.jar
7.29 МиБ
Jan 10th, 2025 18:59:02
caelus-forge-3.2.0+1.20.1.jar
39.18 КиБ
Jan 10th, 2025 18:58:57
citadel-2.6.1-1.20.1.jar
3.03 МиБ
Jan 10th, 2025 19:13:35
cloth-config-11.1.136-forge.jar
1.13 МиБ
Jan 10th, 2025 18:58:58
collective-1.20.1-7.87.jar
633.67 КиБ
Jan 10th, 2025 19:16:21
cupboard-1.20.1-2.7.jar
25.37 КиБ
Jan 10th, 2025 18:58:57
curios-forge-5.11.1+1.20.1.jar
381.76 КиБ
Jan 10th, 2025 18:58:58
elementaryores-1.20.1-1.1.0.jar
91.75 КиБ
Jan 10th, 2025 18:58:58
FarmersDelight-1.20.1-1.2.6.jar
2.81 МиБ
Jan 10th, 2025 18:58:54
flib-1.20.1-0.0.14.jar
284.57 КиБ
Jan 10th, 2025 18:58:53
geckolib-forge-1.20.1-4.7.jar
980.51 КиБ
Jan 10th, 2025 18:58:54
Iceberg-1.20.1-forge-1.1.25.jar
131.4 КиБ
Jan 10th, 2025 19:12:00
Jade-1.20.1-forge-11.7.1.jar
510.99 КиБ
Jan 10th, 2025 19:12:07
jei-1.20.1-forge-15.12.2.51.jar
1.28 МиБ
Jan 10th, 2025 18:58:54
libraryferret-forge-1.20.1-4.0.0.jar
186.07 КиБ
Jan 10th, 2025 18:58:54
Mantle-1.20.1-1.11.28.jar
1.19 МиБ
Jan 10th, 2025 18:58:54
mavapi-1.1.4-mc1.20.1.jar
578.58 КиБ
Jan 10th, 2025 18:58:54
mavm-1.2.6-mc1.20.1.jar
774.12 КиБ
Jan 10th, 2025 18:58:54
mowziesdelight-1.1.2.3-1.20.1.jar
75.77 КиБ
Jan 10th, 2025 18:58:54
mowziesmobs-1.6.5.jar
14.39 МиБ
Jan 10th, 2025 18:59:02
nethersdelight-1.20.1-4.0.jar
357.47 КиБ
Jan 10th, 2025 18:58:54
oceanic_delight-1.0.3-forge-1.20.1.jar
282.37 КиБ
Jan 10th, 2025 18:58:54
oceanworld-7.0.0.jar
1.15 МиБ
Jan 10th, 2025 18:58:55
origins-forge-1.20.1-1.10.0.9-all.jar
2.2 МиБ
Jan 10th, 2025 18:58:56
Patchouli-1.20.1-84-FORGE.jar
627.45 КиБ
Jan 10th, 2025 18:58:55
Prism-1.20.1-forge-1.0.5.jar
50.98 КиБ
Jan 10th, 2025 19:12:02
simplyswords-forge-1.56.0-1.20.1.jar
14.5 МиБ
Jan 10th, 2025 18:59:04
Structory_1.20.x_v1.3.5.jar
1.23 МиБ
Jan 10th, 2025 18:58:56
TConstruct-1.20.1-3.9.0.6.jar
17.55 МиБ
Jan 10th, 2025 18:59:05
TerraBlender-forge-1.20.1-3.0.1.7.jar
105.01 КиБ
Jan 10th, 2025 18:58:55
wthit-forge-8.15.5.jar
748.76 КиБ
Jan 10th, 2025 19:12:03
Xaeros_Minimap_24.7.1_Forge_1.20.jar
1.55 МиБ
Jan 10th, 2025 18:58:56
YungsApi-1.20-Forge-4.0.6.jar
361.84 КиБ
Jan 10th, 2025 18:58:56
YungsBetterEndIsland-1.20-Forge-2.0.6.jar
378.04 КиБ
Jan 10th, 2025 18:58:56
YungsBetterMineshafts-1.20-Forge-4.0.4.jar
481.44 КиБ
Jan 10th, 2025 18:58:56
YungsBetterNetherFortresses-1.20-Forge-2.0.6.jar
604.74 КиБ
Jan 10th, 2025 18:58:56
YungsBetterOceanMonuments-1.20-Forge-3.0.4.jar
1009.04 КиБ
Jan 10th, 2025 18:58:57
YungsBetterStrongholds-1.20-Forge-4.0.3.jar

Tried reproducing with just Tinkers?

Yes

Performance Enchancers

Optifine

Searched for known issues?

I did not search

@Paka069 Paka069 added 1.20 Issue affects 1.20 Bug Issue describes unintended or broken behavior Unreviewed Issue is new and is awaiting the team to review it labels Jan 15, 2025
@KnightMiner
Copy link
Member

Giving me a list of 100 mods and barely any description doesn't help.

Reproduce this issue with a minimal mod list, and explain clearly what is happening

@KnightMiner KnightMiner added Not enough information Insufficient information is provided in the issue to accurately respond Did not follow issue template User failed to follow the issue template, despite it being simple and in plain English and removed Unreviewed Issue is new and is awaiting the team to review it labels Jan 15, 2025
@carbonatek
Copy link

carbonatek commented Jan 16, 2025

I don't know if they are experiencing something different than I do, but, my durability does get lowered to 0 every time i join a server too, but it's a purely visual glitch because if I use a tool from TC, the durability gets set to the correct one. Maybe they're experiencing the same thing?

EDIT: Mods we have in common;
AdvancementPlaques-1.20.1-forge-1.6.7.jar
alexsmobs-1.22.9.jar
architectury-9.2.14-forge.jar
BiomesOPlenty-1.20.1-18.0.0.592.jar
citadel-2.6.1-1.20.1.jar
cloth-config-11.1.136-forge.jar
collective-1.20.1-7.87.jar
cupboard-1.20.1-2.7.jar
curios-forge-5.11.1+1.20.1.jar
FarmersDelight-1.20.1-1.2.6.jar
geckolib-forge-1.20.1-4.7.jar
Iceberg-1.20.1-forge-1.1.25.jar
Jade-1.20.1-forge-11.7.1.jar
Mantle-1.20.1-1.11.28.jar
mowziesmobs-1.6.5.jar
Patchouli-1.20.1-84-FORGE.jar
simplyswords-forge-1.56.0-1.20.1.jar
Structory_1.20.x_v1.3.5.jar
TConstruct-1.20.1-3.9.0.6.jar
TerraBlender-forge-1.20.1-3.0.1.7.jar
Xaeros_Minimap_24.7.1_Forge_1.20.jar
YungsApi-1.20-Forge-4.0.6.jar
YungsBetterEndIsland-1.20-Forge-2.0.6.jar
YungsBetterMineshafts-1.20-Forge-4.0.4.jar
YungsBetterNetherFortresses-1.20-Forge-2.0.6.jar
YungsBetterOceanMonuments-1.20-Forge-3.0.4.jar
YungsBetterStrongholds-1.20-Forge-4.0.3.jar

EDIT 2: I suggest @Paka069 to isolate these mods and remove them one by one before it stops happening. If it doesn't, I suspect Bad Packets, or anything of that sort which interferes with networking.

@NevadaActual
Copy link

Can confirm, there seems to be an odd desync that fixes itself quickly after moving something in inventory. It seems to be clientside, because attempting to actually use the tool leads to extremely slow mining speed, etc, but refreshing the player inventory by moving said tool or armor around fixes it.

Common mods between the previous two reports (just a quick eyeballing, don't have a dedicated server to test this with):

Structory_1.20.x_v1.3.5.jar
TConstruct-1.20.1-3.9.0.6.jar
TerraBlender-forge-1.20.1-3.0.1.7.jar
Jade-1.20.1-forge-11.7.1.jar
Mantle-1.20.1-1.11.28.jar
FarmersDelight-1.20.1-1.2.6.jar
alexsmobs-1.22.9.jar
architectury-9.2.14-forge.jar
BiomesOPlenty-1.20.1-18.0.0.592.jar
citadel-2.6.1-1.20.1.jar
cloth-config-11.1.136-forge.jar
collective-1.20.1-7.87.jar
geckolib-forge-1.20.1-4.7.jar
YungsApi-1.20-Forge-4.0.6.jar
YungsCaveBiomes-1.20.1-Forge-2.0.1.jar

@KnightMiner KnightMiner changed the title Mod problem Tool stats are not loaded when connecting to a server Jan 19, 2025
@KnightMiner KnightMiner added Confirmed Issue has been verified as being caused by Tinkers, or an enhancement is planned to be added and removed Not enough information Insufficient information is provided in the issue to accurately respond Did not follow issue template User failed to follow the issue template, despite it being simple and in plain English labels Jan 19, 2025
@KnightMiner
Copy link
Member

Did some of my own testing and managed to reproduce it. Seems we have a race condition where tools try to load their stats before we finish syncing datapack data. I am not yet sure where its caused and am debugging a bit further still, but from what I can tell it doesn't happen if you either first load a single player world or disconnect from then reconnect to the server.

@KnightMiner KnightMiner added the Resolved Issue is fixed in code, but there is not a release with that fix yet. label Jan 20, 2025
KnightMiner added a commit that referenced this issue Jan 20, 2025
That validation was meant to reduce the NBT size of items a bit by skipping storing stats from modifiers that are not applicable. Most notably due to modifiers like diamond.
But ultimately its just lead to a lot of bugs from forgetting which tag is required to "support" a stat. Still undecided on whether to entirely remove the stat supports hook or not.

Removes the most obvious symptom of #5309 as that issue was caused by tags not being loaded when the player inventory syncs client side. Will push a more proper fix later.
KnightMiner added a commit that referenced this issue Jan 20, 2025
This fully solves #5309 as the problematic registry was item tags.
Also adds some future proofing in case an item stack is ever built pre-data loading.
Worth noting that many of those getters do not consider the concept of their data being reloaded when switching words; its possible some data might be marked as loaded because it was loaded in a different world
@KnightMiner
Copy link
Member

Should be fixed in Tinkers' Construct 3.9.1.17 for 1.20.1.

@TimelineUnknown
Copy link

It is also a thing in Tinkers' Construct 3.8.5.50 and 3.8.5.58 for 1.19.2. Mantel version is 1.10.48 for 1.19.2 too

@KnightMiner KnightMiner added 1.19 Issue affects 1.19 Backport This issue is considered for backport to the previous supported version. and removed Resolved Issue is fixed in code, but there is not a release with that fix yet. labels Jan 24, 2025
@KnightMiner KnightMiner reopened this Jan 24, 2025
@Angelsylvexian
Copy link

Angelsylvexian commented Feb 2, 2025

Hello! Just wondering if this bug fix is going to be fully backported. It's very annoying and almost consistently happens upon everytime I connect to a server.
I also share similar mods from the previous two commenters.

@KnightMiner
Copy link
Member

1.19 was out for over a year and no one reported this issue. If it was so annoying you should have reported it sooner.

It may or may not get backported, will determine if its safe to do so when I next work on 1.19.

@Angelsylvexian
Copy link

Angelsylvexian commented Feb 2, 2025

I just started using the 1.19 version a couple days ago. Sorry for annoying you.
Thank you for your time, if there's anyway I can assist (logs maybe?) more then willing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.19 Issue affects 1.19 1.20 Issue affects 1.20 Backport This issue is considered for backport to the previous supported version. Bug Issue describes unintended or broken behavior Confirmed Issue has been verified as being caused by Tinkers, or an enhancement is planned to be added
Projects
None yet
Development

No branches or pull requests

6 participants