samolego / GolfIV

An anti-exploit attempt for Fabric
https://modrinth.com/mod/golfiv
MIT License
49 stars 13 forks source link

Item NBT data is being cleared even though it's disabled (Bug?) #51

Closed Voidazru closed 3 years ago

Voidazru commented 3 years ago

So, how do I put this. Me and my Friends are playing on a Fabric server and it's suspected that one of our players is using some kind of hacked client. I've installed this mod and everything works fine so far, except that all the NBT data from items is being cleared/not in sync. We're using custom model data for some items and they lose their nbt, banners lose their nbt and player/mob heads lose their nbt. They do however get their models/nbt data back after you click on them in your inventory but as soon as you open a new container or even just your inventory their nbt data is being reset -> EDIT: If you interact with anything (rightclick) it removes the nbt data of all items in your inventory/in the container interacted with. I can't even see the enchantments on my items after opening a door.... This is nothing major but it's just a bit annoying having to click the items constantly for them to look different. We just want the movement/combat anticheat really so it'd be cool if there is a way to remove the nbt data specific part of the config :D I should add that the server is in 1.17

This is the config file (I'm not too experienced with JSON so maybe I did something wrong here? If yes please let me know!)

{ "main": { "_comment_checkInventoryActions": "// Prevents hitting/chatting with open GUI", "checkInventoryActions": true }, "items": { "survival": { "_comment_legalise": "// Whether to enable 'legalising' survival items.", "_comment_bannedSurvivalItems": "// Which items should be cleared when clicked in survival inventory", "bannedItems": [ "minecraft:barrier", "minecraft:spawner", "minecraft:structure_void", "minecraft:bedrock", "minecraft:command_block", "minecraft:spawn_egg" ], "checkEnchants": true, "checkPotionLevels": true, "checkItemCount": true }, "creative": { "_comment_whitelistedNBT": "// Which NBT shouldn't be cleared", "whitelistedNBT": [ "EntityTag", "Enchantments", "StoredEnchantments", "BlockEntityTag", "Damage", "Potion", "display" ], "_comment_removeCreativeNBTTags": "// Disallow all NBT tags in creative which aren't in whitelist section.", "removeCreativeNBTTags": false, "checkEnchants": true, "checkPotionLevels": true, "checkItemCount": true } }, "combat": { "_comment": "// Combat checks settings.", "preventWallHit": true, "checkHitDistance": true, "checkHitAngle": true }, "packet": { "_comment": "// Patches some outgoing server packets", "removeTeleportData": true, "removeHealthTags": true, "removeEquipmentTags": false, "checkPortalHack": true, "patchSoundExploits": true, "removeDroppedItemInfo": true, "patchItemKickExploit": true }, "movement": { "_comment": "// Movement checks settings", "yesFall": true }, "duplication": { "_comment": "// Duplication fixes", "_comment_patchSaveLimit1": "// Whether to prevent throwing an error when saving large string data.", "_comment_patchSaveLimit2": "// This is done by ignoring data after DataOutputStream limit.", "_comment_patchSaveLimit3": "// Written books can reach that point with hacked clients.", "patchSaveLimit": true, "_comment_patchGravityBlock": "// Whether to disable gravity block duping.", "patchGravityBlock": true, "_comment_patchDeathDuplication1": "// Checks if player is connected before applying damage.", "_comment_patchDeathDuplication2": "// Prevents duplicating inventory if player dies after disconnect.", "patchDeathDuplication": true } }