Skip to content

Database is insert NBT tag on items that have no NBT tags #39

@phillipinman

Description

@phillipinman

Issue Description:

InvSync is inserting a 0 NBt tag causing items to be considered separate. For example, minecraft:goldingot is becoming minecraft:goldingot with NBT tags 0 on logout. This results in two items essentially.

Screenshot:
image
image

What happens:

Results in two items, one with no NBT data and one with 0 NBT tags

What you expected to happen:

Both items to have null NBT data and combine into stacks

Steps to reproduce:

  1. Setup DB sync
  2. get a gold ingot and throw it on the ground, meanwhile put another one in your inventory and log out then back in
  3. pickup and compare the ingots, one will have nul NBT data and the other 0 NBT tags
    ...

Affected Versions (Do not use "latest"):

  • Minecraft: 1.12.2
  • InvSync: InvSync-0.6.19.298-DEV.jar
  • Sponge: spongeforge-1.12.2-2768-7.1.6-RC3643.jar
  • Other related mods: NA, forge is present
  • IMPORTANT: MariaDB is used instead of MySQL due to Redhat Licensing.

Your most recent log or stack trace file where the issue was present:

Most relevent log:

[21:03:39] [Server thread/INFO] [invsync]: {"potion_effects":{"data":[]},"mod.baubles":{"data":[]},"game_mode":{"data":"minecraft:survival"},"health":{"data":20.0},"ender_chest":{"data":[]},"inventory":{"selectedSlot":0,"inventory":[{"slot":0,"stack":{"ContentVersion":1,"ItemType":"minecraft:diamond_pickaxe","Count":1,"UnsafeDamage":2,"UnsafeData":{}}},{"slot":1,"stack":{"ContentVersion":1,"ItemType":"minecraft:cobblestone","Count":64,"UnsafeDamage":0,"UnsafeData":{}}}]},"experience":{"experience_since_level":20,"experience_level":11},"version":1,"hunger":{"saturation":1.0,"food_level":20}}
[21:03:39] [Server thread/DEBUG] [invsync]: Preparing statement: REPLACE INTO invsync_inventories (UUID, Active, Data) VALUES (?, FALSE, ?)
[21:03:39] [Server thread/DEBUG] [invsync]: Saving inventory for player Iron_Phildo69 (64f2ebea-4b08-4cbb-b288-7a772381ed27)
[21:03:39] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: Iron_Phildo69 left the game

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions