From 6326215fc5ed1e9df2df69132023c522c8d3862f Mon Sep 17 00:00:00 2001 From: grimmauld Date: Sat, 17 Apr 2021 14:31:07 +0200 Subject: [PATCH] Add mirror block to code --- src/generated/resources/.cache/cache | 35 +-- .../assets/create/blockstates/mirror.json | 17 ++ .../resources/assets/create/lang/en_ud.json | 1 + .../resources/assets/create/lang/en_us.json | 1 + .../assets/create/lang/unfinished/de_de.json | 3 +- .../assets/create/lang/unfinished/es_es.json | 3 +- .../assets/create/lang/unfinished/es_mx.json | 3 +- .../assets/create/lang/unfinished/fr_fr.json | 3 +- .../assets/create/lang/unfinished/it_it.json | 3 +- .../assets/create/lang/unfinished/ja_jp.json | 3 +- .../assets/create/lang/unfinished/ko_kr.json | 3 +- .../assets/create/lang/unfinished/nl_nl.json | 3 +- .../assets/create/lang/unfinished/pt_br.json | 3 +- .../assets/create/lang/unfinished/ru_ru.json | 3 +- .../assets/create/lang/unfinished/zh_cn.json | 3 +- .../assets/create/lang/unfinished/zh_tw.json | 3 +- .../assets/create/models/item/mirror.json | 3 + .../data/create/advancements/aesthetics.json | 4 +- .../create/loot_tables/blocks/mirror.json | 19 ++ .../data/create/tags/blocks/safe_nbt.json | 1 + .../com/simibubi/create/AllBlockPartials.java | 2 + .../java/com/simibubi/create/AllBlocks.java | 18 ++ .../java/com/simibubi/create/AllShapes.java | 4 + .../com/simibubi/create/AllTileEntities.java | 10 + .../simibubi/create/content/AllSections.java | 3 + .../content/optics/mirror/MirrorBlock.java | 41 +++ .../content/optics/mirror/MirrorRenderer.java | 48 ++++ .../optics/mirror/MirrorTileEntity.java | 76 +++++ .../foundation/item/ItemDescription.java | 1 + .../create/models/block/mirror/block.json | 259 +++++++++--------- .../create/models/block/mirror/item.json | 234 ++++++++++++++++ 31 files changed, 657 insertions(+), 156 deletions(-) create mode 100644 src/generated/resources/assets/create/blockstates/mirror.json create mode 100644 src/generated/resources/assets/create/models/item/mirror.json create mode 100644 src/generated/resources/data/create/loot_tables/blocks/mirror.json create mode 100644 src/main/java/com/simibubi/create/content/optics/mirror/MirrorBlock.java create mode 100644 src/main/java/com/simibubi/create/content/optics/mirror/MirrorRenderer.java create mode 100644 src/main/java/com/simibubi/create/content/optics/mirror/MirrorTileEntity.java create mode 100644 src/main/resources/assets/create/models/block/mirror/item.json diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index dc18e2d28..bfd4e3ad8 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -237,6 +237,7 @@ b7c4a0ff0c6f16e14d71fc0fb7fc66d032b65cf3 assets/create/blockstates/mechanical_pu 94bbcb7e622471dbf418d78f9200ad321c7168de assets/create/blockstates/metal_bracket.json 4e48ad0936647065c2322390e7c0fe115c853a98 assets/create/blockstates/millstone.json 468202df0802e17c75fcad0993daf1bc5300ca91 assets/create/blockstates/minecart_anchor.json +5e68c6a2af372a89677f1283875d8481c05d6004 assets/create/blockstates/mirror.json 6a42f86aaff8ced70aaa6adb9460614ab40c21e5 assets/create/blockstates/mossy_andesite.json bd49d8df2c3b0e07f599026db5dc1e67f4fa6199 assets/create/blockstates/mossy_dark_scoria.json d1fad9fa7f6d948fd68a31a86fe1b952bf80817b assets/create/blockstates/mossy_diorite.json @@ -406,20 +407,20 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j 6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json -97e9ee471ea650f6b7f3d3f39f00201cd5ad752d assets/create/lang/en_ud.json -3878d0d84b9575728bd299385af2a61bd3a84243 assets/create/lang/en_us.json -33296621c4421a2dc329a3739d8efafbb3b5b57a assets/create/lang/unfinished/de_de.json -052248ce9880cb3db937fed06c6d46a3ca77d1b4 assets/create/lang/unfinished/es_es.json -05d9d186ad4888c2dcb1eb08fe9b78e1e5482cd7 assets/create/lang/unfinished/es_mx.json -dea56d5fcda7baf23d5938b43c1770b5cd76c6f6 assets/create/lang/unfinished/fr_fr.json -56513c7dd8f8ce309b0f77019a2b1b0a55c0cf38 assets/create/lang/unfinished/it_it.json -888191ed07af611597d5ff852ca3d6cb6bf803b7 assets/create/lang/unfinished/ja_jp.json -95fcbeeffd2ced25371f86c9529d4108bf26f930 assets/create/lang/unfinished/ko_kr.json -03e170a7196c4c76942e8b6fde2b0a0b9b877113 assets/create/lang/unfinished/nl_nl.json -a1e092ee4a6eb19568f36535f183afe1d326f0cf assets/create/lang/unfinished/pt_br.json -74b3356506bdb4bf7046768bd7735fa95057d61a assets/create/lang/unfinished/ru_ru.json -ce16cef5a488c2f86def742ca2e436cb42e18552 assets/create/lang/unfinished/zh_cn.json -b55d5abac95ba2649f656857f54b39f98e686767 assets/create/lang/unfinished/zh_tw.json +4ab580b05eecdd48750cb873b7c7ef98a048915b assets/create/lang/en_ud.json +ebfd5578f6ef42718c80037e5a6e4d15151621da assets/create/lang/en_us.json +4bd58362913f8d8edde00744a4a40172fe1c9b27 assets/create/lang/unfinished/de_de.json +3b9ad2085382e2175767ebc295bf1426c5db55c0 assets/create/lang/unfinished/es_es.json +0979a0dddc2e7ca0a164653059a7256577152ce7 assets/create/lang/unfinished/es_mx.json +0f6ccc13e9684e90e4a6fddbee2bf679ed7fc430 assets/create/lang/unfinished/fr_fr.json +1436da7eb2a4b943995c8f60b9704d819d42b513 assets/create/lang/unfinished/it_it.json +7508b5c318499188f42f7c7596bf89a3bc2227a2 assets/create/lang/unfinished/ja_jp.json +d45df55eb66cd26fd7404674c176cef5e93509a8 assets/create/lang/unfinished/ko_kr.json +1a94b23c7a68d0f24f59a12908bd63be44c9c8a0 assets/create/lang/unfinished/nl_nl.json +7323a5793a09e37cff61e92cb660d004c2d9e7ee assets/create/lang/unfinished/pt_br.json +b8e2d4d06f4f57aa9387162d080abab8dfac956c assets/create/lang/unfinished/ru_ru.json +ba7a86b25a9131531bda34daf5ffc42d03c4cf79 assets/create/lang/unfinished/zh_cn.json +be1ea320e84306665da73fc021d0c013cee75b1a assets/create/lang/unfinished/zh_tw.json 487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json 3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json @@ -1466,6 +1467,7 @@ f8d0d4b2a890ea7a69ab0c390947b48fe0478d3f assets/create/models/item/mechanical_pi 0eb5726c8c0de462f432411c210d6132b2c446a4 assets/create/models/item/millstone.json 363c5a2b8ac945b676c838cdf7b0494c3ab13599 assets/create/models/item/minecart_contraption.json 01e3fda31e549a3b6a1e5e615b59478e8f06f16a assets/create/models/item/minecart_coupling.json +05ecb758484f06ea809ae128d8a128c4cbd60696 assets/create/models/item/mirror.json dc43c88dc8ae1f425e1c10f422b09d97719af5bc assets/create/models/item/mossy_andesite.json 4ce9aabf9fa9e9e6af6b4339291e635708bdbcdf assets/create/models/item/mossy_dark_scoria.json d084f03d068d0b8c3b7c4d00014c168f61836770 assets/create/models/item/mossy_diorite.json @@ -1649,7 +1651,7 @@ d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bear a80fb25a0b655e76be986b5b49fcb0f03461a1ab assets/create/models/item/zinc_nugget.json b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json f98bf9f870ac5ee5b31c12a20739773c5fee4949 assets/create/sounds.json -5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json +0f1b4b980afba9bf2caf583b88e261bba8b10313 data/create/advancements/aesthetics.json 187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json 0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json 83c046bd200623933545c9e4326f782fb02c87fa data/create/advancements/arm_blaze_burner.json @@ -2609,6 +2611,7 @@ e94a78187bcf7f235244b2c656732ba9a5821dd0 data/create/loot_tables/blocks/mechanic b13066b9e627db6954a30b115908602f1298576b data/create/loot_tables/blocks/metal_bracket.json efbd4689e7d6740b80357203d1e02196f0752efa data/create/loot_tables/blocks/millstone.json 205f5899101262f31f5c1a88bb7d954918d08d04 data/create/loot_tables/blocks/minecart_anchor.json +cc3f427bf7e0cac6d73c43fa75e712975522c233 data/create/loot_tables/blocks/mirror.json 53215ac772bee2f88052266b82213aaf668660e9 data/create/loot_tables/blocks/mossy_andesite.json 1bf4a13a44e5cc03d730b2aa537e60426062786e data/create/loot_tables/blocks/mossy_dark_scoria.json 956e6cc0c6314c9c01610b643785eed48d2d9317 data/create/loot_tables/blocks/mossy_diorite.json @@ -3646,7 +3649,7 @@ eedf31af7134d03656c5fa57229982f9c5bed07c data/create/tags/blocks/brittle.json 330bfb3850ba3964b10b1bccbc3cbb9b012cae54 data/create/tags/blocks/fan_heaters.json 3bc64e3a1e7980237435b1770a9ba2102d57fcd4 data/create/tags/blocks/fan_transparent.json 74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/create/tags/blocks/non_movable.json -c81ea194e808985847159b201140d4aa4cbcca65 data/create/tags/blocks/safe_nbt.json +834b0ba683dac15d2decb80c34214b98cb2be67f data/create/tags/blocks/safe_nbt.json c9ac7e3e5ec18554e7184168d65e9b8e44ef5610 data/create/tags/blocks/sails.json 6cdeeac1689f7b5bfd9bc40b462143d8eaf3ad0b data/create/tags/blocks/seats.json 50936b211d94167a35ec78c89954082a336b6269 data/create/tags/blocks/valve_handles.json diff --git a/src/generated/resources/assets/create/blockstates/mirror.json b/src/generated/resources/assets/create/blockstates/mirror.json new file mode 100644 index 000000000..9327c0fb3 --- /dev/null +++ b/src/generated/resources/assets/create/blockstates/mirror.json @@ -0,0 +1,17 @@ +{ + "variants": { + "axis=x": { + "model": "create:block/mirror/block", + "x": 90, + "y": 90 + }, + "axis=y": { + "model": "create:block/mirror/block" + }, + "axis=z": { + "model": "create:block/mirror/block", + "x": 90, + "y": 180 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/lang/en_ud.json b/src/generated/resources/assets/create/lang/en_ud.json index 33c7d7480..c3788c0ae 100644 --- a/src/generated/resources/assets/create/lang/en_ud.json +++ b/src/generated/resources/assets/create/lang/en_ud.json @@ -238,6 +238,7 @@ "block.create.metal_bracket": "\u0287\u01DD\u029E\u0254\u0250\u0279\u15FA \u05DF\u0250\u0287\u01DDW", "block.create.millstone": "\u01DDuo\u0287s\u05DF\u05DF\u0131W", "block.create.minecart_anchor": "\u0279o\u0265\u0254u\u2C6F \u0287\u0279\u0250\u0254\u01DDu\u0131W", + "block.create.mirror": "\u0279o\u0279\u0279\u0131W", "block.create.mossy_andesite": "\u01DD\u0287\u0131s\u01DDpu\u2C6F \u028EssoW", "block.create.mossy_dark_scoria": "\u0250\u0131\u0279o\u0254S \u029E\u0279\u0250\u15E1 \u028EssoW", "block.create.mossy_diorite": "\u01DD\u0287\u0131\u0279o\u0131\u15E1 \u028EssoW", diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index 76da8e5cb..653e00d4d 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -241,6 +241,7 @@ "block.create.metal_bracket": "Metal Bracket", "block.create.millstone": "Millstone", "block.create.minecart_anchor": "Minecart Anchor", + "block.create.mirror": "Mirror", "block.create.mossy_andesite": "Mossy Andesite", "block.create.mossy_dark_scoria": "Mossy Dark Scoria", "block.create.mossy_diorite": "Mossy Diorite", diff --git a/src/generated/resources/assets/create/lang/unfinished/de_de.json b/src/generated/resources/assets/create/lang/unfinished/de_de.json index fef0fbea0..fe952cd5b 100644 --- a/src/generated/resources/assets/create/lang/unfinished/de_de.json +++ b/src/generated/resources/assets/create/lang/unfinished/de_de.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 914", + "_": "Missing Localizations: 915", "_": "->------------------------] Game Elements [------------------------<-", @@ -242,6 +242,7 @@ "block.create.metal_bracket": "Metallhalterung", "block.create.millstone": "Mahlstein", "block.create.minecart_anchor": "Lorenanker", + "block.create.mirror": "UNLOCALIZED: Mirror", "block.create.mossy_andesite": "Moosiger Andesit", "block.create.mossy_dark_scoria": "Moosige Dunkle Schlacke", "block.create.mossy_diorite": "Moosiger Diorit", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_es.json b/src/generated/resources/assets/create/lang/unfinished/es_es.json index 17ad4bdce..eda7556dd 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_es.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_es.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 607", + "_": "Missing Localizations: 608", "_": "->------------------------] Game Elements [------------------------<-", @@ -242,6 +242,7 @@ "block.create.metal_bracket": "Soporte de metal para ejes", "block.create.millstone": "Piedra de molino", "block.create.minecart_anchor": "Ancla de vagonetas", + "block.create.mirror": "UNLOCALIZED: Mirror", "block.create.mossy_andesite": "Andesita musgosa", "block.create.mossy_dark_scoria": "Escoria oscura musgosa", "block.create.mossy_diorite": "Diorita musgosa", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_mx.json b/src/generated/resources/assets/create/lang/unfinished/es_mx.json index e362b5565..039c867c5 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_mx.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_mx.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1265", + "_": "Missing Localizations: 1266", "_": "->------------------------] Game Elements [------------------------<-", @@ -242,6 +242,7 @@ "block.create.metal_bracket": "Soporte de Metal", "block.create.millstone": "Molino", "block.create.minecart_anchor": "Ancla de Vagonetas", + "block.create.mirror": "UNLOCALIZED: Mirror", "block.create.mossy_andesite": "Andesita Musgosa", "block.create.mossy_dark_scoria": "Escoria Oscura Musgosa", "block.create.mossy_diorite": "Diorita Musgosa", diff --git a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json index 586f39174..9cdd3a2fb 100644 --- a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json +++ b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1164", + "_": "Missing Localizations: 1165", "_": "->------------------------] Game Elements [------------------------<-", @@ -242,6 +242,7 @@ "block.create.metal_bracket": "UNLOCALIZED: Metal Bracket", "block.create.millstone": "UNLOCALIZED: Millstone", "block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor", + "block.create.mirror": "UNLOCALIZED: Mirror", "block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite", "block.create.mossy_dark_scoria": "UNLOCALIZED: Mossy Dark Scoria", "block.create.mossy_diorite": "UNLOCALIZED: Mossy Diorite", diff --git a/src/generated/resources/assets/create/lang/unfinished/it_it.json b/src/generated/resources/assets/create/lang/unfinished/it_it.json index f627cf5c9..3d42f3749 100644 --- a/src/generated/resources/assets/create/lang/unfinished/it_it.json +++ b/src/generated/resources/assets/create/lang/unfinished/it_it.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 624", + "_": "Missing Localizations: 625", "_": "->------------------------] Game Elements [------------------------<-", @@ -242,6 +242,7 @@ "block.create.metal_bracket": "Supporto di metallo", "block.create.millstone": "Macina", "block.create.minecart_anchor": "Ancora per carrello da miniera", + "block.create.mirror": "UNLOCALIZED: Mirror", "block.create.mossy_andesite": "Andesite muschiosa", "block.create.mossy_dark_scoria": "Scoria scura muschiosa", "block.create.mossy_diorite": "Diorite muschiosa", diff --git a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json index 99d078dda..ebc4c14ba 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json +++ b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 606", + "_": "Missing Localizations: 607", "_": "->------------------------] Game Elements [------------------------<-", @@ -242,6 +242,7 @@ "block.create.metal_bracket": "金属ブラケット", "block.create.millstone": "石臼", "block.create.minecart_anchor": "トロッコアンカー", + "block.create.mirror": "UNLOCALIZED: Mirror", "block.create.mossy_andesite": "苔むした安山岩", "block.create.mossy_dark_scoria": "苔むしたダークスコリア", "block.create.mossy_diorite": "苔むした閃緑岩", diff --git a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json index 103772bb5..75f6f79c7 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json +++ b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 677", + "_": "Missing Localizations: 678", "_": "->------------------------] Game Elements [------------------------<-", @@ -242,6 +242,7 @@ "block.create.metal_bracket": "금속 지지대", "block.create.millstone": "맷돌", "block.create.minecart_anchor": "광산 수레 정박기", + "block.create.mirror": "UNLOCALIZED: Mirror", "block.create.mossy_andesite": "이끼 낀 안산암", "block.create.mossy_dark_scoria": "이끼 낀 짙은 스코리아", "block.create.mossy_diorite": "이끼 낀 섬록암", diff --git a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json index 3e5158e17..9dbc9a252 100644 --- a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json +++ b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1554", + "_": "Missing Localizations: 1555", "_": "->------------------------] Game Elements [------------------------<-", @@ -242,6 +242,7 @@ "block.create.metal_bracket": "UNLOCALIZED: Metal Bracket", "block.create.millstone": "UNLOCALIZED: Millstone", "block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor", + "block.create.mirror": "UNLOCALIZED: Mirror", "block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite", "block.create.mossy_dark_scoria": "UNLOCALIZED: Mossy Dark Scoria", "block.create.mossy_diorite": "UNLOCALIZED: Mossy Diorite", diff --git a/src/generated/resources/assets/create/lang/unfinished/pt_br.json b/src/generated/resources/assets/create/lang/unfinished/pt_br.json index 3cb760892..36dd8b1b9 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pt_br.json +++ b/src/generated/resources/assets/create/lang/unfinished/pt_br.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1608", + "_": "Missing Localizations: 1609", "_": "->------------------------] Game Elements [------------------------<-", @@ -242,6 +242,7 @@ "block.create.metal_bracket": "UNLOCALIZED: Metal Bracket", "block.create.millstone": "UNLOCALIZED: Millstone", "block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor", + "block.create.mirror": "UNLOCALIZED: Mirror", "block.create.mossy_andesite": "UNLOCALIZED: Mossy Andesite", "block.create.mossy_dark_scoria": "UNLOCALIZED: Mossy Dark Scoria", "block.create.mossy_diorite": "UNLOCALIZED: Mossy Diorite", diff --git a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json index 0cc11a18b..9d827daaf 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json +++ b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 521", + "_": "Missing Localizations: 522", "_": "->------------------------] Game Elements [------------------------<-", @@ -242,6 +242,7 @@ "block.create.metal_bracket": "Металлическая скоба", "block.create.millstone": "Жернов", "block.create.minecart_anchor": "Вагонеточный якорь", + "block.create.mirror": "UNLOCALIZED: Mirror", "block.create.mossy_andesite": "Замшелый андезит", "block.create.mossy_dark_scoria": "Замшелый тёмный пепел", "block.create.mossy_diorite": "Замшелый диорит", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json index 63960b6ec..39488abf9 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 621", + "_": "Missing Localizations: 622", "_": "->------------------------] Game Elements [------------------------<-", @@ -242,6 +242,7 @@ "block.create.metal_bracket": "金属支架", "block.create.millstone": "石磨", "block.create.minecart_anchor": "矿车锚", + "block.create.mirror": "UNLOCALIZED: Mirror", "block.create.mossy_andesite": "生苔安山岩", "block.create.mossy_dark_scoria": "生苔深色熔渣", "block.create.mossy_diorite": "生苔闪长岩", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json index 53ea0ab80..a55991932 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 626", + "_": "Missing Localizations: 627", "_": "->------------------------] Game Elements [------------------------<-", @@ -242,6 +242,7 @@ "block.create.metal_bracket": "金屬支架", "block.create.millstone": "石磨", "block.create.minecart_anchor": "礦車錨", + "block.create.mirror": "UNLOCALIZED: Mirror", "block.create.mossy_andesite": "青苔安山岩", "block.create.mossy_dark_scoria": "青苔黑火成岩", "block.create.mossy_diorite": "青苔閃長岩", diff --git a/src/generated/resources/assets/create/models/item/mirror.json b/src/generated/resources/assets/create/models/item/mirror.json new file mode 100644 index 000000000..ac24f9c0e --- /dev/null +++ b/src/generated/resources/assets/create/models/item/mirror.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/mirror/item" +} \ No newline at end of file diff --git a/src/generated/resources/data/create/advancements/aesthetics.json b/src/generated/resources/data/create/advancements/aesthetics.json index 59a86f429..d723cbe38 100644 --- a/src/generated/resources/data/create/advancements/aesthetics.json +++ b/src/generated/resources/data/create/advancements/aesthetics.json @@ -28,8 +28,8 @@ "trigger": "create:bracket_apply", "conditions": { "accepted_entries": [ - "create:large_cogwheel", - "create:cogwheel" + "create:cogwheel", + "create:large_cogwheel" ] } }, diff --git a/src/generated/resources/data/create/loot_tables/blocks/mirror.json b/src/generated/resources/data/create/loot_tables/blocks/mirror.json new file mode 100644 index 000000000..f84c970ae --- /dev/null +++ b/src/generated/resources/data/create/loot_tables/blocks/mirror.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "create:mirror" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/create/tags/blocks/safe_nbt.json b/src/generated/resources/data/create/tags/blocks/safe_nbt.json index d834c9f41..beda7fb53 100644 --- a/src/generated/resources/data/create/tags/blocks/safe_nbt.json +++ b/src/generated/resources/data/create/tags/blocks/safe_nbt.json @@ -15,6 +15,7 @@ "create:radial_chassis", "create:sequenced_gearshift", "create:rotation_speed_controller", + "create:mirror", "create:andesite_funnel", "create:andesite_belt_funnel", "create:brass_funnel", diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index d6a27e9d0..33e1fefd4 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -83,6 +83,8 @@ public class AllBlockPartials { HOSE_MAGNET = get("hose_pulley/pulley_magnet"), HOSE_HALF = get("hose_pulley/rope_half"), HOSE_HALF_MAGNET = get("hose_pulley/rope_half_magnet"), + MIRROR_PLANE = get("mirror/mirror_plane"), + MILLSTONE_COG = get("millstone/inner"), SYMMETRY_PLANE = get("symmetry_effect/plane"), SYMMETRY_CROSSPLANE = get("symmetry_effect/crossplane"), diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index 5065e7bdb..24fdc9ddd 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -154,6 +154,7 @@ import com.simibubi.create.content.logistics.block.redstone.RedstoneContactBlock import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkBlock; import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkGenerator; import com.simibubi.create.content.logistics.block.redstone.StockpileSwitchBlock; +import com.simibubi.create.content.optics.mirror.MirrorBlock; import com.simibubi.create.content.schematics.block.SchematicTableBlock; import com.simibubi.create.content.schematics.block.SchematicannonBlock; import com.simibubi.create.foundation.block.ItemUseOverrides; @@ -1096,6 +1097,23 @@ public class AllBlocks { .transform(customItemModel()) .register(); + // Optics + + static { + REGISTRATE.startSection(AllSections.OPTICS); + } + + public static final BlockEntry MIRROR = + REGISTRATE.block("mirror", MirrorBlock::new) + .initialProperties(SharedProperties::softMetal) + .addLayer(() -> RenderType::getCutoutMipped) + .tag(AllBlockTags.SAFE_NBT.tag) + .blockstate(BlockStateGen.axisBlockProvider(true)) + .transform(StressConfigDefaults.setImpact(4.0)) + .item() + .transform(customItemModel()) + .register(); + // Logistics static { diff --git a/src/main/java/com/simibubi/create/AllShapes.java b/src/main/java/com/simibubi/create/AllShapes.java index 3afa8656a..b6bbae2b0 100644 --- a/src/main/java/com/simibubi/create/AllShapes.java +++ b/src/main/java/com/simibubi/create/AllShapes.java @@ -38,6 +38,10 @@ public class AllShapes { .add(2, 13, 2, 14, 16, 14) .add(0, 0, 14, 16, 16, 16) .forHorizontalAxis(), + MIRROR = shape(0, 0, 0, 16, 2, 16) + .add(1, 2, 1, 15, 14, 15) + .add(0, 14, 0, 16, 16, 16) + .forAxis(), SAIL_FRAME_COLLISION = shape(0, 5, 0, 16, 9, 16).erase(2, 0, 2, 14, 16, 14) .forDirectional(), SAIL_FRAME = shape(0, 5, 0, 16, 9, 16).forDirectional(), SAIL = shape(0, 5, 0, 16, 10, 16).forDirectional(), diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index 33476b929..c51b7fc6d 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -149,6 +149,8 @@ import com.simibubi.create.content.logistics.block.redstone.NixieTubeRenderer; import com.simibubi.create.content.logistics.block.redstone.NixieTubeTileEntity; import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkTileEntity; import com.simibubi.create.content.logistics.block.redstone.StockpileSwitchTileEntity; +import com.simibubi.create.content.optics.mirror.MirrorRenderer; +import com.simibubi.create.content.optics.mirror.MirrorTileEntity; import com.simibubi.create.content.schematics.block.SchematicTableTileEntity; import com.simibubi.create.content.schematics.block.SchematicannonInstance; import com.simibubi.create.content.schematics.block.SchematicannonRenderer; @@ -582,6 +584,14 @@ public class AllTileEntities { // .renderer(() -> renderer) .register(); + // Optics + public static final TileEntityEntry MIRROR = Create.registrate() + .tileEntity("mirror", MirrorTileEntity::new) + // .instance(() -> MirrorRendererInstance::new) + .validBlocks(AllBlocks.MIRROR) + .renderer(() -> MirrorRenderer::new) + .register(); + // Logistics public static final TileEntityEntry REDSTONE_LINK = Create.registrate() .tileEntity("redstone_link", RedstoneLinkTileEntity::new) diff --git a/src/main/java/com/simibubi/create/content/AllSections.java b/src/main/java/com/simibubi/create/content/AllSections.java index 81569f408..17ccc865f 100644 --- a/src/main/java/com/simibubi/create/content/AllSections.java +++ b/src/main/java/com/simibubi/create/content/AllSections.java @@ -16,6 +16,9 @@ public enum AllSections { /** Item transport and other Utility */ LOGISTICS(Palette.Yellow), + /** Beacon tech */ + OPTICS(Palette.White), + /** Tools for strucuture movement and replication */ SCHEMATICS(Palette.Blue), diff --git a/src/main/java/com/simibubi/create/content/optics/mirror/MirrorBlock.java b/src/main/java/com/simibubi/create/content/optics/mirror/MirrorBlock.java new file mode 100644 index 000000000..fb402471e --- /dev/null +++ b/src/main/java/com/simibubi/create/content/optics/mirror/MirrorBlock.java @@ -0,0 +1,41 @@ +package com.simibubi.create.content.optics.mirror; + +import com.simibubi.create.AllShapes; +import com.simibubi.create.AllTileEntities; +import com.simibubi.create.content.contraptions.relays.encased.AbstractEncasedShaftBlock; +import com.simibubi.create.content.contraptions.wrench.IWrenchable; +import com.simibubi.create.foundation.block.ITE; + +import mcp.MethodsReturnNonnullByDefault; +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; + +import javax.annotation.ParametersAreNonnullByDefault; + +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +public class MirrorBlock extends AbstractEncasedShaftBlock implements IWrenchable, ITE { + public MirrorBlock(Properties properties) { + super(properties); + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return AllTileEntities.MIRROR.create(); + } + + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return AllShapes.MIRROR.get(state.get(AXIS)); + } + + @Override + public Class getTileEntityClass() { + return MirrorTileEntity.class; + } +} diff --git a/src/main/java/com/simibubi/create/content/optics/mirror/MirrorRenderer.java b/src/main/java/com/simibubi/create/content/optics/mirror/MirrorRenderer.java new file mode 100644 index 000000000..f690bc5a9 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/optics/mirror/MirrorRenderer.java @@ -0,0 +1,48 @@ +package com.simibubi.create.content.optics.mirror; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.content.contraptions.base.KineticTileEntity; +import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; +import com.simibubi.create.foundation.render.SuperByteBuffer; +import com.simibubi.create.foundation.utility.AngleHelper; + +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.state.properties.BlockStateProperties; +import net.minecraft.util.Direction; + +public class MirrorRenderer extends KineticTileEntityRenderer { + public MirrorRenderer(TileEntityRendererDispatcher dispatcher) { + super(dispatcher); + } + + @Override + protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer, + int light, int overlay) { + + // if (FastRenderDispatcher.available(te.getWorld())) return; + + super.renderSafe(te, partialTicks, ms, buffer, light, overlay); + + MirrorTileEntity bearingTe = (MirrorTileEntity) te; + final Direction.Axis facing = te.getBlockState() + .get(BlockStateProperties.AXIS); + SuperByteBuffer superBuffer = AllBlockPartials.MIRROR_PLANE.renderOn(te.getBlockState()); + + float interpolatedAngle = bearingTe.getInterpolatedAngle(partialTicks - 1); + kineticRotationTransform(superBuffer, te, facing, (float) (interpolatedAngle / 180 * Math.PI), light); + + if (facing == Direction.Axis.X) { + superBuffer.rotateCentered(Direction.UP, AngleHelper.rad(90)); + } + if (facing == Direction.Axis.Y) { + superBuffer.rotateCentered(Direction.EAST, AngleHelper.rad(90)); + } + if (facing == Direction.Axis.Z) { + superBuffer.rotateCentered(Direction.UP, AngleHelper.rad(180)); + } + superBuffer.renderInto(ms, buffer.getBuffer(RenderType.getSolid())); + } +} diff --git a/src/main/java/com/simibubi/create/content/optics/mirror/MirrorTileEntity.java b/src/main/java/com/simibubi/create/content/optics/mirror/MirrorTileEntity.java new file mode 100644 index 000000000..e9c7f7660 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/optics/mirror/MirrorTileEntity.java @@ -0,0 +1,76 @@ +package com.simibubi.create.content.optics.mirror; + +import com.simibubi.create.content.contraptions.base.KineticTileEntity; +import com.simibubi.create.foundation.utility.ServerSpeedProvider; + +import net.minecraft.block.BlockState; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.math.MathHelper; + +public class MirrorTileEntity extends KineticTileEntity { + protected float angle; + protected float clientAngleDiff; + private float prevAngle; + + public MirrorTileEntity(TileEntityType typeIn) { + super(typeIn); + setLazyTickRate(3); + } + + @Override + public void write(CompoundNBT compound, boolean clientPacket) { + compound.putFloat("Angle", angle); + super.write(compound, clientPacket); + } + + @Override + protected void fromTag(BlockState state, CompoundNBT compound, boolean clientPacket) { + if (wasMoved) { + super.fromTag(state, compound, clientPacket); + return; + } + + angle = compound.getFloat("Angle"); + super.fromTag(state, compound, clientPacket); + } + + public float getInterpolatedAngle(float partialTicks) { + if (isVirtual()) + return MathHelper.lerp(partialTicks + .5f, prevAngle, angle); + return MathHelper.lerp(partialTicks, angle, angle + getAngularSpeed()); + } + + public float getAngularSpeed() { + float speed = getSpeed() * 3 / 10f; + if (getSpeed() == 0) + speed = 0; + if (world.isRemote) { + speed *= ServerSpeedProvider.get(); + speed += clientAngleDiff / 3f; + } + return speed; + } + + @Override + public void tick() { + super.tick(); + + prevAngle = angle; + if (world.isRemote) + clientAngleDiff /= 2; + + float angularSpeed = getAngularSpeed(); + float newAngle = angle + angularSpeed; + angle = newAngle % 360; + } + + @Override + public boolean shouldRenderAsTE() { + return true; + } + + public void setAngle(float forcedAngle) { + angle = forcedAngle; + } +} diff --git a/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java b/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java index 6c8a9afd0..e42ae7516 100644 --- a/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java +++ b/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java @@ -59,6 +59,7 @@ public class ItemDescription { Red(DARK_RED, RED), Purple(DARK_PURPLE, LIGHT_PURPLE), Gray(DARK_GRAY, GRAY), + White(WHITE, AQUA) ; diff --git a/src/main/resources/assets/create/models/block/mirror/block.json b/src/main/resources/assets/create/models/block/mirror/block.json index 22e9ddab8..7614462a2 100644 --- a/src/main/resources/assets/create/models/block/mirror/block.json +++ b/src/main/resources/assets/create/models/block/mirror/block.json @@ -8,188 +8,195 @@ }, "elements": [ { - "name": "side", - "from": [2, 2, 14], - "to": [14, 14, 15], - "rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]}, + "name": "front", + "from": [1, 2, 1], + "to": [3, 14, 3], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]}, "faces": { - "north": {"uv": [2, 2, 14, 14], "texture": "#4"}, - "south": {"uv": [2, 2, 14, 14], "texture": "#4"}, - "up": {"uv": [0, 0, 1, 12], "rotation": 270, "texture": "#3"}, - "down": {"uv": [2, 11, 14, 12], "texture": "#4"} + "north": {"uv": [14, 0, 2, 2], "rotation": 270, "texture": "#3"}, + "east": {"uv": [2, 2, 14, 0], "rotation": 270, "texture": "#3"}, + "south": {"uv": [14, 14, 2, 16], "rotation": 90, "texture": "#3"}, + "west": {"uv": [2, 16, 14, 14], "rotation": 90, "texture": "#3"} } }, { "name": "side", - "from": [2, 2, 1], - "to": [14, 14, 2], - "rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]}, + "from": [2, 0, 2], + "to": [14, 1, 14], + "rotation": {"angle": 0, "axis": "x", "origin": [8, -10, 8]}, "faces": { - "north": {"uv": [14, 2, 2, 14], "texture": "#4"}, - "south": {"uv": [14, 2, 2, 14], "texture": "#4"}, - "up": {"uv": [1, 0, 0, 12], "rotation": 270, "texture": "#3"}, - "down": {"uv": [2, 12, 14, 11], "texture": "#4"} + "north": {"uv": [2, 11, 14, 12], "rotation": 180, "texture": "#4"}, + "south": {"uv": [0, 0, 1, 12], "rotation": 270, "texture": "#3"}, + "up": {"uv": [2, 2, 14, 14], "rotation": 180, "texture": "#4"}, + "down": {"uv": [2, 2, 14, 14], "texture": "#4"} + } + }, + { + "name": "side", + "from": [2, 14, 2], + "to": [14, 15, 14], + "rotation": {"angle": 0, "axis": "x", "origin": [8, -10, 8]}, + "faces": { + "north": {"uv": [2, 12, 14, 11], "rotation": 180, "texture": "#4"}, + "south": {"uv": [1, 0, 0, 12], "rotation": 270, "texture": "#3"}, + "up": {"uv": [14, 2, 2, 14], "rotation": 180, "texture": "#4"}, + "down": {"uv": [14, 2, 2, 14], "texture": "#4"} } }, { "name": "side_frame", - "from": [0, 2, 14], - "to": [2, 14, 16], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]}, + "from": [0, 0, 2], + "to": [2, 2, 14], + "rotation": {"angle": 0, "axis": "x", "origin": [8, -1, 8]}, "faces": { - "north": {"uv": [14, 2, 16, 14], "texture": "#4"}, - "east": {"uv": [0, 2, 2, 14], "texture": "#4"}, - "south": {"uv": [0, 2, 2, 14], "texture": "#4"}, - "west": {"uv": [14, 2, 16, 14], "texture": "#4"}, - "up": {"uv": [0, 14, 2, 16], "texture": "#4"}, - "down": {"uv": [0, 0, 2, 2], "texture": "#4"} + "north": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#4"}, + "east": {"uv": [0, 2, 2, 14], "rotation": 270, "texture": "#4"}, + "south": {"uv": [0, 14, 2, 16], "texture": "#4"}, + "west": {"uv": [14, 2, 16, 14], "rotation": 90, "texture": "#4"}, + "up": {"uv": [14, 2, 16, 14], "rotation": 180, "texture": "#4"}, + "down": {"uv": [0, 2, 2, 14], "texture": "#4"} } }, { "name": "side_frame", - "from": [0, 2, 0], - "to": [2, 14, 2], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]}, + "from": [0, 14, 2], + "to": [2, 16, 14], + "rotation": {"angle": 0, "axis": "x", "origin": [8, -1, 8]}, "faces": { - "north": {"uv": [2, 2, 0, 14], "texture": "#4"}, - "east": {"uv": [2, 2, 0, 14], "texture": "#4"}, - "south": {"uv": [16, 2, 14, 14], "texture": "#4"}, - "west": {"uv": [16, 2, 14, 14], "texture": "#4"}, - "up": {"uv": [0, 16, 2, 14], "texture": "#4"}, - "down": {"uv": [0, 2, 2, 0], "texture": "#4"} + "north": {"uv": [0, 2, 2, 0], "rotation": 180, "texture": "#4"}, + "east": {"uv": [2, 2, 0, 14], "rotation": 270, "texture": "#4"}, + "south": {"uv": [0, 16, 2, 14], "texture": "#4"}, + "west": {"uv": [16, 2, 14, 14], "rotation": 90, "texture": "#4"}, + "up": {"uv": [2, 2, 0, 14], "rotation": 180, "texture": "#4"}, + "down": {"uv": [16, 2, 14, 14], "texture": "#4"} } }, { "name": "side_frame", - "from": [14, 2, 14], - "to": [16, 14, 16], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]}, + "from": [14, 0, 2], + "to": [16, 2, 14], + "rotation": {"angle": 0, "axis": "x", "origin": [8, -1, 8]}, "faces": { - "north": {"uv": [2, 2, 0, 14], "rotation": 180, "texture": "#4"}, - "east": {"uv": [2, 2, 0, 14], "rotation": 180, "texture": "#3"}, - "south": {"uv": [16, 2, 14, 14], "rotation": 180, "texture": "#4"}, - "west": {"uv": [2, 2, 0, 14], "texture": "#4"}, - "up": {"uv": [2, 14, 0, 16], "texture": "#4"}, - "down": {"uv": [2, 0, 0, 2], "texture": "#4"} + "north": {"uv": [2, 0, 0, 2], "rotation": 180, "texture": "#4"}, + "east": {"uv": [2, 2, 0, 14], "rotation": 90, "texture": "#3"}, + "south": {"uv": [2, 14, 0, 16], "texture": "#4"}, + "west": {"uv": [2, 2, 0, 14], "rotation": 90, "texture": "#4"}, + "up": {"uv": [2, 2, 0, 14], "texture": "#4"}, + "down": {"uv": [16, 2, 14, 14], "rotation": 180, "texture": "#4"} } }, { "name": "side_frame", - "from": [14, 2, 0], - "to": [16, 14, 2], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]}, + "from": [14, 14, 2], + "to": [16, 16, 14], + "rotation": {"angle": 0, "axis": "x", "origin": [8, -1, 8]}, "faces": { - "north": {"uv": [14, 2, 16, 14], "rotation": 180, "texture": "#4"}, - "east": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#3"}, - "south": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#4"}, - "west": {"uv": [0, 2, 2, 14], "texture": "#4"}, - "up": {"uv": [2, 16, 0, 14], "texture": "#4"}, - "down": {"uv": [2, 2, 0, 0], "texture": "#4"} + "north": {"uv": [2, 2, 0, 0], "rotation": 180, "texture": "#4"}, + "east": {"uv": [0, 2, 2, 14], "rotation": 90, "texture": "#3"}, + "south": {"uv": [2, 16, 0, 14], "texture": "#4"}, + "west": {"uv": [0, 2, 2, 14], "rotation": 90, "texture": "#4"}, + "up": {"uv": [14, 2, 16, 14], "texture": "#4"}, + "down": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#4"} } }, { - "name": "side_frame", - "from": [0, 0, 14], - "to": [16, 2, 16], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]}, + "name": "front", + "from": [1, 2, 13], + "to": [3, 14, 15], + "rotation": {"angle": 0, "axis": "x", "origin": [8, -10, 8]}, "faces": { - "north": {"uv": [0, 14, 16, 16], "texture": "#4"}, - "east": {"uv": [0, 14, 2, 16], "texture": "#4"}, - "south": {"uv": [0, 14, 16, 16], "texture": "#4"}, - "west": {"uv": [14, 14, 16, 16], "texture": "#4"}, - "up": {"uv": [0, 0, 12, 2], "texture": "#4"}, - "down": {"uv": [0, 14, 16, 16], "rotation": 180, "texture": "#3"} - } - }, - { - "name": "side_frame", - "from": [0, 14, 14], - "to": [16, 16, 16], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]}, - "faces": { - "north": {"uv": [0, 16, 16, 14], "texture": "#4"}, - "east": {"uv": [0, 16, 2, 14], "texture": "#4"}, - "south": {"uv": [0, 16, 16, 14], "texture": "#4"}, - "west": {"uv": [14, 16, 16, 14], "texture": "#4"}, - "up": {"uv": [0, 16, 16, 14], "rotation": 180, "texture": "#3"}, - "down": {"uv": [0, 2, 12, 0], "texture": "#4"} + "north": {"uv": [2, 14, 14, 16], "rotation": 270, "texture": "#3"}, + "east": {"uv": [2, 0, 14, 2], "rotation": 270, "texture": "#3"}, + "south": {"uv": [2, 0, 14, 2], "rotation": 90, "texture": "#3"}, + "west": {"uv": [2, 14, 14, 16], "rotation": 90, "texture": "#3"} } }, { "name": "side_frame", "from": [0, 0, 0], "to": [16, 2, 2], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]}, + "rotation": {"angle": 0, "axis": "x", "origin": [8, -1, 8]}, "faces": { - "north": {"uv": [16, 14, 0, 16], "texture": "#4"}, - "east": {"uv": [2, 14, 0, 16], "texture": "#4"}, - "south": {"uv": [16, 14, 0, 16], "texture": "#4"}, - "west": {"uv": [16, 14, 14, 16], "texture": "#4"}, - "up": {"uv": [0, 2, 12, 0], "texture": "#4"}, - "down": {"uv": [0, 14, 16, 16], "texture": "#3"} + "north": {"uv": [0, 14, 16, 16], "texture": "#3"}, + "east": {"uv": [0, 14, 2, 16], "rotation": 270, "texture": "#4"}, + "south": {"uv": [0, 0, 12, 2], "texture": "#4"}, + "west": {"uv": [14, 14, 16, 16], "rotation": 90, "texture": "#4"}, + "up": {"uv": [0, 14, 16, 16], "rotation": 180, "texture": "#4"}, + "down": {"uv": [0, 14, 16, 16], "texture": "#4"} } }, { "name": "side_frame", "from": [0, 14, 0], "to": [16, 16, 2], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]}, + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, "faces": { - "north": {"uv": [16, 16, 0, 14], "texture": "#4"}, - "east": {"uv": [2, 16, 0, 14], "texture": "#4"}, - "south": {"uv": [16, 16, 0, 14], "texture": "#4"}, - "west": {"uv": [16, 16, 14, 14], "texture": "#4"}, - "up": {"uv": [0, 2, 16, 0], "rotation": 180, "texture": "#3"}, - "down": {"uv": [0, 0, 12, 2], "texture": "#4"} + "north": {"uv": [0, 2, 12, 0], "rotation": 180, "texture": "#4"}, + "east": {"uv": [0, 16, 2, 14], "rotation": 270, "texture": "#4"}, + "south": {"uv": [0, 16, 16, 14], "rotation": 180, "texture": "#3"}, + "west": {"uv": [14, 16, 16, 14], "rotation": 90, "texture": "#4"}, + "up": {"uv": [0, 16, 16, 14], "rotation": 180, "texture": "#4"}, + "down": {"uv": [0, 16, 16, 14], "texture": "#4"} + } + }, + { + "name": "side_frame", + "from": [0, 14, 14], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "x", "origin": [8, -1, 8]}, + "faces": { + "north": {"uv": [0, 14, 16, 16], "rotation": 180, "texture": "#3"}, + "east": {"uv": [2, 14, 0, 16], "rotation": 270, "texture": "#4"}, + "south": {"uv": [0, 2, 12, 0], "texture": "#4"}, + "west": {"uv": [16, 14, 14, 16], "rotation": 90, "texture": "#4"}, + "up": {"uv": [16, 14, 0, 16], "rotation": 180, "texture": "#4"}, + "down": {"uv": [16, 14, 0, 16], "texture": "#4"} + } + }, + { + "name": "side_frame", + "from": [0, 0, 14], + "to": [16, 2, 16], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 12, 2], "rotation": 180, "texture": "#4"}, + "east": {"uv": [2, 16, 0, 14], "rotation": 270, "texture": "#4"}, + "south": {"uv": [0, 2, 16, 0], "rotation": 180, "texture": "#3"}, + "west": {"uv": [16, 16, 14, 14], "rotation": 90, "texture": "#4"}, + "up": {"uv": [16, 16, 0, 14], "rotation": 180, "texture": "#4"}, + "down": {"uv": [16, 16, 0, 14], "texture": "#4"} } }, { "name": "front", - "from": [1, 1, 2], - "to": [3, 3, 14], - "rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]}, + "from": [13, 2, 13], + "to": [15, 14, 15], + "rotation": {"angle": 0, "axis": "x", "origin": [8, -10, 8]}, "faces": { - "east": {"uv": [2, 0, 14, 2], "texture": "#3"}, - "west": {"uv": [2, 14, 14, 16], "texture": "#3"}, - "up": {"uv": [2, 0, 14, 2], "rotation": 90, "texture": "#3"}, - "down": {"uv": [2, 14, 14, 16], "rotation": 90, "texture": "#3"} + "north": {"uv": [2, 16, 14, 14], "rotation": 270, "texture": "#3"}, + "east": {"uv": [14, 14, 2, 16], "rotation": 270, "texture": "#3"}, + "south": {"uv": [2, 2, 14, 0], "rotation": 90, "texture": "#3"}, + "west": {"uv": [14, 0, 2, 2], "rotation": 90, "texture": "#3"} } }, { "name": "front", - "from": [13, 1, 2], - "to": [15, 3, 14], - "rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]}, + "from": [13, 2, 1], + "to": [15, 14, 3], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]}, "faces": { - "east": {"uv": [14, 14, 2, 16], "texture": "#3"}, - "west": {"uv": [14, 0, 2, 2], "texture": "#3"}, - "up": {"uv": [2, 2, 14, 0], "rotation": 90, "texture": "#3"}, - "down": {"uv": [2, 16, 14, 14], "rotation": 90, "texture": "#3"} + "north": {"uv": [14, 2, 2, 0], "rotation": 270, "texture": "#3"}, + "east": {"uv": [14, 16, 2, 14], "rotation": 270, "texture": "#3"}, + "south": {"uv": [14, 16, 2, 14], "rotation": 90, "texture": "#3"}, + "west": {"uv": [14, 2, 2, 0], "rotation": 90, "texture": "#3"} } - }, + } + ], + "groups": [ { - "name": "front", - "from": [13, 13, 2], - "to": [15, 15, 14], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]}, - "faces": { - "east": {"uv": [14, 16, 2, 14], "texture": "#3"}, - "west": {"uv": [14, 2, 2, 0], "texture": "#3"}, - "up": {"uv": [14, 16, 2, 14], "rotation": 90, "texture": "#3"}, - "down": {"uv": [14, 2, 2, 0], "rotation": 90, "texture": "#3"} - } - }, - { - "name": "front", - "from": [1, 13, 2], - "to": [3, 15, 14], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]}, - "faces": { - "east": {"uv": [2, 2, 14, 0], "texture": "#3"}, - "west": {"uv": [2, 16, 14, 14], "texture": "#3"}, - "up": {"uv": [14, 14, 2, 16], "rotation": 90, "texture": "#3"}, - "down": {"uv": [14, 0, 2, 2], "rotation": 90, "texture": "#3"} - } + "name": "group", + "origin": [8, 8, 8], + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] } ] } \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/mirror/item.json b/src/main/resources/assets/create/models/block/mirror/item.json new file mode 100644 index 000000000..7a7c09c15 --- /dev/null +++ b/src/main/resources/assets/create/models/block/mirror/item.json @@ -0,0 +1,234 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/axis", + "1": "create:block/axis_top", + "3": "create:block/gearbox_top", + "4": "create:block/gearbox", + "2_0": "create:block/symmetry_mirror", + "particle": "create:item/refined_radiance" + }, + "elements": [ + { + "name": "Mirror", + "from": [2, 9.5, 2], + "to": [14, 10.5, 14], + "rotation": {"angle": -45, "axis": "z", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [2, 2, 14, 14], "rotation": 180, "texture": "#2_0"}, + "east": {"uv": [3, 1, 4, 15], "rotation": 270, "texture": "#2_0"}, + "south": {"uv": [4, 1, 12, 2], "texture": "#2_0"}, + "west": {"uv": [12, 1, 13, 15], "rotation": 90, "texture": "#2_0"}, + "up": {"uv": [2, 2, 14, 14], "rotation": 180, "texture": "#2_0"}, + "down": {"uv": [4, 1, 12, 15], "texture": "#2_0"} + } + }, + { + "name": "Axis", + "from": [6, 6, 0], + "to": [10, 10, 16], + "shade": false, + "rotation": {"angle": -45, "axis": "z", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [6, 6, 10, 10], "rotation": 180, "texture": "#1"}, + "east": {"uv": [6, 0, 10, 16], "rotation": 270, "texture": "#0"}, + "south": {"uv": [6, 6, 10, 10], "texture": "#1"}, + "west": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#0"}, + "up": {"uv": [6, 0, 10, 16], "rotation": 180, "texture": "#0"}, + "down": {"uv": [6, 0, 10, 16], "texture": "#0"} + } + }, + { + "name": "side", + "from": [2, 2, 14], + "to": [14, 14, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]}, + "faces": { + "north": {"uv": [2, 2, 14, 14], "texture": "#4"}, + "south": {"uv": [2, 2, 14, 14], "texture": "#4"}, + "up": {"uv": [0, 0, 1, 12], "rotation": 270, "texture": "#3"}, + "down": {"uv": [2, 11, 14, 12], "texture": "#4"} + } + }, + { + "name": "side", + "from": [2, 2, 1], + "to": [14, 14, 2], + "rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]}, + "faces": { + "north": {"uv": [14, 2, 2, 14], "texture": "#4"}, + "south": {"uv": [14, 2, 2, 14], "texture": "#4"}, + "up": {"uv": [1, 0, 0, 12], "rotation": 270, "texture": "#3"}, + "down": {"uv": [2, 12, 14, 11], "texture": "#4"} + } + }, + { + "name": "side_frame", + "from": [0, 2, 14], + "to": [2, 14, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]}, + "faces": { + "north": {"uv": [14, 2, 16, 14], "texture": "#4"}, + "east": {"uv": [0, 2, 2, 14], "texture": "#4"}, + "south": {"uv": [0, 2, 2, 14], "texture": "#4"}, + "west": {"uv": [14, 2, 16, 14], "texture": "#4"}, + "up": {"uv": [0, 14, 2, 16], "texture": "#4"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#4"} + } + }, + { + "name": "side_frame", + "from": [0, 2, 0], + "to": [2, 14, 2], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]}, + "faces": { + "north": {"uv": [2, 2, 0, 14], "texture": "#4"}, + "east": {"uv": [2, 2, 0, 14], "texture": "#4"}, + "south": {"uv": [16, 2, 14, 14], "texture": "#4"}, + "west": {"uv": [16, 2, 14, 14], "texture": "#4"}, + "up": {"uv": [0, 16, 2, 14], "texture": "#4"}, + "down": {"uv": [0, 2, 2, 0], "texture": "#4"} + } + }, + { + "name": "side_frame", + "from": [14, 2, 14], + "to": [16, 14, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]}, + "faces": { + "north": {"uv": [2, 2, 0, 14], "rotation": 180, "texture": "#4"}, + "east": {"uv": [2, 2, 0, 14], "rotation": 180, "texture": "#3"}, + "south": {"uv": [16, 2, 14, 14], "rotation": 180, "texture": "#4"}, + "west": {"uv": [2, 2, 0, 14], "texture": "#4"}, + "up": {"uv": [2, 14, 0, 16], "texture": "#4"}, + "down": {"uv": [2, 0, 0, 2], "texture": "#4"} + } + }, + { + "name": "side_frame", + "from": [14, 2, 0], + "to": [16, 14, 2], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]}, + "faces": { + "north": {"uv": [14, 2, 16, 14], "rotation": 180, "texture": "#4"}, + "east": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#3"}, + "south": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#4"}, + "west": {"uv": [0, 2, 2, 14], "texture": "#4"}, + "up": {"uv": [2, 16, 0, 14], "texture": "#4"}, + "down": {"uv": [2, 2, 0, 0], "texture": "#4"} + } + }, + { + "name": "side_frame", + "from": [0, 0, 14], + "to": [16, 2, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]}, + "faces": { + "north": {"uv": [0, 14, 16, 16], "texture": "#4"}, + "east": {"uv": [0, 14, 2, 16], "texture": "#4"}, + "south": {"uv": [0, 14, 16, 16], "texture": "#4"}, + "west": {"uv": [14, 14, 16, 16], "texture": "#4"}, + "up": {"uv": [0, 0, 12, 2], "texture": "#4"}, + "down": {"uv": [0, 14, 16, 16], "rotation": 180, "texture": "#3"} + } + }, + { + "name": "side_frame", + "from": [0, 14, 14], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]}, + "faces": { + "north": {"uv": [0, 16, 16, 14], "texture": "#4"}, + "east": {"uv": [0, 16, 2, 14], "texture": "#4"}, + "south": {"uv": [0, 16, 16, 14], "texture": "#4"}, + "west": {"uv": [14, 16, 16, 14], "texture": "#4"}, + "up": {"uv": [0, 16, 16, 14], "rotation": 180, "texture": "#3"}, + "down": {"uv": [0, 2, 12, 0], "texture": "#4"} + } + }, + { + "name": "side_frame", + "from": [0, 0, 0], + "to": [16, 2, 2], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 8]}, + "faces": { + "north": {"uv": [16, 14, 0, 16], "texture": "#4"}, + "east": {"uv": [2, 14, 0, 16], "texture": "#4"}, + "south": {"uv": [16, 14, 0, 16], "texture": "#4"}, + "west": {"uv": [16, 14, 14, 16], "texture": "#4"}, + "up": {"uv": [0, 2, 12, 0], "texture": "#4"}, + "down": {"uv": [0, 14, 16, 16], "texture": "#3"} + } + }, + { + "name": "side_frame", + "from": [0, 14, 0], + "to": [16, 16, 2], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]}, + "faces": { + "north": {"uv": [16, 16, 0, 14], "texture": "#4"}, + "east": {"uv": [2, 16, 0, 14], "texture": "#4"}, + "south": {"uv": [16, 16, 0, 14], "texture": "#4"}, + "west": {"uv": [16, 16, 14, 14], "texture": "#4"}, + "up": {"uv": [0, 2, 16, 0], "rotation": 180, "texture": "#3"}, + "down": {"uv": [0, 0, 12, 2], "texture": "#4"} + } + }, + { + "name": "front", + "from": [1, 1, 2], + "to": [3, 3, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]}, + "faces": { + "east": {"uv": [2, 0, 14, 2], "texture": "#3"}, + "west": {"uv": [2, 14, 14, 16], "texture": "#3"}, + "up": {"uv": [2, 0, 14, 2], "rotation": 90, "texture": "#3"}, + "down": {"uv": [2, 14, 14, 16], "rotation": 90, "texture": "#3"} + } + }, + { + "name": "front", + "from": [13, 1, 2], + "to": [15, 3, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]}, + "faces": { + "east": {"uv": [14, 14, 2, 16], "texture": "#3"}, + "west": {"uv": [14, 0, 2, 2], "texture": "#3"}, + "up": {"uv": [2, 2, 14, 0], "rotation": 90, "texture": "#3"}, + "down": {"uv": [2, 16, 14, 14], "rotation": 90, "texture": "#3"} + } + }, + { + "name": "front", + "from": [13, 13, 2], + "to": [15, 15, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]}, + "faces": { + "east": {"uv": [14, 16, 2, 14], "texture": "#3"}, + "west": {"uv": [14, 2, 2, 0], "texture": "#3"}, + "up": {"uv": [14, 16, 2, 14], "rotation": 90, "texture": "#3"}, + "down": {"uv": [14, 2, 2, 0], "rotation": 90, "texture": "#3"} + } + }, + { + "name": "front", + "from": [1, 13, 2], + "to": [3, 15, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]}, + "faces": { + "east": {"uv": [2, 2, 14, 0], "texture": "#3"}, + "west": {"uv": [2, 16, 14, 14], "texture": "#3"}, + "up": {"uv": [14, 14, 2, 16], "rotation": 90, "texture": "#3"}, + "down": {"uv": [14, 0, 2, 2], "rotation": 90, "texture": "#3"} + } + } + ], + "groups": [0, 1, + { + "name": "block", + "origin": [8, 8, 8], + "children": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + } + ] +} \ No newline at end of file