qyl27 / NBTEdit

Minecraft In-Game NBTEdit is reborn now. Download from https://www.curseforge.com/minecraft/mc-mods/nbtedit-reborn .
https://modrinth.com/mod/nbtedit-reborn
GNU General Public License v3.0
33 stars 5 forks source link

[bug] 多人游戏编辑其他玩家导致被踢出 #20

Closed vocaloidkiss closed 1 year ago

vocaloidkiss commented 1 year ago

多人游戏编辑其他玩家payload过大导致被踢出, 是正常现象吗,双端均以安装并配置权限无问题,这是不是说明其实就不能编辑玩家。。。。裸体玩家就超过32767byte了 2023-09-15_20 09 56

vocaloidkiss commented 1 year ago

有无解决办法

qyl27 commented 1 year ago

其实在原先1.12时代的nbtedit代码里面就有说这个功能是 use it at your own risk ,我此前也没有仔细实验过这个功能,我会去调查一下这个问题,并想办法解决。
另外想知道你的游戏都安装了哪些模组呢?很多模组都会给玩家附加他们自己的信息。

vocaloidkiss commented 1 year ago

看看默认的nbt可以吗

vocaloidkiss commented 1 year ago

[23:18:30] vocaloidkiss拥有以下实体数据:{seenCredits: 1b, DeathTime: 0s, foodTickTimer: 0, recipeBook: {recipes: [], isGuiOpen: 1b, toBeDisplayed: [], isSmokerGuiOpen: 0b, isFurnaceFilteringCraftable: 0b, isFurnaceGuiOpen: 0b, isBlastingFurnaceFilteringCraftable: 0b, isBlastingFurnaceGuiOpen: 0b, isFilteringCraftable: 1b, isSmokerFilteringCraftable: 0b}, OnGround: 1b, AbsorptionAmount: 0.0f, XpTotal: 5031, SpawnDimension: "minecraft:overworld", SpawnX: 5741, playerGameType: 0, Attributes: [{Name: "minecraft:generic.attack_speed", Base: 4.0d}, {Name: "minecraft:generic.knockback_resistance", Base: 0.0d}, {Name: "minecraft:generic.attack_damage", Base: 1.0d}, {Name: "minecraft:generic.movement_speed", Base: 0.10000000149011612d}, {Name: "minecraft:generic.max_health", Base: 20.0d}, {Name: "minecraft:generic.armor", Base: 0.0d}, {Name: "minecraft:generic.luck", Base: 0.0d}, {Name: "minecraft:generic.armor_toughness", Base: 0.0d}], Invulnerable: 0b, SelectedItemSlot: 0, Brain: {memories: {}}, SpawnAngle: -111.14979f, Dimension: "minecraft:overworld", abilities: {walkSpeed: 0.1f, instabuild: 0b, flying: 0b, flySpeed: 0.05f, mayfly: 0b, invulnerable: 0b, mayBuild: 1b}, Score: 5031, Rotation: [-66.1413f, 11.999868f], HurtByTimestamp: 6667, "fabrictailor:skin_data": {value: "ewogICJ0aW1lc3RhbXAiIDogMTY5NDA2ODI2MTgxOSwKICAicHJvZmlsZUlkIiA6ICI1OWM2YjQzYzc2ZDI0N2NkOGViNTE4YzhjOWM5OTE3OSIsCiAgInByb2ZpbGVOYW1lIiA6ICJ2b2NhbG9pZGtpc3MiLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTZhMTdlODgxNjc0MmU0NDQ4NzQ1OWRiOTZjOTI3ZDNmYmI3MjI4Zjc3MjIwZGU2MjRhOTY2MjdiMWNmZWRjZSIsCiAgICAgICJtZXRhZGF0YSIgOiB7CiAgICAgICAgIm1vZGVsIiA6ICJzbGltIgogICAgICB9CiAgICB9CiAgfQp9", signature: "HEi0FCNNZfLsOsVGEdqY+N4p0tLmRPyGwNBe2Y/IqoLF0HRjL+bkOi6YP0Cvb5OKYJvtZXpKnaVBa8srqNdMCteK/zn4of+7HqCmvW2nR8b9mT40R8LxBFjjJPCEIq5jNRGo3fle+m/jFGUtIkMkzMYIyFsKEk2RJsItC7NpYAnRwDBVqtg5ITVOP8B3wDUXt6Ht/o0Q6cwzueUmIeAW0mmk2zyeCBHw5h2Tu3BbKMYkFfdlgMp7Kwd0EvVNCC0/85XKEfaQuZT4LMPTzI4piqogPwCNJbc/L8ZSxLC9BD6cVYuLMm2919EOJgkJDeXnHCUF1QP72tzvnCDjgzdoHtcSjUcwGz18ctYdKKtzpneCcrbekfYtOOQKDEn8d9PME/nzK/37GYWjPridkqdU1dip98cF2r1/eKfQFY1WDMkF49lyx9g0mM0wFkmjzr9i6YXQvgSW9IX40J33WNN1Txl1TNvoiAac8TVokIFDr37Qco6j96zTQhrlm1uJDfMXhABGX8xBs1gxE9iR0lo4kHL868y8V5CL0mzMQFFWuPVpjcOzgtBO3An8W+ROF+avuQDmHxyc6oIzHfuupEER/Rfiyr89I0WOVVCnOUa5pK1LdH+eNrX/guzzZifio0gV4P77RkeO5st+QaGlVM7lGsFr0Ibluly4w4s/oMvLkNU="}, foodSaturationLevel: 20.0f, "playerabilitylib:abilities": [{ability_sources: [], ability_id: "minecraft:mayfly"}, {ability_sources: [], ability_id: "minecraft:instabuild"}, {ability_sources: [], ability_id: "minecraft:maynotbuild"}, {ability_sources: [], ability_id: "minecraft:flying"}, {ability_sources: [], ability_id: "minecraft:invulnerable"}], SpawnZ: 258, SpawnY: 108, LastDeathLocation: {pos: [I; 513, 64, -372], dimension: "minecraft:the_nether"}, Air: 300s, EnderItems: [], XpSeed: -1106879855, foodLevel: 20, UUID: [I; 1506194492, 1993492429, -1900734264, -909536903], XpLevel: 0, Inventory: [], Motion: [0.0d, -0.0784000015258789d, 0.0d], FallDistance: 0.0f, DataVersion: 3465, SleepTimer: 0s, XpP: 0.0f, warden_spawn_tracker: {ticks_since_last_warning: 9992, cooldown_ticks: 0, warning_level: 0}, SpawnForced: 0b, Pos: [5975.9728880407665d, 82.0d, 323.66065443496115d], Health: 20.0f, HurtTime: 0s, FallFlying: 0b, Fire: -20s, PortalCooldown: 0, foodExhaustionLevel: 2.645753f}

vocaloidkiss commented 1 year ago

fabrictailor的skin纹理数据占了一半,配方解锁多了也有几千条数据

vocaloidkiss commented 1 year ago

很奇怪的是,为什么不能把nbt分成小于最大限制的几份发送到服务端修改呢

vocaloidkiss commented 1 year ago

试验完毕,裸体玩家可以编辑,但是nbt多了就寄了,编辑没毛病,就是数据包发送的锅

qyl27 commented 1 year ago

问题确认了。
经过搜索,我认为可以使用 Packet Fixer 模组来直接解决此问题,它已经很完善,且支持 Forge/Fabric 1.15 - 1.20 。
(这个问题似乎在很多大型模组包里面都会发生……或许一个通用的解决方案比模组自己mixin要好。)

qyl27 commented 1 year ago

这个问题先close了,因为已经有模组解决了数据包传输过大的问题(PacketFixer),且不是本模组主要要解决的问题。
我在本项目介绍中的常见问题处也加上了相关说明。