You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the current default as of latest release as of this message
{
"// Patches some outgoing server packets": "",
"main": {
"// Prevents hitting/chatting with open GUI": "",
"checkInventoryActions": true,
"// Prevents headless pistons from destroying blocks that are not piston extensions.": "",
"preventDestructionByHeadlessPistons": true,
"// Allows headless pistons to destroy certain blocks when preventing destruction is enabled.": "",
"// Useful to allow only breaking of bedrock but denying destruction of barriers.": "",
"allowedDestructibleByHeadlessPistons": [
"minecraft:piston_head"
],
"// What altitude in the nether should start inflicting void damage (e.g. 128). -1 disables it.": "",
"inflictNetherRoofDamage": -1
},
"items": {
"survival": {
"// Whether to enable 'legalising' survival items.": "",
"// Whether to check whole inventory when connecting / changing dimensions, etc.": "",
"legaliseWholeInventory": true,
"// Which items should be cleared when clicked in survival inventory": "",
"bannedItems": {
"minecraft:structure_void": "",
"minecraft:end_portal_frame": "",
"minecraft:bedrock": "",
"minecraft:barrier": "",
"minecraft:repeating_command_block": "",
"minecraft:command_block": "",
"minecraft:spawner": "",
"minecraft:jigsaw": "",
"minecraft:air": "",
"minecraft:structure_block": "",
"minecraft:air": "",
"minecraft:air": "",
"minecraft:chain_command_block": ""
},
"banSpawnEggs": true,
"checkEnchants": true,
"checkPotionLevels": true,
"checkItemCount": true
},
"creative": {
"// Whether to check whole inventory when connecting / changing dimensions, etc.": "",
"legaliseWholeInventory": true,
"// Which NBT shouldn't be cleared": "",
"// Disallow all NBT tags in creative which aren't in whitelist section.": "",
"whitelistedNBT": [
"EntityTag",
"Enchantments",
"StoredEnchantments",
"BlockEntityTag",
"Damage",
"Potion",
"display"
],
"removeCreativeNBTTags": true,
"checkEnchants": true,
"checkPotionLevels": true,
"checkItemCount": true
}
},
"combat": {
"_comment": "// Combat checks settings.",
"preventWallHit": true,
"checkHitDistance": true,
"checkHitAngle": true
},
"packet": {
"removeTeleportData": true,
"removeHealthTags": true,
"// Allows health tags for certain entities.": "",
"// This maps entity ID to percentage as decimal.": "",
"allowedHealthTags": {
"minecraft:iron_golem": 0.25,
"minecraft:wither": 0.5,
"minecraft:wolf": 0.0
},
"removeEquipmentTags": true,
"checkPortalHack": true,
"patchSoundExploits": true,
"removeDroppedItemInfo": true,
"patchItemKickExploit": true
},
"movement": {
"patchNoFall": true
},
"duplication": {
"_comment": "// Duplication fixes",
"// Whether to prevent throwing an error when saving large string data.": "",
"// This is done by ignoring data after DataOutputStream limit.": "",
"// Written books can reach that point with hacked clients.": "",
"patchSaveLimit": true,
"// Whether to disable gravity block duping.": "",
"patchGravityBlock": true,
"// Checks if player is connected before applying damage.": "",
"// Prevents duplicating inventory if player dies after disconnect.": "",
"patchDeathDuplication": true
}
}
proposed json
{//Patches some outgoing server packets,"main": {//Prevents hitting/chatting with open GUI,"checkInventoryActions": true,//Prevents headless pistons from destroying blocks that are not piston extensions.,"preventDestructionByHeadlessPistons": true,//Allows headless pistons to destroy certain blocks when preventing destruction is enabled.,//Useful to allow only breaking of bedrock but denying destruction of barriers.,"allowedDestructibleByHeadlessPistons": ["minecraft:piston_head"],//What altitude in the nether should start inflicting void damage (e.g. 128). -1 disables it.,"inflictNetherRoofDamage": -1},"items": {"survival": {//Whether to enable 'legalising' survival items.,//Whether to check whole inventory when connecting / changing dimensions, etc.,"legaliseWholeInventory": true,//Which items should be cleared when clicked in survival inventory,"bannedItems": ["minecraft:structure_void","minecraft:end_portal_frame","minecraft:bedrock","minecraft:barrier","minecraft:repeating_command_block","minecraft:command_block","minecraft:spawner","minecraft:jigsaw","minecraft:air","minecraft:structure_block","minecraft:air","minecraft:air","minecraft:chain_command_block"],"banSpawnEggs": true,"checkEnchants": true,"checkPotionLevels": true,"checkItemCount": true},"creative": {//Whether to check whole inventory when connecting / changing dimensions, etc.,"legaliseWholeInventory": true,//Which NBT shouldn't be cleared,//Disallow all NBT tags in creative which aren't in whitelist section.,"whitelistedNBT": ["EntityTag","Enchantments","StoredEnchantments","BlockEntityTag","Damage","Potion","display"],"removeCreativeNBTTags": true,"checkEnchants": true,"checkPotionLevels": true,"checkItemCount": true}},"combat": {//Combat checks settings.","preventWallHit": true,"checkHitDistance": true,"checkHitAngle": true},"packet": {"removeTeleportData": true,"removeHealthTags": true,//Allows health tags for certain entities.,//This maps entity ID to percentage as decimal.,"allowedHealthTags": {"minecraft:iron_golem": 0.25,"minecraft:wither": 0.5,"minecraft:wolf": 0.0},"removeEquipmentTags": true,"checkPortalHack": true,"patchSoundExploits": true,"removeDroppedItemInfo": true,"patchItemKickExploit": true},"movement": {"patchNoFall": true},"duplication": {//Duplication fixes//Whether to prevent throwing an error when saving large string data.,//This is done by ignoring data after DataOutputStream limit.,//Written books can reach that point with hacked clients.,"patchSaveLimit": true,//Whether to disable gravity block duping.,"patchGravityBlock": true,//Checks if player is connected before applying damage.,//Prevents duplicating inventory if player dies after disconnect.,"patchDeathDuplication": true}}
make comments be actual comments (not json keys)
Easier to read
make inventory blacklist actually be an [list] and not an {table}
Makes editors not have a heart attack when modified
if you are concerned about reading the config file, what you can do is
(psuedo code)
// open file
for each line do
line = readLine
line = (trim whitespace from beginning)
if line.hasPrefix("//") then
ignore
else
append(jsondata, line) // append line to jsondata
end
// parse jsondata as if you are parsing file
The text was updated successfully, but these errors were encountered:
A problem is that the JSON library used here, GSON, has no native method for writing comments in JSON since the JSON spec normally doesn't allow those. It can read and ignore comments fine with lenient set tho.
If we want native JSON comments as part of JSON 5, we'll likely want Jankson (likely more favourable with being much more fault tolerant with inputs), so that'd be something to consider on top.
the current default as of latest release as of this message
proposed json
[list]
and not an{table}
if you are concerned about reading the config file, what you can do is
(psuedo code)
The text was updated successfully, but these errors were encountered: