[1.12.2,1.14.4] Too large nbt tags send to client
HyCraftHD opened this issue · 3 comments
Describe the bug
If a mod uses lots of nbt tags the backpack will send them always to the client because currently we sync every nbt tag to the client. This behaviour is very bad and therefore the should implement
getNBTShareTag(ItemStack stack) / getShareTag(ItemStack stack)
to remove the inventory from being sent to the client.
To Reproduce
Steps to reproduce the behavior:
- Use a mod that uses lots of nbt tags on items
- Store them in a backpack
- If running on a server this may break the packsize and deny the login from a player.
Expected behavior
Should not happen, lol 😳
Screenshots
Something like this:
Versions
- Mod version: 1.12.2-1.5.1.35 / 1.14.4-1.7.1.36
- Minecraft version: 1.12.2 / 1.14.4
- Forge version: Every forge version
- UTeamCore version: Irrelevant
Log (if crash occures)
Link to crash log
Also just to let you know. This issue is not caused by the backpack mod but by the trash slot mod.
An issue can be found here: TwelveIterationMods/TrashSlot#56
Can you figure what is wrong? Your Useful Backpacks mod is the only one not working properly... What happens is that when you open a backpack and move your move onto it, the game kicks you with an error. The following is the error:
The game crashed whilst exception in server tick loop
Error" java.lang.NoSuchMethodError:
net.minecraft.entity.player.PlayerEntity.getEntityData()Lnet/minecraft/nbt/CompoundNBT
---- Minecraft Crash Report ----
// I bet Cylons wouldn't have this problem.
Time: 10/9/19 5:55 AM
Description: Exception in server tick loop
java.lang.NoSuchMethodError: net.minecraft.entity.player.PlayerEntity.getEntityData()Lnet/minecraft/nbt/CompoundNBT;
at net.blay09.mods.trashslot.TrashHelper.getTrashItem(TrashHelper.java:19) ~[?:10.4.5] {}
at net.blay09.mods.trashslot.TrashSlot.onPlayerOpenContainer(TrashSlot.java:89) ~[?:10.4.5] {}
at net.minecraftforge.eventbus.ASMEventHandler_136_TrashSlot_onPlayerOpenContainer_Open.invoke(.dynamic) ~[?:?] {}
at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:80) ~[eventbus-1.0.0-service.jar:?] {}
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258) ~[eventbus-1.0.0-service.jar:?] {}
at net.minecraftforge.fml.network.NetworkHooks.openGui(NetworkHooks.java:182) ~[?:?] {}
at info.u_team.useful_backpacks.item.BackpackItem.func_77659_a(BackpackItem.java:31) ~[?:1.7.0.34] {}
at net.minecraft.item.ItemStack.func_77957_a(ItemStack.java:192) ~[?:?] {}
at net.minecraft.server.management.PlayerInteractionManager.func_187250_a(PlayerInteractionManager.java:273) ~[?:?] {}
at net.minecraft.network.play.ServerPlayNetHandler.func_147346_a(ServerPlayNetHandler.java:865) ~[?:?] {}
at net.minecraft.network.play.client.CPlayerTryUseItemPacket.func_148833_a(SourceFile:32) ~[?:?] {}
at net.minecraft.network.play.client.CPlayerTryUseItemPacket.func_148833_a(SourceFile:9) ~[?:?] {}
at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:33) ~[?:?] {xf:OptiFine:default}
at net.minecraft.network.PacketThreadUtil$$Lambda$5439/997082431.run(Unknown Source) ~[?:?] {}
at net.minecraft.util.concurrent.TickDelayedTask.run(SourceFile:18) ~[?:?] {}
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(ThreadTaskExecutor.java:170) ~[?:?] {pl:accesstransformer:B,xf:OptiFine:default}
at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) ~[?:?] {}
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(ThreadTaskExecutor.java:135) ~[?:?] {pl:accesstransformer:B,xf:OptiFine:default}
at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:699) ~[?:?] {pl:accesstransformer:B}
at net.minecraft.server.MinecraftServer.func_213168_p(MinecraftServer.java:693) ~[?:?] {pl:accesstransformer:B}
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213160_bf(ThreadTaskExecutor.java:115) ~[?:?] {pl:accesstransformer:B,xf:OptiFine:default}
at net.minecraft.server.MinecraftServer.func_213202_o(MinecraftServer.java:678) ~[?:?] {pl:accesstransformer:B}
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:626) [?:?] {pl:accesstransformer:B}
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51] {}
A detailed walkthrough of the error, its code path and all known details is as follows:
-- System Details --
Details:
Minecraft Version: 1.14.4
Minecraft Version ID: 1.14.4
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_51, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 5720339936 bytes (5455 MB) / 8589934592 bytes (8192 MB) up to 8589934592 bytes (8192 MB)
CPUs: 8
JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx8G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
ModLauncher: 3.2.0+60+b86c1d4
ModLauncher launch target: fmlclient
ModLauncher naming: srg
ModLauncher services:
/eventbus-1.0.0-service.jar eventbus PLUGINSERVICE
/forge-1.14.4-28.1.0.jar object_holder_definalize PLUGINSERVICE
/forge-1.14.4-28.1.0.jar runtime_enum_extender PLUGINSERVICE
/accesstransformers-1.0.0-shadowed.jar accesstransformer PLUGINSERVICE
/forge-1.14.4-28.1.0.jar capability_inject_definalize PLUGINSERVICE
/forge-1.14.4-28.1.0.jar runtimedistcleaner PLUGINSERVICE
/preview_OptiFine_1.14.4_HD_U_F4_pre7.jar OptiFine TRANSFORMATIONSERVICE
/forge-1.14.4-28.1.0.jar fml TRANSFORMATIONSERVICE
FML: 28.1
Forge: net.minecraftforge:28.1.0
FML Language Providers:
[email protected]
minecraft@1
[email protected]
Mod List:
AmbientSounds_v3.0.9_mc1.14.4.jar Ambient Sounds {[email protected] DONE}
BiomesOPlenty-1.14.4-9.0.0.236-universal.jar Biomes O' Plenty {[email protected] DONE}
Chicken-Drop-Feathers-1.14.4.jar Chicken Drop Feathers {[email protected] DONE}
Corail-Pillar-Extension-Biomes-O-Plenty-Mod-1.14.4.jar Corail Pillar - Biomes O'Plenty Extension {[email protected] DONE}
Corail-Woodcutter-1.14.4.jar Corail Woodcutter {[email protected] DONE}
corail_pillar-4.5.3-1.14.4.jar Corail Pillar {[email protected] DONE}
create-mc1.14.4_v0.0.5.jar Create {[email protected] DONE}
CyclopsCore-1.14.4.jar Cyclops Core {[email protected] DONE}
Extended-Caves-Mod-1.14.4.jar Extended Caves {[email protected] DONE}
Extended-Lights-1.14.4.jar Extended Lights {[email protected] DONE}
FastFurnace-Mod-1.14.4.jar FastFurnace {[email protected] DONE}
FastLeafDecay-v17.jar FastLeafDecay {fastleafdecay@v17 DONE}
forgemod_VoxelMap-1.9.13b_for_1.14.4.jar VoxelMap {[email protected] DONE}
JRFTL+[1.14.4]-1.1.jar JRFTL {[email protected] DONE}
lumberjack_1.14.4_2.0.0.jar LumberJack {[email protected] DONE}
metalbarrels-1.3c.jar Metal Barrels {[email protected] DONE}
Placebo-1.14.4-2.1.11.jar Placebo {[email protected] DONE}
Pretty-Beaches-Mod-1.14.4.jar Pretty Beaches {[email protected] DONE}
Remove-Mouseover-Highlight-Mod-1.14.4.jar Remove Mouseover Highlight {[email protected] DONE}
Seafaring-1.14.4.jar Seafaring {[email protected] DONE}
Sign-Button-Mod-1.14.4.jar Sign Button {signbutton@version DONE}
Simple-Diving-Gear-Mod-1.14.4.jar Simple Diving Gear {[email protected] mc 1.14.4 DONE}
ToastControl-1.14.4-2.1.2.jar Toast Control {[email protected] DONE}
tombstone-3.7.5-1.14.4.jar Corail Tombstone {[email protected] DONE}
Torchplacer-1.14.4.jar Torchplacer {[email protected] DONE}
TrashSlot-Mod-1.14.4.jar TrashSlot {[email protected] DONE}
U-Team-Core-1.14.4.jar U Team Core {[email protected] DONE}
Uncle-Gs-Glass-Mod-1.14.4.jar Uncle George's Glass {[email protected] DONE}
Useful-Backpacks-Mod-1.14.4.jar Useful Backpacks {[email protected] DONE}
Wild-Nature-Mod-1.14.4.jar WildNature Mod {[email protected] DONE}
worldedit-forge-mc1.14.4-7.0.1.jar WorldEdit {[email protected];61bc012 DONE}
forge-1.14.4-28.1.0-universal.jar Forge {[email protected] DONE}
forge-1.14.4-28.1.0-client.jar Minecraft {[email protected] DONE}
Player Count: 1 / 8; [ServerPlayerEntity['KalderiusUSA'/74, l='Dad's 9/19/19', x=3174.86, y=37.00, z=2362.57]]
Data Packs: mod:unclegglass, mod:rmh, mod:worldedit, mod:wildnature, mod:voxelmap, mod:uteamcore, mod:usefulbackpacks, mod:trashslot, mod:torchpl, mod:tombstone, mod:toastcontrol, mod:simpledivegear, mod:signbutton, mod:sea, mod:prettybeaches, mod:placebo, mod:metalbarrels, mod:lumberjack (incompatible), mod:jrftl (incompatible), mod:forge, mod:fastleafdecay, mod:fastfurnace, mod:extlights, mod:extcaves, mod:cyclopscore, mod:create, mod:corail_woodcutter, mod:corail_pillar_extension_biomesoplenty, mod:corail_pillar, mod:chickendropfeathersmod, mod:biomesoplenty, mod:ambientsounds, vanilla
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'forge'