From 20de324b721512402fb15537bb92b3a45c721f22 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sun, 14 Jun 2020 22:24:46 +0200 Subject: [PATCH] PipeState - Implemented dynamic models and blockstates of copper pipes --- src/generated/resources/.cache/cache | 30 +- .../create/blockstates/copper_pipe.json | 425 ++++++++++++++++++ .../create/blockstates/radial_chassis.json | 24 +- .../resources/assets/create/lang/en_ud.json | 1 + .../resources/assets/create/lang/en_us.json | 1 + .../create/models/block/copper_pipe/ld_x.json | 37 ++ .../create/models/block/copper_pipe/ld_y.json | 37 ++ .../create/models/block/copper_pipe/ld_z.json | 37 ++ .../create/models/block/copper_pipe/lr_x.json | 37 ++ .../create/models/block/copper_pipe/lr_y.json | 37 ++ .../create/models/block/copper_pipe/lr_z.json | 37 ++ .../create/models/block/copper_pipe/lu_x.json | 37 ++ .../create/models/block/copper_pipe/lu_y.json | 37 ++ .../create/models/block/copper_pipe/lu_z.json | 37 ++ .../models/block/copper_pipe/none_x.json | 37 ++ .../models/block/copper_pipe/none_y.json | 37 ++ .../models/block/copper_pipe/none_z.json | 37 ++ .../create/models/block/copper_pipe/rd_x.json | 37 ++ .../create/models/block/copper_pipe/rd_y.json | 37 ++ .../create/models/block/copper_pipe/rd_z.json | 37 ++ .../create/models/block/copper_pipe/ru_x.json | 37 ++ .../create/models/block/copper_pipe/ru_y.json | 37 ++ .../create/models/block/copper_pipe/ru_z.json | 37 ++ .../create/models/block/copper_pipe/ud_x.json | 37 ++ .../create/models/block/copper_pipe/ud_y.json | 37 ++ .../create/models/block/copper_pipe/ud_z.json | 37 ++ .../create/models/item/copper_pipe.json | 3 + .../loot_tables/blocks/copper_pipe.json | 19 + .../com/simibubi/create/AllBlockPartials.java | 10 +- .../java/com/simibubi/create/AllBlocks.java | 17 +- .../crafter/MechanicalCrafterBlock.java | 27 +- .../crafter/MechanicalCrafterTileEntity.java | 2 +- .../components/crafter/RecipeGridHandler.java | 2 +- .../contraptions/fluids/PipeBlock.java | 126 ++++++ .../contraptions/fluids/PipeModel.java | 99 ++++ .../create/foundation/data/BlockStateGen.java | 109 +++++ .../foundation/data/CreateRegistrate.java | 14 +- .../create/foundation/utility/Pointing.java | 35 ++ .../models/block/copper_pipe/block_end.json | 19 + .../models/block/copper_pipe/casing.json | 21 + .../models/block/copper_pipe/core_x.json | 17 + .../models/block/copper_pipe/core_y.json | 17 + .../models/block/copper_pipe/core_z.json | 17 + .../create/models/block/copper_pipe/item.json | 70 +++ .../models/block/copper_pipe/rim/down.json | 21 + .../models/block/copper_pipe/rim/east.json | 21 + .../models/block/copper_pipe/rim/north.json | 22 + .../models/block/copper_pipe/rim/south.json | 22 + .../models/block/copper_pipe/rim/up.json | 21 + .../models/block/copper_pipe/rim/west.json | 21 + .../create/textures/block/copper_pipe.png | Bin 0 -> 1852 bytes .../create/textures/block/copper_pipe_ld.png | Bin 0 -> 288 bytes .../create/textures/block/copper_pipe_lr.png | Bin 0 -> 285 bytes .../create/textures/block/copper_pipe_lu.png | Bin 0 -> 286 bytes .../create/textures/block/copper_pipe_rd.png | Bin 0 -> 282 bytes .../create/textures/block/copper_pipe_ru.png | Bin 0 -> 296 bytes .../create/textures/block/copper_pipe_ud.png | Bin 0 -> 264 bytes 57 files changed, 1968 insertions(+), 42 deletions(-) create mode 100644 src/generated/resources/assets/create/blockstates/copper_pipe.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/ld_x.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/ld_y.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/ld_z.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/lr_x.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/lr_y.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/lr_z.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/lu_x.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/lu_y.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/lu_z.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/none_x.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/none_y.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/none_z.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/rd_x.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/rd_y.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/rd_z.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/ru_x.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/ru_y.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/ru_z.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/ud_x.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/ud_y.json create mode 100644 src/generated/resources/assets/create/models/block/copper_pipe/ud_z.json create mode 100644 src/generated/resources/assets/create/models/item/copper_pipe.json create mode 100644 src/generated/resources/data/create/loot_tables/blocks/copper_pipe.json create mode 100644 src/main/java/com/simibubi/create/content/contraptions/fluids/PipeBlock.java create mode 100644 src/main/java/com/simibubi/create/content/contraptions/fluids/PipeModel.java create mode 100644 src/main/java/com/simibubi/create/foundation/utility/Pointing.java create mode 100644 src/main/resources/assets/create/models/block/copper_pipe/block_end.json create mode 100644 src/main/resources/assets/create/models/block/copper_pipe/casing.json create mode 100644 src/main/resources/assets/create/models/block/copper_pipe/core_x.json create mode 100644 src/main/resources/assets/create/models/block/copper_pipe/core_y.json create mode 100644 src/main/resources/assets/create/models/block/copper_pipe/core_z.json create mode 100644 src/main/resources/assets/create/models/block/copper_pipe/item.json create mode 100644 src/main/resources/assets/create/models/block/copper_pipe/rim/down.json create mode 100644 src/main/resources/assets/create/models/block/copper_pipe/rim/east.json create mode 100644 src/main/resources/assets/create/models/block/copper_pipe/rim/north.json create mode 100644 src/main/resources/assets/create/models/block/copper_pipe/rim/south.json create mode 100644 src/main/resources/assets/create/models/block/copper_pipe/rim/up.json create mode 100644 src/main/resources/assets/create/models/block/copper_pipe/rim/west.json create mode 100644 src/main/resources/assets/create/textures/block/copper_pipe.png create mode 100644 src/main/resources/assets/create/textures/block/copper_pipe_ld.png create mode 100644 src/main/resources/assets/create/textures/block/copper_pipe_lr.png create mode 100644 src/main/resources/assets/create/textures/block/copper_pipe_lu.png create mode 100644 src/main/resources/assets/create/textures/block/copper_pipe_rd.png create mode 100644 src/main/resources/assets/create/textures/block/copper_pipe_ru.png create mode 100644 src/main/resources/assets/create/textures/block/copper_pipe_ud.png diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index e5ec22a5c..43d67c370 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -36,6 +36,7 @@ e5e3757e99c139d67b2a70288466d8a74d818841 assets\create\blockstates\cogwheel.json f8eff64c75fc599e9a44a003f54ae9931cd8ce7c assets\create\blockstates\copper_block.json cabf6b8c59eb0e3d56a0a5a856ca058bb3200882 assets\create\blockstates\copper_casing.json 3355a852cdc717e257ca19b3db836068964733e3 assets\create\blockstates\copper_ore.json +bc3bceb50a42599ace49c26240767afd02df565f assets\create\blockstates\copper_pipe.json dc76bca1fdd41c8e6ada27fd59a2b73d7adc9596 assets\create\blockstates\copper_shingles.json 3df0d5d5170a2f6cbab0f8a9bc8f2d64229589af assets\create\blockstates\creative_crate.json f0031f5e970b3d5695472ed384950b8631b015ed assets\create\blockstates\creative_motor.json @@ -273,7 +274,7 @@ b7829c2ef2c47188713f8cab21b2c9bc7f9c5b79 assets\create\blockstates\portable_stor e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets\create\blockstates\powered_toggle_latch.json 3a739f9d4276828d83f2d2750bf3227c87bcd438 assets\create\blockstates\pulley_magnet.json 469e430d96cb0a5e1aaf6b7cc5d401d488c9e600 assets\create\blockstates\pulse_repeater.json -4e1fb033316e9230d2f024d67c27940ea731643a assets\create\blockstates\radial_chassis.json +ab2a1bf8f37f1c64d00538867f4c3a97195bd3c4 assets\create\blockstates\radial_chassis.json 8929677f2cc5354aa19ef182af69f9f0b41eb242 assets\create\blockstates\redstone_contact.json c29213b77ac0c78d8979c5f6188d2b265696f9b9 assets\create\blockstates\redstone_link.json 1eac804cba08aebb5f4646758ae1ef9b32e01365 assets\create\blockstates\reinforced_rail.json @@ -325,8 +326,8 @@ c60c3115fd6eeaa3a696428a87a74d184ab7d62d assets\create\blockstates\weathered_lim c77b46d8b459e5c7cc495393546f3fcca8a1fa1d assets\create\blockstates\weathered_limestone_pillar.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets\create\blockstates\zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets\create\blockstates\zinc_ore.json -6bf74a9e1f74b41f53399c1f817942b01a010bf0 assets\create\lang\en_ud.json -966d4802e7f260d852e422c5f47b2a9389557373 assets\create\lang\en_us.json +88f2465e94bac0cd25432195825faaa457fa8b0e assets\create\lang\en_ud.json +8cb43c2910b0dedf4dd87adc900c165bec3d192f assets\create\lang\en_us.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets\create\models\block\acacia_window.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets\create\models\block\acacia_window_pane_noside.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets\create\models\block\acacia_window_pane_noside_alt.json @@ -399,6 +400,27 @@ ac07568fa7b2d3fa84d0fe89a498514d30514291 assets\create\models\block\chiseled_sco ecb2b85ee210dce329d2be66b98d0f0d4e6fc223 assets\create\models\block\chiseled_weathered_limestone.json f9a3f0939ea43b404eb2826b94211a25fca5ebc2 assets\create\models\block\clockwork_bearing.json 70406933cc4fa5471af6e562fd84a397347dba17 assets\create\models\block\copper_casing.json +84d3ba609f4d977977ebb44b46a1623879b9f30d assets\create\models\block\copper_pipe\ld_x.json +a185744cb718e72b8ccd4cdf7b9f85dfed62227b assets\create\models\block\copper_pipe\ld_y.json +ce12231c7d40f242cbb2e4a789c01777e8c2e189 assets\create\models\block\copper_pipe\ld_z.json +ad91bc4b916fb0445f051680b1710f20c7e818c3 assets\create\models\block\copper_pipe\lr_x.json +a4d8803d7ced28ba0c5c40cc694914ca344bb9cc assets\create\models\block\copper_pipe\lr_y.json +33cf12086e8362cd84da0fc684156323537ac31a assets\create\models\block\copper_pipe\lr_z.json +c5c636b16425d7fa827361512f9233c6cb054945 assets\create\models\block\copper_pipe\lu_x.json +0e5f387899a23902d84c27277665a221f29afb1f assets\create\models\block\copper_pipe\lu_y.json +cbf217c4971622a70d151623ff9f6edfd7f881a4 assets\create\models\block\copper_pipe\lu_z.json +86fbb2a8d0475044394137a7a7aec2c58bff9a3b assets\create\models\block\copper_pipe\none_x.json +d8bc59c2a86253715c8e4160115d9b1ba7e536c9 assets\create\models\block\copper_pipe\none_y.json +718305fffa1b9e78bf03690fbe655b86bae40ae1 assets\create\models\block\copper_pipe\none_z.json +1d99c2889d06401b98207a924489337b0c77026f assets\create\models\block\copper_pipe\rd_x.json +521ddedf28ed1a1fed78d12f505e22cd45120caa assets\create\models\block\copper_pipe\rd_y.json +bd774fb0ab18e94c1c8969acfaca4d7b7b9a8564 assets\create\models\block\copper_pipe\rd_z.json +d8e06415a5f05fcd86004cb45207144f5ae74afe assets\create\models\block\copper_pipe\ru_x.json +d6c91e3025c48fee267c10acb9d0f77036f178e4 assets\create\models\block\copper_pipe\ru_y.json +df11c86477a785f7c61b2e0b491996fb49527a76 assets\create\models\block\copper_pipe\ru_z.json +d29742ac5c34f856adf29e3c4ce6e5abf5c17e0e assets\create\models\block\copper_pipe\ud_x.json +40b288882daf5a47759f8d9db27f90b17ad1d8e0 assets\create\models\block\copper_pipe\ud_y.json +657ae1d3a5de431ee852eb12006a1ce211944607 assets\create\models\block\copper_pipe\ud_z.json 1ef7060b0ca7e9c0bfc8151f98ca08da31862cda assets\create\models\block\crate\brass\bottom.json 4ef2c7c3018f2d219f159a3ce58ceb00610b9c5d assets\create\models\block\crate\brass\left.json c76cfec1279d307c52f9502fdba3425f38219168 assets\create\models\block\crate\brass\right.json @@ -940,6 +962,7 @@ dcb09deae110077bcddf090996b51cc66e9a7de3 assets\create\models\item\cogwheel.json c5bcfba46f5824654dedaa2c5d5f42deb29e3baf assets\create\models\item\copper_ingot.json 3cdb321193355af630ee0e0b18bf24a9469aabad assets\create\models\item\copper_nugget.json 51be7da59368681522de870f1e09036dac55aa77 assets\create\models\item\copper_ore.json +e950d4812c3488ca86f58260638208e8f64042f2 assets\create\models\item\copper_pipe.json 200ef8378a9c014571c414433d4aef73a204dc01 assets\create\models\item\copper_sheet.json d7cb2f7bac8fae893fc5179af8140786a908f3f5 assets\create\models\item\copper_shingles.json 4e9126b349d55c65aa5407f05700579e52101c1f assets\create\models\item\crafter_slot_cover.json @@ -1712,6 +1735,7 @@ d76113310fc56eca6382d44df174096f2210d416 data\create\loot_tables\blocks\clutch.j f38802b919c49f162f102d6e5d94113f05bf4ab1 data\create\loot_tables\blocks\copper_block.json 5a65a18ea787130ac7b8f5652bfa5ed187446649 data\create\loot_tables\blocks\copper_casing.json 31a51237763c374b7cdf39b9b62c14e965871047 data\create\loot_tables\blocks\copper_ore.json +f5930a4583844c3fc52b515131d54946dc6b24e0 data\create\loot_tables\blocks\copper_pipe.json a5a7ba88a1d38da83b37bbe842dc7cc0544f37be data\create\loot_tables\blocks\copper_shingles.json b160899aa785dc54d8c6cc095337f70b81f3e44f data\create\loot_tables\blocks\creative_crate.json d8f2f8921b9200b1d9476a77ee1be32c25308ac3 data\create\loot_tables\blocks\creative_motor.json diff --git a/src/generated/resources/assets/create/blockstates/copper_pipe.json b/src/generated/resources/assets/create/blockstates/copper_pipe.json new file mode 100644 index 000000000..6d586ea95 --- /dev/null +++ b/src/generated/resources/assets/create/blockstates/copper_pipe.json @@ -0,0 +1,425 @@ +{ + "multipart": [ + { + "when": { + "down": "true" + }, + "apply": { + "model": "create:block/copper_pipe/block_end", + "x": 180, + "y": 90 + } + }, + { + "when": { + "up": "true" + }, + "apply": { + "model": "create:block/copper_pipe/block_end", + "y": 90 + } + }, + { + "when": { + "north": "true" + }, + "apply": { + "model": "create:block/copper_pipe/block_end", + "x": 90 + } + }, + { + "when": { + "south": "true" + }, + "apply": { + "model": "create:block/copper_pipe/block_end", + "x": 90, + "y": 180 + } + }, + { + "when": { + "west": "true" + }, + "apply": { + "model": "create:block/copper_pipe/block_end", + "x": 90, + "y": 270 + } + }, + { + "when": { + "east": "true" + }, + "apply": { + "model": "create:block/copper_pipe/block_end", + "x": 90, + "y": 90 + } + }, + { + "when": { + "south": "false", + "north": "true", + "down": "false", + "up": "true" + }, + "apply": { + "model": "create:block/copper_pipe/lu_x" + } + }, + { + "when": { + "south": "true", + "north": "false", + "down": "false", + "up": "true" + }, + "apply": { + "model": "create:block/copper_pipe/ru_x" + } + }, + { + "when": { + "south": "false", + "north": "true", + "down": "true", + "up": "false" + }, + "apply": { + "model": "create:block/copper_pipe/ld_x" + } + }, + { + "when": { + "south": "true", + "north": "false", + "down": "true", + "up": "false" + }, + "apply": { + "model": "create:block/copper_pipe/rd_x" + } + }, + { + "when": { + "south": "false", + "north": "false", + "down": "true", + "up": "true" + }, + "apply": { + "model": "create:block/copper_pipe/ud_x" + } + }, + { + "when": { + "south": "false", + "north": "false", + "down": "false", + "up": "true" + }, + "apply": { + "model": "create:block/copper_pipe/ud_x" + } + }, + { + "when": { + "south": "false", + "north": "false", + "down": "true", + "up": "false" + }, + "apply": { + "model": "create:block/copper_pipe/ud_x" + } + }, + { + "when": { + "south": "true", + "north": "true", + "down": "false", + "up": "false" + }, + "apply": { + "model": "create:block/copper_pipe/lr_x" + } + }, + { + "when": { + "south": "false", + "north": "true", + "down": "false", + "up": "false" + }, + "apply": { + "model": "create:block/copper_pipe/lr_x" + } + }, + { + "when": { + "south": "true", + "north": "false", + "down": "false", + "up": "false" + }, + "apply": { + "model": "create:block/copper_pipe/lr_x" + } + }, + { + "when": { + "south": "false", + "north": "false", + "down": "false", + "up": "false" + }, + "apply": { + "model": "create:block/copper_pipe/none_x" + } + }, + { + "when": { + "south": "true", + "north": "false", + "east": "false", + "west": "true" + }, + "apply": { + "model": "create:block/copper_pipe/lu_y" + } + }, + { + "when": { + "south": "true", + "north": "false", + "east": "true", + "west": "false" + }, + "apply": { + "model": "create:block/copper_pipe/ru_y" + } + }, + { + "when": { + "south": "false", + "north": "true", + "east": "false", + "west": "true" + }, + "apply": { + "model": "create:block/copper_pipe/ld_y" + } + }, + { + "when": { + "south": "false", + "north": "true", + "east": "true", + "west": "false" + }, + "apply": { + "model": "create:block/copper_pipe/rd_y" + } + }, + { + "when": { + "south": "true", + "north": "true", + "east": "false", + "west": "false" + }, + "apply": { + "model": "create:block/copper_pipe/ud_y" + } + }, + { + "when": { + "south": "true", + "north": "false", + "east": "false", + "west": "false" + }, + "apply": { + "model": "create:block/copper_pipe/ud_y" + } + }, + { + "when": { + "south": "false", + "north": "true", + "east": "false", + "west": "false" + }, + "apply": { + "model": "create:block/copper_pipe/ud_y" + } + }, + { + "when": { + "south": "false", + "north": "false", + "east": "true", + "west": "true" + }, + "apply": { + "model": "create:block/copper_pipe/lr_y" + } + }, + { + "when": { + "south": "false", + "north": "false", + "east": "false", + "west": "true" + }, + "apply": { + "model": "create:block/copper_pipe/lr_y" + } + }, + { + "when": { + "south": "false", + "north": "false", + "east": "true", + "west": "false" + }, + "apply": { + "model": "create:block/copper_pipe/lr_y" + } + }, + { + "when": { + "south": "false", + "north": "false", + "east": "false", + "west": "false" + }, + "apply": { + "model": "create:block/copper_pipe/none_y" + } + }, + { + "when": { + "down": "false", + "east": "true", + "west": "false", + "up": "true" + }, + "apply": { + "model": "create:block/copper_pipe/lu_z" + } + }, + { + "when": { + "down": "false", + "east": "false", + "west": "true", + "up": "true" + }, + "apply": { + "model": "create:block/copper_pipe/ru_z" + } + }, + { + "when": { + "down": "true", + "east": "true", + "west": "false", + "up": "false" + }, + "apply": { + "model": "create:block/copper_pipe/ld_z" + } + }, + { + "when": { + "down": "true", + "east": "false", + "west": "true", + "up": "false" + }, + "apply": { + "model": "create:block/copper_pipe/rd_z" + } + }, + { + "when": { + "down": "true", + "east": "false", + "west": "false", + "up": "true" + }, + "apply": { + "model": "create:block/copper_pipe/ud_z" + } + }, + { + "when": { + "down": "false", + "east": "false", + "west": "false", + "up": "true" + }, + "apply": { + "model": "create:block/copper_pipe/ud_z" + } + }, + { + "when": { + "down": "true", + "east": "false", + "west": "false", + "up": "false" + }, + "apply": { + "model": "create:block/copper_pipe/ud_z" + } + }, + { + "when": { + "down": "false", + "east": "true", + "west": "true", + "up": "false" + }, + "apply": { + "model": "create:block/copper_pipe/lr_z" + } + }, + { + "when": { + "down": "false", + "east": "true", + "west": "false", + "up": "false" + }, + "apply": { + "model": "create:block/copper_pipe/lr_z" + } + }, + { + "when": { + "down": "false", + "east": "false", + "west": "true", + "up": "false" + }, + "apply": { + "model": "create:block/copper_pipe/lr_z" + } + }, + { + "when": { + "down": "false", + "east": "false", + "west": "false", + "up": "false" + }, + "apply": { + "model": "create:block/copper_pipe/none_z" + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/blockstates/radial_chassis.json b/src/generated/resources/assets/create/blockstates/radial_chassis.json index 80ab92133..410cb13c7 100644 --- a/src/generated/resources/assets/create/blockstates/radial_chassis.json +++ b/src/generated/resources/assets/create/blockstates/radial_chassis.json @@ -149,8 +149,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "x" + "axis": "x", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky" @@ -158,8 +158,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "y" + "axis": "y", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -168,8 +168,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "z" + "axis": "z", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -178,8 +178,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "x" + "axis": "x", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_x" @@ -187,8 +187,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "y" + "axis": "y", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -197,8 +197,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "z" + "axis": "z", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", diff --git a/src/generated/resources/assets/create/lang/en_ud.json b/src/generated/resources/assets/create/lang/en_ud.json index 63fd3d336..0d1321200 100644 --- a/src/generated/resources/assets/create/lang/en_ud.json +++ b/src/generated/resources/assets/create/lang/en_ud.json @@ -37,6 +37,7 @@ "block.create.copper_block": "\u029E\u0254o\u05DF\u15FA \u0279\u01DDddo\u0186", "block.create.copper_casing": "bu\u0131s\u0250\u0186 \u0279\u01DDddo\u0186", "block.create.copper_ore": "\u01DD\u0279O \u0279\u01DDddo\u0186", + "block.create.copper_pipe": "\u01DDd\u0131\u0500 \u0279\u01DDddo\u0186", "block.create.copper_shingles": "s\u01DD\u05DFbu\u0131\u0265S \u0279\u01DDddo\u0186", "block.create.creative_crate": "\u01DD\u0287\u0250\u0279\u0186 \u01DD\u028C\u0131\u0287\u0250\u01DD\u0279\u0186", "block.create.creative_motor": "\u0279o\u0287oW \u01DD\u028C\u0131\u0287\u0250\u01DD\u0279\u0186", diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index b50e2d6ae..6e909424b 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -40,6 +40,7 @@ "block.create.copper_block": "Copper Block", "block.create.copper_casing": "Copper Casing", "block.create.copper_ore": "Copper Ore", + "block.create.copper_pipe": "Copper Pipe", "block.create.copper_shingles": "Copper Shingles", "block.create.creative_crate": "Creative Crate", "block.create.creative_motor": "Creative Motor", diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/ld_x.json b/src/generated/resources/assets/create/models/block/copper_pipe/ld_x.json new file mode 100644 index 000000000..050674efa --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/ld_x.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_x", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "west": { + "texture": "#0", + "uv": [ + 12.0, + 8.0, + 16.0, + 12.0 + ] + }, + "east": { + "texture": "#0", + "uv": [ + 16.0, + 8.0, + 12.0, + 12.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/ld_y.json b/src/generated/resources/assets/create/models/block/copper_pipe/ld_y.json new file mode 100644 index 000000000..dbe8af7de --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/ld_y.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_y", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "down": { + "texture": "#0", + "uv": [ + 12.0, + 8.0, + 16.0, + 12.0 + ] + }, + "up": { + "texture": "#0", + "uv": [ + 12.0, + 12.0, + 16.0, + 8.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/ld_z.json b/src/generated/resources/assets/create/models/block/copper_pipe/ld_z.json new file mode 100644 index 000000000..0c4728b93 --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/ld_z.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_z", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "north": { + "texture": "#0", + "uv": [ + 12.0, + 8.0, + 16.0, + 12.0 + ] + }, + "south": { + "texture": "#0", + "uv": [ + 16.0, + 8.0, + 12.0, + 12.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/lr_x.json b/src/generated/resources/assets/create/models/block/copper_pipe/lr_x.json new file mode 100644 index 000000000..69ce847fd --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/lr_x.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_x", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "west": { + "texture": "#0", + "uv": [ + 4.0, + 12.0, + 8.0, + 16.0 + ] + }, + "east": { + "texture": "#0", + "uv": [ + 8.0, + 12.0, + 4.0, + 16.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/lr_y.json b/src/generated/resources/assets/create/models/block/copper_pipe/lr_y.json new file mode 100644 index 000000000..74888e271 --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/lr_y.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_y", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "down": { + "texture": "#0", + "uv": [ + 4.0, + 12.0, + 8.0, + 16.0 + ] + }, + "up": { + "texture": "#0", + "uv": [ + 4.0, + 16.0, + 8.0, + 12.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/lr_z.json b/src/generated/resources/assets/create/models/block/copper_pipe/lr_z.json new file mode 100644 index 000000000..3cd5dc8b9 --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/lr_z.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_z", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "north": { + "texture": "#0", + "uv": [ + 4.0, + 12.0, + 8.0, + 16.0 + ] + }, + "south": { + "texture": "#0", + "uv": [ + 8.0, + 12.0, + 4.0, + 16.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/lu_x.json b/src/generated/resources/assets/create/models/block/copper_pipe/lu_x.json new file mode 100644 index 000000000..56fc110fa --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/lu_x.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_x", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "west": { + "texture": "#0", + "uv": [ + 8.0, + 12.0, + 12.0, + 16.0 + ] + }, + "east": { + "texture": "#0", + "uv": [ + 12.0, + 12.0, + 8.0, + 16.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/lu_y.json b/src/generated/resources/assets/create/models/block/copper_pipe/lu_y.json new file mode 100644 index 000000000..ce38f044a --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/lu_y.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_y", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "down": { + "texture": "#0", + "uv": [ + 8.0, + 12.0, + 12.0, + 16.0 + ] + }, + "up": { + "texture": "#0", + "uv": [ + 8.0, + 16.0, + 12.0, + 12.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/lu_z.json b/src/generated/resources/assets/create/models/block/copper_pipe/lu_z.json new file mode 100644 index 000000000..95c7c6ca7 --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/lu_z.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_z", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "north": { + "texture": "#0", + "uv": [ + 8.0, + 12.0, + 12.0, + 16.0 + ] + }, + "south": { + "texture": "#0", + "uv": [ + 12.0, + 12.0, + 8.0, + 16.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/none_x.json b/src/generated/resources/assets/create/models/block/copper_pipe/none_x.json new file mode 100644 index 000000000..d0bf2daa3 --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/none_x.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_x", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "west": { + "texture": "#0", + "uv": [ + 12.0, + 12.0, + 16.0, + 16.0 + ] + }, + "east": { + "texture": "#0", + "uv": [ + 16.0, + 12.0, + 12.0, + 16.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/none_y.json b/src/generated/resources/assets/create/models/block/copper_pipe/none_y.json new file mode 100644 index 000000000..accaa1e3d --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/none_y.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_y", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "down": { + "texture": "#0", + "uv": [ + 12.0, + 12.0, + 16.0, + 16.0 + ] + }, + "up": { + "texture": "#0", + "uv": [ + 12.0, + 16.0, + 16.0, + 12.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/none_z.json b/src/generated/resources/assets/create/models/block/copper_pipe/none_z.json new file mode 100644 index 000000000..7d255de58 --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/none_z.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_z", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "north": { + "texture": "#0", + "uv": [ + 12.0, + 12.0, + 16.0, + 16.0 + ] + }, + "south": { + "texture": "#0", + "uv": [ + 16.0, + 12.0, + 12.0, + 16.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/rd_x.json b/src/generated/resources/assets/create/models/block/copper_pipe/rd_x.json new file mode 100644 index 000000000..e9db2634e --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/rd_x.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_x", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "west": { + "texture": "#0", + "uv": [ + 8.0, + 8.0, + 12.0, + 12.0 + ] + }, + "east": { + "texture": "#0", + "uv": [ + 12.0, + 8.0, + 8.0, + 12.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/rd_y.json b/src/generated/resources/assets/create/models/block/copper_pipe/rd_y.json new file mode 100644 index 000000000..07df500ea --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/rd_y.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_y", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "down": { + "texture": "#0", + "uv": [ + 8.0, + 8.0, + 12.0, + 12.0 + ] + }, + "up": { + "texture": "#0", + "uv": [ + 8.0, + 12.0, + 12.0, + 8.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/rd_z.json b/src/generated/resources/assets/create/models/block/copper_pipe/rd_z.json new file mode 100644 index 000000000..e24cecbd3 --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/rd_z.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_z", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "north": { + "texture": "#0", + "uv": [ + 8.0, + 8.0, + 12.0, + 12.0 + ] + }, + "south": { + "texture": "#0", + "uv": [ + 12.0, + 8.0, + 8.0, + 12.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/ru_x.json b/src/generated/resources/assets/create/models/block/copper_pipe/ru_x.json new file mode 100644 index 000000000..3c82f33fb --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/ru_x.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_x", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "west": { + "texture": "#0", + "uv": [ + 0.0, + 12.0, + 4.0, + 16.0 + ] + }, + "east": { + "texture": "#0", + "uv": [ + 4.0, + 12.0, + 0.0, + 16.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/ru_y.json b/src/generated/resources/assets/create/models/block/copper_pipe/ru_y.json new file mode 100644 index 000000000..5e923fc69 --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/ru_y.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_y", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "down": { + "texture": "#0", + "uv": [ + 0.0, + 12.0, + 4.0, + 16.0 + ] + }, + "up": { + "texture": "#0", + "uv": [ + 0.0, + 16.0, + 4.0, + 12.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/ru_z.json b/src/generated/resources/assets/create/models/block/copper_pipe/ru_z.json new file mode 100644 index 000000000..a7d071637 --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/ru_z.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_z", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "north": { + "texture": "#0", + "uv": [ + 0.0, + 12.0, + 4.0, + 16.0 + ] + }, + "south": { + "texture": "#0", + "uv": [ + 4.0, + 12.0, + 0.0, + 16.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/ud_x.json b/src/generated/resources/assets/create/models/block/copper_pipe/ud_x.json new file mode 100644 index 000000000..b99092120 --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/ud_x.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_x", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "west": { + "texture": "#0", + "uv": [ + 0.0, + 8.0, + 4.0, + 12.0 + ] + }, + "east": { + "texture": "#0", + "uv": [ + 4.0, + 8.0, + 0.0, + 12.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/ud_y.json b/src/generated/resources/assets/create/models/block/copper_pipe/ud_y.json new file mode 100644 index 000000000..eb0fc9b7e --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/ud_y.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_y", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "down": { + "texture": "#0", + "uv": [ + 0.0, + 8.0, + 4.0, + 12.0 + ] + }, + "up": { + "texture": "#0", + "uv": [ + 0.0, + 12.0, + 4.0, + 8.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/block/copper_pipe/ud_z.json b/src/generated/resources/assets/create/models/block/copper_pipe/ud_z.json new file mode 100644 index 000000000..357f02404 --- /dev/null +++ b/src/generated/resources/assets/create/models/block/copper_pipe/ud_z.json @@ -0,0 +1,37 @@ +{ + "parent": "create:block/copper_pipe/core_z", + "elements": [ + { + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "north": { + "texture": "#0", + "uv": [ + 0.0, + 8.0, + 4.0, + 12.0 + ] + }, + "south": { + "texture": "#0", + "uv": [ + 4.0, + 8.0, + 0.0, + 12.0 + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/item/copper_pipe.json b/src/generated/resources/assets/create/models/item/copper_pipe.json new file mode 100644 index 000000000..2bfbd0bf8 --- /dev/null +++ b/src/generated/resources/assets/create/models/item/copper_pipe.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/copper_pipe/item" +} \ No newline at end of file diff --git a/src/generated/resources/data/create/loot_tables/blocks/copper_pipe.json b/src/generated/resources/data/create/loot_tables/blocks/copper_pipe.json new file mode 100644 index 000000000..d61dcd76a --- /dev/null +++ b/src/generated/resources/data/create/loot_tables/blocks/copper_pipe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "create:copper_pipe" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index 469c3e9f7..982b89e88 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -73,9 +73,17 @@ public enum AllBlockPartials { SYMMETRY_PLANE("symmetry_effect/plane"), SYMMETRY_CROSSPLANE("symmetry_effect/crossplane"), SYMMETRY_TRIPLEPLANE("symmetry_effect/tripleplane"), + + COPPER_PIPE_CASING("copper_pipe/casing"), + COPPER_PIPE_RIM_UP("copper_pipe/rim/up"), + COPPER_PIPE_RIM_DOWN("copper_pipe/rim/down"), + COPPER_PIPE_RIM_EAST("copper_pipe/rim/east"), + COPPER_PIPE_RIM_WEST("copper_pipe/rim/west"), + COPPER_PIPE_RIM_NORTH("copper_pipe/rim/north"), + COPPER_PIPE_RIM_SOUTH("copper_pipe/rim/south"), ; - + private ResourceLocation modelLocation; private IBakedModel bakedModel; diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index a70293327..c80e24f93 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -40,8 +40,8 @@ import com.simibubi.create.content.contraptions.components.structureMovement.cha import com.simibubi.create.content.contraptions.components.structureMovement.chassis.LinearChassisBlock.ChassisCTBehaviour; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.RadialChassisBlock; import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock; -import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlockItem; import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock.MinecartAnchorBlock; +import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlockItem; import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock; import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonHeadBlock; import com.simibubi.create.content.contraptions.components.structureMovement.piston.PistonExtensionPoleBlock; @@ -49,6 +49,8 @@ import com.simibubi.create.content.contraptions.components.structureMovement.pul import com.simibubi.create.content.contraptions.components.tracks.ReinforcedRailBlock; import com.simibubi.create.content.contraptions.components.turntable.TurntableBlock; import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheelBlock; +import com.simibubi.create.content.contraptions.fluids.PipeBlock; +import com.simibubi.create.content.contraptions.fluids.PipeModel; import com.simibubi.create.content.contraptions.processing.BasinBlock; import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock; import com.simibubi.create.content.contraptions.relays.advanced.sequencer.SequencedGearshiftBlock; @@ -385,6 +387,19 @@ public class AllBlocks { .transform(ModelGen.customItemModel("gauge", "_", "item")) .register(); + // Fluids + + public static final BlockEntry COPPER_PIPE = + REGISTRATE.block("copper_pipe", PipeBlock::new) + .initialProperties(SharedProperties::softMetal) + .blockstate(BlockStateGen.pipe()) + .onRegister(CreateRegistrate.blockModel(() -> PipeModel::new)) + .item() + .transform(customItemModel()) + .register(); + + // Contraptions + public static final BlockEntry MECHANICAL_PISTON = REGISTRATE.block("mechanical_piston", MechanicalPistonBlock::normal) .transform(BuilderTransformers.mechanicalPiston(PistonType.DEFAULT)) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterBlock.java index 4afe0c11b..a8600a1e8 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterBlock.java @@ -9,7 +9,7 @@ import com.simibubi.create.content.contraptions.components.crafter.ConnectedInpu import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity.Phase; import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.utility.AngleHelper; -import com.simibubi.create.foundation.utility.Lang; +import com.simibubi.create.foundation.utility.Pointing; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.Block; @@ -26,7 +26,6 @@ import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; import net.minecraft.util.Direction.AxisDirection; import net.minecraft.util.Hand; -import net.minecraft.util.IStringSerializable; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.Vec3d; @@ -263,30 +262,14 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock implements IT return false; if (crafterState.get(HORIZONTAL_FACING) != targetState.get(HORIZONTAL_FACING)) return false; - if (Math.abs(crafterState.get(POINTING).xRotation - targetState.get(POINTING).xRotation) == 180) + if (Math.abs(crafterState.get(POINTING) + .getXRotation() + - targetState.get(POINTING) + .getXRotation()) == 180) return false; return true; } - public enum Pointing implements IStringSerializable { - UP(0), LEFT(270), DOWN(180), RIGHT(90); - - private int xRotation; - - private Pointing(int xRotation) { - this.xRotation = xRotation; - } - - @Override - public String getName() { - return Lang.asId(name()); - } - - public int getXRotation() { - return xRotation; - } - } - @Override public Class getTileEntityClass() { return MechanicalCrafterTileEntity.class; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterTileEntity.java index 69a60b9b8..93d44a928 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterTileEntity.java @@ -12,13 +12,13 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.AllItems; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.components.crafter.ConnectedInputHandler.ConnectedInput; -import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterBlock.Pointing; import com.simibubi.create.content.contraptions.components.crafter.RecipeGridHandler.GroupedItems; import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.edgeInteraction.EdgeInteractionBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.inventory.InsertingBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.inventory.InventoryManagementBehaviour.Attachments; +import com.simibubi.create.foundation.utility.Pointing; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/RecipeGridHandler.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/RecipeGridHandler.java index 775f21d05..55c04b434 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/RecipeGridHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/RecipeGridHandler.java @@ -15,7 +15,7 @@ import org.apache.commons.lang3.tuple.Pair; import com.google.common.base.Predicates; import com.simibubi.create.AllBlocks; import com.simibubi.create.AllRecipeTypes; -import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterBlock.Pointing; +import com.simibubi.create.foundation.utility.Pointing; import net.minecraft.block.BlockState; import net.minecraft.inventory.CraftingInventory; diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeBlock.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeBlock.java new file mode 100644 index 000000000..383699bd2 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeBlock.java @@ -0,0 +1,126 @@ +package com.simibubi.create.content.contraptions.fluids; + +import javax.annotation.Nullable; + +import com.simibubi.create.foundation.utility.Iterate; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.SixWayBlock; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.state.StateContainer.Builder; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.Axis; +import net.minecraft.util.Direction.AxisDirection; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.ILightReader; +import net.minecraft.world.IWorld; + +public class PipeBlock extends SixWayBlock { + + public PipeBlock(Properties properties) { + super(4 / 16f, properties); + } + + @Override + protected void fillStateContainer(Builder builder) { + builder.add(NORTH, EAST, SOUTH, WEST, UP, DOWN); + } + + @Override + public BlockState getStateForPlacement(BlockItemUseContext context) { + return updateBlockState(getDefaultState(), context.getNearestLookingDirection(), null, context.getWorld(), + context.getPos()); + } + + @Override + public BlockState updatePostPlacement(BlockState state, Direction direction, BlockState neighbourState, + IWorld world, BlockPos pos, BlockPos neighbourPos) { + return updateBlockState(state, direction, direction.getOpposite(), world, pos); + } + + public BlockState updateBlockState(BlockState state, Direction preferredDirection, @Nullable Direction ignore, + ILightReader world, BlockPos pos) { + // Update sides that are not ignored + for (Direction d : Iterate.directions) + if (d != ignore) + state = state.with(FACING_TO_PROPERTY_MAP.get(d), this == world.getBlockState(pos.offset(d)) + .getBlock()); + + // See if it has enough connections + Direction connectedDirection = null; + for (Direction d : Iterate.directions) { + if (state.get(FACING_TO_PROPERTY_MAP.get(d))) { + if (connectedDirection != null) + return state; + connectedDirection = d; + } + } + + // Add opposite end if only one connection + if (connectedDirection != null) + return state.with(FACING_TO_PROPERTY_MAP.get(connectedDirection.getOpposite()), true); + + // Use preferred + return state.with(FACING_TO_PROPERTY_MAP.get(preferredDirection), true) + .with(FACING_TO_PROPERTY_MAP.get(preferredDirection.getOpposite()), true); + } + + public static boolean isPipe(BlockState state) { + return state.getBlock() instanceof PipeBlock; + } + + public static boolean shouldDrawRim(ILightReader world, BlockPos pos, BlockState state, Direction direction) { + if (!isPipe(state)) + return false; + if (!state.get(FACING_TO_PROPERTY_MAP.get(direction))) + return false; + BlockPos offsetPos = pos.offset(direction); + BlockState facingState = world.getBlockState(offsetPos); + if (!isPipe(facingState)) + return true; + if (!isCornerOrEndPipe(world, pos, state)) + return false; + if (isStraightPipe(world, offsetPos, facingState)) + return true; + if (!shouldDrawCasing(world, pos, state) && shouldDrawCasing(world, offsetPos, facingState)) + return true; + if (isCornerOrEndPipe(world, offsetPos, facingState)) + return direction.getAxisDirection() == AxisDirection.POSITIVE; + return false; + } + + public static boolean isCornerOrEndPipe(ILightReader world, BlockPos pos, BlockState state) { + return isPipe(state) && !isStraightPipe(world, pos, state) && !shouldDrawCasing(world, pos, state); + } + + public static boolean isStraightPipe(ILightReader world, BlockPos pos, BlockState state) { + if (!isPipe(state)) + return false; + boolean axisFound = false; + for (Axis axis : Iterate.axes) { + Direction d1 = Direction.getFacingFromAxis(AxisDirection.NEGATIVE, axis); + Direction d2 = Direction.getFacingFromAxis(AxisDirection.POSITIVE, axis); + if (state.get(FACING_TO_PROPERTY_MAP.get(d1)) && state.get(FACING_TO_PROPERTY_MAP.get(d2))) + if (axisFound) + return false; + else + axisFound = true; + } + return axisFound; + } + + public static boolean shouldDrawCasing(ILightReader world, BlockPos pos, BlockState state) { + if (!isPipe(state)) + return false; + for (Axis axis : Iterate.axes) { + int connections = 0; + for (Direction direction : Iterate.directions) + if (direction.getAxis() != axis && state.get(FACING_TO_PROPERTY_MAP.get(direction))) + connections++; + if (connections > 2) + return true; + } + return false; + } +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeModel.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeModel.java new file mode 100644 index 000000000..f90b30112 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeModel.java @@ -0,0 +1,99 @@ +package com.simibubi.create.content.contraptions.fluids; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.Random; + +import com.google.common.collect.ImmutableMap; +import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.foundation.block.render.WrappedBakedModel; +import com.simibubi.create.foundation.utility.Iterate; + +import net.minecraft.block.BlockState; +import net.minecraft.client.renderer.model.BakedQuad; +import net.minecraft.client.renderer.model.IBakedModel; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.ILightReader; +import net.minecraftforge.client.model.data.IModelData; +import net.minecraftforge.client.model.data.ModelDataMap; +import net.minecraftforge.client.model.data.ModelProperty; + +public class PipeModel extends WrappedBakedModel { + + public static Map RIMS = ImmutableMap.builder() + .put(Direction.UP, AllBlockPartials.COPPER_PIPE_RIM_UP) + .put(Direction.DOWN, AllBlockPartials.COPPER_PIPE_RIM_DOWN) + .put(Direction.EAST, AllBlockPartials.COPPER_PIPE_RIM_EAST) + .put(Direction.WEST, AllBlockPartials.COPPER_PIPE_RIM_WEST) + .put(Direction.NORTH, AllBlockPartials.COPPER_PIPE_RIM_NORTH) + .put(Direction.SOUTH, AllBlockPartials.COPPER_PIPE_RIM_SOUTH) + .build(); + + private static ModelProperty PIPE_PROPERTY = new ModelProperty<>(); + + public PipeModel(IBakedModel template) { + super(template); + } + + @Override + public IModelData getModelData(ILightReader world, BlockPos pos, BlockState state, IModelData tileData) { + PipeModelData data = new PipeModelData(); + for (Direction d : Iterate.directions) + data.putRim(d, PipeBlock.shouldDrawRim(world, pos, state, d)); + data.setEncased(PipeBlock.shouldDrawCasing(world, pos, state)); + return new ModelDataMap.Builder().withInitial(PIPE_PROPERTY, data) + .build(); + } + + @Override + public List getQuads(BlockState state, Direction side, Random rand, IModelData data) { + List quads = super.getQuads(state, side, rand, data); + if (data instanceof ModelDataMap) { + ModelDataMap modelDataMap = (ModelDataMap) data; + if (modelDataMap.hasProperty(PIPE_PROPERTY)) + addQuads(quads, state, side, rand, modelDataMap, modelDataMap.getData(PIPE_PROPERTY)); + } + return quads; + } + + private void addQuads(List quads, BlockState state, Direction side, Random rand, IModelData data, + PipeModelData pipeData) { + for (Direction d : Iterate.directions) + if (pipeData.getRim(d)) + quads.addAll(RIMS.get(d) + .get() + .getQuads(state, side, rand, data)); + if (pipeData.isEncased()) + quads.addAll(AllBlockPartials.COPPER_PIPE_CASING.get() + .getQuads(state, side, rand, data)); + } + + private class PipeModelData { + boolean[] rims; + boolean encased; + + public PipeModelData() { + rims = new boolean[6]; + Arrays.fill(rims, false); + } + + public void putRim(Direction face, boolean rim) { + rims[face.getIndex()] = rim; + } + + public void setEncased(boolean encased) { + this.encased = encased; + } + + public boolean getRim(Direction face) { + return rims[face.getIndex()]; + } + + public boolean isEncased() { + return encased; + } + } + +} diff --git a/src/main/java/com/simibubi/create/foundation/data/BlockStateGen.java b/src/main/java/com/simibubi/create/foundation/data/BlockStateGen.java index e46eab01b..1a8d78300 100644 --- a/src/main/java/com/simibubi/create/foundation/data/BlockStateGen.java +++ b/src/main/java/com/simibubi/create/foundation/data/BlockStateGen.java @@ -3,20 +3,27 @@ package com.simibubi.create.foundation.data; import java.util.HashMap; import java.util.IdentityHashMap; +import java.util.List; import java.util.Map; import java.util.Vector; import java.util.function.BiFunction; import java.util.function.Function; +import org.apache.commons.lang3.tuple.Pair; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; import com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.LinearChassisBlock; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.RadialChassisBlock; import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssembleRailType; import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock; import com.simibubi.create.content.contraptions.components.tracks.ReinforcedRailBlock; +import com.simibubi.create.content.contraptions.fluids.PipeBlock; import com.simibubi.create.content.logistics.block.belts.observer.BeltObserverBlock; import com.simibubi.create.content.palettes.PavedBlock; import com.simibubi.create.foundation.utility.Iterate; +import com.simibubi.create.foundation.utility.Pointing; import com.simibubi.create.foundation.worldgen.OxidizingBlock; import com.tterrag.registrate.builders.BlockBuilder; import com.tterrag.registrate.providers.DataGenContext; @@ -26,10 +33,12 @@ import com.tterrag.registrate.util.nullness.NonNullUnaryOperator; import net.minecraft.block.Block; import net.minecraft.block.BlockState; +import net.minecraft.state.BooleanProperty; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.state.properties.RailShape; import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; +import net.minecraft.util.Direction.AxisDirection; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.generators.ConfiguredModel; import net.minecraftforge.client.model.generators.ModelFile; @@ -339,4 +348,104 @@ public class BlockStateGen { }; } + public static

NonNullBiConsumer, RegistrateBlockstateProvider> pipe() { + return (c, p) -> { + String path = "block/" + c.getName(); + + String LU = "lu"; + String RU = "ru"; + String LD = "ld"; + String RD = "rd"; + String LR = "lr"; + String UD = "ud"; + String NONE = "none"; + + List orientations = ImmutableList.of(LU, RU, LD, RD, LR, UD, NONE); + Map> uvs = ImmutableMap.>builder() + .put(LU, Pair.of(8, 12)) + .put(RU, Pair.of(0, 12)) + .put(LD, Pair.of(12, 8)) + .put(RD, Pair.of(8, 8)) + .put(LR, Pair.of(4, 12)) + .put(UD, Pair.of(0, 8)) + .put(NONE, Pair.of(12, 12)) + .build(); + + Map coreTemplates = new IdentityHashMap<>(); + Map, ModelFile> coreModels = new HashMap<>(); + + for (Axis axis : Iterate.axes) + coreTemplates.put(axis, p.modLoc(path + "/core_" + axis.getName())); + ModelFile end = AssetLookup.partialBaseModel(c, p, "end"); + + for (Axis axis : Iterate.axes) { + ResourceLocation parent = coreTemplates.get(axis); + for (String s : orientations) { + Pair key = Pair.of(s, axis); + String modelName = path + "/" + s + "_" + axis.getName(); + coreModels.put(key, p.models() + .withExistingParent(modelName, parent) + .element() + .from(4, 4, 4) + .to(12, 12, 12) + .face(Direction.getFacingFromAxis(AxisDirection.POSITIVE, axis)) + .end() + .face(Direction.getFacingFromAxis(AxisDirection.NEGATIVE, axis)) + .end() + .faces((d, builder) -> { + Pair pair = uvs.get(s); + float u = pair.getKey(); + float v = pair.getValue(); + if (d == Direction.UP) + builder.uvs(u, v + 4, u + 4, v); + else if (d.getAxisDirection() == AxisDirection.POSITIVE) + builder.uvs(u + 4, v, u, v + 4); + else + builder.uvs(u, v, u + 4, v + 4); + builder.texture("#0"); + }) + .end()); + } + } + + MultiPartBlockStateBuilder builder = p.getMultipartBuilder(c.get()); + for (Direction d : Iterate.directions) + builder.part() + .modelFile(end) + .rotationX(d == Direction.UP ? 0 : d == Direction.DOWN ? 180 : 90) + .rotationY((int) (d.getHorizontalAngle() + 180) % 360) + .addModel() + .condition(PipeBlock.FACING_TO_PROPERTY_MAP.get(d), true) + .end(); + + for (Axis axis : Iterate.axes) { + putPart(coreModels, builder, axis, LU, true, false, true, false); + putPart(coreModels, builder, axis, RU, true, false, false, true); + putPart(coreModels, builder, axis, LD, false, true, true, false); + putPart(coreModels, builder, axis, RD, false, true, false, true); + putPart(coreModels, builder, axis, UD, true, true, false, false); + putPart(coreModels, builder, axis, UD, true, false, false, false); + putPart(coreModels, builder, axis, UD, false, true, false, false); + putPart(coreModels, builder, axis, LR, false, false, true, true); + putPart(coreModels, builder, axis, LR, false, false, true, false); + putPart(coreModels, builder, axis, LR, false, false, false, true); + putPart(coreModels, builder, axis, NONE, false, false, false, false); + } + }; + } + + private static void putPart(Map, ModelFile> coreModels, MultiPartBlockStateBuilder builder, + Axis axis, String s, boolean up, boolean down, boolean left, boolean right) { + Direction positiveAxis = Direction.getFacingFromAxis(AxisDirection.POSITIVE, axis); + Map propertyMap = PipeBlock.FACING_TO_PROPERTY_MAP; + builder.part() + .modelFile(coreModels.get(Pair.of(s, axis))) + .addModel() + .condition(propertyMap.get(Pointing.UP.getCombinedDirection(positiveAxis)), up) + .condition(propertyMap.get(Pointing.LEFT.getCombinedDirection(positiveAxis)), left) + .condition(propertyMap.get(Pointing.RIGHT.getCombinedDirection(positiveAxis)), right) + .condition(propertyMap.get(Pointing.DOWN.getCombinedDirection(positiveAxis)), down) + .end(); + } + } diff --git a/src/main/java/com/simibubi/create/foundation/data/CreateRegistrate.java b/src/main/java/com/simibubi/create/foundation/data/CreateRegistrate.java index a5e75ace3..47390a57f 100644 --- a/src/main/java/com/simibubi/create/foundation/data/CreateRegistrate.java +++ b/src/main/java/com/simibubi/create/foundation/data/CreateRegistrate.java @@ -108,7 +108,8 @@ public class CreateRegistrate extends AbstractRegistrate { final String location = "block/palettes/" + c.getName() + "/plain"; p.simpleBlock(c.get(), p.models() .cubeAll(c.getName(), p.modLoc(location))); - // TODO tag with forge:stone; if TFWorldGen == true tag with forge:wg_stone aswell + // TODO tag with forge:stone; if TFWorldGen == true tag with forge:wg_stone + // aswell }) .simpleItem(); } @@ -116,6 +117,10 @@ public class CreateRegistrate extends AbstractRegistrate { public static NonNullConsumer connectedTextures(ConnectedTextureBehaviour behavior) { return entry -> onClient(() -> () -> registerCTBehviour(entry, behavior)); } + + public static NonNullConsumer blockModel(Supplier> func) { + return entry -> onClient(() -> () -> registerBlockModel(entry, func)); + } public static NonNullConsumer blockColors(Supplier> colorFunc) { return entry -> onClient(() -> () -> registerBlockColor(entry, colorFunc)); @@ -152,6 +157,13 @@ public class CreateRegistrate extends AbstractRegistrate { .register(entry.delegate, model -> new CTModel(model, behavior)); } + @OnlyIn(Dist.CLIENT) + private static void registerBlockModel(Block entry, + Supplier> func) { + CreateClient.getCustomBlockModels() + .register(entry.delegate, func.get()); + } + @OnlyIn(Dist.CLIENT) private static void registerItemModel(Item entry, Supplier> func) { diff --git a/src/main/java/com/simibubi/create/foundation/utility/Pointing.java b/src/main/java/com/simibubi/create/foundation/utility/Pointing.java new file mode 100644 index 000000000..89c434111 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/utility/Pointing.java @@ -0,0 +1,35 @@ +package com.simibubi.create.foundation.utility; + +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.Axis; +import net.minecraft.util.Direction.AxisDirection; +import net.minecraft.util.IStringSerializable; + +public enum Pointing implements IStringSerializable { + UP(0), LEFT(270), DOWN(180), RIGHT(90); + + private int xRotation; + + private Pointing(int xRotation) { + this.xRotation = xRotation; + } + + @Override + public String getName() { + return Lang.asId(name()); + } + + public int getXRotation() { + return xRotation; + } + + public Direction getCombinedDirection(Direction direction) { + Axis axis = direction.getAxis(); + Direction top = axis == Axis.Y ? Direction.SOUTH : Direction.UP; + int rotations = direction.getAxisDirection() == AxisDirection.NEGATIVE ? 4 - ordinal() : ordinal(); + for (int i = 0; i < rotations; i++) + top = DirectionHelper.rotateAround(top, axis); + return top; + } + +} diff --git a/src/main/resources/assets/create/models/block/copper_pipe/block_end.json b/src/main/resources/assets/create/models/block/copper_pipe/block_end.json new file mode 100644 index 000000000..8b319b7d5 --- /dev/null +++ b/src/main/resources/assets/create/models/block/copper_pipe/block_end.json @@ -0,0 +1,19 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/copper_pipe", + "particle": "create:block/copper_pipe" + }, + "elements": [ + { + "from": [4, 12, 4], + "to": [12, 16, 12], + "faces": { + "north": {"uv": [0, 6, 4, 8], "rotation": 0, "texture": "#0"}, + "east": {"uv": [0, 6, 4, 8], "rotation": 0, "texture": "#0"}, + "south": {"uv": [0, 6, 4, 8], "rotation": 0, "texture": "#0"}, + "west": {"uv": [0, 6, 4, 8], "rotation": 0, "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/copper_pipe/casing.json b/src/main/resources/assets/create/models/block/copper_pipe/casing.json new file mode 100644 index 000000000..2b2b05b51 --- /dev/null +++ b/src/main/resources/assets/create/models/block/copper_pipe/casing.json @@ -0,0 +1,21 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/copper_pipe", + "particle": "create:block/copper_pipe" + }, + "elements": [ + { + "from": [2, 2, 2], + "to": [14, 14, 14], + "faces": { + "north": {"uv": [0, 0, 6, 6], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 6], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 6], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 6], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 6], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 6], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/copper_pipe/core_x.json b/src/main/resources/assets/create/models/block/copper_pipe/core_x.json new file mode 100644 index 000000000..a26b7b81a --- /dev/null +++ b/src/main/resources/assets/create/models/block/copper_pipe/core_x.json @@ -0,0 +1,17 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/copper_pipe", + "particle": "create:block/copper_pipe" + }, + "elements": [ + { + "from": [4, 4, 4], + "to": [12, 12, 12], + "faces": { + "east": {"uv": [1, 1, 5, 5], "rotation": 180, "texture": "#0"}, + "west": {"uv": [1, 1, 5, 5], "rotation": 180, "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/copper_pipe/core_y.json b/src/main/resources/assets/create/models/block/copper_pipe/core_y.json new file mode 100644 index 000000000..0bc031c0f --- /dev/null +++ b/src/main/resources/assets/create/models/block/copper_pipe/core_y.json @@ -0,0 +1,17 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/copper_pipe", + "particle": "create:block/copper_pipe" + }, + "elements": [ + { + "from": [4, 4, 4], + "to": [12, 12, 12], + "faces": { + "up": {"uv": [1, 1, 5, 5], "rotation": 180, "texture": "#0"}, + "down": {"uv": [1, 1, 5, 5], "rotation": 180, "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/copper_pipe/core_z.json b/src/main/resources/assets/create/models/block/copper_pipe/core_z.json new file mode 100644 index 000000000..2c422241b --- /dev/null +++ b/src/main/resources/assets/create/models/block/copper_pipe/core_z.json @@ -0,0 +1,17 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/copper_pipe", + "particle": "create:block/copper_pipe" + }, + "elements": [ + { + "from": [4, 4, 4], + "to": [12, 12, 12], + "faces": { + "north": {"uv": [1, 1, 5, 5], "rotation": 180, "texture": "#0"}, + "south": {"uv": [1, 1, 5, 5], "rotation": 180, "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/copper_pipe/item.json b/src/main/resources/assets/create/models/block/copper_pipe/item.json new file mode 100644 index 000000000..67858427e --- /dev/null +++ b/src/main/resources/assets/create/models/block/copper_pipe/item.json @@ -0,0 +1,70 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "1": "create:block/copper_pipe", + "particle": "create:block/copper_pipe" + }, + "elements": [ + { + "from": [4, 4, 4], + "to": [12, 12, 12], + "faces": { + "north": {"uv": [4, 12, 8, 16], "rotation": 180, "texture": "#1"}, + "east": {"uv": [4, 12, 8, 16], "rotation": 180, "texture": "#1"}, + "south": {"uv": [4, 12, 8, 16], "rotation": 180, "texture": "#1"}, + "west": {"uv": [4, 12, 8, 16], "rotation": 180, "texture": "#1"}, + "up": {"uv": [4, 12, 8, 16], "rotation": 180, "texture": "#1"}, + "down": {"uv": [4, 12, 8, 16], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [0, 4, 4], + "to": [4, 12, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 8, 8]}, + "faces": { + "north": {"uv": [0, 8, 4, 6], "rotation": 270, "texture": "#1"}, + "south": {"uv": [0, 8, 4, 6], "rotation": 90, "texture": "#1"}, + "up": {"uv": [0, 8, 4, 6], "rotation": 90, "texture": "#1"}, + "down": {"uv": [0, 8, 4, 6], "rotation": 270, "texture": "#1"} + } + }, + { + "from": [12, 4, 4], + "to": [16, 12, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [16, 8, 8]}, + "faces": { + "north": {"uv": [0, 6, 4, 8], "rotation": 270, "texture": "#1"}, + "south": {"uv": [0, 6, 4, 8], "rotation": 90, "texture": "#1"}, + "up": {"uv": [0, 6, 4, 8], "rotation": 90, "texture": "#1"}, + "down": {"uv": [0, 6, 4, 8], "rotation": 270, "texture": "#1"} + } + }, + { + "from": [0, 3, 3], + "to": [2, 13, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 8, 8]}, + "faces": { + "north": {"uv": [6, 6, 11, 5], "rotation": 90, "texture": "#1"}, + "east": {"uv": [6, 0, 11, 5], "rotation": 180, "texture": "#1"}, + "south": {"uv": [6, 6, 11, 5], "rotation": 90, "texture": "#1"}, + "west": {"uv": [6, 0, 11, 5], "rotation": 180, "texture": "#1"}, + "up": {"uv": [6, 6, 11, 5], "rotation": 90, "texture": "#1"}, + "down": {"uv": [6, 6, 11, 5], "rotation": 90, "texture": "#1"} + } + }, + { + "from": [14, 3, 3], + "to": [16, 13, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [16, 8, 8]}, + "faces": { + "north": {"uv": [6, 5, 11, 6], "rotation": 90, "texture": "#1"}, + "east": {"uv": [11, 0, 6, 5], "rotation": 180, "texture": "#1"}, + "south": {"uv": [6, 5, 11, 6], "rotation": 90, "texture": "#1"}, + "west": {"uv": [11, 0, 6, 5], "rotation": 180, "texture": "#1"}, + "up": {"uv": [6, 5, 11, 6], "rotation": 90, "texture": "#1"}, + "down": {"uv": [6, 5, 11, 6], "rotation": 90, "texture": "#1"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/copper_pipe/rim/down.json b/src/main/resources/assets/create/models/block/copper_pipe/rim/down.json new file mode 100644 index 000000000..71814a99c --- /dev/null +++ b/src/main/resources/assets/create/models/block/copper_pipe/rim/down.json @@ -0,0 +1,21 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/copper_pipe", + "particle": "create:block/copper_pipe" + }, + "elements": [ + { + "from": [3, -1, 3], + "to": [13, 1, 13], + "faces": { + "north": {"uv": [6, 6, 11, 5], "texture": "#0"}, + "east": {"uv": [11, 5, 6, 6], "rotation": 180, "texture": "#0"}, + "south": {"uv": [6, 6, 11, 5], "texture": "#0"}, + "west": {"uv": [11, 5, 6, 6], "rotation": 180, "texture": "#0"}, + "up": {"uv": [11, 0, 6, 5], "rotation": 90, "texture": "#0"}, + "down": {"uv": [11, 0, 6, 5], "rotation": 90, "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/copper_pipe/rim/east.json b/src/main/resources/assets/create/models/block/copper_pipe/rim/east.json new file mode 100644 index 000000000..82d57e3c3 --- /dev/null +++ b/src/main/resources/assets/create/models/block/copper_pipe/rim/east.json @@ -0,0 +1,21 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/copper_pipe", + "particle": "create:block/copper_pipe" + }, + "elements": [ + { + "from": [15, 3, 3], + "to": [17, 13, 13], + "faces": { + "north": {"uv": [6, 6, 11, 5], "rotation": 90, "texture": "#0"}, + "east": {"uv": [11, 0, 6, 5], "texture": "#0"}, + "south": {"uv": [6, 6, 11, 5], "rotation": 270, "texture": "#0"}, + "west": {"uv": [11, 0, 6, 5], "texture": "#0"}, + "up": {"uv": [11, 5, 6, 6], "rotation": 90, "texture": "#0"}, + "down": {"uv": [11, 5, 6, 6], "rotation": 90, "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/copper_pipe/rim/north.json b/src/main/resources/assets/create/models/block/copper_pipe/rim/north.json new file mode 100644 index 000000000..8460a61c1 --- /dev/null +++ b/src/main/resources/assets/create/models/block/copper_pipe/rim/north.json @@ -0,0 +1,22 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/copper_pipe", + "particle": "create:block/copper_pipe" + }, + "elements": [ + { + "from": [3, 3, -1], + "to": [13, 13, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -5]}, + "faces": { + "north": {"uv": [6, 0, 11, 5], "texture": "#0"}, + "east": {"uv": [6, 5, 11, 6], "rotation": 90, "texture": "#0"}, + "south": {"uv": [6, 0, 11, 5], "texture": "#0"}, + "west": {"uv": [6, 5, 11, 6], "rotation": 270, "texture": "#0"}, + "up": {"uv": [6, 5, 11, 6], "texture": "#0"}, + "down": {"uv": [6, 5, 11, 6], "rotation": 180, "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/copper_pipe/rim/south.json b/src/main/resources/assets/create/models/block/copper_pipe/rim/south.json new file mode 100644 index 000000000..195357ade --- /dev/null +++ b/src/main/resources/assets/create/models/block/copper_pipe/rim/south.json @@ -0,0 +1,22 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/copper_pipe", + "particle": "create:block/copper_pipe" + }, + "elements": [ + { + "from": [3, 3, 15], + "to": [13, 13, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 21]}, + "faces": { + "north": {"uv": [6, 0, 11, 5], "texture": "#0"}, + "east": {"uv": [6, 5, 11, 6], "rotation": 270, "texture": "#0"}, + "south": {"uv": [6, 0, 11, 5], "texture": "#0"}, + "west": {"uv": [6, 5, 11, 6], "rotation": 90, "texture": "#0"}, + "up": {"uv": [11, 6, 6, 5], "texture": "#0"}, + "down": {"uv": [11, 6, 6, 5], "rotation": 180, "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/copper_pipe/rim/up.json b/src/main/resources/assets/create/models/block/copper_pipe/rim/up.json new file mode 100644 index 000000000..1ed6f0275 --- /dev/null +++ b/src/main/resources/assets/create/models/block/copper_pipe/rim/up.json @@ -0,0 +1,21 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/copper_pipe", + "particle": "create:block/copper_pipe" + }, + "elements": [ + { + "from": [3, 15, 3], + "to": [13, 17, 13], + "faces": { + "north": {"uv": [6, 5, 11, 6], "texture": "#0"}, + "east": {"uv": [11, 6, 6, 5], "rotation": 180, "texture": "#0"}, + "south": {"uv": [6, 5, 11, 6], "texture": "#0"}, + "west": {"uv": [11, 6, 6, 5], "rotation": 180, "texture": "#0"}, + "up": {"uv": [6, 0, 11, 5], "rotation": 90, "texture": "#0"}, + "down": {"uv": [6, 0, 11, 5], "rotation": 90, "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/copper_pipe/rim/west.json b/src/main/resources/assets/create/models/block/copper_pipe/rim/west.json new file mode 100644 index 000000000..30e90ebf5 --- /dev/null +++ b/src/main/resources/assets/create/models/block/copper_pipe/rim/west.json @@ -0,0 +1,21 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/copper_pipe", + "particle": "create:block/copper_pipe" + }, + "elements": [ + { + "from": [-1, 3, 3], + "to": [1, 13, 13], + "faces": { + "north": {"uv": [6, 5, 11, 6], "rotation": 90, "texture": "#0"}, + "east": {"uv": [6, 0, 11, 5], "texture": "#0"}, + "south": {"uv": [6, 5, 11, 6], "rotation": 270, "texture": "#0"}, + "west": {"uv": [6, 0, 11, 5], "texture": "#0"}, + "up": {"uv": [11, 6, 6, 5], "rotation": 90, "texture": "#0"}, + "down": {"uv": [11, 6, 6, 5], "rotation": 90, "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/copper_pipe.png b/src/main/resources/assets/create/textures/block/copper_pipe.png new file mode 100644 index 0000000000000000000000000000000000000000..1f75479832d88480798a6d285a4eaff7d412dc53 GIT binary patch literal 1852 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WMyDrW(e>JaRrKN^0VYx85h`^7TB42x!L)8I0kq-g!p@e2YE#Vdq#))W+p`z z=Ok7aXLN=5bcgzOh5Pr0`}aqB_e2Ixi1MDA5I7?-Xnu0&+?3$?DWMBe!xpB6FHVnG zoEg3}GhlH>fEmaBIs*<);r|hav?rkaG+?cqfDQR0%@~(!YT}`RGn$vc)r0#4@+trf3 zyDfcxOZuMHj6Llcdpa`rb!P4F%G%eJeV`kNat`(YQSPDMyhD9?hx_u6^yMF%kbh)q z-r;G*M<)~>n^<&kR>`5+rHAK~9hqBxWM0M5`IRRo6`!10e0)LG@dec<7FM5JRC8)^ z?dc_TXMkvFJurAj!C(%7St|~D0`mz&NswRg|B($Cg1@t?0^^Faz$3Dlfr0M;2s36~ z>*Qo$VA|>F;uvD#pE~J(^d$$GI`ciu-cDo>p7fh{)f$$y>hi~uKe~UsQBq{P zW!>K^Q%+8ux?pZdikaASL%zMb4iz zg_*lUn1AJ`s+vnb+WaxXC-2ASSNFE=e{KL0Nt&Pb$he5Pq+5T>_sSoSG_)PNZ+fUm zO%3l&5kDLCeE$1Fw#ZafjY2C;t&LlD{(k)U-Tn2my-#^vaI)IFFZg6=QFmu+FB`XQ zWNET)x?(FI3pM~sWz9jq2dr#@K(0$BRzWe__QD>J23T}$l zc_Y6)XX^3Ks%MqdLS8@Jlc#goMytVG;?mU6r^gv~Y;nEwY#}$V?c*CKn!Zh4llF=K zp-=CmhN>;653Ee&O>F<>wkA!}{#vO9TTI6V{=bXDH%(~sXWGfAZGUb1f&E{82Kx6@ zI7l^Y@Mb@xyzJ9sn+*jTyMBk>`u@|>Fz_JX57x$$il_6AKhI^jZYkWftKpTdmeret zqO-pg-^TCgOFj5+;)hwGA-Pp^-U*(LGu6picWYYo+tx1|@+4XWE*l8!2>Gz?@wTu9 zY%F{S79M)PD^=;e6ibTe%qM>?iNAeinA%g>@^=1Lcg5yCSMxp#E-yMP#`$By_g~I4 zkGekh_;F{ts*slPVwOnNs4u_kB>2`<9ds~LsR$@3ajv_@y+h{02JQn^Qz~<-oYq_0 zsmJMV_PI5sxL+{E*=^c$xor$GZ*Hw!<}IcA#=%i;l3~(<%BE7=_;t5gxwCf!tZ(9+ imUdp6wOb&@;2-nx_!lvI6;>1s;*b3=DjSL74G){)!Z!;8sr;#}J8d-ab#ECIbNmDr5_GmU7l(2Jc`@oSk-&x`t$zB hA|fWO(zp1>X!kYf&BgHSc%TOuJYD@<);T3K0RUO7axMS> literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/copper_pipe_lr.png b/src/main/resources/assets/create/textures/block/copper_pipe_lr.png new file mode 100644 index 0000000000000000000000000000000000000000..3b3b49910434dab86834030c095977bbffa81651 GIT binary patch literal 285 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1SGw4HSYi^#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSL74G){)!Z!;3iKO#}J8d+1``9hYUnq9>2dKC~-!~;-XY+ z!4fI01-xAkSeO_&qvssm{nM#x*5RHnZEwu8-%q~A$iSg!cx+LFjk?0J!xF}tH&YI^ zHeBo|VoOq6Ao1a-*Quo<#f_aybPVTBKAbl@IBV|XInvpI&-eDv|M%Xv({R~VwXMsh zFfFYyY=(MKcI%0sKi=HC`!|G5e8Jz6V@sBCa@c9M eiqCxemjC*XjElTs$Ibv<&*16m=d#Wzp$PzSRdD72 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/copper_pipe_lu.png b/src/main/resources/assets/create/textures/block/copper_pipe_lu.png new file mode 100644 index 0000000000000000000000000000000000000000..49d6fc7912119015139d085b424f79e26e09dce2 GIT binary patch literal 286 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1SGw4HSYi^#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSL74G){)!Z!;AT%3#}J8d)!s_j^6WdN!`p zP`|$N+zdt+olCKs?ktxH%z6CLJp8({0-H{3R%B*!NnlveSqrP@3Hv%Z6?eo1E`9oz z)#2%CMz6$I+xq!e#63HoGoPtJT9%EGXK${3?nLi%m73a1bEa`_T#z93xqkDtvbE;d e{3>={i$Cm{`SQWC4>dsNGkCiCxvX!lvI6;>1s;*b3=DjSL74G){)!Z!;CfFN#}J8d)!x&5O$H*YFPG{DY-r7JT%70g zM`8NE$^Ty}FB4)^ymRf=k(*~D=O|A9{Bncfdp^mfm3+1DyP7UZJlLWANWvm{rb5p~ zrHBi24yXT+GWI+QF867)LT$I~J9Z|i}I{PZIavkpDK(RaY|Y)aZ%-)vE@M5UH5 bdw(mUUSUbUK5ltDnm{r-UW|v@3E; literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/copper_pipe_ru.png b/src/main/resources/assets/create/textures/block/copper_pipe_ru.png new file mode 100644 index 0000000000000000000000000000000000000000..e33c3570aa0a123267b5dbec59ee694c931a9e1a GIT binary patch literal 296 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1SGw4HSYi^#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSL74G){)!Z!;9gG`#}J8d-gCZwhYbWA9&UU*bAp=T!Yxa^ zRaEj0R9di!zpjl?h?>>#DcHO-+q!vr{zp%L8M}L$>Qj@xg`6#YK4<=}lQR@*Bi?*H zc7~x~`|7YrwU!G~OAYN>1gaCaon0W;T{D-PA#z$*$GP~e5@~m)thkc(KVa{>#T=Wr zR;}J|@Bi<+P-RJn#@z3pS(2@nxxC#eUmvBp)biiSYG2ohCTF+4&GEW%-8ufdj74R2 oU1T!lvI6;>1s;*b3=DjSL74G){)!Z!;9O4^#}J8d)jm(5CIbQ2%X1l-f);U~K3vJo z|7>rHVo<_~H{1X0e)qj`se1Al-pj7`upXZUe4$CWRbkW48e($jF$eX%F_&O zP-@Xw%FrS)b7yYledERdj#uaRG^#9RNsD+rtM}p_HhCt8bCPn>Yug=L1+M;VD3o#D zFmtP#%$9AvFQ=zQc?4WGxE=Q}_IcTh)UxBJFZRt1`og+1G&1#NMvWKHp$wj`elF{r G5}E*puVu#o literal 0 HcmV?d00001