From 380104a8500edeae649d4f9a5d45ffc5396c51ac Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Tue, 8 Feb 2022 01:49:35 +0100 Subject: [PATCH] Girdert of here! - New Metal Girder block - Experimental Girder renderer for track curves --- src/generated/resources/.cache/cache | 39 +++--- .../create/blockstates/metal_girder.json | 78 +++++++++++ .../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_cl.json | 3 +- .../assets/create/lang/unfinished/es_es.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/pl_pl.json | 3 +- .../assets/create/lang/unfinished/pt_br.json | 3 +- .../assets/create/lang/unfinished/pt_pt.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 +- .../create/models/item/metal_girder.json | 3 + .../data/create/advancements/aesthetics.json | 4 +- .../loot_tables/blocks/metal_girder.json | 20 +++ .../tags/blocks/mineable/pickaxe.json | 1 + .../com/simibubi/create/AllBlockPartials.java | 2 + .../java/com/simibubi/create/AllBlocks.java | 10 ++ .../java/com/simibubi/create/AllShapes.java | 10 +- .../curiosities/girder/GirderBlock.java | 130 ++++++++++++++++++ .../girder/GirderBlockStateGenerator.java | 60 ++++++++ .../logistics/trains/BezierConnection.java | 12 +- .../trains/management/StationBlock.java | 6 + .../trains/track/TrackBlockItem.java | 6 +- .../logistics/trains/track/TrackPaver.java | 13 +- .../trains/track/TrackPlacement.java | 17 +-- .../logistics/trains/track/TrackRenderer.java | 98 ++++++++++++- .../models/block/metal_girder/Girder.bbmodel | 1 + .../block/metal_girder/block_bottom.json | 30 ++++ .../block/metal_girder/block_cross.json | 42 ++++++ .../models/block/metal_girder/block_pole.json | 29 ++++ .../models/block/metal_girder/block_top.json | 29 ++++ .../models/block/metal_girder/block_x.json | 54 ++++++++ .../models/block/metal_girder/block_z.json | 53 +++++++ .../models/block/metal_girder/item.json | 86 ++++++++++++ .../models/block/metal_girder/segment.json | 22 +++ .../models/block/metal_girder/segment2.json | 20 +++ .../create/textures/block/chute_block.png | Bin 0 -> 266 bytes .../assets/create/textures/block/girder.png | Bin 0 -> 1060 bytes .../create/textures/block/girder_pole.png | Bin 0 -> 278 bytes .../create/textures/block/standard_track.png | Bin 978 -> 990 bytes 47 files changed, 863 insertions(+), 56 deletions(-) create mode 100644 src/generated/resources/assets/create/blockstates/metal_girder.json create mode 100644 src/generated/resources/assets/create/models/item/metal_girder.json create mode 100644 src/generated/resources/data/create/loot_tables/blocks/metal_girder.json create mode 100644 src/main/java/com/simibubi/create/content/curiosities/girder/GirderBlock.java create mode 100644 src/main/java/com/simibubi/create/content/curiosities/girder/GirderBlockStateGenerator.java create mode 100644 src/main/resources/assets/create/models/block/metal_girder/Girder.bbmodel create mode 100644 src/main/resources/assets/create/models/block/metal_girder/block_bottom.json create mode 100644 src/main/resources/assets/create/models/block/metal_girder/block_cross.json create mode 100644 src/main/resources/assets/create/models/block/metal_girder/block_pole.json create mode 100644 src/main/resources/assets/create/models/block/metal_girder/block_top.json create mode 100644 src/main/resources/assets/create/models/block/metal_girder/block_x.json create mode 100644 src/main/resources/assets/create/models/block/metal_girder/block_z.json create mode 100644 src/main/resources/assets/create/models/block/metal_girder/item.json create mode 100644 src/main/resources/assets/create/models/block/metal_girder/segment.json create mode 100644 src/main/resources/assets/create/models/block/metal_girder/segment2.json create mode 100644 src/main/resources/assets/create/textures/block/chute_block.png create mode 100644 src/main/resources/assets/create/textures/block/girder.png create mode 100644 src/main/resources/assets/create/textures/block/girder_pole.png diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index b447e4783..6c96f19b4 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -290,6 +290,7 @@ debef0f5dde74103aaf4422de4bc90e4099b0c47 assets/create/blockstates/mechanical_pl b7c4a0ff0c6f16e14d71fc0fb7fc66d032b65cf3 assets/create/blockstates/mechanical_pump.json 264d72320ee0f1e014319f7d99dcc1fa953a4ad4 assets/create/blockstates/mechanical_saw.json 94bbcb7e622471dbf418d78f9200ad321c7168de assets/create/blockstates/metal_bracket.json +c253a827d9f0b0e29f67dfd19d65b259d3d4f045 assets/create/blockstates/metal_girder.json 4e48ad0936647065c2322390e7c0fe115c853a98 assets/create/blockstates/millstone.json 468202df0802e17c75fcad0993daf1bc5300ca91 assets/create/blockstates/minecart_anchor.json b1126c191877cff86b4e2de83e1fcbd151451cb7 assets/create/blockstates/mysterious_cuckoo_clock.json @@ -535,22 +536,22 @@ bf2b0310500213ff853c748c236eb5d01f61658e assets/create/blockstates/yellow_toolbo 6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json -9ffe5b3f8a39fa3c3a97a3c534bd82402177e82e assets/create/lang/en_ud.json -8a5aec9b50def31d67404d0bfe4b44e36f4b92fe assets/create/lang/en_us.json -d9daa020e298d6ab1420c31347e34d1c44b1754b assets/create/lang/unfinished/de_de.json -fb68c11749892f4548065b5a2c9c06d8ea191675 assets/create/lang/unfinished/es_cl.json -2c3dd3ce3babc836ca5d7cf7b6674bc82dacab75 assets/create/lang/unfinished/es_es.json -031fa6be3a6fa11c6f14dc71c96c75e3bfa29172 assets/create/lang/unfinished/fr_fr.json -e683bf4fb4acfb4ba4a545427c9d793905272572 assets/create/lang/unfinished/it_it.json -641d5b5066086679364cbf882722ca75b7a1578c assets/create/lang/unfinished/ja_jp.json -8260c7075f6e9fdb8a97618636854555a0dc2b72 assets/create/lang/unfinished/ko_kr.json -fb7df57cc05f3cf95715b4c1dcf7274beb332c4f assets/create/lang/unfinished/nl_nl.json -697fb5eb49f7316c9932fab43346717695c5e0c5 assets/create/lang/unfinished/pl_pl.json -e007d6c626a1fca61382838f413d0e40ca702017 assets/create/lang/unfinished/pt_br.json -c4b8a2bd6331dd0c703bc70204f9dce24be08cc2 assets/create/lang/unfinished/pt_pt.json -b8acd477bf9bef586fe10e58a4120064581ecabc assets/create/lang/unfinished/ru_ru.json -44e398366683e2d92ebdbbcdf7b6510b7ee62889 assets/create/lang/unfinished/zh_cn.json -0d0016f17bea0cece7b89de092db5517ddfb899e assets/create/lang/unfinished/zh_tw.json +d32ac672a6e85015edc0f49157405da81a9d82fd assets/create/lang/en_ud.json +907936101b5a6cc3fc9db47aec2617f836b773bb assets/create/lang/en_us.json +c265dd98de3faa80affe8f5a6f171f7a0f9d1027 assets/create/lang/unfinished/de_de.json +4f41bf7eece8eb6463b307390d721348018cf91d assets/create/lang/unfinished/es_cl.json +93e8b2b6d7f029c362029393c1329045cfb35033 assets/create/lang/unfinished/es_es.json +4cfe7446bb05c23c9a49fe3bccddb1e597050c1c assets/create/lang/unfinished/fr_fr.json +2a495ea4df9330bc69bcb05291b8210fa644bfdc assets/create/lang/unfinished/it_it.json +62d1aec8ba91731d99480e60dd6cb29489b6c887 assets/create/lang/unfinished/ja_jp.json +aa79bb52d87c6d5251231dd4f577dd334793e903 assets/create/lang/unfinished/ko_kr.json +a8f003508a946f9c1144bf14aff2321feccc507b assets/create/lang/unfinished/nl_nl.json +43f5043560fda8799718c262fa72111101be31db assets/create/lang/unfinished/pl_pl.json +cae2ce1a697c0660ff66b23020dd0209ae9258c6 assets/create/lang/unfinished/pt_br.json +e3d4a36a5f9b7b37cf52affadc9018ff3106a0d8 assets/create/lang/unfinished/pt_pt.json +c2986f67a7dcf94db04107f4126ab3601f5065ee assets/create/lang/unfinished/ru_ru.json +40cd4b06703e51b8779b36e45fd42bf836737971 assets/create/lang/unfinished/zh_cn.json +48c4e96bfd4de2cd466911a18035d7bba98645a4 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 @@ -1877,6 +1878,7 @@ f8d0d4b2a890ea7a69ab0c390947b48fe0478d3f assets/create/models/item/mechanical_pi 4e363477e3e8059dd7b2bad04046521b31923d1b assets/create/models/item/mechanical_pump.json 3fc1fcb2016d2782c3667c21575423122b66705a assets/create/models/item/mechanical_saw.json 3afa723a8ba4160a4bd8778a56e1880e7ff53ed9 assets/create/models/item/metal_bracket.json +56494f6d8743241836f7e68122ad9cc83f77658a assets/create/models/item/metal_girder.json 0eb5726c8c0de462f432411c210d6132b2c446a4 assets/create/models/item/millstone.json 363c5a2b8ac945b676c838cdf7b0494c3ab13599 assets/create/models/item/minecart_contraption.json 01e3fda31e549a3b6a1e5e615b59478e8f06f16a assets/create/models/item/minecart_coupling.json @@ -2135,7 +2137,7 @@ d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bear a80fb25a0b655e76be986b5b49fcb0f03461a1ab assets/create/models/item/zinc_nugget.json b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json 5049f72c327a88f175f6f9425909e098fc711100 assets/create/sounds.json -0f1b4b980afba9bf2caf583b88e261bba8b10313 data/create/advancements/aesthetics.json +5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json 613e64b44bed959da899fdd54c1cacb227fb33f2 data/create/advancements/andesite_alloy.json 81885c6bfb85792c88aaa7c9b70f58832945d31f data/create/advancements/andesite_casing.json 83c046bd200623933545c9e4326f782fb02c87fa data/create/advancements/arm_blaze_burner.json @@ -3571,6 +3573,7 @@ ff55d31ae8f7a8943f1e9fcc330d18e246566997 data/create/loot_tables/blocks/mechanic 8f885b8cec8f1ef9e35bd9b93a64a0f6e14c31b0 data/create/loot_tables/blocks/mechanical_pump.json 6c88dd3f096f2a7572573158f8e6d9f4b3dedae0 data/create/loot_tables/blocks/mechanical_saw.json fcd800d7abf5dc5ce50b6fff6f2fc934b3d47b4b data/create/loot_tables/blocks/metal_bracket.json +afdff197c9d1a6940e988c00435135f9705fd0e5 data/create/loot_tables/blocks/metal_girder.json b83a90fbe83906b171fc0de6bdc2d9aa3a8c542e data/create/loot_tables/blocks/millstone.json 5c1df8443043b3fe3b665dba348e2ff188bcbe31 data/create/loot_tables/blocks/minecart_anchor.json 1e73d28fdd2e54910074aeadbe5617425a8ae656 data/create/loot_tables/blocks/mysterious_cuckoo_clock.json @@ -5274,7 +5277,7 @@ ff1900963bc4cd8ceffa78d58ef1952ceacb2fb7 data/forge/tags/items/storage_blocks/br 69f596fcb065e26b02ce246760432b5174191b76 data/minecraft/tags/blocks/impermeable.json 2db7759fe036160c14c6ed19a68604ca16f4de60 data/minecraft/tags/blocks/lush_ground_replaceable.json 02f7a9df2f9e154749266e7ac59c37aa076a3390 data/minecraft/tags/blocks/mineable/axe.json -b52748d3d434dd40ba10db8e97fa2102d7acb638 data/minecraft/tags/blocks/mineable/pickaxe.json +fa964df81a193d6854ef23fc6061a02d52743f60 data/minecraft/tags/blocks/mineable/pickaxe.json 2db7759fe036160c14c6ed19a68604ca16f4de60 data/minecraft/tags/blocks/moss_replaceable.json e157c1d3af30e409e34bbefbe15a037e6e1c8daa data/minecraft/tags/blocks/needs_iron_tool.json a08f67865337f62601c5e333b4011382d10020e4 data/minecraft/tags/blocks/needs_stone_tool.json diff --git a/src/generated/resources/assets/create/blockstates/metal_girder.json b/src/generated/resources/assets/create/blockstates/metal_girder.json new file mode 100644 index 000000000..5b2035a7f --- /dev/null +++ b/src/generated/resources/assets/create/blockstates/metal_girder.json @@ -0,0 +1,78 @@ +{ + "multipart": [ + { + "when": { + "x": "false", + "z": "false" + }, + "apply": { + "model": "create:block/metal_girder/block_pole" + } + }, + { + "when": { + "x": "true" + }, + "apply": { + "model": "create:block/metal_girder/block_x" + } + }, + { + "when": { + "z": "true" + }, + "apply": { + "model": "create:block/metal_girder/block_z" + } + }, + { + "when": { + "top": "true", + "x": "true", + "z": "false" + }, + "apply": { + "model": "create:block/metal_girder/block_top" + } + }, + { + "when": { + "bottom": "true", + "x": "true", + "z": "false" + }, + "apply": { + "model": "create:block/metal_girder/block_bottom" + } + }, + { + "when": { + "top": "true", + "x": "false", + "z": "true" + }, + "apply": { + "model": "create:block/metal_girder/block_top" + } + }, + { + "when": { + "bottom": "true", + "x": "false", + "z": "true" + }, + "apply": { + "model": "create:block/metal_girder/block_bottom" + } + }, + { + "when": { + "x": "true", + "z": "true" + }, + "apply": { + "model": "create:block/metal_girder/block_cross" + } + } + ] +} \ 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 f45539ebc..79f8d0097 100644 --- a/src/generated/resources/assets/create/lang/en_ud.json +++ b/src/generated/resources/assets/create/lang/en_ud.json @@ -291,6 +291,7 @@ "block.create.mechanical_pump": "d\u026Fn\u0500 \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW", "block.create.mechanical_saw": "\u028D\u0250S \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW", "block.create.metal_bracket": "\u0287\u01DD\u029E\u0254\u0250\u0279\u15FA \u05DF\u0250\u0287\u01DDW", + "block.create.metal_girder": "\u0279\u01DDp\u0279\u0131\u2141 \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.mysterious_cuckoo_clock": "\u029E\u0254o\u05DF\u0186 oo\u029E\u0254n\u0186", diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index c3ff63ff0..6a42a8175 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -294,6 +294,7 @@ "block.create.mechanical_pump": "Mechanical Pump", "block.create.mechanical_saw": "Mechanical Saw", "block.create.metal_bracket": "Metal Bracket", + "block.create.metal_girder": "Metal Girder", "block.create.millstone": "Millstone", "block.create.minecart_anchor": "Minecart Anchor", "block.create.mysterious_cuckoo_clock": "Cuckoo Clock", 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 f31d47ff9..79366c4ab 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: 1429", + "_": "Missing Localizations: 1430", "_": "->------------------------] Game Elements [------------------------<-", @@ -295,6 +295,7 @@ "block.create.mechanical_pump": "Mechanische Pumpe", "block.create.mechanical_saw": "Mechanische Säge", "block.create.metal_bracket": "Metallhalterung", + "block.create.metal_girder": "UNLOCALIZED: Metal Girder", "block.create.millstone": "Mahlstein", "block.create.minecart_anchor": "Lorenanker", "block.create.mysterious_cuckoo_clock": "Kuckucksuhr", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_cl.json b/src/generated/resources/assets/create/lang/unfinished/es_cl.json index c14c576a2..9c3505d80 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_cl.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_cl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 440", + "_": "Missing Localizations: 441", "_": "->------------------------] Game Elements [------------------------<-", @@ -295,6 +295,7 @@ "block.create.mechanical_pump": "Bomba Mecánica", "block.create.mechanical_saw": "Sierra Mecánica", "block.create.metal_bracket": "Soporte Metálico", + "block.create.metal_girder": "UNLOCALIZED: Metal Girder", "block.create.millstone": "Piedra de Molino", "block.create.minecart_anchor": "Ancla de Vagoneta", "block.create.mysterious_cuckoo_clock": "Reloj Cu-Cú", 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 f7be4e2e0..d149a878b 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: 440", + "_": "Missing Localizations: 441", "_": "->------------------------] Game Elements [------------------------<-", @@ -295,6 +295,7 @@ "block.create.mechanical_pump": "Bomba mecánica", "block.create.mechanical_saw": "Sierra mecánica", "block.create.metal_bracket": "Soporte de metal para ejes", + "block.create.metal_girder": "UNLOCALIZED: Metal Girder", "block.create.millstone": "Piedra de molino", "block.create.minecart_anchor": "Ancla de vagonetas", "block.create.mysterious_cuckoo_clock": "Reloj de cuco", 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 39744abb5..2a7e92032 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: 1691", + "_": "Missing Localizations: 1692", "_": "->------------------------] Game Elements [------------------------<-", @@ -295,6 +295,7 @@ "block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump", "block.create.mechanical_saw": "Scie mécanique", "block.create.metal_bracket": "UNLOCALIZED: Metal Bracket", + "block.create.metal_girder": "UNLOCALIZED: Metal Girder", "block.create.millstone": "UNLOCALIZED: Millstone", "block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor", "block.create.mysterious_cuckoo_clock": "UNLOCALIZED: Cuckoo Clock", 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 d7fedf5e6..e993ac310 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: 1380", + "_": "Missing Localizations: 1381", "_": "->------------------------] Game Elements [------------------------<-", @@ -295,6 +295,7 @@ "block.create.mechanical_pump": "Pompa meccanica", "block.create.mechanical_saw": "Sega meccanica", "block.create.metal_bracket": "Supporto di metallo", + "block.create.metal_girder": "UNLOCALIZED: Metal Girder", "block.create.millstone": "Macina", "block.create.minecart_anchor": "Ancora per carrello da miniera", "block.create.mysterious_cuckoo_clock": "Orologio a cucù misterioso", 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 e71d5392c..66e410374 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: 110", + "_": "Missing Localizations: 111", "_": "->------------------------] Game Elements [------------------------<-", @@ -295,6 +295,7 @@ "block.create.mechanical_pump": "メカニカルポンプ", "block.create.mechanical_saw": "メカニカルソー", "block.create.metal_bracket": "金属ブラケット", + "block.create.metal_girder": "UNLOCALIZED: Metal Girder", "block.create.millstone": "石臼", "block.create.minecart_anchor": "トロッコアンカー", "block.create.mysterious_cuckoo_clock": "鳩時計", 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 f5ac449df..b84e5f93e 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: 112", + "_": "Missing Localizations: 113", "_": "->------------------------] Game Elements [------------------------<-", @@ -295,6 +295,7 @@ "block.create.mechanical_pump": "펌프", "block.create.mechanical_saw": "톱", "block.create.metal_bracket": "금속 지지대", + "block.create.metal_girder": "UNLOCALIZED: Metal Girder", "block.create.millstone": "맷돌", "block.create.minecart_anchor": "광산 수레 정박기", "block.create.mysterious_cuckoo_clock": "뻐꾸기 시계?", 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 31c7a29f1..fe0792130 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: 2044", + "_": "Missing Localizations: 2045", "_": "->------------------------] Game Elements [------------------------<-", @@ -295,6 +295,7 @@ "block.create.mechanical_pump": "UNLOCALIZED: Mechanical Pump", "block.create.mechanical_saw": "Mechanische Zaag", "block.create.metal_bracket": "UNLOCALIZED: Metal Bracket", + "block.create.metal_girder": "UNLOCALIZED: Metal Girder", "block.create.millstone": "UNLOCALIZED: Millstone", "block.create.minecart_anchor": "UNLOCALIZED: Minecart Anchor", "block.create.mysterious_cuckoo_clock": "UNLOCALIZED: Cuckoo Clock", diff --git a/src/generated/resources/assets/create/lang/unfinished/pl_pl.json b/src/generated/resources/assets/create/lang/unfinished/pl_pl.json index dc179c08f..11a41a399 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pl_pl.json +++ b/src/generated/resources/assets/create/lang/unfinished/pl_pl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 479", + "_": "Missing Localizations: 480", "_": "->------------------------] Game Elements [------------------------<-", @@ -295,6 +295,7 @@ "block.create.mechanical_pump": "Mechaniczna pompa", "block.create.mechanical_saw": "Mechaniczna piła", "block.create.metal_bracket": "Metalowy wspornik", + "block.create.metal_girder": "UNLOCALIZED: Metal Girder", "block.create.millstone": "Młynek", "block.create.minecart_anchor": "Kotwica wagonikowa", "block.create.mysterious_cuckoo_clock": "Zegar z kukułką", 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 61271f954..bfa634c75 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: 1663", + "_": "Missing Localizations: 1664", "_": "->------------------------] Game Elements [------------------------<-", @@ -295,6 +295,7 @@ "block.create.mechanical_pump": "Bomba Mecânica", "block.create.mechanical_saw": "Serra Mecânica", "block.create.metal_bracket": "Suporte de metal", + "block.create.metal_girder": "UNLOCALIZED: Metal Girder", "block.create.millstone": "Pedra de Moer", "block.create.minecart_anchor": "Ancóra de carrinho de Mina", "block.create.mysterious_cuckoo_clock": "Relógio cuckoo", diff --git a/src/generated/resources/assets/create/lang/unfinished/pt_pt.json b/src/generated/resources/assets/create/lang/unfinished/pt_pt.json index 645594bee..8cc86923c 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pt_pt.json +++ b/src/generated/resources/assets/create/lang/unfinished/pt_pt.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1663", + "_": "Missing Localizations: 1664", "_": "->------------------------] Game Elements [------------------------<-", @@ -295,6 +295,7 @@ "block.create.mechanical_pump": "Bomba Mecânica", "block.create.mechanical_saw": "Serra Mecânica", "block.create.metal_bracket": "Suporte de metal", + "block.create.metal_girder": "UNLOCALIZED: Metal Girder", "block.create.millstone": "Pedra de Moer", "block.create.minecart_anchor": "Ancóra de carrinho de Mina", "block.create.mysterious_cuckoo_clock": "Relógio cuckoo", 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 b783b5f54..777db4d88 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: 484", + "_": "Missing Localizations: 485", "_": "->------------------------] Game Elements [------------------------<-", @@ -295,6 +295,7 @@ "block.create.mechanical_pump": "Механическая помпа", "block.create.mechanical_saw": "Механическая пила", "block.create.metal_bracket": "Металлическая скоба", + "block.create.metal_girder": "UNLOCALIZED: Metal Girder", "block.create.millstone": "Жернов", "block.create.minecart_anchor": "Вагонеточный якорь", "block.create.mysterious_cuckoo_clock": "Часы с кукушкой", 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 83c89c123..d17c91e77 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: 110", + "_": "Missing Localizations: 111", "_": "->------------------------] Game Elements [------------------------<-", @@ -295,6 +295,7 @@ "block.create.mechanical_pump": "动力泵", "block.create.mechanical_saw": "动力锯", "block.create.metal_bracket": "金属支架", + "block.create.metal_girder": "UNLOCALIZED: Metal Girder", "block.create.millstone": "石磨", "block.create.minecart_anchor": "矿车锚", "block.create.mysterious_cuckoo_clock": "布谷鸟闹钟", 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 f6eeffc23..a31fd46e0 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: 498", + "_": "Missing Localizations: 499", "_": "->------------------------] Game Elements [------------------------<-", @@ -295,6 +295,7 @@ "block.create.mechanical_pump": "機械幫浦", "block.create.mechanical_saw": "機械切割機", "block.create.metal_bracket": "金屬支架", + "block.create.metal_girder": "UNLOCALIZED: Metal Girder", "block.create.millstone": "石磨", "block.create.minecart_anchor": "礦車錨", "block.create.mysterious_cuckoo_clock": "神秘布穀鳥鐘", diff --git a/src/generated/resources/assets/create/models/item/metal_girder.json b/src/generated/resources/assets/create/models/item/metal_girder.json new file mode 100644 index 000000000..c665a2f5a --- /dev/null +++ b/src/generated/resources/assets/create/models/item/metal_girder.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/metal_girder/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 d723cbe38..59a86f429 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:cogwheel", - "create:large_cogwheel" + "create:large_cogwheel", + "create:cogwheel" ] } }, diff --git a/src/generated/resources/data/create/loot_tables/blocks/metal_girder.json b/src/generated/resources/data/create/loot_tables/blocks/metal_girder.json new file mode 100644 index 000000000..0ca8ebb1e --- /dev/null +++ b/src/generated/resources/data/create/loot_tables/blocks/metal_girder.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "create:metal_girder" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 032cbf9b1..11f41103e 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -41,6 +41,7 @@ "create:stressometer", "create:wooden_bracket", "create:metal_bracket", + "create:metal_girder", "create:fluid_pipe", "create:encased_fluid_pipe", "create:glass_fluid_pipe", diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index 9552f26d7..e7eb6b3dd 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -114,6 +114,8 @@ public class AllBlockPartials { TRACK_SEGMENT_LEFT = block("track/segment_left"), TRACK_SEGMENT_RIGHT = block("track/segment_right"), TRACK_TIE = block("track/tie"), + GIRDER_SEGMENT = block("metal_girder/segment"), + GIRDER_SEGMENT_2 = block("metal_girder/segment2"), TRACK_STATION_OVERLAY = block("track/station_overlay"), TRACK_STATION_OVERLAY_DIAGONAL = block("track/station_overlay_diagonal"), diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index 96a41c39c..a06dc2c97 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -127,6 +127,8 @@ import com.simibubi.create.content.curiosities.armor.CopperBacktankBlock; import com.simibubi.create.content.curiosities.bell.HauntedBellBlock; import com.simibubi.create.content.curiosities.bell.HauntedBellMovementBehaviour; import com.simibubi.create.content.curiosities.bell.PeculiarBellBlock; +import com.simibubi.create.content.curiosities.girder.GirderBlock; +import com.simibubi.create.content.curiosities.girder.GirderBlockStateGenerator; import com.simibubi.create.content.curiosities.toolbox.ToolboxBlock; import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelBlock; import com.simibubi.create.content.logistics.block.belts.tunnel.BrassTunnelBlock; @@ -665,6 +667,14 @@ public class AllBlocks { .transform(BracketGenerator.itemModel("metal")) .register(); + public static final BlockEntry METAL_GIRDER = REGISTRATE.block("metal_girder", GirderBlock::new) + .blockstate(GirderBlockStateGenerator::blockState) + .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) + .transform(pickaxeOnly()) + .item() + .transform(customItemModel()) + .register(); + // Fluids public static final BlockEntry FLUID_PIPE = REGISTRATE.block("fluid_pipe", FluidPipeBlock::new) diff --git a/src/main/java/com/simibubi/create/AllShapes.java b/src/main/java/com/simibubi/create/AllShapes.java index 5512d7335..dfa0ee521 100644 --- a/src/main/java/com/simibubi/create/AllShapes.java +++ b/src/main/java/com/simibubi/create/AllShapes.java @@ -28,10 +28,9 @@ public class AllShapes { CASING_13PX = shape(0, 0, 0, 16, 13, 16).forDirectional(), CASING_12PX = shape(0, 0, 0, 16, 12, 16).forDirectional(), CASING_11PX = shape(0, 0, 0, 16, 11, 16).forDirectional(), - MOTOR_BLOCK = shape(3, 0, 3, 13, 14, 13).forDirectional(), - TRACK = shape(0, 0, 0, 16, 4, 16).forDirectional(), + MOTOR_BLOCK = shape(3, 0, 3, 13, 14, 13).forDirectional(), TRACK = shape(0, 0, 0, 16, 4, 16).forDirectional(), FOUR_VOXEL_POLE = shape(6, 0, 6, 10, 16, 10).forAxis(), SIX_VOXEL_POLE = shape(5, 0, 5, 11, 16, 11).forAxis(), - EIGHT_VOXEL_POLE = shape(4, 0, 4, 12, 16, 12).forAxis(), + EIGHT_VOXEL_POLE = shape(4, 0, 4, 12, 16, 12).forAxis(), TEN_VOXEL_POLE = shape(3, 0, 3, 13, 16, 13).forAxis(), FURNACE_ENGINE = shape(1, 1, 0, 15, 15, 16).add(0, 0, 9, 16, 16, 14) .forHorizontal(Direction.SOUTH), PORTABLE_STORAGE_INTERFACE = shape(0, 0, 0, 16, 14, 16).forDirectional(), @@ -121,6 +120,8 @@ public class AllShapes { BELL_CEILING = shape(0, 5, 5, 16, 16, 11).add(3, 1, 3, 13, 13, 13) .forHorizontal(SOUTH), + GIRDER_BEAM = shape(4, 2, 0, 12, 14, 16).forHorizontalAxis(), + STATION = shape(0, 0, 0, 16, 5, 16).add(2, 4, 0, 14, 16, 4) .forHorizontal(NORTH), CONTROLS = shape(0, 0, 4, 16, 4, 16).add(0, 0, 6, 16, 14, 16) @@ -157,6 +158,9 @@ public class AllShapes { BASIN_COLLISION_SHAPE = shape(0, 2, 0, 16, 13, 16).erase(2, 5, 2, 14, 16, 14) .add(2, 0, 2, 14, 2, 14) .build(), + GIRDER_CROSS = shape(TEN_VOXEL_POLE.get(Axis.Y)).add(GIRDER_BEAM.get(Axis.X)) + .add(GIRDER_BEAM.get(Axis.Z)) + .build(), BACKTANK = shape(3, 0, 3, 13, 12, 13).add(SIX_VOXEL_POLE.get(Axis.Y)) .build(), SPEED_CONTROLLER = shape(0, 0, 0, 16, 4, 16).add(1, 1, 1, 15, 13, 15) diff --git a/src/main/java/com/simibubi/create/content/curiosities/girder/GirderBlock.java b/src/main/java/com/simibubi/create/content/curiosities/girder/GirderBlock.java new file mode 100644 index 000000000..6b4504d8b --- /dev/null +++ b/src/main/java/com/simibubi/create/content/curiosities/girder/GirderBlock.java @@ -0,0 +1,130 @@ +package com.simibubi.create.content.curiosities.girder; + +import static net.minecraft.world.level.block.state.properties.BlockStateProperties.WATERLOGGED; + +import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllShapes; +import com.simibubi.create.content.contraptions.wrench.IWrenchable; +import com.simibubi.create.content.logistics.trains.track.TrackBlock; +import com.simibubi.create.content.logistics.trains.track.TrackBlock.TrackShape; +import com.simibubi.create.foundation.utility.Iterate; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.Direction.Axis; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SimpleWaterloggedBlock; +import net.minecraft.world.level.block.WallBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition.Builder; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.block.state.properties.Property; +import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.Fluids; +import net.minecraft.world.level.pathfinder.PathComputationType; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; + +public class GirderBlock extends Block implements SimpleWaterloggedBlock, IWrenchable { + + public static final BooleanProperty X = BooleanProperty.create("x"); + public static final BooleanProperty Z = BooleanProperty.create("z"); + public static final BooleanProperty TOP = BooleanProperty.create("top"); + public static final BooleanProperty BOTTOM = BooleanProperty.create("bottom"); + + public GirderBlock(Properties p_49795_) { + super(p_49795_); + registerDefaultState(defaultBlockState().setValue(WATERLOGGED, false) + .setValue(TOP, false) + .setValue(BOTTOM, false) + .setValue(X, false) + .setValue(Z, false)); + } + + @Override + protected void createBlockStateDefinition(Builder pBuilder) { + super.createBlockStateDefinition(pBuilder.add(X, Z, TOP, BOTTOM, WATERLOGGED)); + } + + @Override + public FluidState getFluidState(BlockState state) { + return state.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : Fluids.EMPTY.defaultFluidState(); + } + + @Override + public BlockState updateShape(BlockState state, Direction direction, BlockState neighbourState, LevelAccessor world, + BlockPos pos, BlockPos neighbourPos) { + if (state.getValue(WATERLOGGED)) + world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world)); + Axis axis = direction.getAxis(); + Property updateProperty = + axis == Axis.X ? X : axis == Axis.Z ? Z : direction == Direction.UP ? TOP : BOTTOM; + state = state.setValue(updateProperty, false); + for (Direction d : Iterate.directionsInAxis(axis)) + state = updateState(world, pos, state, d); + return state; + } + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + Level level = context.getLevel(); + BlockPos pos = context.getClickedPos(); + Direction face = context.getClickedFace(); + FluidState ifluidstate = level.getFluidState(pos); + BlockState state = super.getStateForPlacement(context); + state = state.setValue(X, face.getAxis() == Axis.X); + state = state.setValue(Z, face.getAxis() == Axis.Z); + + for (Direction d : Iterate.directions) + state = updateState(level, pos, state, d); + + return state.setValue(WATERLOGGED, Boolean.valueOf(ifluidstate.getType() == Fluids.WATER)); + } + + public static BlockState updateState(LevelAccessor level, BlockPos pos, BlockState state, Direction d) { + Axis axis = d.getAxis(); + Property updateProperty = axis == Axis.X ? X : axis == Axis.Z ? Z : d == Direction.UP ? TOP : BOTTOM; + BlockState sideState = level.getBlockState(pos.relative(d)); + + if (axis.isVertical()) { + if (sideState.getBlock() == state.getBlock() && sideState.getValue(X) == sideState.getValue(Z)) + state = state.setValue(updateProperty, true); + else if (sideState.hasProperty(WallBlock.UP) && sideState.getValue(WallBlock.UP)) + state = state.setValue(updateProperty, true); + return state; + } + + if (sideState.getBlock() == state.getBlock() && sideState.getValue(updateProperty)) + state = state.setValue(updateProperty, true); + + for (Direction d2 : Iterate.directionsInAxis(axis == Axis.X ? Axis.Z : Axis.X)) { + BlockState above = level.getBlockState(pos.above() + .relative(d2)); + if (AllBlocks.TRACK.has(above)) { + TrackShape shape = above.getValue(TrackBlock.SHAPE); + if (shape == (axis == Axis.X ? TrackShape.XO : TrackShape.ZO)) + state = state.setValue(updateProperty, true); + } + } + + return state; + } + + @Override + public VoxelShape getShape(BlockState state, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) { + boolean x = state.getValue(GirderBlock.X); + boolean z = state.getValue(GirderBlock.Z); + return x ? z ? AllShapes.GIRDER_CROSS : AllShapes.GIRDER_BEAM.get(Axis.X) + : z ? AllShapes.GIRDER_BEAM.get(Axis.Z) : AllShapes.EIGHT_VOXEL_POLE.get(Axis.Y); + } + + @Override + public boolean isPathfindable(BlockState state, BlockGetter reader, BlockPos pos, PathComputationType type) { + return false; + } + +} diff --git a/src/main/java/com/simibubi/create/content/curiosities/girder/GirderBlockStateGenerator.java b/src/main/java/com/simibubi/create/content/curiosities/girder/GirderBlockStateGenerator.java new file mode 100644 index 000000000..9c1d7dcab --- /dev/null +++ b/src/main/java/com/simibubi/create/content/curiosities/girder/GirderBlockStateGenerator.java @@ -0,0 +1,60 @@ +package com.simibubi.create.content.curiosities.girder; + +import com.simibubi.create.foundation.data.AssetLookup; +import com.simibubi.create.foundation.utility.Iterate; +import com.tterrag.registrate.providers.DataGenContext; +import com.tterrag.registrate.providers.RegistrateBlockstateProvider; + +import net.minecraft.world.level.block.Block; +import net.minecraftforge.client.model.generators.MultiPartBlockStateBuilder; + +public class GirderBlockStateGenerator { + + public static void blockState(DataGenContext c, RegistrateBlockstateProvider p) { + MultiPartBlockStateBuilder builder = p.getMultipartBuilder(c.get()); + + builder.part() + .modelFile(AssetLookup.partialBaseModel(c, p, "pole")) + .addModel() + .condition(GirderBlock.X, false) + .condition(GirderBlock.Z, false) + .end(); + + builder.part() + .modelFile(AssetLookup.partialBaseModel(c, p, "x")) + .addModel() + .condition(GirderBlock.X, true) + .end(); + + builder.part() + .modelFile(AssetLookup.partialBaseModel(c, p, "z")) + .addModel() + .condition(GirderBlock.Z, true) + .end(); + + for (boolean x : Iterate.trueAndFalse) + builder.part() + .modelFile(AssetLookup.partialBaseModel(c, p, "top")) + .addModel() + .condition(GirderBlock.TOP, true) + .condition(GirderBlock.X, x) + .condition(GirderBlock.Z, !x) + .end() + .part() + .modelFile(AssetLookup.partialBaseModel(c, p, "bottom")) + .addModel() + .condition(GirderBlock.BOTTOM, true) + .condition(GirderBlock.X, x) + .condition(GirderBlock.Z, !x) + .end(); + + builder.part() + .modelFile(AssetLookup.partialBaseModel(c, p, "cross")) + .addModel() + .condition(GirderBlock.X, true) + .condition(GirderBlock.Z, true) + .end(); + + } + +} diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/BezierConnection.java b/src/main/java/com/simibubi/create/content/logistics/trains/BezierConnection.java index a2f3bc9aa..a4edaed2a 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/BezierConnection.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/BezierConnection.java @@ -23,6 +23,7 @@ public class BezierConnection implements Iterable { public Couple axes; public Couple normals; public boolean primary; + public boolean hasGirder; // runtime @@ -37,19 +38,20 @@ public class BezierConnection implements Iterable { private double handleLength; public BezierConnection(Couple positions, Couple starts, Couple axes, Couple normals, - Couple targets, boolean primary) { + Couple targets, boolean primary, boolean girder) { tePositions = positions; this.starts = starts; this.axes = axes; this.normals = normals; this.trackEnds = targets; this.primary = primary; + this.hasGirder = girder; resolved = false; } public BezierConnection secondary() { return new BezierConnection(tePositions.swap(), starts.swap(), axes.swap(), normals.swap(), trackEnds.swap(), - false); + false, hasGirder); } public BezierConnection(CompoundTag compound) { @@ -58,11 +60,12 @@ public class BezierConnection implements Iterable { Couple.deserializeEach(compound.getList("Axes", Tag.TAG_COMPOUND), VecHelper::readNBTCompound), Couple.deserializeEach(compound.getList("Normals", Tag.TAG_COMPOUND), VecHelper::readNBTCompound), Couple.create(compound.getBoolean("TrackEnd1"), compound.getBoolean("TrackEnd2")), - compound.getBoolean("Primary")); + compound.getBoolean("Primary"), compound.getBoolean("Girder")); } public CompoundTag write() { CompoundTag compound = new CompoundTag(); + compound.putBoolean("Girder", hasGirder); compound.putBoolean("Primary", primary); compound.putBoolean("TrackEnd1", trackEnds.getFirst()); compound.putBoolean("TrackEnd2", trackEnds.getSecond()); @@ -76,7 +79,7 @@ public class BezierConnection implements Iterable { public BezierConnection(FriendlyByteBuf buffer) { this(Couple.create(buffer::readBlockPos), Couple.create(() -> VecHelper.read(buffer)), Couple.create(() -> VecHelper.read(buffer)), Couple.create(() -> VecHelper.read(buffer)), - Couple.create(buffer::readBoolean), buffer.readBoolean()); + Couple.create(buffer::readBoolean), buffer.readBoolean(), buffer.readBoolean()); } public void write(FriendlyByteBuf buffer) { @@ -86,6 +89,7 @@ public class BezierConnection implements Iterable { normals.forEach(v -> VecHelper.write(v, buffer)); trackEnds.forEach(buffer::writeBoolean); buffer.writeBoolean(primary); + buffer.writeBoolean(hasGirder); } public BlockPos getKey() { diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/management/StationBlock.java b/src/main/java/com/simibubi/create/content/logistics/trains/management/StationBlock.java index 6c1c6a5a9..00bd598c3 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/management/StationBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/management/StationBlock.java @@ -25,6 +25,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.pathfinder.PathComputationType; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; @@ -102,4 +103,9 @@ public class StationBlock extends HorizontalDirectionalBlock implements ITE placeBlockIfFree(level, p, state)); } + private static boolean isWallLike(BlockState defaultBlockState) { + return defaultBlockState.getBlock() instanceof WallBlock || AllBlocks.METAL_GIRDER.has(defaultBlockState); + } + private static void placeBlockIfFree(Level level, BlockPos pos, BlockState state) { BlockState stateAtPos = level.getBlockState(pos); if (stateAtPos.getBlock() != state.getBlock() && stateAtPos.getMaterial() @@ -68,6 +77,8 @@ public class TrackPaver { boolean slab = defaultBlockState.hasProperty(SlabBlock.TYPE); if (slab) defaultBlockState = defaultBlockState.setValue(SlabBlock.TYPE, SlabType.DOUBLE); + if (isWallLike(defaultBlockState)) + return; Map, Double> yLevels = new HashMap<>(); BlockPos tePosition = bc.tePositions.getFirst(); diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackPlacement.java b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackPlacement.java index 1e7132808..234bc99cb 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackPlacement.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackPlacement.java @@ -71,8 +71,8 @@ public class TrackPlacement { static BlockPos hoveringPos; static ItemStack lastItem; - public static PlacementInfo tryConnect(Level level, BlockPos pos2, BlockState state2, Vec3 lookVec, - ItemStack stack) { + public static PlacementInfo tryConnect(Level level, BlockPos pos2, BlockState state2, Vec3 lookVec, ItemStack stack, + boolean girder) { if (cached != null && pos2.equals(hoveringPos) && stack.equals(lastItem)) return cached; @@ -161,7 +161,7 @@ public class TrackPlacement { BlockPos targetPos2 = pos2.offset(offset2.x, offset2.y, offset2.z); info.curve = new BezierConnection(Couple.create(targetPos1, targetPos2), Couple.create(end1.add(offset1), end2.add(offset2)), Couple.create(normedAxis1, normedAxis2), - Couple.create(normal1, normal2), Couple.create(front1, front2), true); + Couple.create(normal1, normal2), Couple.create(front1, front2), true, girder); } // S curve or Straight @@ -249,10 +249,11 @@ public class TrackPlacement { int hDistance = info.end1Extent; if (axis1.y == 0 || !Mth.equal(absAscend + 1, dist / axis1.length())) { info.end1Extent = 0; - if (hDistance < absAscend * 3) + double minHDistance = Math.max(absAscend < 4 ? absAscend * 4 : absAscend * 3, 6); + if (hDistance < minHDistance) return info.withMessage("too_steep"); - if (hDistance > absAscend * 4) { - int correction = (int) (hDistance - absAscend * 4); + if (hDistance > minHDistance) { + int correction = (int) (hDistance - minHDistance); info.end1Extent = correction / 2 + (correction % 2); info.end2Extent = correction / 2; } @@ -311,7 +312,7 @@ public class TrackPlacement { info.curve = skipCurve ? null : new BezierConnection(Couple.create(targetPos1, targetPos2), Couple.create(end1.add(offset1), end2.add(offset2)), Couple.create(normedAxis1, normedAxis2), - Couple.create(normal1, normal2), Couple.create(front1, front2), true); + Couple.create(normal1, normal2), Couple.create(front1, front2), true, girder); info.valid = true; @@ -397,7 +398,7 @@ public class TrackPlacement { if (!(hitState.getBlock() instanceof TrackBlock)) return; - PlacementInfo info = tryConnect(level, pos, hitState, player.getLookAngle(), stack); + PlacementInfo info = tryConnect(level, pos, hitState, player.getLookAngle(), stack, false); if (info.valid) player.displayClientMessage(Lang.translate("track.valid_connection") .withStyle(ChatFormatting.GREEN), true); diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackRenderer.java b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackRenderer.java index c0100ab49..122c19de8 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackRenderer.java @@ -32,7 +32,8 @@ public class TrackRenderer extends SafeTileEntityRenderer { @Override protected void renderSafe(TrackTileEntity te, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light, int overlay) { - if (Backend.isOn()) return; + if (Backend.isOn()) + return; VertexConsumer vb = buffer.getBuffer(RenderType.solid()); te.connections.forEach(map -> map.values() @@ -47,7 +48,10 @@ public class TrackRenderer extends SafeTileEntityRenderer { BlockPos tePosition = bc.tePositions.getFirst(); TransformStack.cast(ms) - .nudge((int) tePosition.asLong()); + .nudge((int) tePosition.asLong()); + + if (bc.hasGirder) + renderGirder(bc, ms, vb, tePosition); Vec3 previous1 = null; Vec3 previous2 = null; @@ -57,6 +61,8 @@ public class TrackRenderer extends SafeTileEntityRenderer { Vec3 rail2 = segment.position.subtract(segment.normal.scale(.965f)); if (previous1 != null) { + int centralLight = 0; + { // Tie Vec3 railMiddle = rail1.add(rail2) @@ -66,6 +72,9 @@ public class TrackRenderer extends SafeTileEntityRenderer { Vec3 diff = railMiddle.subtract(prevMiddle); Vec3 angles = getModelAngles(segment.normal, diff); + centralLight = LevelRenderer.getLightColor(Minecraft.getInstance().level, + new BlockPos(railMiddle).offset(tePosition)); + SuperByteBuffer sbb = CachedBufferer.partial(AllBlockPartials.TRACK_TIE, Blocks.AIR.defaultBlockState()); @@ -75,8 +84,7 @@ public class TrackRenderer extends SafeTileEntityRenderer { .rotateZRadians(angles.z) .translate(-1 / 2f, -2 / 16f - 1 / 1024f, 0); - sbb.light(LevelRenderer.getLightColor(Minecraft.getInstance().level, - new BlockPos(railMiddle).offset(tePosition))); + sbb.light(centralLight); sbb.renderInto(ms, vb); } @@ -111,6 +119,88 @@ public class TrackRenderer extends SafeTileEntityRenderer { ms.popPose(); } + private static void renderGirder(BezierConnection bc, PoseStack ms, VertexConsumer vb, BlockPos tePosition) { + Vec3 previousG11 = null; + Vec3 previousG21 = null; + Vec3 previousG12 = null; + Vec3 previousG22 = null; + + for (BezierConnection.Segment segment : bc) { + Vec3 rail1 = segment.position.add(segment.normal.scale(.965f)); + Vec3 rail2 = segment.position.subtract(segment.normal.scale(.965f)); + + Vec3 upNormal = segment.derivative.normalize() + .cross(segment.normal); + Vec3 firstGirderOffset = upNormal.scale(-8 / 16f); + Vec3 secondGirderOffset = upNormal.scale(-10 / 16f); + Vec3 g11 = segment.position.add(segment.normal.scale(1)) + .add(firstGirderOffset); + Vec3 g12 = segment.position.subtract(segment.normal.scale(1)) + .add(firstGirderOffset); + Vec3 g21 = g11.add(secondGirderOffset); + Vec3 g22 = g12.add(secondGirderOffset); + + if (previousG11 != null) { + Vec3 railMiddle = rail1.add(rail2) + .scale(.5); + int centralLight = LevelRenderer.getLightColor(Minecraft.getInstance().level, + new BlockPos(railMiddle).offset(tePosition)); + Vec3 normal = segment.normal; + float l = 2.2f; + + for (boolean first : Iterate.trueAndFalse) { + for (boolean top : Iterate.trueAndFalse) { + Vec3 railI = top ? first ? g11 : g12 : first ? g21 : g22; + Vec3 prevI = top ? first ? previousG11 : previousG12 : first ? previousG21 : previousG22; + Vec3 diff = railI.subtract(prevI); + Vec3 angles = getModelAngles(normal, diff); + + SuperByteBuffer sbb2 = + CachedBufferer.partial(AllBlockPartials.GIRDER_SEGMENT, Blocks.AIR.defaultBlockState()); + + sbb2.translate(prevI) + .rotateYRadians(angles.y) + .rotateXRadians(angles.x) + .rotateZRadians(angles.z) + .translate(0, 2 / 16f + (segment.index % 2 == 0 ? 1 : -1) / 2048f - 1 / 1024f, 0) + .rotateZ(top ? 0 : 180) + .scale(1, 1, (float) diff.length() * l); + + sbb2.light(centralLight); + sbb2.renderInto(ms, vb); + } + + { + Vec3 railI = (first ? g11 : g12).add(first ? g21 : g22) + .scale(.5); + Vec3 prevI = (first ? previousG11 : previousG12).add(first ? previousG21 : previousG22) + .scale(.5); + Vec3 diff = railI.subtract(prevI); + Vec3 angles = getModelAngles(normal, diff); + + SuperByteBuffer sbb2 = CachedBufferer.partial(AllBlockPartials.GIRDER_SEGMENT_2, + Blocks.AIR.defaultBlockState()); + + sbb2.translate(prevI) + .rotateYRadians(angles.y) + .rotateXRadians(angles.x) + .rotateZRadians(angles.z) + .translate(0, 2 / 16f + (segment.index % 2 == 0 ? 1 : -1) / 2048f - 1 / 1024f, 0) + .scale(1, 1, (float) diff.length() * l); + + sbb2.light(centralLight); + sbb2.renderInto(ms, vb); + } + } + } + + previousG11 = g11; + previousG12 = g12; + previousG21 = g21; + previousG22 = g22; + } + } + public static Vec3 getModelAngles(Vec3 normal, Vec3 diff) { double diffX = diff.x(); double diffY = diff.y(); diff --git a/src/main/resources/assets/create/models/block/metal_girder/Girder.bbmodel b/src/main/resources/assets/create/models/block/metal_girder/Girder.bbmodel new file mode 100644 index 000000000..583bd45a4 --- /dev/null +++ b/src/main/resources/assets/create/models/block/metal_girder/Girder.bbmodel @@ -0,0 +1 @@ +{"meta":{"format_version":"4.0","creation_time":1644273873,"model_format":"java_block","box_uv":false},"name":"segment2","parent":"","ambientocclusion":true,"front_gui_light":false,"visible_box":[1,1,0],"variable_placeholders":"","resolution":{"width":16,"height":16},"elements":[{"name":"cube","rescale":false,"locked":false,"from":[-2,-4,0],"to":[2,4,8],"autouv":0,"color":4,"origin":[8,8,8],"faces":{"north":{"uv":[8,1,12,3],"rotation":270,"texture":0},"east":{"uv":[0,5,4,9],"texture":0},"south":{"uv":[8,1,12,3],"rotation":270,"texture":0},"west":{"uv":[0,5,4,9],"texture":0},"up":{"uv":[0,0,4,16],"texture":null},"down":{"uv":[0,0,4,16],"texture":null}},"uuid":"3a05841c-acd9-87b3-84b6-52c43638a212"}],"outliner":["3a05841c-acd9-87b3-84b6-52c43638a212"],"textures":[{"path":"C:\\Users\\simon\\Desktop\\Modding\\Forge 18 Concealed\\Create\\src\\main\\resources\\assets\\create\\textures\\block\\girder.png","name":"girder.png","folder":"block","namespace":"create","id":"0","particle":false,"render_mode":"normal","visible":true,"mode":"bitmap","saved":true,"uuid":"ef4ef1c2-0c80-b18f-8f05-23e8a7be2c79","relative_path":"../../../../textures/block/girder.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA15JREFUWEe1V89rE0EUfmsxkERtE5KGpCmpNJYQaAtisS2tggQPIuRaDwV78s8Q+l94qtCDvQbEgxRBhVJRhNJLaQ9asAn5QdKoSUCple+1b51MN7vbJs5ld9978+ab7/2YWePRwsIxnY5mq0U+r1c+LZ+6TblSsbV3UhrZbPb45uQkfd7aYlsBgIXshsw5rP1wWsNWzwDEotFo8Kvf7z8zCTpd3ske8t+//hDYmZxIU6fNYLNGJpMxAbjZCkDIwrDHQpc9l9qmQtZsNlkWG4qY9pBjiD18mQB0x/q3rOAEQBZRAdgx3BaCTgxY0Q9btyGwY9YyCSVmnRIS8tTYGCdu10molqEdUr38rnm99L3V4kTrZhhPlpaO4Ugc4mk1dBv5/laqULlctpwTDodZNzQUZX1/f5Cf9XqVnwcHBXKVA3Y7DIVCVK2eONRHMBhkXbFQoK/7+1QsldgkMjhII4kERaJRMtLpiXOVob7IzMyUI4APm5uULxTapsaiUbo9PX0CwO/zmcrGaf1Cpr+LnSqfm5+jWq1myUAgEGDd6upzOjo6arPp6+ujxcXHZEzdmj7DABZQQXHJWcgg7xrA3Tv3GAAah++UCXl3kmFe8sb17kIAAGiN0lKlkwlfolPBQCdyNwBskxBngd7P1W8dmPRxkXs8HscyjMfjncvwvIeRnm2jw8PckGToXRRy6S3SuHCeoJu+WFszDDUEdvUulOuhicUGzbYsOvW0nJ+dpZ3dXVYBHO4RL1+95lMyl8sZro9juQtsb+/Q+HiKJ8MpWjkc7+19sawcAAyHQry43BOwGfgzAdQPf9ptnvoHrpiXkfxBkZLJEaZPBSByNRSQYW5PAeD0S40m6NnKCgOQG5UAkBzAbrExAY+Y5/Mls3oGAlf/MQCF3QCNEgI4RlyfLi+bAGQxMHMhAHCIxLAaDx/cp/cbG233QSy4vr5uhgBHMnarXr/gSxhwDAEY0FuvmdHNJqkMcFu2AGDlA+3bVRLq3U9nQrJW5MiDt+/emAzgdgSWrIarMnQLQEpQZUAuNBduRG47IZIQmY444/nx0yYz0O3gRgSa7CiUJBQAagh6AgDZKkex7hCnoNQyFkb9qiHoCQA3ThACAdBzBtwCkB+UnjOg/svpYBAaKcP/AeAvf7PKi3Z7paEAAAAASUVORK5CYII="},{"path":"C:\\Users\\simon\\Desktop\\Modding\\Forge 18 Concealed\\Create\\src\\main\\resources\\assets\\create\\textures\\block\\girder_pole.png","name":"girder_pole.png","folder":"block","namespace":"create","id":"1","particle":false,"render_mode":"normal","visible":true,"mode":"bitmap","saved":true,"uuid":"6e0346b1-88a8-d125-7920-cc325c435982","relative_path":"../../../../textures/block/girder_pole.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAATxJREFUOE+VU01Lw0AUnAgKSVCsVoV4UGrBXkpBFKRQBcm/NghVCOhBKb3opTdFD6aiJAGFRmbLhmfTdXVOIfsymY+3ThiGhe/78FwXK64L4j3PkeU50jTF1+cEq7VldU5wRp+/jT/gnJ6cFYtLCyAJwcHZj4fDe3Umsb5WQ7C9BYcKet0ubgeDUsVzkuCg08FVHGOjXsf1zR34gYTneQiCzamCLMsUm7ZBgqfHF+iheQR6Xikgs86Bz9JCa28H5/24oqAksGVAmSYLJK8oYMq0QLAFKtN22AbB9Ikyg99a4OCfa5Qh8u9EFEVOpUPxwmhBL1H/8uJ/BLMtWAlsLVgJbJtoyqDR2C/a7dbPTZR3QVdnUnB0eFw0m7vTPZBbKG8bgzQpoHW1SJTCi8K9l+D9eE3GGI0e5ragrX8DrJTpWQ0NmZIAAAAASUVORK5CYII="},{"path":"C:\\Users\\simon\\Desktop\\Modding\\Forge 18 Concealed\\Create\\src\\main\\resources\\assets\\create\\textures\\block\\chute_block.png","name":"chute_block.png","folder":"block","namespace":"create","id":"2","particle":true,"render_mode":"normal","visible":true,"mode":"bitmap","saved":true,"uuid":"06436a9e-8580-f22f-d11d-b911094407ec","relative_path":"../../../../textures/block/chute_block.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAATNJREFUOE+FU8FKw0AQnRVMyIaK/kchILb0IK30VE/5Y/HgQSot9EsUJRuSgitv4qyTuE3nMrC78+a9mbemLEtvs4wQV1lGn3XNufGeUmNCxr3cISNcXZN53Gz8Yj6n/eHAhxqMD34LpUDOiumU3nY7Mqvl2l8mF5TnORcDdQgiHTVIVVV0bL87BkmaCnCveEhZHqEJom2aPoB0lnmMSUAxgiVYm9ApFnoGIkGKnWs7BtIJIGMshLrQDwz0EAUMqxx21zMIQ4SE65tJb4XnQMAEMoKEmA9ig9QSbouCXrfb0z7Qrhz1wexu4a21nQSbBD/oreih8SZcy++cc+d9EOv+bwvrh/vwF5iJ+lwxM328fxFqnp5f/oyEhzEfjDHgLWAGnX5L8IMEPhd2Pcy4xyeCfsQP6j3lf7IDJssAAAAASUVORK5CYII="}]} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/metal_girder/block_bottom.json b/src/main/resources/assets/create/models/block/metal_girder/block_bottom.json new file mode 100644 index 000000000..6cef03c81 --- /dev/null +++ b/src/main/resources/assets/create/models/block/metal_girder/block_bottom.json @@ -0,0 +1,30 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/girder", + "particle": "create:block/chute_block" + }, + "elements": [ + { + "from": [3, 0, 3], + "to": [13, 5, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 2.5, 8]}, + "faces": { + "north": {"uv": [13, 8, 15.5, 13], "rotation": 270, "texture": "#0"}, + "east": {"uv": [13, 8, 15.5, 13], "rotation": 270, "texture": "#0"}, + "south": {"uv": [13, 8, 15.5, 13], "rotation": 270, "texture": "#0"}, + "west": {"uv": [13, 8, 15.5, 13], "rotation": 270, "texture": "#0"}, + "up": {"uv": [8, 8, 13, 13], "rotation": 180, "texture": "#0"}, + "down": {"uv": [8, 8, 13, 13], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "Brace", + "origin": [0, 0, 0], + "color": 0, + "children": [0] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/metal_girder/block_cross.json b/src/main/resources/assets/create/models/block/metal_girder/block_cross.json new file mode 100644 index 000000000..8cb4467f7 --- /dev/null +++ b/src/main/resources/assets/create/models/block/metal_girder/block_cross.json @@ -0,0 +1,42 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/girder", + "particle": "create:block/chute_block" + }, + "elements": [ + { + "from": [3, 11, 3], + "to": [13, 16, 13], + "faces": { + "north": {"uv": [13, 8, 15.5, 13], "rotation": 90, "texture": "#0"}, + "east": {"uv": [13, 8, 15.5, 13], "rotation": 90, "texture": "#0"}, + "south": {"uv": [13, 8, 15.5, 13], "rotation": 90, "texture": "#0"}, + "west": {"uv": [13, 8, 15.5, 13], "rotation": 90, "texture": "#0"}, + "up": {"uv": [8, 8, 13, 13], "rotation": 180, "texture": "#0"}, + "down": {"uv": [8, 8, 13, 13], "texture": "#0"} + } + }, + { + "from": [3, 0, 3], + "to": [13, 5, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 2.5, 8]}, + "faces": { + "north": {"uv": [13, 8, 15.5, 13], "rotation": 270, "texture": "#0"}, + "east": {"uv": [13, 8, 15.5, 13], "rotation": 270, "texture": "#0"}, + "south": {"uv": [13, 8, 15.5, 13], "rotation": 270, "texture": "#0"}, + "west": {"uv": [13, 8, 15.5, 13], "rotation": 270, "texture": "#0"}, + "up": {"uv": [8, 8, 13, 13], "rotation": 180, "texture": "#0"}, + "down": {"uv": [8, 8, 13, 13], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "Brace", + "origin": [0, 0, 0], + "color": 0, + "children": [0, 1] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/metal_girder/block_pole.json b/src/main/resources/assets/create/models/block/metal_girder/block_pole.json new file mode 100644 index 000000000..06f83a8e0 --- /dev/null +++ b/src/main/resources/assets/create/models/block/metal_girder/block_pole.json @@ -0,0 +1,29 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "create:block/girder_pole", + "particle": "create:block/chute_block" + }, + "elements": [ + { + "from": [4, 0, 4], + "to": [12, 16, 12], + "faces": { + "north": {"uv": [0, 0, 8, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 8, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 8, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 8, 16], "texture": "#1"}, + "up": {"uv": [8, 0, 16, 8], "texture": "#1"}, + "down": {"uv": [8, 0, 16, 8], "texture": "#1"} + } + } + ], + "groups": [ + { + "name": "Beam Pole", + "origin": [0, 0, 0], + "color": 0, + "children": [0] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/metal_girder/block_top.json b/src/main/resources/assets/create/models/block/metal_girder/block_top.json new file mode 100644 index 000000000..484fc1ddb --- /dev/null +++ b/src/main/resources/assets/create/models/block/metal_girder/block_top.json @@ -0,0 +1,29 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/girder", + "particle": "create:block/chute_block" + }, + "elements": [ + { + "from": [3, 11, 3], + "to": [13, 16, 13], + "faces": { + "north": {"uv": [13, 8, 15.5, 13], "rotation": 90, "texture": "#0"}, + "east": {"uv": [13, 8, 15.5, 13], "rotation": 90, "texture": "#0"}, + "south": {"uv": [13, 8, 15.5, 13], "rotation": 90, "texture": "#0"}, + "west": {"uv": [13, 8, 15.5, 13], "rotation": 90, "texture": "#0"}, + "up": {"uv": [8, 8, 13, 13], "rotation": 180, "texture": "#0"}, + "down": {"uv": [8, 8, 13, 13], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "Brace", + "origin": [0, 0, 0], + "color": 0, + "children": [0] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/metal_girder/block_x.json b/src/main/resources/assets/create/models/block/metal_girder/block_x.json new file mode 100644 index 000000000..de77da6b5 --- /dev/null +++ b/src/main/resources/assets/create/models/block/metal_girder/block_x.json @@ -0,0 +1,54 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/girder", + "particle": "create:block/chute_block" + }, + "elements": [ + { + "from": [0, 4, 6], + "to": [16, 12, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 5, 8, 9], "texture": "#0"}, + "east": {"uv": [8, 1, 12, 3], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 5, 8, 9], "texture": "#0"}, + "west": {"uv": [8, 1, 12, 3], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [0, 2, 4], + "to": [16, 4, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 4, 8, 5], "rotation": 180, "texture": "#0"}, + "east": {"uv": [12, 2, 16, 3], "texture": "#0"}, + "south": {"uv": [0, 4, 8, 5], "rotation": 180, "texture": "#0"}, + "west": {"uv": [12, 2, 16, 3], "texture": "#0"}, + "up": {"uv": [8, 0, 16, 4], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 8, 4], "texture": "#0"} + } + }, + { + "from": [0, 12, 4], + "to": [16, 14, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 4, 8, 5], "texture": "#0"}, + "east": {"uv": [12, 1, 16, 2], "texture": "#0"}, + "south": {"uv": [0, 4, 8, 5], "texture": "#0"}, + "west": {"uv": [12, 1, 16, 2], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 4], "texture": "#0"}, + "down": {"uv": [8, 0, 16, 4], "rotation": 180, "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "Beam X", + "origin": [8, 13, 8], + "color": 0, + "children": [0, 1, 2] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/metal_girder/block_z.json b/src/main/resources/assets/create/models/block/metal_girder/block_z.json new file mode 100644 index 000000000..1d2cf8b64 --- /dev/null +++ b/src/main/resources/assets/create/models/block/metal_girder/block_z.json @@ -0,0 +1,53 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/girder", + "particle": "create:block/chute_block" + }, + "elements": [ + { + "from": [6, 4, 0], + "to": [10, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [8, 1, 12, 3], "rotation": 270, "texture": "#0"}, + "east": {"uv": [0, 5, 8, 9], "texture": "#0"}, + "south": {"uv": [8, 1, 12, 3], "rotation": 270, "texture": "#0"}, + "west": {"uv": [0, 5, 8, 9], "texture": "#0"} + } + }, + { + "from": [4, 2, 0], + "to": [12, 4, 16], + "faces": { + "north": {"uv": [12, 2, 16, 3], "texture": "#0"}, + "east": {"uv": [0, 4, 8, 5], "rotation": 180, "texture": "#0"}, + "south": {"uv": [12, 2, 16, 3], "texture": "#0"}, + "west": {"uv": [0, 4, 8, 5], "rotation": 180, "texture": "#0"}, + "up": {"uv": [8, 0, 16, 4], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 0, 8, 4], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [4, 12, 0], + "to": [12, 14, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [12, 1, 16, 2], "texture": "#0"}, + "east": {"uv": [0, 4, 8, 5], "texture": "#0"}, + "south": {"uv": [12, 1, 16, 2], "texture": "#0"}, + "west": {"uv": [0, 4, 8, 5], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 4], "rotation": 270, "texture": "#0"}, + "down": {"uv": [8, 0, 16, 4], "rotation": 270, "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "Beam Z", + "origin": [8, 13, 8], + "color": 0, + "children": [0, 1, 2] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/metal_girder/item.json b/src/main/resources/assets/create/models/block/metal_girder/item.json new file mode 100644 index 000000000..830f56935 --- /dev/null +++ b/src/main/resources/assets/create/models/block/metal_girder/item.json @@ -0,0 +1,86 @@ +{ + "parent": "block/block", + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/girder", + "particle": "create:block/chute_block" + }, + "elements": [ + { + "from": [0, 4, 6], + "to": [16, 12, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 5, 8, 9], "texture": "#0"}, + "east": {"uv": [8, 1, 12, 3], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 5, 8, 9], "texture": "#0"}, + "west": {"uv": [8, 1, 12, 3], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [0, 2, 4], + "to": [16, 4, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 4, 8, 5], "rotation": 180, "texture": "#0"}, + "east": {"uv": [12, 2, 16, 3], "texture": "#0"}, + "south": {"uv": [0, 4, 8, 5], "rotation": 180, "texture": "#0"}, + "west": {"uv": [12, 2, 16, 3], "texture": "#0"}, + "up": {"uv": [8, 0, 16, 4], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 8, 4], "texture": "#0"} + } + }, + { + "from": [0, 12, 4], + "to": [16, 14, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 4, 8, 5], "texture": "#0"}, + "east": {"uv": [12, 1, 16, 2], "texture": "#0"}, + "south": {"uv": [0, 4, 8, 5], "texture": "#0"}, + "west": {"uv": [12, 1, 16, 2], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 4], "texture": "#0"}, + "down": {"uv": [8, 0, 16, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [3, 11, 3], + "to": [13, 16, 13], + "faces": { + "north": {"uv": [13, 8, 15.5, 13], "rotation": 90, "texture": "#0"}, + "east": {"uv": [13, 8, 15.5, 13], "rotation": 90, "texture": "#0"}, + "south": {"uv": [13, 8, 15.5, 13], "rotation": 90, "texture": "#0"}, + "west": {"uv": [13, 8, 15.5, 13], "rotation": 90, "texture": "#0"}, + "up": {"uv": [8, 8, 13, 13], "rotation": 180, "texture": "#0"}, + "down": {"uv": [8, 8, 13, 13], "texture": "#0"} + } + }, + { + "from": [3, 0, 3], + "to": [13, 5, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 2.5, 8]}, + "faces": { + "north": {"uv": [13, 8, 15.5, 13], "rotation": 270, "texture": "#0"}, + "east": {"uv": [13, 8, 15.5, 13], "rotation": 270, "texture": "#0"}, + "south": {"uv": [13, 8, 15.5, 13], "rotation": 270, "texture": "#0"}, + "west": {"uv": [13, 8, 15.5, 13], "rotation": 270, "texture": "#0"}, + "up": {"uv": [8, 8, 13, 13], "rotation": 180, "texture": "#0"}, + "down": {"uv": [8, 8, 13, 13], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "Beam X", + "origin": [8, 13, 8], + "color": 0, + "children": [0, 1, 2] + }, + { + "name": "Brace", + "origin": [0, 0, 0], + "color": 0, + "children": [3, 4] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/metal_girder/segment.json b/src/main/resources/assets/create/models/block/metal_girder/segment.json new file mode 100644 index 000000000..8ad3d8e0c --- /dev/null +++ b/src/main/resources/assets/create/models/block/metal_girder/segment.json @@ -0,0 +1,22 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/girder", + "particle": "create:block/chute_block" + }, + "elements": [ + { + "from": [-4, -1, 0], + "to": [4, 1, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [12, 1, 16, 2], "texture": "#0"}, + "east": {"uv": [0, 4, 4, 5], "texture": "#0"}, + "south": {"uv": [12, 1, 16, 2], "texture": "#0"}, + "west": {"uv": [0, 4, 4, 5], "texture": "#0"}, + "up": {"uv": [2, 0, 6, 4], "rotation": 270, "texture": "#0"}, + "down": {"uv": [12, 0, 16, 4], "rotation": 270, "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/metal_girder/segment2.json b/src/main/resources/assets/create/models/block/metal_girder/segment2.json new file mode 100644 index 000000000..10214d8bf --- /dev/null +++ b/src/main/resources/assets/create/models/block/metal_girder/segment2.json @@ -0,0 +1,20 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/girder", + "particle": "create:block/chute_block" + }, + "elements": [ + { + "from": [-2, -4, 0], + "to": [2, 4, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [8, 1, 12, 3], "rotation": 270, "texture": "#0"}, + "east": {"uv": [0, 5, 4, 9], "texture": "#0"}, + "south": {"uv": [8, 1, 12, 3], "rotation": 270, "texture": "#0"}, + "west": {"uv": [0, 5, 4, 9], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/chute_block.png b/src/main/resources/assets/create/textures/block/chute_block.png new file mode 100644 index 0000000000000000000000000000000000000000..919643f1ec1fa1a9850cffdb2657c3cf4336e5ff GIT binary patch literal 266 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFEY2>S65eEZExq~;^JazVsZAOg#}P0XMsm# zF#`kNVGw3Kp1&dmC|K(0;us=vS@z69&cg;gtq;{Xj=0zopr E03SGD_W%F@ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/girder.png b/src/main/resources/assets/create/textures/block/girder.png new file mode 100644 index 0000000000000000000000000000000000000000..23997d69d831aa378a13c249182f61d221c54aeb GIT binary patch literal 1060 zcmV+<1l#+GP)OB+EH{<7U{nVFKU zX?~bS(Srmjv_g*o{|0*y)IY7Ko(nxx5Dy+o!4irGA$SozSSd*wcd;fqyO?0?A(?S@ zGMmJv{b0$?n>X{`eDA$^o5a@U<~;@o!Vr`YjDoJ?`97wB9fTp?uB_m&S{*Vp$_cTi z+v!c^Kw@oeO)|ha2LLd}h7>vHL-II%&N;fB9z5U2%9~fQhoOYP7Mqwhj&nkt?{<3N zi0XGcJp@4jMk#_Yl=_0Lq+>mVK)mQ1>*Gmb3W;DyII1#cs{@@%xlp5Dl_wo5x{meb z6cnECM-tYQ;5L9r5>i5B%;GA75`yJY35V4xu6|$Rs&j4B%VsjD*DppgW>Z3Nd~!0< zQ{j{TeuOy6vX~p68hv$Y$Yr9*V^R0Kj$A0DxBO5&%%E zHDLd`><PO~Y1= zn+%%}C;uDRbg)?v1fa^sl+uZ0?e=e(R63qK=_g!1my3h|=;uMJb=eO=(y>56k#sC{ zJ3VQD(g&I9gjh3aBU)TokhBZqLS~DN#Qm&~#XH4=VO8E}G-Au}_VyN@=V5Mc4*5dC zT!!kV0_s?G%%n4)&%;fnq+Gv6-Be26E$xuQ^L;SJKncOY!S{qEXzX@+BOhHyjN4&| zW zd4E`~;`H=vs5*EMV82p9Hj|NU`ODXDaGyVuIyL~bu5LyeR~NiU&lsB&qZCU^i;+;& zYt69KMMty%U}OCq7^TK% zWBpx}YR0f%sXQ>EvB5bXa!9muy~L#hA3uGL^>EZ&goPkLz1BqQ>P9}}n3W;Oj_7FA zaPR9k;A*)XVMV}w{tT<-a^!>OZFvPdyL<98&fLgjAWBfBFg5t15{J+)qT`d3NYd_C zDtKAU%X#BX7>5_>8356;egEM@;xUKNVF?Q3V49=s*KH49`vbe^AAvjxuTAcr*jzznlr;qvU_#4_amo`Xy`0RR9105_CmabVXQ6MmkS& eX=QG7VRUJ4ZU8ZaSnTfr0000NS%G}%0G|+77Z(?QfB(pci1frndpjp3C3RC1i^jS-pnTHY)5$=Jvn0qb_&*dd z1p8MAfdmUYB8wRqxP?KOkzv*x37}xUr;B5VMzC*Rpctznhm+&kwEx<55ohK+_jeQ* zN=RV~?70xBF~NQPOtlTI16gdB+nHywoPG|5#=*sog`!Yoe*F+Q0pxj5c!a z0oSh2==l1%G@|>%vT!}yuL8M?w!Zv(u0TP_Tz0h@cm5UOag4AXU5xO7T#=mf}H*R4*39i>DqeO2tz3)EZGC^b&$n zntA&7$<)qDCT7j^ts97=@tHgKv>xFI(~nMMn|tHLeQX0Pfw{>95|ge;mkN3 zHW6Ir)0n30d1R|9n z2%gClL_=^mGJlZK!jUBP>~fX0C0K`GXbcho*=$bqdTgl#NKz&m|C1PFvsy)h02}xo z3Q}iBDbXK^C{0h@*FS-BFF-()!{=KiuQyPszth=HR%lI<(&@dLxw4>o-*lP(!eh$%rv}m!ssYS98F2 zJZ4bymBmG}?JTaBBwF~qT>AvzCV^O2h7e(WfV)Ts}9V zrt<~ylmd(a%M9yfV57Cy%8zH~4HHprUAiDnU_eCC)i%|B`1OpsPBD78`mrD%>H5qpOs zwSVe_s%=Vh&|w{5wwNlu^$-scKA}wEmr&pVk!5RZOJyu0KU7BkMwc)YSyN4TxnK-O zG_9-@w}xH|zj*chjld<9?tqrYzXS7&FKfi!CZ0T>QH{3Ha3bME^}pinW_>N*+ys*G zCMOV!M4FpGG@krF3EZ8SxKkef6NzNBJRE8g$4;D5e*<{kDa1@7T5bRU002ovPDHLk FV1o9#wWk08 delta 919 zcmV;I18Dr-2hsJRXN|X54Ov z2(IPJy9MgBwv+S3xw3{R7W^P|L!(!OoJ{7(=W|h^P$HYnswADJsj0h$30T76cqIse z=kvQ_AUGTu$bT5Ic!qipdCOWA)*%=MgG4}~P!zKf4V3^%YDuL2CdN4Ic99^!1%5;$ z)a6nW{h3bC-0VZ+FHoKZ2#9h7gPRlxge&#;csj{$Z>Pb*BVvtu>+$*AqV5>5&4vP0 z46o9+&u?o62h!x^0~ronZ)6WpLzDn}fNzJo;?wGVw10NNjqenEzevS`g*t3|^ky|s zGXV<%83hM86gT4FfFGFN2Q#lhPq&Ls9`lIV3~BuK9T^MM5bWghVvX7BR-KJ%4%m*@ z3~IiyvO0<@L4NUjUBU;5f@SZ793dMh|k&I z-%Y)~E`MZo{t*oO`>W`J_BoxP(|=o+DEZ=g|{_6E#;dRnAwmqtVa zXr&-mQg6XB!+I^S(cA0grwdD_iAWPy$3y}~IFvU4b~LS&b&Ph;h?y4)<_TQBa7H8` z%QEd2_k@zM+S-WF8ec$Gx__9g986RyR&{Izbq}4cHtMm<>z~XM z;5X1Lo-Zz&C-616R!QJ+PoJ2#qnly|tOKlv&d5f)4_h z*MMa`wfq3f6E|))`UdLPoT;{{_QPL4?S9=>3KN;