diff --git a/assets/cubyz/blocks/birch_fence.json b/assets/cubyz/blocks/birch_fence.json index 13eefd36..cfb43a1e 100644 --- a/assets/cubyz/blocks/birch_fence.json +++ b/assets/cubyz/blocks/birch_fence.json @@ -6,7 +6,7 @@ ], "absorbedLight" : 0x202830, "rotation" : "fence", - "model" : "fence", + "model" : "cubyz:fence", "texture" : "cubyz:birch_fence", "texture_top" : "cubyz:birch_fence_top", "texture_bottom" : "cubyz:birch_fence_top" diff --git a/assets/cubyz/blocks/birch_leaves.json b/assets/cubyz/blocks/birch_leaves.json index 7f34fd1a..ee6fa041 100644 --- a/assets/cubyz/blocks/birch_leaves.json +++ b/assets/cubyz/blocks/birch_leaves.json @@ -8,7 +8,7 @@ "degradable" : true, "alwaysViewThrough" : true, "absorbedLight" : 0x121012, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:birch_leaves", "lodReplacement" : "cubyz:birch_leaves_opaque", "opaqueVariant" : "cubyz:birch_leaves_opaque" diff --git a/assets/cubyz/blocks/birch_leaves_opaque.json b/assets/cubyz/blocks/birch_leaves_opaque.json index 521a9e95..285949ee 100644 --- a/assets/cubyz/blocks/birch_leaves_opaque.json +++ b/assets/cubyz/blocks/birch_leaves_opaque.json @@ -2,6 +2,6 @@ "class" : "leaf", "hasItem" : false, "absorbedLight" : 0x121012, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:birch_leaves_opaque" } diff --git a/assets/cubyz/blocks/birch_log.json b/assets/cubyz/blocks/birch_log.json index 5101de47..9b92f1b5 100644 --- a/assets/cubyz/blocks/birch_log.json +++ b/assets/cubyz/blocks/birch_log.json @@ -5,7 +5,7 @@ "auto" ], "rotation" : "log", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:birch_log", "texture_top" : "cubyz:birch_log_top", "texture_bottom" : "cubyz:birch_log_top" diff --git a/assets/cubyz/blocks/birch_planks.json b/assets/cubyz/blocks/birch_planks.json index 19a9242a..f74d5b9e 100644 --- a/assets/cubyz/blocks/birch_planks.json +++ b/assets/cubyz/blocks/birch_planks.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:birch_planks" } diff --git a/assets/cubyz/blocks/birch_top.json b/assets/cubyz/blocks/birch_top.json index 277de22a..7931ff0f 100644 --- a/assets/cubyz/blocks/birch_top.json +++ b/assets/cubyz/blocks/birch_top.json @@ -5,7 +5,7 @@ "auto" ], "rotation" : "log", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:birch_log", "texture_top" : "cubyz:birch_log", "texture_bottom" : "cubyz:birch_log_top", diff --git a/assets/cubyz/blocks/cactus.json b/assets/cubyz/blocks/cactus.json index ba94cf62..54e200f5 100644 --- a/assets/cubyz/blocks/cactus.json +++ b/assets/cubyz/blocks/cactus.json @@ -4,6 +4,6 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:cactus" } diff --git a/assets/cubyz/blocks/chalk/aqua.json b/assets/cubyz/blocks/chalk/aqua.json index de8e77fe..9fd23ed8 100644 --- a/assets/cubyz/blocks/chalk/aqua.json +++ b/assets/cubyz/blocks/chalk/aqua.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/aqua" } diff --git a/assets/cubyz/blocks/chalk/black.json b/assets/cubyz/blocks/chalk/black.json index ad6bdeba..4e27f6b6 100644 --- a/assets/cubyz/blocks/chalk/black.json +++ b/assets/cubyz/blocks/chalk/black.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/black" } diff --git a/assets/cubyz/blocks/chalk/blue.json b/assets/cubyz/blocks/chalk/blue.json index 67fbec1c..ed0cc7dc 100644 --- a/assets/cubyz/blocks/chalk/blue.json +++ b/assets/cubyz/blocks/chalk/blue.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/blue" } diff --git a/assets/cubyz/blocks/chalk/brown.json b/assets/cubyz/blocks/chalk/brown.json index d4d2df08..8edbc7c2 100644 --- a/assets/cubyz/blocks/chalk/brown.json +++ b/assets/cubyz/blocks/chalk/brown.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/brown" } diff --git a/assets/cubyz/blocks/chalk/crimson.json b/assets/cubyz/blocks/chalk/crimson.json index e14211bf..06bfbd9a 100644 --- a/assets/cubyz/blocks/chalk/crimson.json +++ b/assets/cubyz/blocks/chalk/crimson.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/crimson" } diff --git a/assets/cubyz/blocks/chalk/cyan.json b/assets/cubyz/blocks/chalk/cyan.json index c7ba7a80..d94d39c8 100644 --- a/assets/cubyz/blocks/chalk/cyan.json +++ b/assets/cubyz/blocks/chalk/cyan.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/cyan" } diff --git a/assets/cubyz/blocks/chalk/dark_grey.json b/assets/cubyz/blocks/chalk/dark_grey.json index fb00e73d..6f10e55b 100644 --- a/assets/cubyz/blocks/chalk/dark_grey.json +++ b/assets/cubyz/blocks/chalk/dark_grey.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/dark_grey" } diff --git a/assets/cubyz/blocks/chalk/green.json b/assets/cubyz/blocks/chalk/green.json index 6f01e4b1..17fda801 100644 --- a/assets/cubyz/blocks/chalk/green.json +++ b/assets/cubyz/blocks/chalk/green.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/green" } diff --git a/assets/cubyz/blocks/chalk/grey.json b/assets/cubyz/blocks/chalk/grey.json index af3f740a..3b53dd10 100644 --- a/assets/cubyz/blocks/chalk/grey.json +++ b/assets/cubyz/blocks/chalk/grey.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/grey" } diff --git a/assets/cubyz/blocks/chalk/indigo.json b/assets/cubyz/blocks/chalk/indigo.json index 672343f3..232fe288 100644 --- a/assets/cubyz/blocks/chalk/indigo.json +++ b/assets/cubyz/blocks/chalk/indigo.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/indigo" } diff --git a/assets/cubyz/blocks/chalk/lime.json b/assets/cubyz/blocks/chalk/lime.json index 490123a9..c71fc57a 100644 --- a/assets/cubyz/blocks/chalk/lime.json +++ b/assets/cubyz/blocks/chalk/lime.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/lime" } diff --git a/assets/cubyz/blocks/chalk/magenta.json b/assets/cubyz/blocks/chalk/magenta.json index 825fd9eb..cd566fca 100644 --- a/assets/cubyz/blocks/chalk/magenta.json +++ b/assets/cubyz/blocks/chalk/magenta.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/magenta" } diff --git a/assets/cubyz/blocks/chalk/orange.json b/assets/cubyz/blocks/chalk/orange.json index 9e379c4f..c807a453 100644 --- a/assets/cubyz/blocks/chalk/orange.json +++ b/assets/cubyz/blocks/chalk/orange.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/orange" } diff --git a/assets/cubyz/blocks/chalk/pink.json b/assets/cubyz/blocks/chalk/pink.json index b7523894..32ee7ac5 100644 --- a/assets/cubyz/blocks/chalk/pink.json +++ b/assets/cubyz/blocks/chalk/pink.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/pink" } diff --git a/assets/cubyz/blocks/chalk/purple.json b/assets/cubyz/blocks/chalk/purple.json index c46836cc..c5444802 100644 --- a/assets/cubyz/blocks/chalk/purple.json +++ b/assets/cubyz/blocks/chalk/purple.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/purple" } diff --git a/assets/cubyz/blocks/chalk/red.json b/assets/cubyz/blocks/chalk/red.json index b53327b8..49228c35 100644 --- a/assets/cubyz/blocks/chalk/red.json +++ b/assets/cubyz/blocks/chalk/red.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/red" } diff --git a/assets/cubyz/blocks/chalk/violet.json b/assets/cubyz/blocks/chalk/violet.json index fae22878..ccf38c84 100644 --- a/assets/cubyz/blocks/chalk/violet.json +++ b/assets/cubyz/blocks/chalk/violet.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/violet" } diff --git a/assets/cubyz/blocks/chalk/viridian.json b/assets/cubyz/blocks/chalk/viridian.json index 603a90fb..937a3a64 100644 --- a/assets/cubyz/blocks/chalk/viridian.json +++ b/assets/cubyz/blocks/chalk/viridian.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/viridian" } diff --git a/assets/cubyz/blocks/chalk/white.json b/assets/cubyz/blocks/chalk/white.json index d2056679..df1caa92 100644 --- a/assets/cubyz/blocks/chalk/white.json +++ b/assets/cubyz/blocks/chalk/white.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/white" } diff --git a/assets/cubyz/blocks/chalk/yellow.json b/assets/cubyz/blocks/chalk/yellow.json index c57ddce4..1b0973d9 100644 --- a/assets/cubyz/blocks/chalk/yellow.json +++ b/assets/cubyz/blocks/chalk/yellow.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:chalk/yellow" } diff --git a/assets/cubyz/blocks/coal_ore.json b/assets/cubyz/blocks/coal_ore.json index 86f429c0..295c36dd 100644 --- a/assets/cubyz/blocks/coal_ore.json +++ b/assets/cubyz/blocks/coal_ore.json @@ -14,6 +14,6 @@ "drops" : [ "cubyz:coal" ], - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:coal_ore" } diff --git a/assets/cubyz/blocks/cobblestone.json b/assets/cubyz/blocks/cobblestone.json index 96326d4a..750b105a 100644 --- a/assets/cubyz/blocks/cobblestone.json +++ b/assets/cubyz/blocks/cobblestone.json @@ -15,7 +15,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:cobblestone", "rotation" : "stairs", diff --git a/assets/cubyz/blocks/diamond_ore.json b/assets/cubyz/blocks/diamond_ore.json index b95e803c..d02fb0e3 100644 --- a/assets/cubyz/blocks/diamond_ore.json +++ b/assets/cubyz/blocks/diamond_ore.json @@ -14,6 +14,6 @@ "drops" : [ "cubyz:diamond" ], - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:diamond_ore" } diff --git a/assets/cubyz/blocks/dirt.json b/assets/cubyz/blocks/dirt.json index cbe17ffc..0ee7687f 100644 --- a/assets/cubyz/blocks/dirt.json +++ b/assets/cubyz/blocks/dirt.json @@ -4,6 +4,6 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:dirt" } diff --git a/assets/cubyz/blocks/ferrock.json b/assets/cubyz/blocks/ferrock.json index 5865f5b4..e6a9b0e8 100644 --- a/assets/cubyz/blocks/ferrock.json +++ b/assets/cubyz/blocks/ferrock.json @@ -5,7 +5,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:ferrock" } diff --git a/assets/cubyz/blocks/ferrock_bricks.json b/assets/cubyz/blocks/ferrock_bricks.json index 6db34242..d9c8773c 100644 --- a/assets/cubyz/blocks/ferrock_bricks.json +++ b/assets/cubyz/blocks/ferrock_bricks.json @@ -6,6 +6,6 @@ "auto" ], "rotation" : "stairs", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:ferrock_bricks" } diff --git a/assets/cubyz/blocks/fog/blue.json b/assets/cubyz/blocks/fog/blue.json index cb1a6040..6306813c 100644 --- a/assets/cubyz/blocks/fog/blue.json +++ b/assets/cubyz/blocks/fog/blue.json @@ -11,7 +11,7 @@ "collide": false, "absorbedLight" : 0x010100, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:fog/blue" "item": { "texture" : "fog/blue.png", diff --git a/assets/cubyz/blocks/fog/cyan.json b/assets/cubyz/blocks/fog/cyan.json index bb63a459..5b9ce6a6 100644 --- a/assets/cubyz/blocks/fog/cyan.json +++ b/assets/cubyz/blocks/fog/cyan.json @@ -11,7 +11,7 @@ "collide": false, "absorbedLight" : 0x010000, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:fog/cyan" "item": { "texture" : "fog/cyan.png", diff --git a/assets/cubyz/blocks/fog/green.json b/assets/cubyz/blocks/fog/green.json index 83b08fae..97998f1d 100644 --- a/assets/cubyz/blocks/fog/green.json +++ b/assets/cubyz/blocks/fog/green.json @@ -11,7 +11,7 @@ "collide": false, "absorbedLight" : 0x010001, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:fog/green" "item": { "texture" : "fog/green.png", diff --git a/assets/cubyz/blocks/fog/magenta.json b/assets/cubyz/blocks/fog/magenta.json index 65382f3d..23b70326 100644 --- a/assets/cubyz/blocks/fog/magenta.json +++ b/assets/cubyz/blocks/fog/magenta.json @@ -11,7 +11,7 @@ "collide": false, "absorbedLight" : 0x000100, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:fog/magenta" "item": { "texture" : "fog/magenta.png", diff --git a/assets/cubyz/blocks/fog/red.json b/assets/cubyz/blocks/fog/red.json index 049f64f2..a8ae597a 100644 --- a/assets/cubyz/blocks/fog/red.json +++ b/assets/cubyz/blocks/fog/red.json @@ -11,7 +11,7 @@ "collide": false, "absorbedLight" : 0x000101, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:fog/red" "item": { "texture" : "fog/red.png", diff --git a/assets/cubyz/blocks/fog/yellow.json b/assets/cubyz/blocks/fog/yellow.json index 81ecf64a..9f2e0a08 100644 --- a/assets/cubyz/blocks/fog/yellow.json +++ b/assets/cubyz/blocks/fog/yellow.json @@ -11,7 +11,7 @@ "collide": false, "absorbedLight" : 0x000001, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:fog/yellow" "item": { "texture" : "fog/yellow.png", diff --git a/assets/cubyz/blocks/frost.json b/assets/cubyz/blocks/frost.json index 4ca5cd45..29e2c7f8 100644 --- a/assets/cubyz/blocks/frost.json +++ b/assets/cubyz/blocks/frost.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:frost", "blockEntity" : "cubyz.modding.base.MeltableBlockEntity" } diff --git a/assets/cubyz/blocks/glacite.json b/assets/cubyz/blocks/glacite.json index 5a187749..171886af 100644 --- a/assets/cubyz/blocks/glacite.json +++ b/assets/cubyz/blocks/glacite.json @@ -6,6 +6,6 @@ "auto" ], "rotation" : "stairs", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glacite" } diff --git a/assets/cubyz/blocks/glacite_bricks.json b/assets/cubyz/blocks/glacite_bricks.json index fd4e62dc..15746763 100644 --- a/assets/cubyz/blocks/glacite_bricks.json +++ b/assets/cubyz/blocks/glacite_bricks.json @@ -6,6 +6,6 @@ "auto" ], "rotation" : "stairs", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glacite_bricks" } diff --git a/assets/cubyz/blocks/glass/aqua.json b/assets/cubyz/blocks/glass/aqua.json index 37e6a029..fae644c7 100644 --- a/assets/cubyz/blocks/glass/aqua.json +++ b/assets/cubyz/blocks/glass/aqua.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0xe95825, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/aqua" } diff --git a/assets/cubyz/blocks/glass/black.json b/assets/cubyz/blocks/glass/black.json index d9f0ff53..9af565db 100644 --- a/assets/cubyz/blocks/glass/black.json +++ b/assets/cubyz/blocks/glass/black.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0xe6e6e6, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/black" } diff --git a/assets/cubyz/blocks/glass/blue.json b/assets/cubyz/blocks/glass/blue.json index 2af7a24e..88467bae 100644 --- a/assets/cubyz/blocks/glass/blue.json +++ b/assets/cubyz/blocks/glass/blue.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0xdc923c, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/blue" } diff --git a/assets/cubyz/blocks/glass/brown.json b/assets/cubyz/blocks/glass/brown.json index fa614ce6..dfba5935 100644 --- a/assets/cubyz/blocks/glass/brown.json +++ b/assets/cubyz/blocks/glass/brown.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0x96bdd8, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/brown" } diff --git a/assets/cubyz/blocks/glass/crimson.json b/assets/cubyz/blocks/glass/crimson.json index 725ce3d2..2920400a 100644 --- a/assets/cubyz/blocks/glass/crimson.json +++ b/assets/cubyz/blocks/glass/crimson.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0x69e4e1, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/crimson" } diff --git a/assets/cubyz/blocks/glass/cyan.json b/assets/cubyz/blocks/glass/cyan.json index 05b56791..572cfb15 100644 --- a/assets/cubyz/blocks/glass/cyan.json +++ b/assets/cubyz/blocks/glass/cyan.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0xc62031, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/cyan" } diff --git a/assets/cubyz/blocks/glass/dark_grey.json b/assets/cubyz/blocks/glass/dark_grey.json index aad2e741..d2d9628e 100644 --- a/assets/cubyz/blocks/glass/dark_grey.json +++ b/assets/cubyz/blocks/glass/dark_grey.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0xacacac, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/dark_grey" } diff --git a/assets/cubyz/blocks/glass/green.json b/assets/cubyz/blocks/glass/green.json index d347a921..f50c5b3c 100644 --- a/assets/cubyz/blocks/glass/green.json +++ b/assets/cubyz/blocks/glass/green.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0xd966d9, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/green" } diff --git a/assets/cubyz/blocks/glass/grey.json b/assets/cubyz/blocks/glass/grey.json index 0fc89bbe..5f90ed9e 100644 --- a/assets/cubyz/blocks/glass/grey.json +++ b/assets/cubyz/blocks/glass/grey.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0x656565, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/grey" } diff --git a/assets/cubyz/blocks/glass/indigo.json b/assets/cubyz/blocks/glass/indigo.json index 8c4df37a..66f307a6 100644 --- a/assets/cubyz/blocks/glass/indigo.json +++ b/assets/cubyz/blocks/glass/indigo.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0xd0c16d, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/indigo" } diff --git a/assets/cubyz/blocks/glass/lime.json b/assets/cubyz/blocks/glass/lime.json index a606af62..79fa23e6 100644 --- a/assets/cubyz/blocks/glass/lime.json +++ b/assets/cubyz/blocks/glass/lime.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0xa03ed0, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/lime" } diff --git a/assets/cubyz/blocks/glass/magenta.json b/assets/cubyz/blocks/glass/magenta.json index a8581ba1..ed3fb109 100644 --- a/assets/cubyz/blocks/glass/magenta.json +++ b/assets/cubyz/blocks/glass/magenta.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0x0d9f35, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/magenta" } diff --git a/assets/cubyz/blocks/glass/orange.json b/assets/cubyz/blocks/glass/orange.json index acc14cdf..af7bb5dd 100644 --- a/assets/cubyz/blocks/glass/orange.json +++ b/assets/cubyz/blocks/glass/orange.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0x1183ee, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/orange" } diff --git a/assets/cubyz/blocks/glass/pink.json b/assets/cubyz/blocks/glass/pink.json index 1c8ea3ab..90f077c3 100644 --- a/assets/cubyz/blocks/glass/pink.json +++ b/assets/cubyz/blocks/glass/pink.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0x056830, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/pink" } diff --git a/assets/cubyz/blocks/glass/purple.json b/assets/cubyz/blocks/glass/purple.json index 827ad839..41c30f26 100644 --- a/assets/cubyz/blocks/glass/purple.json +++ b/assets/cubyz/blocks/glass/purple.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0x83d66a, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/purple" } diff --git a/assets/cubyz/blocks/glass/red.json b/assets/cubyz/blocks/glass/red.json index 1a52bf31..16809a2c 100644 --- a/assets/cubyz/blocks/glass/red.json +++ b/assets/cubyz/blocks/glass/red.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0x2ad6d6, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/red" } diff --git a/assets/cubyz/blocks/glass/uranium.json b/assets/cubyz/blocks/glass/uranium.json index e1e710c8..f88bf1e7 100644 --- a/assets/cubyz/blocks/glass/uranium.json +++ b/assets/cubyz/blocks/glass/uranium.json @@ -8,6 +8,6 @@ "hasBackFace" : true, "absorbedLight" : 0x4001ff, "emittedLight" : 0x80ff00, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/uranium" } diff --git a/assets/cubyz/blocks/glass/violet.json b/assets/cubyz/blocks/glass/violet.json index d2bc8c87..60367808 100644 --- a/assets/cubyz/blocks/glass/violet.json +++ b/assets/cubyz/blocks/glass/violet.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0x46c345, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/violet" } diff --git a/assets/cubyz/blocks/glass/viridian.json b/assets/cubyz/blocks/glass/viridian.json index ccb09fe4..ac9b27bc 100644 --- a/assets/cubyz/blocks/glass/viridian.json +++ b/assets/cubyz/blocks/glass/viridian.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0xf09ad6, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/viridian" } diff --git a/assets/cubyz/blocks/glass/white.json b/assets/cubyz/blocks/glass/white.json index a126e7e3..be96755b 100644 --- a/assets/cubyz/blocks/glass/white.json +++ b/assets/cubyz/blocks/glass/white.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0x0f0f0f, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/white" } diff --git a/assets/cubyz/blocks/glass/yellow.json b/assets/cubyz/blocks/glass/yellow.json index a96ee4d0..b0e378ec 100644 --- a/assets/cubyz/blocks/glass/yellow.json +++ b/assets/cubyz/blocks/glass/yellow.json @@ -7,6 +7,6 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0x0d36f1, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glass/yellow" } diff --git a/assets/cubyz/blocks/glow_crystal/black.json b/assets/cubyz/blocks/glow_crystal/black.json index 9733e640..a53e4f1b 100644 --- a/assets/cubyz/blocks/glow_crystal/black.json +++ b/assets/cubyz/blocks/glow_crystal/black.json @@ -5,6 +5,6 @@ "none" ], "emittedLight" : 0x111111, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glow_crystal/black" } diff --git a/assets/cubyz/blocks/glow_crystal/blue.json b/assets/cubyz/blocks/glow_crystal/blue.json index 4117eba7..dadf81fc 100644 --- a/assets/cubyz/blocks/glow_crystal/blue.json +++ b/assets/cubyz/blocks/glow_crystal/blue.json @@ -5,6 +5,6 @@ "none" ], "emittedLight" : 0x0000ff, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glow_crystal/blue" } diff --git a/assets/cubyz/blocks/glow_crystal/brown.json b/assets/cubyz/blocks/glow_crystal/brown.json index 456bc8e2..ada3a202 100644 --- a/assets/cubyz/blocks/glow_crystal/brown.json +++ b/assets/cubyz/blocks/glow_crystal/brown.json @@ -5,6 +5,6 @@ "none" ], "emittedLight" : 0x804000, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glow_crystal/brown" } diff --git a/assets/cubyz/blocks/glow_crystal/cyan.json b/assets/cubyz/blocks/glow_crystal/cyan.json index ddb475e2..8bff5456 100644 --- a/assets/cubyz/blocks/glow_crystal/cyan.json +++ b/assets/cubyz/blocks/glow_crystal/cyan.json @@ -5,6 +5,6 @@ "none" ], "emittedLight" : 0x00ffb0, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glow_crystal/cyan" } diff --git a/assets/cubyz/blocks/glow_crystal/dark_gray.json b/assets/cubyz/blocks/glow_crystal/dark_gray.json index 39dfa0dd..ca0dab66 100644 --- a/assets/cubyz/blocks/glow_crystal/dark_gray.json +++ b/assets/cubyz/blocks/glow_crystal/dark_gray.json @@ -5,6 +5,6 @@ "none" ], "emittedLight" : 0x444444, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glow_crystal/dark_gray" } diff --git a/assets/cubyz/blocks/glow_crystal/dark_green.json b/assets/cubyz/blocks/glow_crystal/dark_green.json index 6f22d9e4..a5e9029d 100644 --- a/assets/cubyz/blocks/glow_crystal/dark_green.json +++ b/assets/cubyz/blocks/glow_crystal/dark_green.json @@ -5,6 +5,6 @@ "none" ], "emittedLight" : 0x008000, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glow_crystal/dark_green" } diff --git a/assets/cubyz/blocks/glow_crystal/dark_red.json b/assets/cubyz/blocks/glow_crystal/dark_red.json index cb01450c..aef17d63 100644 --- a/assets/cubyz/blocks/glow_crystal/dark_red.json +++ b/assets/cubyz/blocks/glow_crystal/dark_red.json @@ -5,6 +5,6 @@ "none" ], "emittedLight" : 0x800000, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glow_crystal/dark_red" } diff --git a/assets/cubyz/blocks/glow_crystal/gray.json b/assets/cubyz/blocks/glow_crystal/gray.json index 56ad9064..d468ecda 100644 --- a/assets/cubyz/blocks/glow_crystal/gray.json +++ b/assets/cubyz/blocks/glow_crystal/gray.json @@ -5,6 +5,6 @@ "none" ], "emittedLight" : 0x808080, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glow_crystal/gray" } diff --git a/assets/cubyz/blocks/glow_crystal/green.json b/assets/cubyz/blocks/glow_crystal/green.json index d03ca5d1..3fecadd5 100644 --- a/assets/cubyz/blocks/glow_crystal/green.json +++ b/assets/cubyz/blocks/glow_crystal/green.json @@ -5,6 +5,6 @@ "none" ], "emittedLight" : 0x00ff00, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glow_crystal/green" } diff --git a/assets/cubyz/blocks/glow_crystal/light_blue.json b/assets/cubyz/blocks/glow_crystal/light_blue.json index de22d97b..503695fc 100644 --- a/assets/cubyz/blocks/glow_crystal/light_blue.json +++ b/assets/cubyz/blocks/glow_crystal/light_blue.json @@ -5,6 +5,6 @@ "none" ], "emittedLight" : 0x4040ff, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glow_crystal/light_blue" } diff --git a/assets/cubyz/blocks/glow_crystal/orange.json b/assets/cubyz/blocks/glow_crystal/orange.json index ab8998b2..7f85f568 100644 --- a/assets/cubyz/blocks/glow_crystal/orange.json +++ b/assets/cubyz/blocks/glow_crystal/orange.json @@ -5,6 +5,6 @@ "none" ], "emittedLight" : 0xff8000, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glow_crystal/orange" } diff --git a/assets/cubyz/blocks/glow_crystal/purple.json b/assets/cubyz/blocks/glow_crystal/purple.json index 198a7be2..ae022598 100644 --- a/assets/cubyz/blocks/glow_crystal/purple.json +++ b/assets/cubyz/blocks/glow_crystal/purple.json @@ -5,6 +5,6 @@ "none" ], "emittedLight" : 0xff00ff, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glow_crystal/purple" } diff --git a/assets/cubyz/blocks/glow_crystal/red.json b/assets/cubyz/blocks/glow_crystal/red.json index 26adf582..ba65d8c5 100644 --- a/assets/cubyz/blocks/glow_crystal/red.json +++ b/assets/cubyz/blocks/glow_crystal/red.json @@ -5,6 +5,6 @@ "none" ], "emittedLight" : 0xff0000, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glow_crystal/red" } diff --git a/assets/cubyz/blocks/glow_crystal/violet.json b/assets/cubyz/blocks/glow_crystal/violet.json index 42ac4703..0e2baf81 100644 --- a/assets/cubyz/blocks/glow_crystal/violet.json +++ b/assets/cubyz/blocks/glow_crystal/violet.json @@ -5,6 +5,6 @@ "none" ], "emittedLight" : 0x8000ff, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glow_crystal/violet" } diff --git a/assets/cubyz/blocks/glow_crystal/white.json b/assets/cubyz/blocks/glow_crystal/white.json index 3ecba309..565a77aa 100644 --- a/assets/cubyz/blocks/glow_crystal/white.json +++ b/assets/cubyz/blocks/glow_crystal/white.json @@ -5,6 +5,6 @@ "none" ], "emittedLight" : 0xffffff, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glow_crystal/white" } diff --git a/assets/cubyz/blocks/glow_crystal/yellow.json b/assets/cubyz/blocks/glow_crystal/yellow.json index 6a94bd1c..dbbff59b 100644 --- a/assets/cubyz/blocks/glow_crystal/yellow.json +++ b/assets/cubyz/blocks/glow_crystal/yellow.json @@ -5,6 +5,6 @@ "none" ], "emittedLight" : 0xffff00, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:glow_crystal/yellow" } diff --git a/assets/cubyz/blocks/grass.json b/assets/cubyz/blocks/grass.json index f69c493b..1433792e 100644 --- a/assets/cubyz/blocks/grass.json +++ b/assets/cubyz/blocks/grass.json @@ -4,7 +4,7 @@ "drops" : [ "cubyz:soil" ], - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:grass_top", "texture_bottom" : "cubyz:soil" } diff --git a/assets/cubyz/blocks/grass_vegetation.json b/assets/cubyz/blocks/grass_vegetation.json index 24af9d71..b3762c97 100644 --- a/assets/cubyz/blocks/grass_vegetation.json +++ b/assets/cubyz/blocks/grass_vegetation.json @@ -8,7 +8,7 @@ "viewThrough" : true, "absorbedLight" : 0x121012, "collide": false, - "model" : "cross", + "model" : "cubyz:cross", "texture" : "cubyz:grass_vegetation", "item": { "texture" : "grass.png", diff --git a/assets/cubyz/blocks/gravel.json b/assets/cubyz/blocks/gravel.json index 1b3bfca0..74fd0320 100644 --- a/assets/cubyz/blocks/gravel.json +++ b/assets/cubyz/blocks/gravel.json @@ -4,6 +4,6 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:gravel" } diff --git a/assets/cubyz/blocks/ice.json b/assets/cubyz/blocks/ice.json index 570d2798..020c062a 100644 --- a/assets/cubyz/blocks/ice.json +++ b/assets/cubyz/blocks/ice.json @@ -7,7 +7,7 @@ "transparent" : true, "hasBackFace" : true, "absorbedLight" : 0xe95825, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:ice", "blockEntity" : "cubyz.modding.base.MeltableBlockEntity" } diff --git a/assets/cubyz/blocks/iron_block.json b/assets/cubyz/blocks/iron_block.json index eb9e4b84..1d4da21b 100644 --- a/assets/cubyz/blocks/iron_block.json +++ b/assets/cubyz/blocks/iron_block.json @@ -6,6 +6,6 @@ "auto" ], "rotation" : "stairs", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:iron_block" } diff --git a/assets/cubyz/blocks/iron_ore.json b/assets/cubyz/blocks/iron_ore.json index bee6276a..b10d9b9a 100644 --- a/assets/cubyz/blocks/iron_ore.json +++ b/assets/cubyz/blocks/iron_ore.json @@ -14,6 +14,6 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:iron_ore" } diff --git a/assets/cubyz/blocks/lava.json b/assets/cubyz/blocks/lava.json index 3b3c0392..5a88d657 100644 --- a/assets/cubyz/blocks/lava.json +++ b/assets/cubyz/blocks/lava.json @@ -11,6 +11,6 @@ "collide": false, "absorbedLight" : 0x0084ff, "emittedLight" : 0xff7b00, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:lava" } diff --git a/assets/cubyz/blocks/limestone.json b/assets/cubyz/blocks/limestone.json index 7ece3ea3..cfb3128c 100644 --- a/assets/cubyz/blocks/limestone.json +++ b/assets/cubyz/blocks/limestone.json @@ -6,6 +6,6 @@ "auto" ], "rotation" : "stairs", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:limestone" } diff --git a/assets/cubyz/blocks/limestone_bricks.json b/assets/cubyz/blocks/limestone_bricks.json index cb34d0f0..5574732b 100644 --- a/assets/cubyz/blocks/limestone_bricks.json +++ b/assets/cubyz/blocks/limestone_bricks.json @@ -5,6 +5,6 @@ "auto" ], "rotation": "stairs", - "model": "cube", + "model": "cubyz:cube", "texture": "cubyz:limestone_bricks" } \ No newline at end of file diff --git a/assets/cubyz/blocks/magma.json b/assets/cubyz/blocks/magma.json index 2ade27b5..0e5f62c3 100644 --- a/assets/cubyz/blocks/magma.json +++ b/assets/cubyz/blocks/magma.json @@ -5,6 +5,6 @@ "auto" ], "emittedLight" : 0x884928, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:magma" } diff --git a/assets/cubyz/blocks/mahogany_fence.json b/assets/cubyz/blocks/mahogany_fence.json index c68f221a..f082f8e0 100644 --- a/assets/cubyz/blocks/mahogany_fence.json +++ b/assets/cubyz/blocks/mahogany_fence.json @@ -6,7 +6,7 @@ ], "absorbedLight" : 0x202830, "rotation" : "fence", - "model" : "fence", + "model" : "cubyz:fence", "texture" : "cubyz:mahogany_fence", "texture_top" : "cubyz:mahogany_fence_top", "texture_bottom" : "cubyz:mahogany_fence_top" diff --git a/assets/cubyz/blocks/mahogany_leaves.json b/assets/cubyz/blocks/mahogany_leaves.json index 6fd013be..3e1f6b55 100644 --- a/assets/cubyz/blocks/mahogany_leaves.json +++ b/assets/cubyz/blocks/mahogany_leaves.json @@ -8,7 +8,7 @@ "degradable" : true, "alwaysViewThrough" : true, "absorbedLight" : 0x121012, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:mahogany_leaves", "lodReplacement" : "cubyz:mahogany_leaves_opaque", "opaqueVariant" : "cubyz:mahogany_leaves_opaque" diff --git a/assets/cubyz/blocks/mahogany_leaves_opaque.json b/assets/cubyz/blocks/mahogany_leaves_opaque.json index b04a1de7..5512f440 100644 --- a/assets/cubyz/blocks/mahogany_leaves_opaque.json +++ b/assets/cubyz/blocks/mahogany_leaves_opaque.json @@ -2,6 +2,6 @@ "class" : "leaf", "hasItem" : false, "absorbedLight" : 0x121012, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:mahogany_leaves_opaque" } diff --git a/assets/cubyz/blocks/mahogany_log.json b/assets/cubyz/blocks/mahogany_log.json index 1b9ab73a..15034f17 100644 --- a/assets/cubyz/blocks/mahogany_log.json +++ b/assets/cubyz/blocks/mahogany_log.json @@ -5,7 +5,7 @@ "auto" ], "rotation" : "log", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:mahogany_log", "texture_top" : "cubyz:mahogany_log_top", "texture_bottom" : "cubyz:mahogany_log_top" diff --git a/assets/cubyz/blocks/mahogany_planks.json b/assets/cubyz/blocks/mahogany_planks.json index 154da7b3..f9562af1 100644 --- a/assets/cubyz/blocks/mahogany_planks.json +++ b/assets/cubyz/blocks/mahogany_planks.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:mahogany_planks" } diff --git a/assets/cubyz/blocks/mahogany_top.json b/assets/cubyz/blocks/mahogany_top.json index cbac4a35..6862cf7b 100644 --- a/assets/cubyz/blocks/mahogany_top.json +++ b/assets/cubyz/blocks/mahogany_top.json @@ -5,7 +5,7 @@ "auto" ], "rotation" : "log", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:mahogany_log", "texture_top" : "cubyz:mahogany_log", "texture_bottom" : "cubyz:mahogany_log_top" diff --git a/assets/cubyz/blocks/marble.json b/assets/cubyz/blocks/marble.json index 88f30380..d9c89135 100644 --- a/assets/cubyz/blocks/marble.json +++ b/assets/cubyz/blocks/marble.json @@ -5,6 +5,6 @@ "auto" ], "rotation": "stairs", - "model": "cube", + "model": "cubyz:cube", "texture": "cubyz:marble" } \ No newline at end of file diff --git a/assets/cubyz/blocks/marble_bricks.json b/assets/cubyz/blocks/marble_bricks.json index 9056e0c1..9e3a9458 100644 --- a/assets/cubyz/blocks/marble_bricks.json +++ b/assets/cubyz/blocks/marble_bricks.json @@ -5,6 +5,6 @@ "auto" ], "rotation": "stairs", - "model": "cube", + "model": "cubyz:cube", "texture": "cubyz:marble_bricks" } \ No newline at end of file diff --git a/assets/cubyz/blocks/mossy_cobblestone.json b/assets/cubyz/blocks/mossy_cobblestone.json index 4e4a3831..5af1ffd2 100644 --- a/assets/cubyz/blocks/mossy_cobblestone.json +++ b/assets/cubyz/blocks/mossy_cobblestone.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:mossy_cobblestone", "rotation" : "stairs", diff --git a/assets/cubyz/blocks/non_degradable_oak_leaves.json b/assets/cubyz/blocks/non_degradable_oak_leaves.json index 5c1e28d2..7b7f26a3 100644 --- a/assets/cubyz/blocks/non_degradable_oak_leaves.json +++ b/assets/cubyz/blocks/non_degradable_oak_leaves.json @@ -9,6 +9,6 @@ "degradable" : false, "alwaysViewThrough" : true, "absorbedLight" : 0x121012, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:oak_leaves" } diff --git a/assets/cubyz/blocks/oak_fence.json b/assets/cubyz/blocks/oak_fence.json index 85a5a94d..d2d8c952 100644 --- a/assets/cubyz/blocks/oak_fence.json +++ b/assets/cubyz/blocks/oak_fence.json @@ -6,7 +6,7 @@ ], "absorbedLight" : 0x202830, "rotation" : "fence", - "model" : "fence", + "model" : "cubyz:fence", "texture" : "cubyz:oak_fence", "texture_top" : "cubyz:oak_fence_top", "texture_bottom" : "cubyz:oak_fence_top" diff --git a/assets/cubyz/blocks/oak_leaves.json b/assets/cubyz/blocks/oak_leaves.json index 250c2a43..47b013a4 100644 --- a/assets/cubyz/blocks/oak_leaves.json +++ b/assets/cubyz/blocks/oak_leaves.json @@ -8,7 +8,7 @@ "degradable" : true, "alwaysViewThrough" : true, "absorbedLight" : 0x121012, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:oak_leaves", "lodReplacement" : "cubyz:oak_leaves_opaque", "opaqueVariant" : "cubyz:oak_leaves_opaque" diff --git a/assets/cubyz/blocks/oak_leaves_opaque.json b/assets/cubyz/blocks/oak_leaves_opaque.json index 94467639..76ffe931 100644 --- a/assets/cubyz/blocks/oak_leaves_opaque.json +++ b/assets/cubyz/blocks/oak_leaves_opaque.json @@ -2,6 +2,6 @@ "class" : "leaf", "hasItem" : false, "absorbedLight" : 0x121012, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:oak_leaves_opaque" } diff --git a/assets/cubyz/blocks/oak_log.json b/assets/cubyz/blocks/oak_log.json index 989cc547..c99f1945 100644 --- a/assets/cubyz/blocks/oak_log.json +++ b/assets/cubyz/blocks/oak_log.json @@ -5,7 +5,7 @@ "auto" ], "rotation" : "log", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:oak_log", "texture_top" : "cubyz:oak_log_top", "texture_bottom" : "cubyz:oak_log_top" diff --git a/assets/cubyz/blocks/oak_planks.json b/assets/cubyz/blocks/oak_planks.json index cece0324..dd1f9437 100644 --- a/assets/cubyz/blocks/oak_planks.json +++ b/assets/cubyz/blocks/oak_planks.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:oak_planks" } diff --git a/assets/cubyz/blocks/oak_top.json b/assets/cubyz/blocks/oak_top.json index f726868f..e66a0dfa 100644 --- a/assets/cubyz/blocks/oak_top.json +++ b/assets/cubyz/blocks/oak_top.json @@ -5,7 +5,7 @@ "auto" ], "rotation" : "log", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:oak_log", "texture_top" : "cubyz:oak_log", "texture_bottom" : "cubyz:oak_log_top", diff --git a/assets/cubyz/blocks/obsidian.json b/assets/cubyz/blocks/obsidian.json index 77071f05..f89e5e28 100644 --- a/assets/cubyz/blocks/obsidian.json +++ b/assets/cubyz/blocks/obsidian.json @@ -6,6 +6,6 @@ "auto" ], "rotation" : "stairs", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:obsidian" } diff --git a/assets/cubyz/blocks/pine_fence.json b/assets/cubyz/blocks/pine_fence.json index 5f570440..0a241cc9 100644 --- a/assets/cubyz/blocks/pine_fence.json +++ b/assets/cubyz/blocks/pine_fence.json @@ -6,7 +6,7 @@ ], "absorbedLight" : 0x202830, "rotation" : "fence", - "model" : "fence", + "model" : "cubyz:fence", "texture" : "cubyz:pine_fence", "texture_top" : "cubyz:pine_fence_top", "texture_bottom" : "cubyz:pine_fence_top" diff --git a/assets/cubyz/blocks/pine_log.json b/assets/cubyz/blocks/pine_log.json index 434abd2b..68c607cc 100644 --- a/assets/cubyz/blocks/pine_log.json +++ b/assets/cubyz/blocks/pine_log.json @@ -5,7 +5,7 @@ "auto" ], "rotation" : "log", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:pine_log", "texture_top" : "cubyz:pine_log_top", "texture_bottom" : "cubyz:pine_log_top" diff --git a/assets/cubyz/blocks/pine_needles.json b/assets/cubyz/blocks/pine_needles.json index 0a5ed639..1d06b2e9 100644 --- a/assets/cubyz/blocks/pine_needles.json +++ b/assets/cubyz/blocks/pine_needles.json @@ -8,7 +8,7 @@ "degradable" : true, "alwaysViewThrough" : true, "absorbedLight" : 0x121012, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:pine_needles", "lodReplacement" : "cubyz:pine_needles_opaque", "opaqueVariant" : "cubyz:pine_needles_opaque" diff --git a/assets/cubyz/blocks/pine_needles_opaque.json b/assets/cubyz/blocks/pine_needles_opaque.json index 472e38a1..2fbb73b6 100644 --- a/assets/cubyz/blocks/pine_needles_opaque.json +++ b/assets/cubyz/blocks/pine_needles_opaque.json @@ -2,6 +2,6 @@ "class" : "leaf", "hasItem" : false, "absorbedLight" : 0x121012, - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:pine_needles_opaque" } diff --git a/assets/cubyz/blocks/pine_planks.json b/assets/cubyz/blocks/pine_planks.json index 5c18d66f..4423443d 100644 --- a/assets/cubyz/blocks/pine_planks.json +++ b/assets/cubyz/blocks/pine_planks.json @@ -4,7 +4,7 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "stairs", "texture" : "cubyz:pine_planks" } diff --git a/assets/cubyz/blocks/pine_top.json b/assets/cubyz/blocks/pine_top.json index 09ead0f4..97b0814e 100644 --- a/assets/cubyz/blocks/pine_top.json +++ b/assets/cubyz/blocks/pine_top.json @@ -5,7 +5,7 @@ "auto" ], "rotation" : "log", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:pine_log", "texture_top" : "cubyz:pine_log", "texture_bottom" : "cubyz:pine_log_top", diff --git a/assets/cubyz/blocks/sand.json b/assets/cubyz/blocks/sand.json index 992ee5b9..d7f82453 100644 --- a/assets/cubyz/blocks/sand.json +++ b/assets/cubyz/blocks/sand.json @@ -4,6 +4,6 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:sand", } diff --git a/assets/cubyz/blocks/sandstone.json b/assets/cubyz/blocks/sandstone.json index 78929579..f3d21d1d 100644 --- a/assets/cubyz/blocks/sandstone.json +++ b/assets/cubyz/blocks/sandstone.json @@ -5,6 +5,6 @@ "auto" ], "rotation": "stairs", - "model": "cube", + "model": "cubyz:cube", "texture": "cubyz:sandstone" } \ No newline at end of file diff --git a/assets/cubyz/blocks/sandstone_bricks.json b/assets/cubyz/blocks/sandstone_bricks.json index ac6077fa..b87ca063 100644 --- a/assets/cubyz/blocks/sandstone_bricks.json +++ b/assets/cubyz/blocks/sandstone_bricks.json @@ -5,6 +5,6 @@ "auto" ], "rotation": "stairs", - "model": "cube", + "model": "cubyz:cube", "texture": "cubyz:sandstone_bricks" } \ No newline at end of file diff --git a/assets/cubyz/blocks/snow.json b/assets/cubyz/blocks/snow.json index 8d59517f..f8dc797d 100644 --- a/assets/cubyz/blocks/snow.json +++ b/assets/cubyz/blocks/snow.json @@ -5,7 +5,7 @@ "auto" ], "rotation" : "stackable", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:snow", "blockEntity" : "cubyz.modding.base.MeltableBlockEntity" } diff --git a/assets/cubyz/blocks/soil.json b/assets/cubyz/blocks/soil.json index 2b3aa4b6..532f1b43 100644 --- a/assets/cubyz/blocks/soil.json +++ b/assets/cubyz/blocks/soil.json @@ -4,6 +4,6 @@ "drops" : [ "auto" ], - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:soil" } diff --git a/assets/cubyz/blocks/stone.json b/assets/cubyz/blocks/stone.json index 72f43bdb..c36a60ac 100644 --- a/assets/cubyz/blocks/stone.json +++ b/assets/cubyz/blocks/stone.json @@ -6,6 +6,6 @@ "cubyz:cobblestone" ], "rotation" : "stairs", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:stone" } diff --git a/assets/cubyz/blocks/stone_bricks.json b/assets/cubyz/blocks/stone_bricks.json index ebf7336e..7090dafb 100644 --- a/assets/cubyz/blocks/stone_bricks.json +++ b/assets/cubyz/blocks/stone_bricks.json @@ -5,6 +5,6 @@ "auto" ], "rotation": "stairs", - "model": "cube", + "model": "cubyz:cube", "texture": "cubyz:stone_bricks" } \ No newline at end of file diff --git a/assets/cubyz/blocks/torch.json b/assets/cubyz/blocks/torch.json index a72047c8..af572594 100644 --- a/assets/cubyz/blocks/torch.json +++ b/assets/cubyz/blocks/torch.json @@ -10,7 +10,7 @@ "absorbedLight" : 0x010101, "collide": false, "rotation" : "torch", - "model" : "torch", + "model" : "cubyz:torch", "texture" : "cubyz:torch", "item": { "texture" : "torch.png", diff --git a/assets/cubyz/blocks/void_stone.json b/assets/cubyz/blocks/void_stone.json index c960cffc..a61fc130 100644 --- a/assets/cubyz/blocks/void_stone.json +++ b/assets/cubyz/blocks/void_stone.json @@ -6,6 +6,6 @@ "cubyz:void_stone" ], "rotation" : "stairs", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:void_stone" } diff --git a/assets/cubyz/blocks/void_stone_bricks.json b/assets/cubyz/blocks/void_stone_bricks.json index 80fe7717..6200ecb8 100644 --- a/assets/cubyz/blocks/void_stone_bricks.json +++ b/assets/cubyz/blocks/void_stone_bricks.json @@ -6,6 +6,6 @@ "auto" ], "rotation" : "stairs", - "model" : "cube", + "model" : "cubyz:cube", "texture" : "cubyz:void_stone_bricks" } diff --git a/assets/cubyz/blocks/water.json b/assets/cubyz/blocks/water.json index 369fadbf..36879e41 100644 --- a/assets/cubyz/blocks/water.json +++ b/assets/cubyz/blocks/water.json @@ -10,7 +10,7 @@ "hasBackFace" : true, "collide": false, "absorbedLight" : 0x090501, - "model" : "cube", + "model" : "cubyz:cube", "texture" : { "time" : 500, "textures": [ diff --git a/assets/cubyz/blocks/workbench.json b/assets/cubyz/blocks/workbench.json index 5ddc50ee..58b5cc77 100644 --- a/assets/cubyz/blocks/workbench.json +++ b/assets/cubyz/blocks/workbench.json @@ -5,7 +5,7 @@ "auto" ], "gui" : "workbench", - "model" : "cube", + "model" : "cubyz:cube", "rotation" : "planar", "texture" : "cubyz:workbench_back", "texture_front" : "cubyz:workbench_front", diff --git a/assets/cubyz/models/cross.obj b/assets/cubyz/models/cross.obj new file mode 100644 index 00000000..f9d308a9 --- /dev/null +++ b/assets/cubyz/models/cross.obj @@ -0,0 +1,20 @@ +v 1 1 0 +v 1 1 1 +v 0 0 0 +v 0 0 1 +v 0 1 0 +v 0 1 1 +v 1 0 0 +v 1 0 1 +vt 0 0 +vt 0 0.25 +vt 0.25 0 +vt 0.25 0.25 +vn -0.70703125 0.70703125 0 +vn 0.70703125 -0.70703125 0 +vn -0.70703125 -0.70703125 0 +vn 0.70703125 0.70703125 0 +f 2/2/1 1/1/1 3/3/1 4/4/1 +f 4/2/2 3/1/2 1/3/2 2/4/2 +f 6/2/3 5/1/3 7/3/3 8/4/3 +f 8/2/4 7/1/4 5/3/4 6/4/4 diff --git a/assets/cubyz/models/cube.obj b/assets/cubyz/models/cube.obj new file mode 100644 index 00000000..f56b3457 --- /dev/null +++ b/assets/cubyz/models/cube.obj @@ -0,0 +1,33 @@ +v 1 1 1 +v 1 0 1 +v 0 1 1 +v 0 0 1 +v 0 1 0 +v 0 0 0 +v 1 1 0 +v 1 0 0 +vt 0 0 +vt 0 0.25 +vt 0.25 0 +vt 0.25 0.25 +vt 0.5 0 +vt 0.5 0.25 +vt 0.75 0 +vt 0.75 0.25 +vt 1 0 +vt 1 0.25 +vt 0 0.5 +vt 0.25 0.5 +vt 0.5 0.5 +vn 0 0 1 +vn 0 0 -1 +vn 1 0 0 +vn -1 0 0 +vn 0 1 0 +vn 0 -1 0 +f 2/2/1 1/1/1 3/3/1 4/4/1 +f 6/4/2 5/3/2 7/5/2 8/6/2 +f 2/6/3 8/5/3 7/7/3 1/8/3 +f 3/8/4 5/7/4 6/9/4 4/10/4 +f 1/11/5 7/2/5 5/4/5 3/12/5 +f 4/12/6 6/4/6 8/6/6 2/13/6 diff --git a/assets/cubyz/models/fence.obj b/assets/cubyz/models/fence.obj new file mode 100644 index 00000000..1ed74b81 --- /dev/null +++ b/assets/cubyz/models/fence.obj @@ -0,0 +1,122 @@ +v 0.375 0.625 0 +v 0.375 0.625 1 +v 0.375 0.375 0 +v 0.375 0.375 1 +v 0.625 0.375 0 +v 0.625 0.375 1 +v 0.625 0.625 0 +v 0.625 0.625 1 +v 0 0.4375 0.1875 +v 0 0.4375 0.375 +v 1 0.4375 0.1875 +v 1 0.4375 0.375 +v 1 0.5625 0.1875 +v 1 0.5625 0.375 +v 0 0.5625 0.1875 +v 0 0.5625 0.375 +v 0 0.4375 0.625 +v 0 0.4375 0.8125 +v 1 0.4375 0.625 +v 1 0.4375 0.8125 +v 1 0.5625 0.625 +v 1 0.5625 0.8125 +v 0 0.5625 0.625 +v 0 0.5625 0.8125 +v 0.4375 1 0.1875 +v 0.4375 1 0.375 +v 0.4375 0 0.1875 +v 0.4375 0 0.375 +v 0.5625 0 0.1875 +v 0.5625 0 0.375 +v 0.5625 1 0.1875 +v 0.5625 1 0.375 +v 0.4375 1 0.625 +v 0.4375 1 0.8125 +v 0.4375 0 0.625 +v 0.4375 0 0.8125 +v 0.5625 0 0.625 +v 0.5625 0 0.8125 +v 0.5625 1 0.625 +v 0.5625 1 0.8125 +vt 0.84375 0 +vt 0.84375 0.25 +vt 0.90625 0 +vt 0.90625 0.25 +vt 0.59375 0 +vt 0.59375 0.25 +vt 0.65625 0 +vt 0.65625 0.25 +vt 0.34375 0.25 +vt 0.34375 0.5 +vt 0.40625 0.25 +vt 0.40625 0.5 +vt 0.09375 0.25 +vt 0.09375 0.5 +vt 0.15625 0.25 +vt 0.15625 0.5 +vt 0.25 0.296875 +vt 0.25 0.34375 +vt 0.5 0.296875 +vt 0.5 0.34375 +vt 0 0.296875 +vt 0 0.34375 +vt 0.25 0.109375 +vt 0.25 0.140625 +vt 0.5 0.109375 +vt 0.5 0.140625 +vt 0 0.109375 +vt 0 0.140625 +vt 0.25 0.40625 +vt 0.25 0.453125 +vt 0.5 0.40625 +vt 0.5 0.453125 +vt 0 0.40625 +vt 0 0.453125 +vt 0.75 0.046875 +vt 0.75 0.09375 +vt 1 0.046875 +vt 1 0.09375 +vt 0.5 0.046875 +vt 0.5 0.09375 +vt 0.75 0.15625 +vt 0.75 0.203125 +vt 1 0.15625 +vt 1 0.203125 +vt 0.5 0.15625 +vt 0.5 0.203125 +vt 0.09375 0.09375 +vt 0.09375 0.15625 +vt 0.15625 0.09375 +vt 0.15625 0.15625 +vt 0.34375 0.09375 +vt 0.34375 0.15625 +vt 0.40625 0.09375 +vt 0.40625 0.15625 +vn -1 0 0 +vn 1 0 0 +vn 0 -1 0 +vn 0 1 0 +vn 0 0 -1 +vn 0 0 1 +f 2/2/1 1/1/1 3/3/1 4/4/1 +f 6/6/2 5/5/2 7/7/2 8/8/2 +f 4/10/3 3/9/3 5/11/3 6/12/3 +f 8/14/4 7/13/4 1/15/4 2/16/4 +f 10/18/3 9/17/3 11/19/3 12/20/3 +f 14/22/4 13/21/4 15/17/4 16/18/4 +f 9/24/5 15/23/5 13/25/5 11/26/5 +f 12/28/6 14/27/6 16/23/6 10/24/6 +f 18/30/3 17/29/3 19/31/3 20/32/3 +f 22/34/4 21/33/4 23/29/4 24/30/4 +f 17/24/5 23/23/5 21/25/5 19/26/5 +f 20/28/6 22/27/6 24/23/6 18/24/6 +f 26/36/1 25/35/1 27/37/1 28/38/1 +f 30/40/2 29/39/2 31/35/2 32/36/2 +f 27/25/5 25/23/5 31/24/5 29/26/5 +f 30/23/6 32/27/6 26/28/6 28/24/6 +f 34/42/1 33/41/1 35/43/1 36/44/1 +f 38/46/2 37/45/2 39/41/2 40/42/2 +f 35/25/5 33/23/5 39/24/5 37/26/5 +f 38/23/6 40/27/6 34/28/6 36/24/6 +f 6/48/6 8/47/6 2/49/6 4/50/6 +f 3/52/5 1/51/5 7/53/5 5/54/5 diff --git a/assets/cubyz/models/torch.obj b/assets/cubyz/models/torch.obj new file mode 100644 index 00000000..59949327 --- /dev/null +++ b/assets/cubyz/models/torch.obj @@ -0,0 +1,44 @@ +v 0.4375 0.5625 0 +v 0.4375 0.5625 0.75 +v 0.4375 0.4375 0 +v 0.4375 0.4375 0.75 +v 0.5625 0.4375 0 +v 0.5625 0.4375 0.75 +v 0.5625 0.5625 0 +v 0.5625 0.5625 0.75 +vt 0.75 0.0625 +vt 0.75 0.25 +vt 0.78125 0.0625 +vt 0.78125 0.25 +vt 0.5 0.0625 +vt 0.5 0.25 +vt 0.53125 0.0625 +vt 0.53125 0.25 +vt 0.25 0.3125 +vt 0.25 0.5 +vt 0.28125 0.3125 +vt 0.28125 0.5 +vt 0 0.3125 +vt 0 0.5 +vt 0.03125 0.3125 +vt 0.03125 0.5 +vt 0 0.03125 +vt 0 0.0625 +vt 0.03125 0.03125 +vt 0.03125 0.0625 +vt 0.25 0 +vt 0.25 0.03125 +vt 0.28125 0 +vt 0.28125 0.03125 +vn -1 0 0 +vn 1 0 0 +vn 0 -1 0 +vn 0 1 0 +vn 0 0 1 +vn 0 0 -1 +f 2/2/1 1/1/1 3/3/1 4/4/1 +f 6/6/2 5/5/2 7/7/2 8/8/2 +f 4/10/3 3/9/3 5/11/3 6/12/3 +f 8/14/4 7/13/4 1/15/4 2/16/4 +f 6/18/5 8/17/5 2/19/5 4/20/5 +f 3/22/6 1/21/6 7/23/6 5/24/6 diff --git a/src/assets.zig b/src/assets.zig index d98f8f8a..f048e0ba 100644 --- a/src/assets.zig +++ b/src/assets.zig @@ -13,6 +13,7 @@ var commonBlocks: std.StringHashMap(JsonElement) = undefined; var commonBiomes: std.StringHashMap(JsonElement) = undefined; var commonItems: std.StringHashMap(JsonElement) = undefined; var commonRecipes: main.List([]const u8) = undefined; +var commonModels: std.StringHashMap([]const u8) = undefined; /// Reads json files recursively from all subfolders. pub fn readAllJsonFilesInAddons(externalAllocator: NeverFailingAllocator, addons: main.List(std.fs.Dir), addonNames: main.List([]const u8), subPath: []const u8, output: *std.StringHashMap(JsonElement)) void { @@ -88,8 +89,51 @@ pub fn readAllFilesInAddons(externalAllocator: NeverFailingAllocator, addons: ma } } } +/// Reads obj files recursively from all subfolders. +pub fn readAllObjFilesInAddonsHashmap(externalAllocator: NeverFailingAllocator, addons: main.List(std.fs.Dir), addonNames: main.List([]const u8), subPath: []const u8, output: *std.StringHashMap([]const u8)) void { + for(addons.items, addonNames.items) |addon, addonName| { + var dir = addon.openDir(subPath, .{.iterate = true}) catch |err| { + if(err != error.FileNotFound) { + std.log.err("Could not open addon directory {s}: {s}", .{subPath, @errorName(err)}); + } + continue; + }; + defer dir.close(); -pub fn readAssets(externalAllocator: NeverFailingAllocator, assetPath: []const u8, blocks: *std.StringHashMap(JsonElement), items: *std.StringHashMap(JsonElement), biomes: *std.StringHashMap(JsonElement), recipes: *main.List([]const u8)) void { + var walker = dir.walk(main.stackAllocator.allocator) catch unreachable; + defer walker.deinit(); + + while(walker.next() catch |err| blk: { + std.log.err("Got error while iterating addon directory {s}: {s}", .{subPath, @errorName(err)}); + break :blk null; + }) |entry| { + if(entry.kind == .file and std.ascii.endsWithIgnoreCase(entry.basename, ".obj")) { + const folderName = addonName; + const id: []u8 = externalAllocator.alloc(u8, folderName.len + 1 + entry.path.len - 4); + errdefer externalAllocator.free(id); + @memcpy(id[0..folderName.len], folderName); + id[folderName.len] = ':'; + for(0..entry.path.len-4) |i| { + if(entry.path[i] == '\\') { // Convert windows path seperators + id[folderName.len+1+i] = '/'; + } else { + id[folderName.len+1+i] = entry.path[i]; + } + } + + const file = dir.openFile(entry.path, .{}) catch |err| { + std.log.err("Could not open {s}/{s}: {s}", .{subPath, entry.path, @errorName(err)}); + continue; + }; + defer file.close(); + const string = file.readToEndAlloc(externalAllocator.allocator, std.math.maxInt(usize)) catch unreachable; + output.put(id, string) catch unreachable; + } + } + } +} + +pub fn readAssets(externalAllocator: NeverFailingAllocator, assetPath: []const u8, blocks: *std.StringHashMap(JsonElement), items: *std.StringHashMap(JsonElement), biomes: *std.StringHashMap(JsonElement), recipes: *main.List([]const u8), models: *std.StringHashMap([]const u8)) void { var addons = main.List(std.fs.Dir).init(main.stackAllocator); defer addons.deinit(); var addonNames = main.List([]const u8).init(main.stackAllocator); @@ -124,6 +168,7 @@ pub fn readAssets(externalAllocator: NeverFailingAllocator, assetPath: []const u readAllJsonFilesInAddons(externalAllocator, addons, addonNames, "items", items); readAllJsonFilesInAddons(externalAllocator, addons, addonNames, "biomes", biomes); readAllFilesInAddons(externalAllocator, addons, "recipes", recipes); + readAllObjFilesInAddonsHashmap(externalAllocator, addons, addonNames, "models", models); } pub fn init() void { @@ -135,8 +180,9 @@ pub fn init() void { commonItems = std.StringHashMap(JsonElement).init(arenaAllocator.allocator); commonBiomes = std.StringHashMap(JsonElement).init(arenaAllocator.allocator); commonRecipes = main.List([]const u8).init(arenaAllocator); + commonModels = std.StringHashMap([]const u8).init(arenaAllocator.allocator); - readAssets(arenaAllocator, "assets/", &commonBlocks, &commonItems, &commonBiomes, &commonRecipes); + readAssets(arenaAllocator, "assets/", &commonBlocks, &commonItems, &commonBiomes, &commonRecipes, &commonModels); } fn registerItem(assetFolder: []const u8, id: []const u8, json: JsonElement) !*items_zig.BaseItem { @@ -233,10 +279,17 @@ pub fn loadWorldAssets(assetFolder: []const u8, blockPalette: *Palette, biomePal var recipes = main.List([]const u8).init(main.stackAllocator); recipes.appendSlice(commonRecipes.items); defer recipes.clearAndFree(); + var models = commonModels.cloneWithAllocator(main.stackAllocator.allocator) catch unreachable; + defer models.clearAndFree(); - readAssets(arenaAllocator, assetFolder, &blocks, &items, &biomes, &recipes); + readAssets(arenaAllocator, assetFolder, &blocks, &items, &biomes, &recipes, &models); errdefer unloadAssets(); + var modelIterator = models.iterator(); + while (modelIterator.next()) |entry| { + _ = main.models.registerModel(entry.key_ptr.*, entry.value_ptr.*); + } + // blocks: for(blockPalette.palette.items) |id| { const nullValue = blocks.get(id); diff --git a/src/blocks.zig b/src/blocks.zig index bd0bb29b..e3e29fd7 100644 --- a/src/blocks.zig +++ b/src/blocks.zig @@ -576,7 +576,7 @@ pub const meshes = struct { // MARK: meshes } pub fn register(assetFolder: []const u8, _: []const u8, json: JsonElement) void { - _modelIndex[meshes.size] = _mode[meshes.size].createBlockModel(json.get([]const u8, "model", "cube")); + _modelIndex[meshes.size] = _mode[meshes.size].createBlockModel(json.get([]const u8, "model", "cubyz:cube")); // The actual model is loaded later, in the rendering thread. // But textures can be loaded here: diff --git a/src/models.zig b/src/models.zig index 97871717..87d32a50 100644 --- a/src/models.zig +++ b/src/models.zig @@ -36,6 +36,18 @@ fn snapToGrid(x: anytype) @TypeOf(x) { return @as(T, @floatFromInt(int))/@as(T, @splat(gridSize)); } +const Triangle = struct { + vertex: [3]usize, + normal: usize, + uvs: [3]usize, +}; + +const Quad = struct { + vertex: [4]usize, + normal: usize, + uvs: [4]usize, +}; + pub const Model = struct { min: Vec3f, max: Vec3f, @@ -75,8 +87,6 @@ pub const Model = struct { return @popCount(@as(u3, @bitCast(hasTwoOnes))) == 2 and @popCount(@as(u3, @bitCast(hasTwoZeroes))) == 2; } - - pub fn init(quadInfos: []const QuadInfo) u16 { const adjustedQuads = main.stackAllocator.alloc(QuadInfo, quadInfos.len); defer main.stackAllocator.free(adjustedQuads); @@ -153,6 +163,191 @@ pub const Model = struct { return modelIndex; } + + fn addVert(vert: Vec3f, vertList: *main.List(Vec3f)) usize { + const ind = for (vertList.*.items, 0..) |vertex, index| { + if (std.meta.eql(vertex, vert)) break index; + } else vertList.*.items.len; + + if (ind == vertList.*.items.len) { + vertList.*.append(vert); + } + + return ind; + } + + pub fn loadModel(data: []const u8) u16 { + var vertices = main.List(Vec3f).init(main.stackAllocator); + defer vertices.deinit(); + + var normals = main.List(Vec3f).init(main.stackAllocator); + defer normals.deinit(); + + var uvs = main.List(Vec2f).init(main.stackAllocator); + defer uvs.deinit(); + + var tris = main.List(Triangle).init(main.stackAllocator); + defer tris.deinit(); + + var quadFaces = main.List(Quad).init(main.stackAllocator); + defer quadFaces.deinit(); + + var fixed_buffer = std.io.fixedBufferStream(data); + var buf_reader = std.io.bufferedReader(fixed_buffer.reader()); + var in_stream = buf_reader.reader(); + var buf: [128]u8 = undefined; + while (in_stream.readUntilDelimiterOrEof(&buf, '\n') catch |e| blk: { + std.log.err("Error reading line while loading model: {any}", .{e}); + break :blk null; + }) |lineUntrimmed| { + if (lineUntrimmed.len < 3) + continue; + + var line = lineUntrimmed; + if (line[line.len - 1] == '\r') { + line = line[0..line.len - 1]; + } + + if (line[0] == '#') + continue; + + if (std.mem.eql(u8, line[0..2], "v ")) { + var coordsIter = std.mem.split(u8, line[2..], " "); + var coords: Vec3f = undefined; + var i: usize = 0; + while (coordsIter.next()) |coord| : (i += 1) { + coords[i] = std.fmt.parseFloat(f32, coord) catch |e| blk: { std.log.err("Failed parsing {s} into float: {any}", .{coord, e}); break :blk 0; }; + } + const coordsCorrect: Vec3f = .{coords[0], coords[1], coords[2]}; + vertices.append(coordsCorrect); + } else if (std.mem.eql(u8, line[0..3], "vn ")) { + var coordsIter = std.mem.split(u8, line[3..], " "); + var norm: Vec3f = undefined; + var i: usize = 0; + while (coordsIter.next()) |coord| : (i += 1) { + norm[i] = std.fmt.parseFloat(f32, coord) catch |e| blk: { std.log.err("Failed parsing {s} into float: {any}", .{coord, e}); break :blk 0; }; + } + const normCorrect: Vec3f = .{norm[0], norm[1], norm[2]}; + normals.append(normCorrect); + } else if (std.mem.eql(u8, line[0..3], "vt ")) { + var coordsIter = std.mem.split(u8, line[3..], " "); + var uv: Vec2f = undefined; + var i: usize = 0; + while (coordsIter.next()) |coord| : (i += 1) { + uv[i] = std.fmt.parseFloat(f32, coord) catch |e| blk: { std.log.err("Failed parsing {s} into float: {any}", .{coord, e}); break :blk 0; }; + } + uv[0] *= 4; + uv[1] *= 4; + uvs.append(.{uv[0], uv[1]}); + } else if (std.mem.eql(u8, line[0..2], "f ")) { + var coordsIter = std.mem.split(u8, line[2..], " "); + var faceData: [3][4]usize = undefined; + var i: usize = 0; + var failed = false; + while (coordsIter.next()) |vertex| : (i += 1) { + if (i >= 4) { + failed = true; + std.log.err("More than 4 verticies in a face", .{}); + break; + } + var d = std.mem.split(u8, vertex, "/"); + var j: usize = 0; + if (std.mem.count(u8, vertex, "/") != 2 or std.mem.count(u8, vertex, "//") != 0) { + failed = true; + std.log.err("Failed loading face {s}. Each vertex must use vertex/uv/normal", .{line}); + break; + } + while (d.next()) |value| : (j += 1) { + faceData[j][i] = std.fmt.parseUnsigned(usize, value, 10) catch |e| blk: { std.log.err("Failed parsing {s} into uint: {any}", .{value, e}); break :blk 1; }; + faceData[j][i] -= 1; + } + } + if (!failed) { + switch (i) { + 3 => { + tris.append(.{.vertex=faceData[0][0..3].*, .uvs=faceData[1][0..3].*, .normal=faceData[2][0]}); + }, + 4 => { + quadFaces.append(.{.vertex=faceData[0], .uvs=faceData[1], .normal=faceData[2][0]}); + }, + else => std.log.err("Failed loading face {s} with {d} vertices", .{line, i}) + } + } + } + } + + var quadInfos = main.List(QuadInfo).init(main.stackAllocator); + defer quadInfos.deinit(); + + for (tris.items) |face| { + const normal: Vec3f = normals.items[face.normal]; + + var uvA: Vec2f = uvs.items[face.uvs[0]]; + var uvB: Vec2f = uvs.items[face.uvs[2]]; + var uvC: Vec2f = uvs.items[face.uvs[1]]; + + const minUv = @floor(@min(@min(uvA, uvB), uvC)); + + if (minUv[0] < 0 or minUv[0] > 4 or minUv[1] < 0 or minUv[1] > 4) { + std.log.err("Uv value for model is outside of 0-1 range", .{}); + continue; + } + + const textureSlot = @as(u32, @intFromFloat(@floor(minUv[1]))) * 4 + @as(u32, @intFromFloat(@floor(minUv[0]))); + + uvA -= minUv; + uvB -= minUv; + uvC -= minUv; + + const cornerA: Vec3f = vertices.items[face.vertex[0]]; + const cornerB: Vec3f = vertices.items[face.vertex[2]]; + const cornerC: Vec3f = vertices.items[face.vertex[1]]; + + quadInfos.append(.{ + .normal = normal, + .corners = .{cornerA, cornerB, cornerC, cornerB}, + .cornerUV = .{uvA, uvB, uvC, uvB}, + .textureSlot = textureSlot, + }); + } + + for (quadFaces.items) |face| { + const normal: Vec3f = normals.items[face.normal]; + + var uvA: Vec2f = uvs.items[face.uvs[1]]; + var uvB: Vec2f = uvs.items[face.uvs[0]]; + var uvC: Vec2f = uvs.items[face.uvs[2]]; + var uvD: Vec2f = uvs.items[face.uvs[3]]; + + const minUv = @floor(@min(@min(uvA, uvB), @min(uvC, uvD))); + const textureSlot = @as(u32, @intFromFloat(@floor(minUv[1]))) * 4 + @as(u32, @intFromFloat(@floor(minUv[0]))); + + if (minUv[0] < 0 or minUv[0] > 4 or minUv[1] < 0 or minUv[1] > 4) { + std.log.err("Uv value for model is outside of 0-1 range", .{}); + continue; + } + + uvA -= minUv; + uvB -= minUv; + uvC -= minUv; + uvD -= minUv; + + const cornerA: Vec3f = vertices.items[face.vertex[1]]; + const cornerB: Vec3f = vertices.items[face.vertex[0]]; + const cornerC: Vec3f = vertices.items[face.vertex[2]]; + const cornerD: Vec3f = vertices.items[face.vertex[3]]; + + quadInfos.append(.{ + .normal = normal, + .corners = .{cornerA, cornerB, cornerC, cornerD}, + .cornerUV = .{uvA, uvB, uvC, uvD}, + .textureSlot = textureSlot, + }); + } + + return Model.init(quadInfos.items); + } + fn deinit(self: *const Model) void { for(0..6) |i| { main.globalAllocator.free(self.neighborFacingQuads[i]); @@ -222,7 +417,6 @@ pub fn getModelIndex(string: []const u8) u16 { pub var quads: main.List(QuadInfo) = undefined; pub var extraQuadInfos: main.List(ExtraQuadInfo) = undefined; pub var models: main.List(Model) = undefined; -pub var fullCube: u16 = undefined; var quadDeduplication: std.AutoHashMap([@sizeOf(QuadInfo)]u8, u16) = undefined; @@ -327,7 +521,12 @@ fn openBox(min: Vec3f, max: Vec3f, uvOffset: Vec2f, openSide: enum{x, y, z}) [4] } } -// TODO: Allow loading from world assets. +pub fn registerModel(id: []const u8, data: []const u8) u16 { + const model = Model.loadModel(data); + nameToIndex.put(id, model) catch unreachable; + return model; +} + // TODO: Entity models. pub fn init() void { models = main.List(Model).init(main.globalAllocator); @@ -338,71 +537,6 @@ pub fn init() void { nameToIndex = std.StringHashMap(u16).init(main.globalAllocator.allocator); nameToIndex.put("none", Model.init(&.{})) catch unreachable; - - const cube = Model.init(&box(.{0, 0, 0}, .{1, 1, 1}, .{0, 0})); - nameToIndex.put("cube", cube) catch unreachable; - fullCube = cube; - - const cross = Model.init(&.{ - .{ - .normal = .{-std.math.sqrt1_2, std.math.sqrt1_2, 0}, - .corners = .{.{1, 1, 0}, .{1, 1, 1}, .{0, 0, 0}, .{0, 0, 1}}, - .cornerUV = .{.{0, 0}, .{0, 1}, .{1, 0}, .{1, 1}}, - .textureSlot = 0, - }, - .{ - .normal = .{std.math.sqrt1_2, -std.math.sqrt1_2, 0}, - .corners = .{.{0, 0, 0}, .{0, 0, 1}, .{1, 1, 0}, .{1, 1, 1}}, - .cornerUV = .{.{0, 0}, .{0, 1}, .{1, 0}, .{1, 1}}, - .textureSlot = 0, - }, - .{ - .normal = .{-std.math.sqrt1_2, -std.math.sqrt1_2, 0}, - .corners = .{.{0, 1, 0}, .{0, 1, 1}, .{1, 0, 0}, .{1, 0, 1}}, - .cornerUV = .{.{0, 0}, .{0, 1}, .{1, 0}, .{1, 1}}, - .textureSlot = 0, - }, - .{ - .normal = .{std.math.sqrt1_2, std.math.sqrt1_2, 0}, - .corners = .{.{1, 0, 0}, .{1, 0, 1}, .{0, 1, 0}, .{0, 1, 1}}, - .cornerUV = .{.{0, 0}, .{0, 1}, .{1, 0}, .{1, 1}}, - .textureSlot = 0, - }, - }); - nameToIndex.put("cross", cross) catch unreachable; - - const swapTopUVs = struct{fn swapTopUVs(_quadInfos: [4]QuadInfo) [4]QuadInfo { - var quadInfos = _quadInfos; - for(&quadInfos) |*quad| { - if(quad.normal[2] != 0) { - for(&quad.cornerUV) |*uv| { - std.mem.swap(f32, &uv[0], &uv[1]); - } - } - } - return quadInfos; - }}.swapTopUVs; - const fence = Model.init(&( - box(.{6.0/16.0, 6.0/16.0, 0}, .{10.0/16.0, 10.0/16.0, 1}, .{0, 0}) - ++ openBox(.{0, 7.0/16.0, 3.0/16.0}, .{1, 9.0/16.0, 6.0/16.0}, .{0, 0}, .x) - ++ openBox(.{0, 7.0/16.0, 10.0/16.0}, .{1, 9.0/16.0, 13.0/16.0}, .{0, 0}, .x) - ++ swapTopUVs(openBox(.{7.0/16.0, 0, 3.0/16.0}, .{9.0/16.0, 1, 6.0/16.0}, .{0, 0}, .y)) - ++ swapTopUVs(openBox(.{7.0/16.0, 0, 10.0/16.0}, .{9.0/16.0, 1, 13.0/16.0}, .{0, 0}, .y)) - )); - nameToIndex.put("fence", fence) catch unreachable; - - const torch = Model.init(&(openBox(.{7.0/16.0, 7.0/16.0, 0}, .{9.0/16.0, 9.0/16.0, 12.0/16.0}, .{-7.0/16.0, 4.0/16.0}, .z) ++ .{.{ - .normal = .{0, 0, 1}, - .corners = .{.{9.0/16.0, 9.0/16.0, 12.0/16.0}, .{9.0/16.0, 7.0/16.0, 12.0/16.0}, .{7.0/16.0, 9.0/16.0, 12.0/16.0}, .{7.0/16.0, 7.0/16.0, 12.0/16.0}}, - .cornerUV = .{.{0, 2.0/16.0}, .{0, 4.0/16.0}, .{2.0/16.0, 2.0/16.0}, .{2.0/16.0, 4.0/16.0}}, - .textureSlot = Neighbor.dirUp.toInt(), - }} ++ .{.{ - .normal = .{0, 0, -1}, - .corners = .{.{7.0/16.0, 9.0/16.0, 0}, .{7.0/16.0, 7.0/16.0, 0}, .{9.0/16.0, 9.0/16.0, 0}, .{9.0/16.0, 7.0/16.0, 0}}, - .cornerUV = .{.{0, 0}, .{0, 2.0/16.0}, .{2.0/16.0, 0}, .{2.0/16.0, 2.0/16.0}}, - .textureSlot = Neighbor.dirDown.toInt(), - }})); - nameToIndex.put("torch", torch) catch unreachable; } pub fn uploadModels() void {