From 1ba81dc62feb0f7bc231f591ee902d57004fc068 Mon Sep 17 00:00:00 2001 From: IntegratedQuantum Date: Thu, 16 May 2024 21:18:38 +0200 Subject: [PATCH] Fix the python script so it detects \r correctly. --- assets/cubyz/blocks/glass/aqua.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/black.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/blue.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/brown.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/crimson.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/cyan.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/dark_grey.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/green.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/grey.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/indigo.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/lime.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/magenta.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/orange.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/pink.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/purple.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/red.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/uranium.json | 24 ++++++++++++------------ assets/cubyz/blocks/glass/violet.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/viridian.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/white.json | 22 +++++++++++----------- assets/cubyz/blocks/glass/yellow.json | 22 +++++++++++----------- format_check.py | 2 +- 22 files changed, 233 insertions(+), 233 deletions(-) diff --git a/assets/cubyz/blocks/glass/aqua.json b/assets/cubyz/blocks/glass/aqua.json index 7a72c2dca..d1f3b8ca8 100644 --- a/assets/cubyz/blocks/glass/aqua.json +++ b/assets/cubyz/blocks/glass/aqua.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0xe95825, - "model" : "cube", - "texture" : "cubyz:glass/aqua" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0xe95825, + "model" : "cube", + "texture" : "cubyz:glass/aqua" +} diff --git a/assets/cubyz/blocks/glass/black.json b/assets/cubyz/blocks/glass/black.json index c75d5e6f5..f2e019a69 100644 --- a/assets/cubyz/blocks/glass/black.json +++ b/assets/cubyz/blocks/glass/black.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0xe6e6e6, - "model" : "cube", - "texture" : "cubyz:glass/black" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0xe6e6e6, + "model" : "cube", + "texture" : "cubyz:glass/black" +} diff --git a/assets/cubyz/blocks/glass/blue.json b/assets/cubyz/blocks/glass/blue.json index d640aecb3..c54dbe380 100644 --- a/assets/cubyz/blocks/glass/blue.json +++ b/assets/cubyz/blocks/glass/blue.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0xdc923c, - "model" : "cube", - "texture" : "cubyz:glass/blue" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0xdc923c, + "model" : "cube", + "texture" : "cubyz:glass/blue" +} diff --git a/assets/cubyz/blocks/glass/brown.json b/assets/cubyz/blocks/glass/brown.json index a71534a68..46af6a86f 100644 --- a/assets/cubyz/blocks/glass/brown.json +++ b/assets/cubyz/blocks/glass/brown.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0x96bdd8, - "model" : "cube", - "texture" : "cubyz:glass/brown" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0x96bdd8, + "model" : "cube", + "texture" : "cubyz:glass/brown" +} diff --git a/assets/cubyz/blocks/glass/crimson.json b/assets/cubyz/blocks/glass/crimson.json index d627c7881..773a04659 100644 --- a/assets/cubyz/blocks/glass/crimson.json +++ b/assets/cubyz/blocks/glass/crimson.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0x69e4e1, - "model" : "cube", - "texture" : "cubyz:glass/crimson" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0x69e4e1, + "model" : "cube", + "texture" : "cubyz:glass/crimson" +} diff --git a/assets/cubyz/blocks/glass/cyan.json b/assets/cubyz/blocks/glass/cyan.json index fbe24bd18..e5b621563 100644 --- a/assets/cubyz/blocks/glass/cyan.json +++ b/assets/cubyz/blocks/glass/cyan.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0xc62031, - "model" : "cube", - "texture" : "cubyz:glass/cyan" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0xc62031, + "model" : "cube", + "texture" : "cubyz:glass/cyan" +} diff --git a/assets/cubyz/blocks/glass/dark_grey.json b/assets/cubyz/blocks/glass/dark_grey.json index 419d974cf..037e5f3bd 100644 --- a/assets/cubyz/blocks/glass/dark_grey.json +++ b/assets/cubyz/blocks/glass/dark_grey.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0xacacac, - "model" : "cube", - "texture" : "cubyz:glass/dark_grey" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0xacacac, + "model" : "cube", + "texture" : "cubyz:glass/dark_grey" +} diff --git a/assets/cubyz/blocks/glass/green.json b/assets/cubyz/blocks/glass/green.json index 15b45adff..50de46fd7 100644 --- a/assets/cubyz/blocks/glass/green.json +++ b/assets/cubyz/blocks/glass/green.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0xd966d9, - "model" : "cube", - "texture" : "cubyz:glass/green" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0xd966d9, + "model" : "cube", + "texture" : "cubyz:glass/green" +} diff --git a/assets/cubyz/blocks/glass/grey.json b/assets/cubyz/blocks/glass/grey.json index 125d9ca39..f9fb24469 100644 --- a/assets/cubyz/blocks/glass/grey.json +++ b/assets/cubyz/blocks/glass/grey.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0x656565, - "model" : "cube", - "texture" : "cubyz:glass/grey" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0x656565, + "model" : "cube", + "texture" : "cubyz:glass/grey" +} diff --git a/assets/cubyz/blocks/glass/indigo.json b/assets/cubyz/blocks/glass/indigo.json index 0d87a06b0..e95cb9216 100644 --- a/assets/cubyz/blocks/glass/indigo.json +++ b/assets/cubyz/blocks/glass/indigo.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0xd0c16d, - "model" : "cube", - "texture" : "cubyz:glass/indigo" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0xd0c16d, + "model" : "cube", + "texture" : "cubyz:glass/indigo" +} diff --git a/assets/cubyz/blocks/glass/lime.json b/assets/cubyz/blocks/glass/lime.json index 88507b1fc..5bd32aedb 100644 --- a/assets/cubyz/blocks/glass/lime.json +++ b/assets/cubyz/blocks/glass/lime.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0xa03ed0, - "model" : "cube", - "texture" : "cubyz:glass/lime" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0xa03ed0, + "model" : "cube", + "texture" : "cubyz:glass/lime" +} diff --git a/assets/cubyz/blocks/glass/magenta.json b/assets/cubyz/blocks/glass/magenta.json index bf5475c9e..b8ab8235b 100644 --- a/assets/cubyz/blocks/glass/magenta.json +++ b/assets/cubyz/blocks/glass/magenta.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0x0d9f35, - "model" : "cube", - "texture" : "cubyz:glass/magenta" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0x0d9f35, + "model" : "cube", + "texture" : "cubyz:glass/magenta" +} diff --git a/assets/cubyz/blocks/glass/orange.json b/assets/cubyz/blocks/glass/orange.json index fd040ba42..dd6c1f57d 100644 --- a/assets/cubyz/blocks/glass/orange.json +++ b/assets/cubyz/blocks/glass/orange.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0x1183ee, - "model" : "cube", - "texture" : "cubyz:glass/orange" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0x1183ee, + "model" : "cube", + "texture" : "cubyz:glass/orange" +} diff --git a/assets/cubyz/blocks/glass/pink.json b/assets/cubyz/blocks/glass/pink.json index e95d865a7..6a220fc26 100644 --- a/assets/cubyz/blocks/glass/pink.json +++ b/assets/cubyz/blocks/glass/pink.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0x056830, - "model" : "cube", - "texture" : "cubyz:glass/pink" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0x056830, + "model" : "cube", + "texture" : "cubyz:glass/pink" +} diff --git a/assets/cubyz/blocks/glass/purple.json b/assets/cubyz/blocks/glass/purple.json index 82937374f..be6357553 100644 --- a/assets/cubyz/blocks/glass/purple.json +++ b/assets/cubyz/blocks/glass/purple.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0x83d66a, - "model" : "cube", - "texture" : "cubyz:glass/purple" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0x83d66a, + "model" : "cube", + "texture" : "cubyz:glass/purple" +} diff --git a/assets/cubyz/blocks/glass/red.json b/assets/cubyz/blocks/glass/red.json index 6de360193..2c14210b3 100644 --- a/assets/cubyz/blocks/glass/red.json +++ b/assets/cubyz/blocks/glass/red.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0x2ad6d6, - "model" : "cube", - "texture" : "cubyz:glass/red" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0x2ad6d6, + "model" : "cube", + "texture" : "cubyz:glass/red" +} diff --git a/assets/cubyz/blocks/glass/uranium.json b/assets/cubyz/blocks/glass/uranium.json index f7c77d813..08517c422 100644 --- a/assets/cubyz/blocks/glass/uranium.json +++ b/assets/cubyz/blocks/glass/uranium.json @@ -1,12 +1,12 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0x4001ff, - "emittedLight" : 0x80ff00, - "model" : "cube", - "texture" : "cubyz:glass/uranium" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0x4001ff, + "emittedLight" : 0x80ff00, + "model" : "cube", + "texture" : "cubyz:glass/uranium" +} diff --git a/assets/cubyz/blocks/glass/violet.json b/assets/cubyz/blocks/glass/violet.json index f7cfb9c82..fbac04cba 100644 --- a/assets/cubyz/blocks/glass/violet.json +++ b/assets/cubyz/blocks/glass/violet.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0x46c345, - "model" : "cube", - "texture" : "cubyz:glass/violet" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0x46c345, + "model" : "cube", + "texture" : "cubyz:glass/violet" +} diff --git a/assets/cubyz/blocks/glass/viridian.json b/assets/cubyz/blocks/glass/viridian.json index a4a41223d..a2b296493 100644 --- a/assets/cubyz/blocks/glass/viridian.json +++ b/assets/cubyz/blocks/glass/viridian.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0xf09ad6, - "model" : "cube", - "texture" : "cubyz:glass/viridian" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0xf09ad6, + "model" : "cube", + "texture" : "cubyz:glass/viridian" +} diff --git a/assets/cubyz/blocks/glass/white.json b/assets/cubyz/blocks/glass/white.json index adc0d6c25..1c4815133 100644 --- a/assets/cubyz/blocks/glass/white.json +++ b/assets/cubyz/blocks/glass/white.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0x0f0f0f, - "model" : "cube", - "texture" : "cubyz:glass/white" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0x0f0f0f, + "model" : "cube", + "texture" : "cubyz:glass/white" +} diff --git a/assets/cubyz/blocks/glass/yellow.json b/assets/cubyz/blocks/glass/yellow.json index ad7feb981..cdfe91962 100644 --- a/assets/cubyz/blocks/glass/yellow.json +++ b/assets/cubyz/blocks/glass/yellow.json @@ -1,11 +1,11 @@ -{ - "class" : "stone", - "hardness" : 2, - "drops" : [ - "none" - ], - "transparent" : true, - "absorbedLight" : 0x0d36f1, - "model" : "cube", - "texture" : "cubyz:glass/yellow" -} +{ + "class" : "stone", + "hardness" : 2, + "drops" : [ + "none" + ], + "transparent" : true, + "absorbedLight" : 0x0d36f1, + "model" : "cube", + "texture" : "cubyz:glass/yellow" +} diff --git a/format_check.py b/format_check.py index cb13421a2..7c928797d 100644 --- a/format_check.py +++ b/format_check.py @@ -16,7 +16,7 @@ for subdir, dirs, files in os.walk("."): if filepath.startswith("./zig-cache"): continue if filepath.endswith(".json") or filepath.endswith(".zig") or filepath.endswith(".py") or filepath.endswith(".zon") or filepath.endswith(".vs") or filepath.endswith(".fs") or filepath.endswith(".glsl"): - with open(filepath, "r") as f: + with open(filepath, "r", newline = '') as f: string = f.read() line = 1 lineStart = True