From 6e285e2f8bc652840c066fdfea5ae8104ff97e80 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Fri, 25 Sep 2020 17:22:16 +0200 Subject: [PATCH] Valves and Valve handles - Added a straight pipe variant to cut flows using rotational input - Added a slower more precise variant of the hand crank - Basins now render their contained fluids --- src/generated/resources/.cache/cache | 34 +-- .../assets/create/blockstates/fluid_pipe.json | 204 ++++++++-------- .../create/blockstates/fluid_valve.json | 100 ++++++++ .../create/blockstates/radial_chassis.json | 24 +- .../create/blockstates/valve_handle.json | 30 +++ .../resources/assets/create/lang/en_ud.json | 2 + .../resources/assets/create/lang/en_us.json | 2 + .../assets/create/lang/unfinished/de_de.json | 4 +- .../assets/create/lang/unfinished/fr_fr.json | 4 +- .../assets/create/lang/unfinished/it_it.json | 4 +- .../assets/create/lang/unfinished/ja_jp.json | 4 +- .../assets/create/lang/unfinished/ko_kr.json | 4 +- .../assets/create/lang/unfinished/nl_nl.json | 4 +- .../assets/create/lang/unfinished/pt_br.json | 4 +- .../assets/create/lang/unfinished/ru_ru.json | 4 +- .../assets/create/lang/unfinished/zh_cn.json | 4 +- .../create/models/item/fluid_valve.json | 3 + .../create/models/item/valve_handle.json | 3 + .../loot_tables/blocks/fluid_valve.json | 19 ++ .../loot_tables/blocks/valve_handle.json | 19 ++ .../data/create/tags/blocks/brittle.json | 1 + .../com/simibubi/create/AllBlockPartials.java | 24 +- .../java/com/simibubi/create/AllBlocks.java | 20 ++ .../java/com/simibubi/create/AllShapes.java | 4 + .../com/simibubi/create/AllTileEntities.java | 10 +- .../base/DirectionalAxisKineticBlock.java | 66 +++--- .../components/actors/DrillRenderer.java | 4 +- .../PortableStorageInterfaceTileEntity.java | 9 + .../components/clock/CuckooClockRenderer.java | 2 +- .../components/crank/HandCrankBlock.java | 12 + .../components/crank/HandCrankRenderer.java | 14 +- .../components/crank/HandCrankTileEntity.java | 8 +- .../components/crank/ValveHandleBlock.java | 36 +++ .../components/fan/EncasedFanRenderer.java | 4 +- .../components/flywheel/FlywheelRenderer.java | 2 +- .../motor/CreativeMotorRenderer.java | 2 +- .../components/saw/SawRenderer.java | 2 +- .../bearing/BearingRenderer.java | 2 +- .../pulley/PulleyRenderer.java | 2 +- .../contraptions/fluids/FluidNetwork.java | 7 +- .../contraptions/fluids/FluidNetworkFlow.java | 2 + .../contraptions/fluids/FluidPropagator.java | 1 + .../contraptions/fluids/PumpRenderer.java | 4 +- .../fluids/actors/SpoutTileEntity.java | 6 +- .../fluids/pipes/FluidValveBlock.java | 73 ++++++ .../fluids/pipes/FluidValveRenderer.java | 60 +++++ .../fluids/pipes/FluidValveTileEntity.java | 128 ++++++++++ .../fluids/pipes/GlassFluidPipeBlock.java | 11 +- .../fluids/pipes/StraightPipeTileEntity.java | 4 + .../processing/BasinRenderer.java | 61 +++++ .../processing/BasinTileEntity.java | 1 + .../relays/encased/SplitShaftRenderer.java | 2 +- .../relays/gearbox/GearboxRenderer.java | 2 +- .../fluid/SmartFluidTankBehaviour.java | 8 +- .../foundation/utility/DirectionHelper.java | 6 + .../models/block/deployer/vertical.json | 3 +- .../models/block/fluid_pipe/window.json | 62 +++-- .../fluid_valve/block_horizontal_closed.json | 44 ++++ .../fluid_valve/block_horizontal_open.json | 44 ++++ .../fluid_valve/block_vertical_closed.json | 44 ++++ .../fluid_valve/block_vertical_open.json | 44 ++++ .../create/models/block/fluid_valve/item.json | 201 ++++++++++++++++ .../models/block/fluid_valve/pointer.json | 95 ++++++++ .../create/models/block/valve_handle.json | 222 ++++++++++++++++++ .../create/textures/block/fluid_pipe.png | Bin 1356 -> 669 bytes .../create/textures/block/fluid_valve.png | Bin 0 -> 696 bytes .../textures/block/glass_fluid_pipe.png | Bin 499 -> 330 bytes 67 files changed, 1612 insertions(+), 223 deletions(-) create mode 100644 src/generated/resources/assets/create/blockstates/fluid_valve.json create mode 100644 src/generated/resources/assets/create/blockstates/valve_handle.json create mode 100644 src/generated/resources/assets/create/models/item/fluid_valve.json create mode 100644 src/generated/resources/assets/create/models/item/valve_handle.json create mode 100644 src/generated/resources/data/create/loot_tables/blocks/fluid_valve.json create mode 100644 src/generated/resources/data/create/loot_tables/blocks/valve_handle.json create mode 100644 src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java create mode 100644 src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveBlock.java create mode 100644 src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveRenderer.java create mode 100644 src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveTileEntity.java create mode 100644 src/main/resources/assets/create/models/block/fluid_valve/block_horizontal_closed.json create mode 100644 src/main/resources/assets/create/models/block/fluid_valve/block_horizontal_open.json create mode 100644 src/main/resources/assets/create/models/block/fluid_valve/block_vertical_closed.json create mode 100644 src/main/resources/assets/create/models/block/fluid_valve/block_vertical_open.json create mode 100644 src/main/resources/assets/create/models/block/fluid_valve/item.json create mode 100644 src/main/resources/assets/create/models/block/fluid_valve/pointer.json create mode 100644 src/main/resources/assets/create/models/block/valve_handle.json create mode 100644 src/main/resources/assets/create/textures/block/fluid_valve.png diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 36b412ed4..4e96a6802 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -127,8 +127,9 @@ de8a40b7daf1497d5aecee47a43b3e0b1d030b00 assets/create/blockstates/fancy_scoria_ fc9ac0a7e7191b93516719455a17177fa6524ecc assets/create/blockstates/fancy_weathered_limestone_bricks_slab.json b2a7c321b1795f20e7433f81a55ce4683de081b8 assets/create/blockstates/fancy_weathered_limestone_bricks_stairs.json 6372fe02ba0065acb0758121c45a15a1a8fdc5de assets/create/blockstates/fancy_weathered_limestone_bricks_wall.json -fe9169716dd21a81a3710a89f0a9b7ea4dcd4d51 assets/create/blockstates/fluid_pipe.json +4c3e0500f9382d2e426e823fe876f57f4d7ee3b4 assets/create/blockstates/fluid_pipe.json f0eaab18e16c4f3f65ebf3b55b08f0dc445720fe assets/create/blockstates/fluid_tank.json +5408d92ab02af86539ac42971d4033545970bb3a assets/create/blockstates/fluid_valve.json e9da1794b6ece7f9aa8bcb43d42c23a55446133b assets/create/blockstates/flywheel.json ac00d40e1ef50a37041c0481afa1a23a14dea78e assets/create/blockstates/framed_glass.json 61df7769fa61f6dd2868a4377e54320fdd473b4e assets/create/blockstates/framed_glass_pane.json @@ -297,7 +298,7 @@ e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets/create/blockstates/powered_toggl 3a739f9d4276828d83f2d2750bf3227c87bcd438 assets/create/blockstates/pulley_magnet.json 469e430d96cb0a5e1aaf6b7cc5d401d488c9e600 assets/create/blockstates/pulse_repeater.json 92957119abd5fbcca36a113b2a80255fd70fc303 assets/create/blockstates/purple_seat.json -8d7e653bfd9846e684a0d3725595714a19201017 assets/create/blockstates/radial_chassis.json +89b63c6e5875da07226854651079bcea85439f5b assets/create/blockstates/radial_chassis.json da1b08387af7afa0855ee8d040f620c01f20660a assets/create/blockstates/red_seat.json 8929677f2cc5354aa19ef182af69f9f0b41eb242 assets/create/blockstates/redstone_contact.json c29213b77ac0c78d8979c5f6188d2b265696f9b9 assets/create/blockstates/redstone_link.json @@ -332,6 +333,7 @@ e815bfd854c2653f10828bb11950f7fb991d7efc assets/create/blockstates/stressometer. 8b0c2c7ac72529565b3339aa8df7565858100afa assets/create/blockstates/tiled_glass.json a2454400b1cf9889f70aebdc89c52a1be25f543c assets/create/blockstates/tiled_glass_pane.json a8094531617e27a545c4815ab2062bf0ffca3633 assets/create/blockstates/turntable.json +c9b34d2c455b5fb60bffd19adff1ca4387bc566a assets/create/blockstates/valve_handle.json 69dfe8afaa8eb6105dae9f76ab8b7847bf90b8c6 assets/create/blockstates/vertical_framed_glass.json c4db76b9d36cfb098df0d158cb6f8b82768ebe14 assets/create/blockstates/vertical_framed_glass_pane.json d995547bcd71603ba7378d8998098e462030bfd0 assets/create/blockstates/water_wheel.json @@ -349,17 +351,17 @@ c77b46d8b459e5c7cc495393546f3fcca8a1fa1d assets/create/blockstates/weathered_lim a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json -5e8bf32d45aae9207aa4063803d073dda12fefc9 assets/create/lang/en_ud.json -a623a699b4b15b1793846f2981f5ddfcf5f70eaa assets/create/lang/en_us.json -20b98763fcc45b49d4f08c0567de1305ae2ca08b assets/create/lang/unfinished/de_de.json -49356dba136af4ba87c61adcec8a5e86ffed0d19 assets/create/lang/unfinished/fr_fr.json -7aeadfee8cf3f5037a892d20dc5ed5a73015822d assets/create/lang/unfinished/it_it.json -da24efa68279d5bd95c55210cc5ecb46f7b28550 assets/create/lang/unfinished/ja_jp.json -e391370d913d9ea71b061ead791e335c5fd5abe1 assets/create/lang/unfinished/ko_kr.json -920688bd6cfdbb4a3f3a35700868b5639f10bf2a assets/create/lang/unfinished/nl_nl.json -d57b0279090380d35f6f56a34864114b210d815c assets/create/lang/unfinished/pt_br.json -4f957b1130d5f2ae953d687d754417de0f62fd61 assets/create/lang/unfinished/ru_ru.json -c2198b6cee5fdba4049fd2166f6382e5bbaf6581 assets/create/lang/unfinished/zh_cn.json +e7a5a4320a332f5ed4341d3c08dd50a2e945d8bb assets/create/lang/en_ud.json +040cb0a702643a865f30bae9eeacaeaa94bbce7d assets/create/lang/en_us.json +5c6ce1933165fecd71fbdf67cb8de955368d1bfc assets/create/lang/unfinished/de_de.json +b8c3464b86dd7a934d3beec6c005e4799cbdf7af assets/create/lang/unfinished/fr_fr.json +c91eb4509e5afe6f288ed737f407914ae983480a assets/create/lang/unfinished/it_it.json +16fb593c1179f58811153b2f7c7cffb55615587f assets/create/lang/unfinished/ja_jp.json +4d975de4cd34e10e7156fe35a0e5f4e40650aa69 assets/create/lang/unfinished/ko_kr.json +f98f523352796c3496c27085182118bbd597a7ad assets/create/lang/unfinished/nl_nl.json +714e68af6c0f614d069ff0b31763bced1f968437 assets/create/lang/unfinished/pt_br.json +a18338a37536490b2f7b6a8836add3e133b16920 assets/create/lang/unfinished/ru_ru.json +e7ad3d9140bb94d5aa2720b651d8bf1308ad0da4 assets/create/lang/unfinished/zh_cn.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 @@ -1136,6 +1138,7 @@ ce6ee1fe4a92e26af75c2eaebd5055efdbdff169 assets/create/models/item/fancy_scoria_ 7bdb3d8a59586654df0c2a84d73a346b898d247b assets/create/models/item/fancy_weathered_limestone_bricks_wall.json e5e6fb6eb182b85b977e1025a7fe84d46de59320 assets/create/models/item/fluid_pipe.json e7d2097256fed545064a37d233e7b810b04c26a4 assets/create/models/item/fluid_tank.json +f4727119b75ab632c3ad295be4d398b1919d782f assets/create/models/item/fluid_valve.json 8707332c0cb6ee123e7962d08536a60725c64ce8 assets/create/models/item/flywheel.json d62b93d3c274d280f3eec22a28b5175943411d25 assets/create/models/item/framed_glass.json 1041d462c6e856f7f3f2365c299c0599703d1ed7 assets/create/models/item/framed_glass_pane.json @@ -1356,6 +1359,7 @@ b1d3d00ff05908feacad06a86800da96cc9bc65d assets/create/models/item/tiled_glass.j 8a2a81a8cbc52b6021e57107d79a32f73b82d8fe assets/create/models/item/tiled_glass_pane.json c081317f106a2b04700aafde12c57445844c20ab assets/create/models/item/tree_fertilizer.json fb24881c4e92bbb7ffa54a71e0af6b1c66d84829 assets/create/models/item/turntable.json +ee706dcb209ad93f12a1cc4c3c502aa24153c82b assets/create/models/item/valve_handle.json 32f49b724af10c8d7e2ed5a3c82280e83b75f789 assets/create/models/item/vertical_framed_glass.json 5e331da9d4086412f5722923e3008246ed286a00 assets/create/models/item/vertical_framed_glass_pane.json 00c2929de9b7171656bea74e1a6d694c6a45b075 assets/create/models/item/vertical_gearbox.json @@ -2103,6 +2107,7 @@ e4d0fe35d3441a5815bd4e1357329b284e63ecd8 data/create/loot_tables/blocks/fancy_we 6bb505bad78cbb01a5cb5a069435bf4ed0e62adf data/create/loot_tables/blocks/fancy_weathered_limestone_bricks_wall.json c8aa9bbed8fd703eb1853de0b7c9e04dffb7a511 data/create/loot_tables/blocks/fluid_pipe.json 108d27b697d2ea0719d74a704c6e344a8d63375b data/create/loot_tables/blocks/fluid_tank.json +40dbf1f193787f3c6437de8c0a828ba4e37f10fc data/create/loot_tables/blocks/fluid_valve.json f37526c092c645045c22674dea6c7b1ec503c9c3 data/create/loot_tables/blocks/flywheel.json ce0bb978b11935bc2d1218445f8ab18099af6b8a data/create/loot_tables/blocks/framed_glass.json 89bd90ecd7a1ce1f75bd873989cc58a84c8dcef9 data/create/loot_tables/blocks/framed_glass_pane.json @@ -2306,6 +2311,7 @@ ec2889e712702644092197a4b41a682fb953817d data/create/loot_tables/blocks/stockpil 05e843ca6eb5e299bf41de123977a1045c120ad4 data/create/loot_tables/blocks/tiled_glass.json e999969f05d2625e61757aa82092d232b99f6e0a data/create/loot_tables/blocks/tiled_glass_pane.json 7b66ad2c48449bafd0cdbd086ac41218cb73a814 data/create/loot_tables/blocks/turntable.json +4192595ca6a8e0845a871dc8f99724185e1e955c data/create/loot_tables/blocks/valve_handle.json 028e293b5cd694017962f67dc80dba719f904e28 data/create/loot_tables/blocks/vertical_framed_glass.json d0156602dd5f4a274c293df67e19374820c72890 data/create/loot_tables/blocks/vertical_framed_glass_pane.json 2883c63ceb1273009dbf91cb0693756cadf79a1a data/create/loot_tables/blocks/water_wheel.json @@ -3020,7 +3026,7 @@ d3fdb8ece6cb072a93ddb64a0baad5ac952117a4 data/create/recipes/weathered_limestone 0f3c993eb6dd3f37953f304b8fad15bf60469ef4 data/create/recipes/weathered_limestone_cobblestone_wall_from_weathered_limestone_cobblestone_stonecutting.json 6eceb25fabbb6b389ca35de3b829ad061c9c456a data/create/recipes/weathered_limestone_pillar.json 11667414f73bc2d00bda7c5c1a7d2934bf6e9165 data/create/recipes/weathered_limestone_pillar_from_weathered_limestone_stonecutting.json -10bed57f3eb989a643eb3609f177e30536f07965 data/create/tags/blocks/brittle.json +c8e33479d80b6dbd23bded9ce15d1b08841819bb data/create/tags/blocks/brittle.json 246ee2ec4e778e38a362f319506564886d4e0e76 data/create/tags/blocks/fan_heaters.json 798ef82869dbe22682121504a372e95607a785dc data/create/tags/blocks/fan_transparent.json 6cdeeac1689f7b5bfd9bc40b462143d8eaf3ad0b data/create/tags/blocks/seats.json diff --git a/src/generated/resources/assets/create/blockstates/fluid_pipe.json b/src/generated/resources/assets/create/blockstates/fluid_pipe.json index 3b646b920..581373307 100644 --- a/src/generated/resources/assets/create/blockstates/fluid_pipe.json +++ b/src/generated/resources/assets/create/blockstates/fluid_pipe.json @@ -60,10 +60,10 @@ }, { "when": { - "down": "false", - "north": "true", + "south": "false", "up": "true", - "south": "false" + "down": "false", + "north": "true" }, "apply": { "model": "create:block/fluid_pipe/lu_x" @@ -71,10 +71,10 @@ }, { "when": { - "down": "false", - "north": "false", + "south": "true", "up": "true", - "south": "true" + "down": "false", + "north": "false" }, "apply": { "model": "create:block/fluid_pipe/ru_x" @@ -82,10 +82,10 @@ }, { "when": { - "down": "true", - "north": "true", + "south": "false", "up": "false", - "south": "false" + "down": "true", + "north": "true" }, "apply": { "model": "create:block/fluid_pipe/ld_x" @@ -93,10 +93,10 @@ }, { "when": { - "down": "true", - "north": "false", + "south": "true", "up": "false", - "south": "true" + "down": "true", + "north": "false" }, "apply": { "model": "create:block/fluid_pipe/rd_x" @@ -104,32 +104,10 @@ }, { "when": { - "down": "true", - "north": "false", + "south": "false", "up": "true", - "south": "false" - }, - "apply": { - "model": "create:block/fluid_pipe/ud_x" - } - }, - { - "when": { - "down": "false", - "north": "false", - "up": "true", - "south": "false" - }, - "apply": { - "model": "create:block/fluid_pipe/ud_x" - } - }, - { - "when": { "down": "true", - "north": "false", - "up": "false", - "south": "false" + "north": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_x" @@ -137,10 +115,32 @@ }, { "when": { + "south": "false", + "up": "true", "down": "false", - "north": "true", + "north": "false" + }, + "apply": { + "model": "create:block/fluid_pipe/ud_x" + } + }, + { + "when": { + "south": "false", "up": "false", - "south": "true" + "down": "true", + "north": "false" + }, + "apply": { + "model": "create:block/fluid_pipe/ud_x" + } + }, + { + "when": { + "south": "true", + "up": "false", + "down": "false", + "north": "true" }, "apply": { "model": "create:block/fluid_pipe/lr_x" @@ -148,10 +148,10 @@ }, { "when": { - "down": "false", - "north": "true", + "south": "false", "up": "false", - "south": "false" + "down": "false", + "north": "true" }, "apply": { "model": "create:block/fluid_pipe/lr_x" @@ -159,10 +159,10 @@ }, { "when": { - "down": "false", - "north": "false", + "south": "true", "up": "false", - "south": "true" + "down": "false", + "north": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_x" @@ -170,10 +170,10 @@ }, { "when": { - "down": "false", - "north": "false", + "south": "false", "up": "false", - "south": "false" + "down": "false", + "north": "false" }, "apply": { "model": "create:block/fluid_pipe/none_x" @@ -181,10 +181,10 @@ }, { "when": { + "south": "true", "west": "true", - "east": "false", "north": "false", - "south": "true" + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/lu_y" @@ -192,10 +192,10 @@ }, { "when": { + "south": "true", "west": "false", - "east": "true", "north": "false", - "south": "true" + "east": "true" }, "apply": { "model": "create:block/fluid_pipe/ru_y" @@ -203,10 +203,10 @@ }, { "when": { + "south": "false", "west": "true", - "east": "false", "north": "true", - "south": "false" + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/ld_y" @@ -214,10 +214,10 @@ }, { "when": { + "south": "false", "west": "false", - "east": "true", "north": "true", - "south": "false" + "east": "true" }, "apply": { "model": "create:block/fluid_pipe/rd_y" @@ -225,10 +225,10 @@ }, { "when": { + "south": "true", "west": "false", - "east": "false", "north": "true", - "south": "true" + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_y" @@ -236,10 +236,10 @@ }, { "when": { + "south": "true", "west": "false", - "east": "false", "north": "false", - "south": "true" + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_y" @@ -247,10 +247,10 @@ }, { "when": { + "south": "false", "west": "false", - "east": "false", "north": "true", - "south": "false" + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_y" @@ -258,10 +258,10 @@ }, { "when": { + "south": "false", "west": "true", - "east": "true", "north": "false", - "south": "false" + "east": "true" }, "apply": { "model": "create:block/fluid_pipe/lr_y" @@ -269,10 +269,10 @@ }, { "when": { + "south": "false", "west": "true", - "east": "false", "north": "false", - "south": "false" + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_y" @@ -280,10 +280,10 @@ }, { "when": { + "south": "false", "west": "false", - "east": "true", "north": "false", - "south": "false" + "east": "true" }, "apply": { "model": "create:block/fluid_pipe/lr_y" @@ -291,10 +291,10 @@ }, { "when": { + "south": "false", "west": "false", - "east": "false", "north": "false", - "south": "false" + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/none_y" @@ -302,10 +302,10 @@ }, { "when": { - "west": "false", - "east": "true", + "up": "true", "down": "false", - "up": "true" + "west": "false", + "east": "true" }, "apply": { "model": "create:block/fluid_pipe/lu_z" @@ -313,10 +313,10 @@ }, { "when": { - "west": "true", - "east": "false", + "up": "true", "down": "false", - "up": "true" + "west": "true", + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/ru_z" @@ -324,10 +324,10 @@ }, { "when": { - "west": "false", - "east": "true", + "up": "false", "down": "true", - "up": "false" + "west": "false", + "east": "true" }, "apply": { "model": "create:block/fluid_pipe/ld_z" @@ -335,10 +335,10 @@ }, { "when": { - "west": "true", - "east": "false", + "up": "false", "down": "true", - "up": "false" + "west": "true", + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/rd_z" @@ -346,10 +346,10 @@ }, { "when": { - "west": "false", - "east": "false", + "up": "true", "down": "true", - "up": "true" + "west": "false", + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_z" @@ -357,10 +357,10 @@ }, { "when": { - "west": "false", - "east": "false", + "up": "true", "down": "false", - "up": "true" + "west": "false", + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_z" @@ -368,10 +368,10 @@ }, { "when": { - "west": "false", - "east": "false", + "up": "false", "down": "true", - "up": "false" + "west": "false", + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_z" @@ -379,10 +379,10 @@ }, { "when": { + "up": "false", + "down": "false", "west": "true", - "east": "true", - "down": "false", - "up": "false" + "east": "true" }, "apply": { "model": "create:block/fluid_pipe/lr_z" @@ -390,10 +390,10 @@ }, { "when": { + "up": "false", + "down": "false", "west": "false", - "east": "true", - "down": "false", - "up": "false" + "east": "true" }, "apply": { "model": "create:block/fluid_pipe/lr_z" @@ -401,10 +401,10 @@ }, { "when": { + "up": "false", + "down": "false", "west": "true", - "east": "false", - "down": "false", - "up": "false" + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_z" @@ -412,10 +412,10 @@ }, { "when": { - "west": "false", - "east": "false", + "up": "false", "down": "false", - "up": "false" + "west": "false", + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/none_z" diff --git a/src/generated/resources/assets/create/blockstates/fluid_valve.json b/src/generated/resources/assets/create/blockstates/fluid_valve.json new file mode 100644 index 000000000..41d048d24 --- /dev/null +++ b/src/generated/resources/assets/create/blockstates/fluid_valve.json @@ -0,0 +1,100 @@ +{ + "variants": { + "axis_along_first=false,enabled=false,facing=down": { + "model": "create:block/fluid_valve/block_horizontal_closed", + "x": 270, + "y": 90 + }, + "axis_along_first=true,enabled=false,facing=down": { + "model": "create:block/fluid_valve/block_horizontal_closed", + "x": 270 + }, + "axis_along_first=false,enabled=true,facing=down": { + "model": "create:block/fluid_valve/block_horizontal_open", + "x": 270, + "y": 90 + }, + "axis_along_first=true,enabled=true,facing=down": { + "model": "create:block/fluid_valve/block_horizontal_open", + "x": 270 + }, + "axis_along_first=false,enabled=false,facing=up": { + "model": "create:block/fluid_valve/block_horizontal_closed", + "x": 90, + "y": 90 + }, + "axis_along_first=true,enabled=false,facing=up": { + "model": "create:block/fluid_valve/block_horizontal_closed", + "x": 90 + }, + "axis_along_first=false,enabled=true,facing=up": { + "model": "create:block/fluid_valve/block_horizontal_open", + "x": 90, + "y": 90 + }, + "axis_along_first=true,enabled=true,facing=up": { + "model": "create:block/fluid_valve/block_horizontal_open", + "x": 90 + }, + "axis_along_first=false,enabled=false,facing=north": { + "model": "create:block/fluid_valve/block_vertical_closed", + "y": 180 + }, + "axis_along_first=true,enabled=false,facing=north": { + "model": "create:block/fluid_valve/block_horizontal_closed", + "y": 180 + }, + "axis_along_first=false,enabled=true,facing=north": { + "model": "create:block/fluid_valve/block_vertical_open", + "y": 180 + }, + "axis_along_first=true,enabled=true,facing=north": { + "model": "create:block/fluid_valve/block_horizontal_open", + "y": 180 + }, + "axis_along_first=false,enabled=false,facing=south": { + "model": "create:block/fluid_valve/block_vertical_closed" + }, + "axis_along_first=true,enabled=false,facing=south": { + "model": "create:block/fluid_valve/block_horizontal_closed" + }, + "axis_along_first=false,enabled=true,facing=south": { + "model": "create:block/fluid_valve/block_vertical_open" + }, + "axis_along_first=true,enabled=true,facing=south": { + "model": "create:block/fluid_valve/block_horizontal_open" + }, + "axis_along_first=false,enabled=false,facing=west": { + "model": "create:block/fluid_valve/block_horizontal_closed", + "y": 90 + }, + "axis_along_first=true,enabled=false,facing=west": { + "model": "create:block/fluid_valve/block_vertical_closed", + "y": 90 + }, + "axis_along_first=false,enabled=true,facing=west": { + "model": "create:block/fluid_valve/block_horizontal_open", + "y": 90 + }, + "axis_along_first=true,enabled=true,facing=west": { + "model": "create:block/fluid_valve/block_vertical_open", + "y": 90 + }, + "axis_along_first=false,enabled=false,facing=east": { + "model": "create:block/fluid_valve/block_horizontal_closed", + "y": 270 + }, + "axis_along_first=true,enabled=false,facing=east": { + "model": "create:block/fluid_valve/block_vertical_closed", + "y": 270 + }, + "axis_along_first=false,enabled=true,facing=east": { + "model": "create:block/fluid_valve/block_horizontal_open", + "y": 270 + }, + "axis_along_first=true,enabled=true,facing=east": { + "model": "create:block/fluid_valve/block_vertical_open", + "y": 270 + } + } +} \ 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 9d00ea8b1..d60327a8a 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/blockstates/valve_handle.json b/src/generated/resources/assets/create/blockstates/valve_handle.json new file mode 100644 index 000000000..d3333b2e6 --- /dev/null +++ b/src/generated/resources/assets/create/blockstates/valve_handle.json @@ -0,0 +1,30 @@ +{ + "variants": { + "facing=down": { + "model": "create:block/valve_handle", + "x": 180 + }, + "facing=up": { + "model": "create:block/valve_handle" + }, + "facing=north": { + "model": "create:block/valve_handle", + "x": 90 + }, + "facing=south": { + "model": "create:block/valve_handle", + "x": 90, + "y": 180 + }, + "facing=west": { + "model": "create:block/valve_handle", + "x": 90, + "y": 270 + }, + "facing=east": { + "model": "create:block/valve_handle", + "x": 90, + "y": 90 + } + } +} \ 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 720fa1360..b30104b36 100644 --- a/src/generated/resources/assets/create/lang/en_ud.json +++ b/src/generated/resources/assets/create/lang/en_ud.json @@ -130,6 +130,7 @@ "block.create.fancy_weathered_limestone_bricks_wall": "\u05DF\u05DF\u0250M s\u029E\u0254\u0131\u0279\u15FA \u01DDuo\u0287s\u01DD\u026F\u0131\uA780 p\u01DD\u0279\u01DD\u0265\u0287\u0250\u01DDM \u028E\u0254u\u0250\u2132", "block.create.fluid_pipe": "\u01DDd\u0131\u0500 p\u0131n\u05DF\u2132", "block.create.fluid_tank": "\u029Eu\u0250\u27D8 p\u0131n\u05DF\u2132", + "block.create.fluid_valve": "\u01DD\u028C\u05DF\u0250\u039B p\u0131n\u05DF\u2132", "block.create.flywheel": "\u05DF\u01DD\u01DD\u0265\u028D\u028E\u05DF\u2132", "block.create.framed_glass": "ss\u0250\u05DF\u2141 p\u01DD\u026F\u0250\u0279\u2132", "block.create.framed_glass_pane": "\u01DDu\u0250\u0500 ss\u0250\u05DF\u2141 p\u01DD\u026F\u0250\u0279\u2132", @@ -333,6 +334,7 @@ "block.create.tiled_glass": "ss\u0250\u05DF\u2141 p\u01DD\u05DF\u0131\u27D8", "block.create.tiled_glass_pane": "\u01DDu\u0250\u0500 ss\u0250\u05DF\u2141 p\u01DD\u05DF\u0131\u27D8", "block.create.turntable": "\u01DD\u05DFq\u0250\u0287u\u0279n\u27D8", + "block.create.valve_handle": "\u01DD\u05DFpu\u0250H \u01DD\u028C\u05DF\u0250\u039B", "block.create.vertical_framed_glass": "ss\u0250\u05DF\u2141 p\u01DD\u026F\u0250\u0279\u2132 \u05DF\u0250\u0254\u0131\u0287\u0279\u01DD\u039B", "block.create.vertical_framed_glass_pane": "\u01DDu\u0250\u0500 ss\u0250\u05DF\u2141 p\u01DD\u026F\u0250\u0279\u2132 \u05DF\u0250\u0254\u0131\u0287\u0279\u01DD\u039B", "block.create.water_wheel": "\u05DF\u01DD\u01DD\u0265M \u0279\u01DD\u0287\u0250M", diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index 7e02b0a84..1daf3530c 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -133,6 +133,7 @@ "block.create.fancy_weathered_limestone_bricks_wall": "Fancy Weathered Limestone Bricks Wall", "block.create.fluid_pipe": "Fluid Pipe", "block.create.fluid_tank": "Fluid Tank", + "block.create.fluid_valve": "Fluid Valve", "block.create.flywheel": "Flywheel", "block.create.framed_glass": "Framed Glass", "block.create.framed_glass_pane": "Framed Glass Pane", @@ -336,6 +337,7 @@ "block.create.tiled_glass": "Tiled Glass", "block.create.tiled_glass_pane": "Tiled Glass Pane", "block.create.turntable": "Turntable", + "block.create.valve_handle": "Valve Handle", "block.create.vertical_framed_glass": "Vertical Framed Glass", "block.create.vertical_framed_glass_pane": "Vertical Framed Glass Pane", "block.create.water_wheel": "Water Wheel", 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 09c9e0774..c72d05bb9 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: 805", + "_": "Missing Localizations: 807", "_": "->------------------------] Game Elements [------------------------<-", @@ -134,6 +134,7 @@ "block.create.fancy_weathered_limestone_bricks_wall": "UNLOCALIZED: Fancy Weathered Limestone Bricks Wall", "block.create.fluid_pipe": "UNLOCALIZED: Fluid Pipe", "block.create.fluid_tank": "UNLOCALIZED: Fluid Tank", + "block.create.fluid_valve": "UNLOCALIZED: Fluid Valve", "block.create.flywheel": "UNLOCALIZED: Flywheel", "block.create.framed_glass": "UNLOCALIZED: Framed Glass", "block.create.framed_glass_pane": "UNLOCALIZED: Framed Glass Pane", @@ -337,6 +338,7 @@ "block.create.tiled_glass": "Glasfliesen", "block.create.tiled_glass_pane": "Glasfliesenscheibe", "block.create.turntable": "Drehtisch", + "block.create.valve_handle": "UNLOCALIZED: Valve Handle", "block.create.vertical_framed_glass": "UNLOCALIZED: Vertical Framed Glass", "block.create.vertical_framed_glass_pane": "UNLOCALIZED: Vertical Framed Glass Pane", "block.create.water_wheel": "Wasserrad", 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 0dbeb86da..3420ffb7e 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: 429", + "_": "Missing Localizations: 431", "_": "->------------------------] Game Elements [------------------------<-", @@ -134,6 +134,7 @@ "block.create.fancy_weathered_limestone_bricks_wall": "UNLOCALIZED: Fancy Weathered Limestone Bricks Wall", "block.create.fluid_pipe": "UNLOCALIZED: Fluid Pipe", "block.create.fluid_tank": "UNLOCALIZED: Fluid Tank", + "block.create.fluid_valve": "UNLOCALIZED: Fluid Valve", "block.create.flywheel": "Volant d'inertie", "block.create.framed_glass": "Grande fenêtre en verre", "block.create.framed_glass_pane": "Grande vitre encadrée", @@ -337,6 +338,7 @@ "block.create.tiled_glass": "Verre carrelé", "block.create.tiled_glass_pane": "Vitre carrelé", "block.create.turntable": "Plaque tournante", + "block.create.valve_handle": "UNLOCALIZED: Valve Handle", "block.create.vertical_framed_glass": "Fenêtre en verre verticale", "block.create.vertical_framed_glass_pane": "Vitre encadrée verticale", "block.create.water_wheel": "Roue à eau", 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 2951abe01..705586333 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: 413", + "_": "Missing Localizations: 415", "_": "->------------------------] Game Elements [------------------------<-", @@ -134,6 +134,7 @@ "block.create.fancy_weathered_limestone_bricks_wall": "UNLOCALIZED: Fancy Weathered Limestone Bricks Wall", "block.create.fluid_pipe": "UNLOCALIZED: Fluid Pipe", "block.create.fluid_tank": "UNLOCALIZED: Fluid Tank", + "block.create.fluid_valve": "UNLOCALIZED: Fluid Valve", "block.create.flywheel": "Volano", "block.create.framed_glass": "Finestra Grande Vetro", "block.create.framed_glass_pane": "Pannello di Finestra Grande Vetro", @@ -337,6 +338,7 @@ "block.create.tiled_glass": "Vetro Piastrellato", "block.create.tiled_glass_pane": "Pannello di Vetro Piastrellato", "block.create.turntable": "Piatto", + "block.create.valve_handle": "UNLOCALIZED: Valve Handle", "block.create.vertical_framed_glass": "Finestra Verticale Vetro", "block.create.vertical_framed_glass_pane": "Pannello di Finestra Verticale Vetro", "block.create.water_wheel": "Ruota d'Acqua", 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 0da7ed792..a3a287baf 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: 408", + "_": "Missing Localizations: 410", "_": "->------------------------] Game Elements [------------------------<-", @@ -134,6 +134,7 @@ "block.create.fancy_weathered_limestone_bricks_wall": "UNLOCALIZED: Fancy Weathered Limestone Bricks Wall", "block.create.fluid_pipe": "UNLOCALIZED: Fluid Pipe", "block.create.fluid_tank": "UNLOCALIZED: Fluid Tank", + "block.create.fluid_valve": "UNLOCALIZED: Fluid Valve", "block.create.flywheel": "勢車", "block.create.framed_glass": "大きなガラス窓", "block.create.framed_glass_pane": "大きなガラス窓板", @@ -337,6 +338,7 @@ "block.create.tiled_glass": "タイルガラス", "block.create.tiled_glass_pane": "タイルガラス板", "block.create.turntable": "ターンテーブル", + "block.create.valve_handle": "UNLOCALIZED: Valve Handle", "block.create.vertical_framed_glass": "垂直ガラス窓", "block.create.vertical_framed_glass_pane": "垂直ガラス窓板", "block.create.water_wheel": "水車", 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 d0b4cc6a4..0acc022b0 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: 413", + "_": "Missing Localizations: 415", "_": "->------------------------] Game Elements [------------------------<-", @@ -134,6 +134,7 @@ "block.create.fancy_weathered_limestone_bricks_wall": "UNLOCALIZED: Fancy Weathered Limestone Bricks Wall", "block.create.fluid_pipe": "UNLOCALIZED: Fluid Pipe", "block.create.fluid_tank": "UNLOCALIZED: Fluid Tank", + "block.create.fluid_valve": "UNLOCALIZED: Fluid Valve", "block.create.flywheel": "플라이휠", "block.create.framed_glass": "큰 유리", "block.create.framed_glass_pane": "큰 유리판", @@ -337,6 +338,7 @@ "block.create.tiled_glass": "타일 유리", "block.create.tiled_glass_pane": "타일 유리판", "block.create.turntable": "돌림판", + "block.create.valve_handle": "UNLOCALIZED: Valve Handle", "block.create.vertical_framed_glass": "수직 유리", "block.create.vertical_framed_glass_pane": "수직 유리판", "block.create.water_wheel": "물레방아", 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 d41a674fe..876604dd5 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: 743", + "_": "Missing Localizations: 745", "_": "->------------------------] Game Elements [------------------------<-", @@ -134,6 +134,7 @@ "block.create.fancy_weathered_limestone_bricks_wall": "UNLOCALIZED: Fancy Weathered Limestone Bricks Wall", "block.create.fluid_pipe": "UNLOCALIZED: Fluid Pipe", "block.create.fluid_tank": "UNLOCALIZED: Fluid Tank", + "block.create.fluid_valve": "UNLOCALIZED: Fluid Valve", "block.create.flywheel": "UNLOCALIZED: Flywheel", "block.create.framed_glass": "Ingelijst Glas", "block.create.framed_glass_pane": "UNLOCALIZED: Framed Glass Pane", @@ -337,6 +338,7 @@ "block.create.tiled_glass": "Getegeld Glas", "block.create.tiled_glass_pane": "Getegeld Glazen Paneel", "block.create.turntable": "Draaischijf", + "block.create.valve_handle": "UNLOCALIZED: Valve Handle", "block.create.vertical_framed_glass": "UNLOCALIZED: Vertical Framed Glass", "block.create.vertical_framed_glass_pane": "UNLOCALIZED: Vertical Framed Glass Pane", "block.create.water_wheel": "Waterrad", 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 85dbbd4b5..a83331be0 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: 812", + "_": "Missing Localizations: 814", "_": "->------------------------] Game Elements [------------------------<-", @@ -134,6 +134,7 @@ "block.create.fancy_weathered_limestone_bricks_wall": "UNLOCALIZED: Fancy Weathered Limestone Bricks Wall", "block.create.fluid_pipe": "UNLOCALIZED: Fluid Pipe", "block.create.fluid_tank": "UNLOCALIZED: Fluid Tank", + "block.create.fluid_valve": "UNLOCALIZED: Fluid Valve", "block.create.flywheel": "UNLOCALIZED: Flywheel", "block.create.framed_glass": "UNLOCALIZED: Framed Glass", "block.create.framed_glass_pane": "UNLOCALIZED: Framed Glass Pane", @@ -337,6 +338,7 @@ "block.create.tiled_glass": "Vidro Entalhado", "block.create.tiled_glass_pane": "Vidraça Entalhada", "block.create.turntable": "Mesa giratória", + "block.create.valve_handle": "UNLOCALIZED: Valve Handle", "block.create.vertical_framed_glass": "UNLOCALIZED: Vertical Framed Glass", "block.create.vertical_framed_glass_pane": "UNLOCALIZED: Vertical Framed Glass Pane", "block.create.water_wheel": "Roda de Água", 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 a1b2f184b..6844d5fea 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: 806", + "_": "Missing Localizations: 808", "_": "->------------------------] Game Elements [------------------------<-", @@ -134,6 +134,7 @@ "block.create.fancy_weathered_limestone_bricks_wall": "UNLOCALIZED: Fancy Weathered Limestone Bricks Wall", "block.create.fluid_pipe": "UNLOCALIZED: Fluid Pipe", "block.create.fluid_tank": "UNLOCALIZED: Fluid Tank", + "block.create.fluid_valve": "UNLOCALIZED: Fluid Valve", "block.create.flywheel": "UNLOCALIZED: Flywheel", "block.create.framed_glass": "UNLOCALIZED: Framed Glass", "block.create.framed_glass_pane": "UNLOCALIZED: Framed Glass Pane", @@ -337,6 +338,7 @@ "block.create.tiled_glass": "Плиточное стекло", "block.create.tiled_glass_pane": "Плиточная стеклянная панель", "block.create.turntable": "Поворотный стол", + "block.create.valve_handle": "UNLOCALIZED: Valve Handle", "block.create.vertical_framed_glass": "UNLOCALIZED: Vertical Framed Glass", "block.create.vertical_framed_glass_pane": "UNLOCALIZED: Vertical Framed Glass Pane", "block.create.water_wheel": "Водяное колесо", 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 a71cef0e7..863fb68e4 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: 93", + "_": "Missing Localizations: 95", "_": "->------------------------] Game Elements [------------------------<-", @@ -134,6 +134,7 @@ "block.create.fancy_weathered_limestone_bricks_wall": "方纹风化石灰岩砖墙", "block.create.fluid_pipe": "UNLOCALIZED: Fluid Pipe", "block.create.fluid_tank": "UNLOCALIZED: Fluid Tank", + "block.create.fluid_valve": "UNLOCALIZED: Fluid Valve", "block.create.flywheel": "飞轮", "block.create.framed_glass": "边框玻璃", "block.create.framed_glass_pane": "边框玻璃板", @@ -337,6 +338,7 @@ "block.create.tiled_glass": "十字玻璃窗", "block.create.tiled_glass_pane": "十字玻璃窗板", "block.create.turntable": "转盘", + "block.create.valve_handle": "UNLOCALIZED: Valve Handle", "block.create.vertical_framed_glass": "竖直边框玻璃", "block.create.vertical_framed_glass_pane": "竖直边框玻璃板", "block.create.water_wheel": "水车", diff --git a/src/generated/resources/assets/create/models/item/fluid_valve.json b/src/generated/resources/assets/create/models/item/fluid_valve.json new file mode 100644 index 000000000..b31acf275 --- /dev/null +++ b/src/generated/resources/assets/create/models/item/fluid_valve.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/fluid_valve/item" +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/item/valve_handle.json b/src/generated/resources/assets/create/models/item/valve_handle.json new file mode 100644 index 000000000..716895f8c --- /dev/null +++ b/src/generated/resources/assets/create/models/item/valve_handle.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/valve_handle" +} \ No newline at end of file diff --git a/src/generated/resources/data/create/loot_tables/blocks/fluid_valve.json b/src/generated/resources/data/create/loot_tables/blocks/fluid_valve.json new file mode 100644 index 000000000..3dc9088e1 --- /dev/null +++ b/src/generated/resources/data/create/loot_tables/blocks/fluid_valve.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "create:fluid_valve" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/create/loot_tables/blocks/valve_handle.json b/src/generated/resources/data/create/loot_tables/blocks/valve_handle.json new file mode 100644 index 000000000..940044950 --- /dev/null +++ b/src/generated/resources/data/create/loot_tables/blocks/valve_handle.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "create:valve_handle" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/create/tags/blocks/brittle.json b/src/generated/resources/data/create/tags/blocks/brittle.json index ca0269645..a639c5622 100644 --- a/src/generated/resources/data/create/tags/blocks/brittle.json +++ b/src/generated/resources/data/create/tags/blocks/brittle.json @@ -3,6 +3,7 @@ "values": [ "create:nozzle", "create:hand_crank", + "create:valve_handle", "create:rope", "create:pulley_magnet", "create:furnace_engine", diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index 492ee1335..9bbae39ee 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -68,7 +68,7 @@ public class AllBlockPartials { SYMMETRY_PLANE = get("symmetry_effect/plane"), SYMMETRY_CROSSPLANE = get("symmetry_effect/crossplane"), SYMMETRY_TRIPLEPLANE = get("symmetry_effect/tripleplane"), - + PORTABLE_STORAGE_INTERFACE_MIDDLE = get("portable_storage_interface/block_middle"), PORTABLE_STORAGE_INTERFACE_MIDDLE_POWERED = get("portable_storage_interface/block_middle_powered"), PORTABLE_STORAGE_INTERFACE_TOP = get("portable_storage_interface/block_top"), @@ -82,7 +82,7 @@ public class AllBlockPartials { FLAG_LONG_IN = get("mechanical_arm/flag/long_in"), FLAG_LONG_OUT = get("mechanical_arm/flag/long_out"), MECHANICAL_PUMP_ARROW = get("mechanical_pump/arrow"), MECHANICAL_PUMP_COG = get("mechanical_pump/cog"), - FLUID_PIPE_CASING = get("fluid_pipe/casing"), + FLUID_PIPE_CASING = get("fluid_pipe/casing"), FLUID_VALVE_POINTER = get("fluid_valve/pointer"), SPOUT_TOP = get("spout/top"), SPOUT_MIDDLE = get("spout/middle"), SPOUT_BOTTOM = get("spout/bottom"), @@ -161,6 +161,11 @@ public class AllBlockPartials { return CreateClient.bufferCache.renderPartial(this, referenceState); } + public SuperByteBuffer renderOnDirectionalSouth(BlockState referenceState) { + Direction facing = referenceState.get(FACING); + return renderOnDirectionalSouth(referenceState, facing); + } + public SuperByteBuffer renderOnDirectional(BlockState referenceState) { Direction facing = referenceState.get(FACING); return renderOnDirectional(referenceState, facing); @@ -168,10 +173,10 @@ public class AllBlockPartials { public SuperByteBuffer renderOnHorizontal(BlockState referenceState) { Direction facing = referenceState.get(HORIZONTAL_FACING); - return renderOnDirectional(referenceState, facing); + return renderOnDirectionalSouth(referenceState, facing); } - public SuperByteBuffer renderOnDirectional(BlockState referenceState, Direction facing) { + public SuperByteBuffer renderOnDirectionalSouth(BlockState referenceState, Direction facing) { MatrixStack ms = new MatrixStack(); // TODO 1.15 find a way to cache this model matrix computation MatrixStacker.of(ms) @@ -182,4 +187,15 @@ public class AllBlockPartials { return CreateClient.bufferCache.renderDirectionalPartial(this, referenceState, facing, ms); } + public SuperByteBuffer renderOnDirectional(BlockState referenceState, Direction facing) { + MatrixStack ms = new MatrixStack(); + // TODO 1.15 find a way to cache this model matrix computation + MatrixStacker.of(ms) + .centre() + .rotateY(AngleHelper.horizontalAngle(facing)) + .rotateX(facing == Direction.UP ? 0 : facing == Direction.DOWN ? 180 : 90) + .unCentre(); + return CreateClient.bufferCache.renderDirectionalPartial(this, referenceState, facing, ms); + } + } diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index a73c72662..3514f9fb9 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -28,6 +28,7 @@ import com.simibubi.create.content.contraptions.components.clock.CuckooClockBloc import com.simibubi.create.content.contraptions.components.crafter.CrafterCTBehaviour; import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterBlock; import com.simibubi.create.content.contraptions.components.crank.HandCrankBlock; +import com.simibubi.create.content.contraptions.components.crank.ValveHandleBlock; import com.simibubi.create.content.contraptions.components.crusher.CrushingWheelBlock; import com.simibubi.create.content.contraptions.components.crusher.CrushingWheelControllerBlock; import com.simibubi.create.content.contraptions.components.deployer.DeployerBlock; @@ -65,6 +66,7 @@ import com.simibubi.create.content.contraptions.fluids.PumpBlock; import com.simibubi.create.content.contraptions.fluids.actors.SpoutBlock; import com.simibubi.create.content.contraptions.fluids.pipes.EncasedPipeBlock; import com.simibubi.create.content.contraptions.fluids.pipes.FluidPipeBlock; +import com.simibubi.create.content.contraptions.fluids.pipes.FluidValveBlock; import com.simibubi.create.content.contraptions.fluids.pipes.GlassFluidPipeBlock; import com.simibubi.create.content.contraptions.fluids.tank.FluidTankBlock; import com.simibubi.create.content.contraptions.fluids.tank.FluidTankGenerator; @@ -491,6 +493,24 @@ public class AllBlocks { .transform(customItemModel()) .register(); + public static final BlockEntry FLUID_VALVE = REGISTRATE.block("fluid_valve", FluidValveBlock::new) + .initialProperties(SharedProperties::softMetal) + .blockstate((c, p) -> BlockStateGen.directionalAxisBlock(c, p, + (state, vertical) -> AssetLookup.partialBaseModel(c, p, vertical ? "vertical" : "horizontal", + state.get(FluidValveBlock.ENABLED) ? "open" : "closed"))) + .onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::new)) + .item() + .transform(customItemModel()) + .register(); + + public static final BlockEntry VALVE_HANDLE = REGISTRATE.block("valve_handle", ValveHandleBlock::new) + .initialProperties(SharedProperties::softMetal) + .blockstate(BlockStateGen.directionalBlockProvider(false)) + .transform(StressConfigDefaults.setCapacity(32.0)) + .tag(AllBlockTags.BRITTLE.tag) + .simpleItem() + .register(); + public static final BlockEntry FLUID_TANK = REGISTRATE.block("fluid_tank", FluidTankBlock::new) .initialProperties(SharedProperties::softMetal) .properties(Block.Properties::nonOpaque) diff --git a/src/main/java/com/simibubi/create/AllShapes.java b/src/main/java/com/simibubi/create/AllShapes.java index f78e208ea..f8b275fe1 100644 --- a/src/main/java/com/simibubi/create/AllShapes.java +++ b/src/main/java/com/simibubi/create/AllShapes.java @@ -47,6 +47,8 @@ public class AllShapes { .forDirectional(), CRANK = shape(5, 0, 5, 11, 6, 11).add(1, 3, 1, 15, 8, 15) .forDirectional(), + VALVE_HANDLE = shape(1, 0, 1, 15, 5, 15) + .forDirectional(), CART_ASSEMBLER = shape(0, 12, 0, 16, 16, 16).add(-2, 0, 1, 18, 14, 15) .forHorizontalAxis(), STOCKPILE_SWITCH = shape(0, 0, 0, 16, 2, 16).add(1, 0, 1, 15, 16, 15) @@ -77,6 +79,8 @@ public class AllShapes { .add(2, -4, 6, 14, 14, 10) .add(0, -5, 0, 16, 16, 6) .forHorizontal(NORTH), + FLUID_VALVE = shape(3, -1, 3, 13, 17, 13).add(2, 2, 2, 14, 14, 14) + .forAxis(), PUMP = shape(2, 0, 2, 14, 5, 14).add(4, 0, 4, 12, 16, 12) .add(3, 12, 3, 13, 16, 13) .forDirectional(Direction.UP) diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index 2af986739..77ae674b0 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -50,6 +50,8 @@ import com.simibubi.create.content.contraptions.fluids.PumpTileEntity; import com.simibubi.create.content.contraptions.fluids.actors.SpoutRenderer; import com.simibubi.create.content.contraptions.fluids.actors.SpoutTileEntity; import com.simibubi.create.content.contraptions.fluids.pipes.FluidPipeTileEntity; +import com.simibubi.create.content.contraptions.fluids.pipes.FluidValveRenderer; +import com.simibubi.create.content.contraptions.fluids.pipes.FluidValveTileEntity; import com.simibubi.create.content.contraptions.fluids.pipes.StraightPipeTileEntity; import com.simibubi.create.content.contraptions.fluids.pipes.TransparentStraightPipeRenderer; import com.simibubi.create.content.contraptions.fluids.tank.FluidTankRenderer; @@ -182,7 +184,7 @@ public class AllTileEntities { public static final TileEntityEntry HAND_CRANK = Create.registrate() .tileEntity("hand_crank", HandCrankTileEntity::new) - .validBlocks(AllBlocks.HAND_CRANK) + .validBlocks(AllBlocks.HAND_CRANK, AllBlocks.VALVE_HANDLE) .renderer(() -> HandCrankRenderer::new) .register(); @@ -213,6 +215,12 @@ public class AllTileEntities { .validBlocks(AllBlocks.GLASS_FLUID_PIPE) .renderer(() -> TransparentStraightPipeRenderer::new) .register(); + + public static final TileEntityEntry FLUID_VALVE = Create.registrate() + .tileEntity("fluid_valve", FluidValveTileEntity::new) + .validBlocks(AllBlocks.FLUID_VALVE) + .renderer(() -> FluidValveRenderer::new) + .register(); public static final TileEntityEntry FLUID_TANK = Create.registrate() .tileEntity("fluid_tank", FluidTankTileEntity::new) diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/DirectionalAxisKineticBlock.java b/src/main/java/com/simibubi/create/content/contraptions/base/DirectionalAxisKineticBlock.java index dd623508c..e3e4bc013 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/DirectionalAxisKineticBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/DirectionalAxisKineticBlock.java @@ -1,5 +1,8 @@ package com.simibubi.create.content.contraptions.base; +import com.simibubi.create.foundation.utility.DirectionHelper; +import com.simibubi.create.foundation.utility.Iterate; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.item.BlockItemUseContext; @@ -46,49 +49,38 @@ public abstract class DirectionalAxisKineticBlock extends DirectionalKineticBloc BlockPos pos = context.getPos(); World world = context.getWorld(); boolean alongFirst = false; + Axis faceAxis = facing.getAxis(); - if (facing.getAxis() - .isHorizontal()) { - alongFirst = facing.getAxis() == Axis.Z; + if (faceAxis.isHorizontal()) { + alongFirst = faceAxis == Axis.Z; + Direction positivePerpendicular = DirectionHelper.getPositivePerpendicular(faceAxis); - Block blockAbove = world.getBlockState(pos.offset(Direction.UP)) - .getBlock(); - boolean shaftAbove = blockAbove instanceof IRotate && ((IRotate) blockAbove).hasShaftTowards(world, - pos.up(), world.getBlockState(pos.up()), Direction.DOWN); - Block blockBelow = world.getBlockState(pos.offset(Direction.DOWN)) - .getBlock(); - boolean shaftBelow = blockBelow instanceof IRotate && ((IRotate) blockBelow).hasShaftTowards(world, - pos.down(), world.getBlockState(pos.down()), Direction.UP); + boolean shaftAbove = prefersConnectionTo(world, pos, Direction.UP, true); + boolean shaftBelow = prefersConnectionTo(world, pos, Direction.DOWN, true); + boolean preferLeft = prefersConnectionTo(world, pos, positivePerpendicular, false); + boolean preferRight = prefersConnectionTo(world, pos, positivePerpendicular.getOpposite(), false); - if (shaftAbove || shaftBelow) - alongFirst = facing.getAxis() == Axis.X; + if (shaftAbove || shaftBelow || preferLeft || preferRight) + alongFirst = faceAxis == Axis.X; } - if (facing.getAxis() - .isVertical()) { + if (faceAxis.isVertical()) { alongFirst = getAxisAlignmentForPlacement(context); Direction prefferedSide = null; - for (Direction side : Direction.values()) { - if (side.getAxis() - .isVertical()) + + for (Direction side : Iterate.horizontalDirections) { + if (!prefersConnectionTo(world, pos, side, true) + && !prefersConnectionTo(world, pos, side.rotateY(), false)) continue; - BlockState blockState = context.getWorld() - .getBlockState(context.getPos() - .offset(side)); - if (blockState.getBlock() instanceof IRotate) { - if (((IRotate) blockState.getBlock()).hasShaftTowards(context.getWorld(), context.getPos() - .offset(side), blockState, side.getOpposite())) - if (prefferedSide != null && prefferedSide.getAxis() != side.getAxis()) { - prefferedSide = null; - break; - } else { - prefferedSide = side; - } + if (prefferedSide != null && prefferedSide.getAxis() != side.getAxis()) { + prefferedSide = null; + break; } + prefferedSide = side; } - if (prefferedSide != null) { + + if (prefferedSide != null) alongFirst = prefferedSide.getAxis() == Axis.X; - } } return this.getDefaultState() @@ -96,6 +88,16 @@ public abstract class DirectionalAxisKineticBlock extends DirectionalKineticBloc .with(AXIS_ALONG_FIRST_COORDINATE, alongFirst); } + protected boolean prefersConnectionTo(IWorldReader reader, BlockPos pos, Direction facing, boolean shaftAxis) { + if (!shaftAxis) + return false; + BlockPos neighbourPos = pos.offset(facing); + BlockState blockState = reader.getBlockState(neighbourPos); + Block block = blockState.getBlock(); + return block instanceof IRotate + && ((IRotate) block).hasShaftTowards(reader, neighbourPos, blockState, facing.getOpposite()); + } + @Override public Axis getRotationAxis(BlockState state) { Axis pistonAxis = state.get(FACING) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillRenderer.java index 2ff91b4b0..40945edf1 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillRenderer.java @@ -27,11 +27,11 @@ public class DrillRenderer extends KineticTileEntityRenderer { @Override protected SuperByteBuffer getRotatedModel(KineticTileEntity te) { - return AllBlockPartials.DRILL_HEAD.renderOnDirectional(te.getBlockState()); + return AllBlockPartials.DRILL_HEAD.renderOnDirectionalSouth(te.getBlockState()); } protected static SuperByteBuffer getRotatingModel(BlockState state) { - return AllBlockPartials.DRILL_HEAD.renderOnDirectional(state); + return AllBlockPartials.DRILL_HEAD.renderOnDirectionalSouth(state); } public static void renderInContraption(MovementContext context, MatrixStack ms, MatrixStack msLocal, diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceTileEntity.java index 06eabc2fd..7fc799514 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceTileEntity.java @@ -13,7 +13,10 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; +import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.MathHelper; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.IItemHandlerModifiable; @@ -79,6 +82,12 @@ public class PortableStorageInterfaceTileEntity extends SmartTileEntity { compound.putInt("Timer", transferTimer); compound.putFloat("Distance", distance); } + + @Override + @OnlyIn(Dist.CLIENT) + public AxisAlignedBB getRenderBoundingBox() { + return super.getRenderBoundingBox().grow(2); + } public boolean isTransferring() { return transferTimer != 0; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockRenderer.java index b99b6d784..6e8250e35 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockRenderer.java @@ -95,7 +95,7 @@ public class CuckooClockRenderer extends KineticTileEntityRenderer { } private SuperByteBuffer transform(AllBlockPartials partial, KineticTileEntity te) { - return partial.renderOnDirectional(te.getBlockState(), te.getBlockState() + return partial.renderOnDirectionalSouth(te.getBlockState(), te.getBlockState() .get(CuckooClockBlock.HORIZONTAL_FACING) .getOpposite()); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankBlock.java index da13c072d..7df494c09 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankBlock.java @@ -1,5 +1,6 @@ package com.simibubi.create.content.contraptions.components.crank; +import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllShapes; import com.simibubi.create.AllTileEntities; import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock; @@ -22,6 +23,8 @@ import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; public class HandCrankBlock extends DirectionalKineticBlock implements ITE { @@ -33,6 +36,15 @@ public class HandCrankBlock extends DirectionalKineticBlock implements ITE { protected SuperByteBuffer getRotatedModel(KineticTileEntity te) { BlockState state = te.getBlockState(); if (state.get(FACING).getAxis().isHorizontal()) - return AllBlockPartials.SHAFT_HALF.renderOnDirectional(state.rotate(Rotation.CLOCKWISE_180)); + return AllBlockPartials.SHAFT_HALF.renderOnDirectionalSouth(state.rotate(Rotation.CLOCKWISE_180)); return CreateClient.bufferCache.renderBlockIn(KineticTileEntityRenderer.KINETIC_TILE, getRenderedBlockState(te)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingRenderer.java index eb3584ff4..82c793e94 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingRenderer.java @@ -42,7 +42,7 @@ public class BearingRenderer extends KineticTileEntityRenderer { @Override protected SuperByteBuffer getRotatedModel(KineticTileEntity te) { - return AllBlockPartials.SHAFT_HALF.renderOnDirectional(te.getBlockState(), te.getBlockState() + return AllBlockPartials.SHAFT_HALF.renderOnDirectionalSouth(te.getBlockState(), te.getBlockState() .get(BearingBlock.FACING) .getOpposite()); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyRenderer.java index bc1de8681..9994c52ec 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyRenderer.java @@ -77,7 +77,7 @@ public class PulleyRenderer extends KineticTileEntityRenderer { @Override protected SuperByteBuffer getRotatedModel(KineticTileEntity te) { BlockState blockState = te.getBlockState(); - return AllBlockPartials.ROPE_COIL.renderOnDirectional(blockState, horizontalFacing(blockState)); + return AllBlockPartials.ROPE_COIL.renderOnDirectionalSouth(blockState, horizontalFacing(blockState)); } public Direction horizontalFacing(BlockState blockState) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidNetwork.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidNetwork.java index 0e9492909..9fcdb4b3e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidNetwork.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidNetwork.java @@ -10,6 +10,7 @@ import java.util.Map; import java.util.Set; import com.google.common.collect.ImmutableList; +import com.simibubi.create.content.contraptions.KineticDebugger; import com.simibubi.create.foundation.utility.BlockFace; import com.simibubi.create.foundation.utility.Pair; @@ -218,6 +219,9 @@ public class FluidNetwork { continue; for (Direction face : FluidPropagator.getPipeConnections(currentState, pipe)) { + if (!pipe.canTransferToward(FluidStack.EMPTY, world.getBlockState(currentPos), face, false)) + continue; + BlockFace blockFace = new BlockFace(currentPos, face); BlockPos connectedPos = blockFace.getConnectedPos(); @@ -229,7 +233,8 @@ public class FluidNetwork { continue; if (collectEndpoint(world, blockFace, openEnds, distance)) continue; - if (FluidPropagator.getPipe(world, connectedPos) == null) + FluidPipeBehaviour pipeBehaviour = FluidPropagator.getPipe(world, connectedPos); + if (pipeBehaviour == null) continue; if (visited.contains(connectedPos)) continue; diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidNetworkFlow.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidNetworkFlow.java index 9c861bb2e..7e630a56f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidNetworkFlow.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidNetworkFlow.java @@ -218,6 +218,8 @@ class FluidNetworkFlow { if (entry.getValue() != pulling) continue; Direction face = entry.getKey(); + if (!pipe.canTransferToward(fluidStack, state, face, false)) + continue; BlockFace addedBlockFace = new BlockFace(currentPos.offset(face), face.getOpposite()); if (skipping && !canSkip(previousFlow, addedBlockFace)) { allFlowsComplete = false; diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java index 066750b38..8345cf985 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java @@ -14,6 +14,7 @@ import com.simibubi.create.content.contraptions.fluids.pipes.FluidPipeBlock; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.utility.BlockFace; +import com.simibubi.create.foundation.utility.Debug; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.outliner.Outline.OutlineParams; diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpRenderer.java index 579445cb8..ff887c908 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpRenderer.java @@ -45,14 +45,14 @@ public class PumpRenderer extends KineticTileEntityRenderer { .rotateY(yRot) .rotateZ(angle) .translateBack(rotationOffset); - arrow.renderInto(ms, buffer.getBuffer(RenderType.getSolid())); + arrow.light(light).renderInto(ms, buffer.getBuffer(RenderType.getSolid())); ms.pop(); } } @Override protected SuperByteBuffer getRotatedModel(KineticTileEntity te) { - return AllBlockPartials.MECHANICAL_PUMP_COG.renderOnDirectional(te.getBlockState()); + return AllBlockPartials.MECHANICAL_PUMP_COG.renderOnDirectionalSouth(te.getBlockState()); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/SpoutTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/SpoutTileEntity.java index 3933cae55..552858f1e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/SpoutTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/SpoutTileEntity.java @@ -89,8 +89,7 @@ public class SpoutTileEntity extends SmartTileEntity { if (processingTicks == -1) { processingTicks = FILLING_TIME; - markDirty(); - sendData(); + notifyUpdate(); return HOLD; } @@ -109,8 +108,7 @@ public class SpoutTileEntity extends SmartTileEntity { tank.getPrimaryHandler().setFluid(fluid); sendSplash = true; - markDirty(); - sendData(); + notifyUpdate(); return PASS; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveBlock.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveBlock.java new file mode 100644 index 000000000..c56476060 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveBlock.java @@ -0,0 +1,73 @@ +package com.simibubi.create.content.contraptions.fluids.pipes; + +import com.simibubi.create.AllShapes; +import com.simibubi.create.AllTileEntities; +import com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock; +import com.simibubi.create.foundation.utility.Iterate; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.StateContainer.Builder; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.Axis; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorldReader; + +public class FluidValveBlock extends DirectionalAxisKineticBlock { + + public static final BooleanProperty ENABLED = BooleanProperty.create("enabled"); + + public FluidValveBlock(Properties properties) { + super(properties); + setDefaultState(getDefaultState().with(ENABLED, false)); + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader p_220053_2_, BlockPos p_220053_3_, + ISelectionContext p_220053_4_) { + return AllShapes.FLUID_VALVE.get(getPipeAxis(state)); + } + + @Override + protected void fillStateContainer(Builder builder) { + super.fillStateContainer(builder.add(ENABLED)); + } + + @Override + protected boolean prefersConnectionTo(IWorldReader reader, BlockPos pos, Direction facing, boolean shaftAxis) { + if (!shaftAxis) { + BlockPos offset = pos.offset(facing); + BlockState blockState = reader.getBlockState(offset); + return FluidPipeBlock.canConnectTo(reader, offset, blockState, facing); + } + return super.prefersConnectionTo(reader, pos, facing, shaftAxis); + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return AllTileEntities.FLUID_VALVE.create(); + } + + public static Axis getPipeAxis(BlockState state) { + if (!(state.getBlock() instanceof FluidValveBlock)) + return null; + Direction facing = state.get(FACING); + boolean alongFirst = !state.get(AXIS_ALONG_FIRST_COORDINATE); + for (Axis axis : Iterate.axes) { + if (axis == facing.getAxis()) + continue; + if (!alongFirst) { + alongFirst = true; + continue; + } + return axis; + } + return null; + } + +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveRenderer.java new file mode 100644 index 000000000..c50f78bb4 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveRenderer.java @@ -0,0 +1,60 @@ +package com.simibubi.create.content.contraptions.fluids.pipes; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.content.contraptions.base.KineticTileEntity; +import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; +import com.simibubi.create.foundation.utility.AngleHelper; +import com.simibubi.create.foundation.utility.MatrixStacker; +import com.simibubi.create.foundation.utility.SuperByteBuffer; + +import net.minecraft.block.BlockState; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.Axis; +import net.minecraft.util.math.MathHelper; + +public class FluidValveRenderer extends KineticTileEntityRenderer { + + public FluidValveRenderer(TileEntityRendererDispatcher dispatcher) { + super(dispatcher); + } + + @Override + protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer, + int light, int overlay) { + super.renderSafe(te, partialTicks, ms, buffer, light, overlay); + BlockState blockState = te.getBlockState(); + SuperByteBuffer pointer = AllBlockPartials.FLUID_VALVE_POINTER.renderOn(blockState); + Direction facing = blockState.get(FluidValveBlock.FACING); + + if (!(te instanceof FluidValveTileEntity)) + return; + FluidValveTileEntity valve = (FluidValveTileEntity) te; + float pointerRotation = MathHelper.lerp(valve.pointer.getValue(partialTicks), 0, -90); + Axis pipeAxis = FluidValveBlock.getPipeAxis(blockState); + Axis shaftAxis = KineticTileEntityRenderer.getRotationAxisOf(te); + + int pointerRotationOffset = 0; + if (pipeAxis.isHorizontal() && shaftAxis == Axis.Z || pipeAxis.isVertical()) + pointerRotationOffset = 90; + + MatrixStacker.of(ms) + .centre() + .rotateY(AngleHelper.horizontalAngle(facing)) + .rotateX(facing == Direction.UP ? 0 : facing == Direction.DOWN ? 180 : 90) + .rotateY(pointerRotationOffset + pointerRotation) + .unCentre(); + + pointer.light(light) + .renderInto(ms, buffer.getBuffer(RenderType.getSolid())); + } + + @Override + protected BlockState getRenderedBlockState(KineticTileEntity te) { + return KineticTileEntityRenderer.shaft(KineticTileEntityRenderer.getRotationAxisOf(te)); + } + +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveTileEntity.java new file mode 100644 index 000000000..b3d3efc27 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveTileEntity.java @@ -0,0 +1,128 @@ +package com.simibubi.create.content.contraptions.fluids.pipes; + +import java.util.List; + +import com.simibubi.create.AllBlocks; +import com.simibubi.create.content.contraptions.base.KineticTileEntity; +import com.simibubi.create.content.contraptions.fluids.FluidPipeAttachmentBehaviour; +import com.simibubi.create.content.contraptions.fluids.FluidPipeBehaviour; +import com.simibubi.create.foundation.tileEntity.SmartTileEntity; +import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; +import com.simibubi.create.foundation.utility.LerpedFloat; +import com.simibubi.create.foundation.utility.LerpedFloat.Chaser; + +import net.minecraft.block.BlockState; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.AxisDirection; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; +import net.minecraft.world.ILightReader; +import net.minecraftforge.fluids.FluidStack; + +public class FluidValveTileEntity extends KineticTileEntity { + + LerpedFloat pointer; + + public FluidValveTileEntity(TileEntityType tileEntityTypeIn) { + super(tileEntityTypeIn); + pointer = LerpedFloat.linear() + .startWithValue(0).chase(0, 0, Chaser.LINEAR); + } + + @Override + public void onSpeedChanged(float previousSpeed) { + super.onSpeedChanged(previousSpeed); + float speed = getSpeed(); + pointer.chase(speed > 0 ? 1 : 0, getChaseSpeed(), Chaser.LINEAR); + sendData(); + } + + @Override + public void tick() { + super.tick(); + pointer.tickChaser(); + + if (world.isRemote) + return; + + BlockState blockState = getBlockState(); + if (!(blockState.getBlock() instanceof FluidValveBlock)) + return; + boolean stateOpen = blockState.get(FluidValveBlock.ENABLED); + + if (stateOpen && pointer.getValue() == 0) { + switchToBlockState(world, pos, blockState.with(FluidValveBlock.ENABLED, false)); + return; + } + if (!stateOpen && pointer.getValue() == 1) { + switchToBlockState(world, pos, blockState.with(FluidValveBlock.ENABLED, true)); + return; + } + } + + private float getChaseSpeed() { + return MathHelper.clamp(Math.abs(getSpeed()) / 16 / 20, 0, 1); + } + + @Override + protected void write(CompoundNBT compound, boolean clientPacket) { + super.write(compound, clientPacket); + compound.put("Pointer", pointer.writeNBT()); + } + + @Override + protected void read(CompoundNBT compound, boolean clientPacket) { + super.read(compound, clientPacket); + pointer.readNBT(compound.getCompound("Pointer"), clientPacket); + } + + @Override + public void addBehaviours(List behaviours) { + behaviours.add(new ValvePipeBehaviour(this)); + behaviours.add(new ValvePipeAttachmentBehaviour(this)); + } + + class ValvePipeBehaviour extends FluidPipeBehaviour { + + public ValvePipeBehaviour(SmartTileEntity te) { + super(te); + } + + @Override + public boolean isConnectedTo(BlockState state, Direction direction) { + return FluidValveBlock.getPipeAxis(state) == direction.getAxis(); + } + + @Override + public boolean canTransferToward(FluidStack fluid, BlockState state, Direction direction, boolean inbound) { + if (state.has(FluidValveBlock.ENABLED) && state.get(FluidValveBlock.ENABLED)) + return super.canTransferToward(fluid, state, direction, inbound); + return false; + } + + } + + class ValvePipeAttachmentBehaviour extends FluidPipeAttachmentBehaviour { + + public ValvePipeAttachmentBehaviour(SmartTileEntity te) { + super(te); + } + + @Override + public AttachmentTypes getAttachment(ILightReader world, BlockPos pos, BlockState state, Direction direction) { + AttachmentTypes attachment = super.getAttachment(world, pos, state, direction); + + BlockState facingState = world.getBlockState(pos.offset(direction)); + if (AllBlocks.FLUID_VALVE.has(facingState) + && FluidValveBlock.getPipeAxis(facingState) == FluidValveBlock.getPipeAxis(state) + && direction.getAxisDirection() == AxisDirection.NEGATIVE) + return AttachmentTypes.NONE; + + return attachment; + } + + } + +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/GlassFluidPipeBlock.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/GlassFluidPipeBlock.java index 83f3bae69..33d1dad10 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/GlassFluidPipeBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/GlassFluidPipeBlock.java @@ -36,19 +36,18 @@ public class GlassFluidPipeBlock extends AxisPipeBlock { public TileEntity createTileEntity(BlockState state, IBlockReader world) { return AllTileEntities.GLASS_FLUID_PIPE.create(); } - + @Override public ActionResultType onWrenched(BlockState state, ItemUseContext context) { BlockState newState = state; World world = context.getWorld(); BlockPos pos = context.getPos(); - if (!state.get(ALT)) - newState = state.with(ALT, true); - else - newState = toRegularPipe(world, pos, state); +// if (!state.get(ALT)) +// newState = state.with(ALT, true); +// else + newState = toRegularPipe(world, pos, state); world.setBlockState(pos, newState, 3); return ActionResultType.SUCCESS; } - } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/StraightPipeTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/StraightPipeTileEntity.java index b5e273f5b..3a19835f9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/StraightPipeTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/StraightPipeTileEntity.java @@ -56,6 +56,10 @@ public class StraightPipeTileEntity extends SmartTileEntity { return AttachmentTypes.NONE; } } + if (otherState.getBlock() instanceof FluidValveBlock + && FluidValveBlock.getPipeAxis(otherState) == direction.getAxis()) + return AttachmentTypes.NONE; + return attachment; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinRenderer.java index 447181e64..e9e232abd 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinRenderer.java @@ -3,6 +3,9 @@ package com.simibubi.create.content.contraptions.processing; import java.util.Random; import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.foundation.fluid.FluidRenderer; +import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour; +import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour.TankSegment; import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer; import com.simibubi.create.foundation.utility.VecHelper; @@ -13,7 +16,9 @@ import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; +import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.ItemStackHandler; @@ -28,6 +33,8 @@ public class BasinRenderer extends SmartTileEntityRenderer { int light, int overlay) { super.renderSafe(basin, partialTicks, ms, buffer, light, overlay); + float fluidSurface = renderFluids(basin, partialTicks, ms, buffer, light, overlay); + ms.push(); BlockPos pos = basin.getPos(); ms.translate(.5, .2f, .5); @@ -57,4 +64,58 @@ public class BasinRenderer extends SmartTileEntityRenderer { } + protected float renderFluids(BasinTileEntity basin, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer, + int light, int overlay) { + SmartFluidTankBehaviour inputFluids = basin.getBehaviour(SmartFluidTankBehaviour.INPUT); + SmartFluidTankBehaviour outputFluids = basin.getBehaviour(SmartFluidTankBehaviour.OUTPUT); + SmartFluidTankBehaviour[] tanks = { inputFluids, outputFluids }; + int renderedFluids = 0; + float totalUnits = 0; + + for (SmartFluidTankBehaviour behaviour : tanks) { + if (behaviour == null) + continue; + for (TankSegment tankSegment : behaviour.getTanks()) { + if (tankSegment.getRenderedFluid() + .isEmpty()) + continue; + totalUnits += tankSegment.getTotalUnits(partialTicks); + renderedFluids++; + } + } + + if (renderedFluids == 0) + return 0; + if (totalUnits == 0) + return 0; + + float fluidLevel = MathHelper.clamp(totalUnits / 2000, 0, 1); + + float xMin = 2 / 16f; + float xMax = 2 / 16f; + final float yMin = 2 / 16f; + final float yMax = yMin + 12 / 16f * fluidLevel; + final float zMin = 2 / 16f; + final float zMax = 14 / 16f; + + for (SmartFluidTankBehaviour behaviour : tanks) { + if (behaviour == null) + continue; + for (TankSegment tankSegment : behaviour.getTanks()) { + FluidStack renderedFluid = tankSegment.getRenderedFluid(); + if (renderedFluid.isEmpty()) + continue; + + float partial = tankSegment.getTotalUnits(partialTicks) / totalUnits; + xMax += partial * 12 / 16f; + FluidRenderer.renderTiledFluidBB(renderedFluid, xMin, yMin, zMin, xMax, yMax, zMax, buffer, ms, light, + false); + + xMin = xMax; + } + } + + return fluidLevel; + } + } diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinTileEntity.java index 48565aa16..1c28f9a3a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinTileEntity.java @@ -114,6 +114,7 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt @Override public void tick() { + super.tick(); if (!contentsChanged) return; contentsChanged = false; diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftRenderer.java index 6d04e0b0e..f2f4a7bfa 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftRenderer.java @@ -47,7 +47,7 @@ public class SplitShaftRenderer extends KineticTileEntityRenderer { angle = angle / 180f * (float) Math.PI; SuperByteBuffer superByteBuffer = - AllBlockPartials.SHAFT_HALF.renderOnDirectional(te.getBlockState(), direction); + AllBlockPartials.SHAFT_HALF.renderOnDirectionalSouth(te.getBlockState(), direction); kineticRotationTransform(superByteBuffer, te, axis, angle, light); superByteBuffer.renderInto(ms, buffer.getBuffer(RenderType.getSolid())); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxRenderer.java index 2983b8673..e1a9211ea 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxRenderer.java @@ -33,7 +33,7 @@ public class GearboxRenderer extends KineticTileEntityRenderer { if (boxAxis == axis) continue; - SuperByteBuffer shaft = AllBlockPartials.SHAFT_HALF.renderOnDirectional(te.getBlockState(), direction); + SuperByteBuffer shaft = AllBlockPartials.SHAFT_HALF.renderOnDirectionalSouth(te.getBlockState(), direction); float offset = getRotationOffsetForPosition(te, pos, axis); float angle = (time * te.getSpeed() * 3f / 10) % 360; diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/fluid/SmartFluidTankBehaviour.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/fluid/SmartFluidTankBehaviour.java index 03b111842..810f84b60 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/fluid/SmartFluidTankBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/fluid/SmartFluidTankBehaviour.java @@ -54,7 +54,7 @@ public class SmartFluidTankBehaviour extends TileEntityBehaviour { this.tanks[i] = tankSegment; handlers[i] = tankSegment.tank; } - capability = LazyOptional.of(() -> new InternalFluidHandler(handlers)); + capability = LazyOptional.of(() -> new InternalFluidHandler(handlers, enforceVariety)); } public SmartFluidTankBehaviour allowInsertion() { @@ -177,7 +177,7 @@ public class SmartFluidTankBehaviour extends TileEntityBehaviour { class InternalFluidHandler extends CombinedTankWrapper { - public InternalFluidHandler(IFluidHandler[] handlers) { + public InternalFluidHandler(IFluidHandler[] handlers, boolean enforceVariety) { super(handlers); if (enforceVariety) enforceVariety(); @@ -235,6 +235,10 @@ public class SmartFluidTankBehaviour extends TileEntityBehaviour { public LerpedFloat getFluidLevel() { return fluidLevel; } + + public float getTotalUnits(float partialTicks) { + return fluidLevel.getValue(partialTicks) * tank.getCapacity(); + } public CompoundNBT writeNBT() { CompoundNBT compound = new CompoundNBT(); diff --git a/src/main/java/com/simibubi/create/foundation/utility/DirectionHelper.java b/src/main/java/com/simibubi/create/foundation/utility/DirectionHelper.java index e9bd8eea0..17f134c80 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/DirectionHelper.java +++ b/src/main/java/com/simibubi/create/foundation/utility/DirectionHelper.java @@ -8,6 +8,7 @@ import static net.minecraft.util.Direction.UP; import static net.minecraft.util.Direction.WEST; import net.minecraft.util.Direction; +import net.minecraft.util.Direction.Axis; /** * A bunch of methods that got stripped out of Direction in 1.15 @@ -73,4 +74,9 @@ public class DirectionHelper { return WEST; } } + + public static Direction getPositivePerpendicular(Axis horizontalAxis) { + return horizontalAxis == Axis.X ? SOUTH : EAST; + } + } diff --git a/src/main/resources/assets/create/models/block/deployer/vertical.json b/src/main/resources/assets/create/models/block/deployer/vertical.json index e65b29b4f..3dda75643 100644 --- a/src/main/resources/assets/create/models/block/deployer/vertical.json +++ b/src/main/resources/assets/create/models/block/deployer/vertical.json @@ -7,7 +7,8 @@ "7": "create:block/piston_inner", "gearbox_top": "create:block/gearbox_top", "gearbox": "create:block/gearbox", - "andesite_casing_short": "create:block/andesite_casing_short" + "andesite_casing_short": "create:block/andesite_casing_short", + "particle": "create:block/gearbox_top" }, "elements": [ { diff --git a/src/main/resources/assets/create/models/block/fluid_pipe/window.json b/src/main/resources/assets/create/models/block/fluid_pipe/window.json index 5cfccad79..ee5187561 100644 --- a/src/main/resources/assets/create/models/block/fluid_pipe/window.json +++ b/src/main/resources/assets/create/models/block/fluid_pipe/window.json @@ -20,8 +20,8 @@ }, { "name": "Inner", - "from": [4, 0, 11.5], - "to": [12, 16, 11.5], + "from": [4, 0, 11.9], + "to": [12, 16, 11.9], "shade": false, "faces": { "north": {"uv": [0, 8, 16, 16], "rotation": 90, "texture": "#0"} @@ -29,17 +29,8 @@ }, { "name": "Inner", - "from": [4, 0, 4.5], - "to": [12, 16, 4.5], - "shade": false, - "faces": { - "south": {"uv": [0, 8, 16, 16], "rotation": 90, "texture": "#0"} - } - }, - { - "name": "Inner", - "from": [4.5, 0, 4], - "to": [4.5, 16, 12], + "from": [4.1, 0, 4], + "to": [4.1, 16, 12], "shade": false, "faces": { "east": {"uv": [0, 8, 16, 16], "rotation": 90, "texture": "#0"} @@ -47,12 +38,53 @@ }, { "name": "Inner", - "from": [11.5, 0, 4], - "to": [11.5, 16, 12], + "from": [4, 0, 4.1], + "to": [12, 16, 4.1], + "shade": false, + "faces": { + "south": {"uv": [0, 8, 16, 16], "rotation": 90, "texture": "#0"} + } + }, + { + "name": "Inner", + "from": [11.9, 0, 4], + "to": [11.9, 16, 12], "shade": false, "faces": { "west": {"uv": [0, 8, 16, 16], "rotation": 90, "texture": "#0"} } + }, + { + "from": [4, 0, 4], + "to": [6, 16, 6], + "faces": { + "east": {"uv": [0, 14, 16, 16], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 8, 16, 10], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [4, 0, 10], + "to": [6, 16, 12], + "faces": { + "north": {"uv": [0, 10, 16, 8], "rotation": 90, "texture": "#0"}, + "east": {"uv": [0, 16, 16, 14], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [10, 0, 4], + "to": [12, 16, 6], + "faces": { + "south": {"uv": [0, 14, 16, 16], "rotation": 90, "texture": "#0"}, + "west": {"uv": [0, 8, 16, 10], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [10, 0, 10], + "to": [12, 16, 12], + "faces": { + "north": {"uv": [0, 16, 16, 14], "rotation": 90, "texture": "#0"}, + "west": {"uv": [0, 10, 16, 8], "rotation": 90, "texture": "#0"} + } } ] } \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_valve/block_horizontal_closed.json b/src/main/resources/assets/create/models/block/fluid_valve/block_horizontal_closed.json new file mode 100644 index 000000000..2bfe51234 --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_valve/block_horizontal_closed.json @@ -0,0 +1,44 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "2": "create:block/fluid_valve", + "3": "create:block/fluid_pipe", + "particle": "create:block/oxidized/copper_block_0" + }, + "elements": [ + { + "name": "ValveCenter", + "from": [2, 2, 2], + "to": [14, 14, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [24, 11, 11]}, + "faces": { + "north": {"uv": [0, 0, 6, 6], "texture": "#3"}, + "east": {"uv": [6, 0, 12, 6], "texture": "#2"}, + "south": {"uv": [0, 0, 6, 6], "texture": "#2"}, + "west": {"uv": [6, 0, 12, 6], "texture": "#2"}, + "up": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#3"}, + "down": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#3"} + } + }, + { + "from": [4, 14, 4], + "to": [12, 16, 12], + "faces": { + "north": {"uv": [0, 6, 4, 7], "texture": "#3"}, + "east": {"uv": [0, 6, 4, 7], "texture": "#3"}, + "south": {"uv": [0, 6, 4, 7], "texture": "#3"}, + "west": {"uv": [0, 6, 4, 7], "texture": "#3"} + } + }, + { + "from": [4, 0, 4], + "to": [12, 2, 12], + "faces": { + "north": {"uv": [0, 7, 4, 6], "texture": "#3"}, + "east": {"uv": [0, 7, 4, 6], "texture": "#3"}, + "south": {"uv": [0, 7, 4, 6], "texture": "#3"}, + "west": {"uv": [0, 7, 4, 6], "texture": "#3"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_valve/block_horizontal_open.json b/src/main/resources/assets/create/models/block/fluid_valve/block_horizontal_open.json new file mode 100644 index 000000000..3a705864b --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_valve/block_horizontal_open.json @@ -0,0 +1,44 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "2": "create:block/fluid_valve", + "3": "create:block/fluid_pipe", + "particle": "create:block/oxidized/copper_block_0" + }, + "elements": [ + { + "name": "ValveCenter", + "from": [2, 2, 2], + "to": [14, 14, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [24, 11, 11]}, + "faces": { + "north": {"uv": [0, 0, 6, 6], "texture": "#3"}, + "east": {"uv": [6, 0, 12, 6], "texture": "#2"}, + "south": {"uv": [0, 6, 6, 12], "texture": "#2"}, + "west": {"uv": [6, 0, 12, 6], "texture": "#2"}, + "up": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#3"}, + "down": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#3"} + } + }, + { + "from": [4, 14, 4], + "to": [12, 16, 12], + "faces": { + "north": {"uv": [0, 6, 4, 7], "texture": "#3"}, + "east": {"uv": [0, 6, 4, 7], "texture": "#3"}, + "south": {"uv": [0, 6, 4, 7], "texture": "#3"}, + "west": {"uv": [0, 6, 4, 7], "texture": "#3"} + } + }, + { + "from": [4, 0, 4], + "to": [12, 2, 12], + "faces": { + "north": {"uv": [0, 7, 4, 6], "texture": "#3"}, + "east": {"uv": [0, 7, 4, 6], "texture": "#3"}, + "south": {"uv": [0, 7, 4, 6], "texture": "#3"}, + "west": {"uv": [0, 7, 4, 6], "texture": "#3"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_valve/block_vertical_closed.json b/src/main/resources/assets/create/models/block/fluid_valve/block_vertical_closed.json new file mode 100644 index 000000000..db7e80b05 --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_valve/block_vertical_closed.json @@ -0,0 +1,44 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "2": "create:block/fluid_valve", + "3": "create:block/fluid_pipe", + "particle": "create:block/oxidized/copper_block_0" + }, + "elements": [ + { + "name": "ValveCenter", + "from": [2, 2, 2], + "to": [14, 14, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [24, 11, 11]}, + "faces": { + "north": {"uv": [0, 0, 6, 6], "texture": "#3"}, + "east": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#3"}, + "south": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#3"}, + "up": {"uv": [6, 0, 12, 6], "rotation": 90, "texture": "#2"}, + "down": {"uv": [6, 0, 12, 6], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [0, 4, 4], + "to": [2, 12, 12], + "faces": { + "north": {"uv": [0, 6, 4, 7], "rotation": 90, "texture": "#3"}, + "south": {"uv": [0, 6, 4, 7], "rotation": 270, "texture": "#3"}, + "up": {"uv": [0, 6, 4, 7], "rotation": 270, "texture": "#3"}, + "down": {"uv": [0, 6, 4, 7], "rotation": 270, "texture": "#3"} + } + }, + { + "from": [14, 4, 4], + "to": [16, 12, 12], + "faces": { + "north": {"uv": [0, 7, 4, 6], "rotation": 90, "texture": "#3"}, + "south": {"uv": [0, 7, 4, 6], "rotation": 270, "texture": "#3"}, + "up": {"uv": [0, 7, 4, 6], "rotation": 270, "texture": "#3"}, + "down": {"uv": [0, 7, 4, 6], "rotation": 270, "texture": "#3"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_valve/block_vertical_open.json b/src/main/resources/assets/create/models/block/fluid_valve/block_vertical_open.json new file mode 100644 index 000000000..c4a17315a --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_valve/block_vertical_open.json @@ -0,0 +1,44 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "2": "create:block/fluid_valve", + "3": "create:block/fluid_pipe", + "particle": "create:block/oxidized/copper_block_0" + }, + "elements": [ + { + "name": "ValveCenter", + "from": [2, 2, 2], + "to": [14, 14, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [24, 11, 11]}, + "faces": { + "north": {"uv": [0, 0, 6, 6], "texture": "#3"}, + "east": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#3"}, + "south": {"uv": [0, 6, 6, 12], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#3"}, + "up": {"uv": [6, 0, 12, 6], "rotation": 90, "texture": "#2"}, + "down": {"uv": [6, 0, 12, 6], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [0, 4, 4], + "to": [2, 12, 12], + "faces": { + "north": {"uv": [0, 6, 4, 7], "rotation": 90, "texture": "#3"}, + "south": {"uv": [0, 6, 4, 7], "rotation": 270, "texture": "#3"}, + "up": {"uv": [0, 6, 4, 7], "rotation": 270, "texture": "#3"}, + "down": {"uv": [0, 6, 4, 7], "rotation": 270, "texture": "#3"} + } + }, + { + "from": [14, 4, 4], + "to": [16, 12, 12], + "faces": { + "north": {"uv": [0, 7, 4, 6], "rotation": 90, "texture": "#3"}, + "south": {"uv": [0, 7, 4, 6], "rotation": 270, "texture": "#3"}, + "up": {"uv": [0, 7, 4, 6], "rotation": 270, "texture": "#3"}, + "down": {"uv": [0, 7, 4, 6], "rotation": 270, "texture": "#3"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_valve/item.json b/src/main/resources/assets/create/models/block/fluid_valve/item.json new file mode 100644 index 000000000..576eb104c --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_valve/item.json @@ -0,0 +1,201 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "2": "create:block/fluid_valve", + "3": "create:block/fluid_pipe", + "4": "create:block/pump", + "1_1": "create:block/axis_top", + "1_0": "create:block/axis", + "particle": "create:block/oxidized/copper_block_0" + }, + "elements": [ + { + "name": "ValveCenter", + "from": [2, 2, 2], + "to": [14, 14, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [24, 11, 11]}, + "faces": { + "north": {"uv": [6, 0, 12, 6], "texture": "#2"}, + "east": {"uv": [0, 0, 6, 6], "texture": "#3"}, + "south": {"uv": [6, 0, 12, 6], "texture": "#2"}, + "west": {"uv": [0, 0, 6, 6], "texture": "#3"}, + "up": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#3"} + } + }, + { + "name": "Axis", + "from": [6, 6, 0], + "to": [10, 10, 16], + "shade": false, + "faces": { + "north": {"uv": [6, 6, 10, 10], "rotation": 180, "texture": "#1_1"}, + "east": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#1_0"}, + "south": {"uv": [6, 6, 10, 10], "texture": "#1_1"}, + "west": {"uv": [6, 0, 10, 16], "rotation": 270, "texture": "#1_0"}, + "up": {"uv": [6, 0, 10, 16], "texture": "#1_0"}, + "down": {"uv": [6, 0, 10, 16], "rotation": 180, "texture": "#1_0"} + } + }, + { + "from": [2.5, 14.1, 9.5], + "to": [4.5, 15.1, 11.5], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [12, 2, 13, 4], "rotation": 270, "texture": "#4"}, + "east": {"uv": [12, 2, 14, 3], "rotation": 180, "texture": "#4"}, + "south": {"uv": [12, 3, 14, 4], "texture": "#4"}, + "west": {"uv": [12, 3, 14, 4], "rotation": 180, "texture": "#4"}, + "up": {"uv": [12, 2, 14, 4], "rotation": 90, "texture": "#4"}, + "down": {"uv": [14, 2, 12, 4], "rotation": 90, "texture": "#4"} + } + }, + { + "from": [2.5, 14.1, 11.5], + "to": [6.5, 15.1, 13.5], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [12, 0, 13, 4], "rotation": 90, "texture": "#4"}, + "east": {"uv": [14, 0, 16, 1], "rotation": 180, "texture": "#4"}, + "south": {"uv": [15, 0, 16, 4], "rotation": 90, "texture": "#4"}, + "west": {"uv": [12, 3, 14, 4], "texture": "#4"}, + "up": {"uv": [14, 0, 16, 4], "rotation": 90, "texture": "#4"}, + "down": {"uv": [16, 0, 14, 4], "rotation": 90, "texture": "#4"} + } + }, + { + "from": [9.5, 14.1, 2.5], + "to": [11.5, 15.1, 4.5], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [14, 3, 12, 4], "rotation": 180, "texture": "#4"}, + "east": {"uv": [14, 3, 12, 4], "texture": "#4"}, + "south": {"uv": [14, 2, 12, 3], "rotation": 180, "texture": "#4"}, + "west": {"uv": [12, 4, 13, 2], "rotation": 270, "texture": "#4"}, + "up": {"uv": [14, 2, 12, 4], "rotation": 180, "texture": "#4"}, + "down": {"uv": [12, 2, 14, 4], "texture": "#4"} + } + }, + { + "from": [11.5, 14.1, 2.5], + "to": [13.5, 15.1, 6.5], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [14, 3, 12, 4], "texture": "#4"}, + "east": {"uv": [15, 4, 16, 0], "rotation": 90, "texture": "#4"}, + "south": {"uv": [16, 0, 14, 1], "rotation": 180, "texture": "#4"}, + "west": {"uv": [12, 4, 13, 0], "rotation": 90, "texture": "#4"}, + "up": {"uv": [16, 0, 14, 4], "rotation": 180, "texture": "#4"}, + "down": {"uv": [14, 0, 16, 4], "texture": "#4"} + } + }, + { + "name": "Center", + "from": [6.5, 14, 6.5], + "to": [9.5, 16, 9.5], + "faces": { + "north": {"uv": [6, 8.5, 7.5, 9.5], "texture": "#2"}, + "east": {"uv": [6, 8.5, 7.5, 9.5], "texture": "#2"}, + "south": {"uv": [6, 8.5, 7.5, 9.5], "texture": "#2"}, + "west": {"uv": [6, 8.5, 7.5, 9.5], "texture": "#2"}, + "up": {"uv": [6, 10, 7.5, 11.5], "texture": "#2"} + } + }, + { + "name": "WestPointer", + "from": [7, 14, 9], + "to": [9, 15, 13], + "faces": { + "east": {"uv": [9.5, 9.5, 7.5, 10], "texture": "#2"}, + "south": {"uv": [7, 9.5, 7.5, 10], "texture": "#2"}, + "west": {"uv": [9.5, 9.5, 7.5, 10], "texture": "#2"}, + "up": {"uv": [9.5, 8.5, 7.5, 9.5], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "WestPointer", + "from": [7, 14, 3], + "to": [9, 15, 7], + "faces": { + "north": {"uv": [7.5, 9.5, 7, 10], "texture": "#2"}, + "east": {"uv": [9.5, 9.5, 7.5, 10], "texture": "#2"}, + "west": {"uv": [9.5, 9.5, 7.5, 10], "texture": "#2"}, + "up": {"uv": [9.5, 8.5, 7.5, 9.5], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [-1, 3, 3], + "to": [2, 13, 13], + "faces": { + "north": {"uv": [6, 5, 11, 6.5], "rotation": 270, "texture": "#3"}, + "south": {"uv": [6, 5, 11, 6.5], "rotation": 90, "texture": "#3"}, + "west": {"uv": [6, 0, 11, 5], "texture": "#3"}, + "up": {"uv": [6, 5, 11, 6.5], "rotation": 90, "texture": "#3"}, + "down": {"uv": [6, 5, 11, 6.5], "rotation": 90, "texture": "#3"} + } + }, + { + "from": [14, 3, 3], + "to": [17, 13, 13], + "faces": { + "north": {"uv": [6, 6.5, 11, 5], "rotation": 270, "texture": "#3"}, + "east": {"uv": [11, 0, 6, 5], "texture": "#3"}, + "south": {"uv": [6, 6.5, 11, 5], "rotation": 90, "texture": "#3"}, + "up": {"uv": [6, 6.5, 11, 5], "rotation": 90, "texture": "#3"}, + "down": {"uv": [6, 6.5, 11, 5], "rotation": 90, "texture": "#3"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 225, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 0], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 135, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + }, + "groups": [0, + { + "name": "shaft", + "origin": [8, 8, 8], + "children": [1] + }, + { + "name": "Pointer", + "origin": [7.5, 14, 8], + "children": [ + { + "name": "arrow", + "origin": [8, 8, 8], + "children": [2, 3] + }, + { + "name": "arrow", + "origin": [8, 8, 8], + "children": [4, 5] + }, 6, 7, 8] + }, 9, 10] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_valve/pointer.json b/src/main/resources/assets/create/models/block/fluid_valve/pointer.json new file mode 100644 index 000000000..eb686e2a8 --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_valve/pointer.json @@ -0,0 +1,95 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "2": "create:block/fluid_valve", + "4": "create:block/pump" + }, + "elements": [ + { + "from": [2.5, 14.1, 9.5], + "to": [4.5, 15.1, 11.5], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [12, 2, 13, 4], "rotation": 270, "texture": "#4"}, + "east": {"uv": [12, 2, 14, 3], "rotation": 180, "texture": "#4"}, + "south": {"uv": [12, 3, 14, 4], "texture": "#4"}, + "west": {"uv": [12, 3, 14, 4], "rotation": 180, "texture": "#4"}, + "up": {"uv": [12, 2, 14, 4], "rotation": 90, "texture": "#4"}, + "down": {"uv": [14, 2, 12, 4], "rotation": 90, "texture": "#4"} + } + }, + { + "from": [2.5, 14.1, 11.5], + "to": [6.5, 15.1, 13.5], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [12, 0, 13, 4], "rotation": 90, "texture": "#4"}, + "east": {"uv": [14, 0, 16, 1], "rotation": 180, "texture": "#4"}, + "south": {"uv": [15, 0, 16, 4], "rotation": 90, "texture": "#4"}, + "west": {"uv": [12, 3, 14, 4], "texture": "#4"}, + "up": {"uv": [14, 0, 16, 4], "rotation": 90, "texture": "#4"}, + "down": {"uv": [16, 0, 14, 4], "rotation": 90, "texture": "#4"} + } + }, + { + "from": [9.5, 14.1, 2.5], + "to": [11.5, 15.1, 4.5], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [14, 3, 12, 4], "rotation": 180, "texture": "#4"}, + "east": {"uv": [14, 3, 12, 4], "texture": "#4"}, + "south": {"uv": [14, 2, 12, 3], "rotation": 180, "texture": "#4"}, + "west": {"uv": [12, 4, 13, 2], "rotation": 270, "texture": "#4"}, + "up": {"uv": [14, 2, 12, 4], "rotation": 180, "texture": "#4"}, + "down": {"uv": [12, 2, 14, 4], "texture": "#4"} + } + }, + { + "from": [11.5, 14.1, 2.5], + "to": [13.5, 15.1, 6.5], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [14, 3, 12, 4], "texture": "#4"}, + "east": {"uv": [15, 4, 16, 0], "rotation": 90, "texture": "#4"}, + "south": {"uv": [16, 0, 14, 1], "rotation": 180, "texture": "#4"}, + "west": {"uv": [12, 4, 13, 0], "rotation": 90, "texture": "#4"}, + "up": {"uv": [16, 0, 14, 4], "rotation": 180, "texture": "#4"}, + "down": {"uv": [14, 0, 16, 4], "texture": "#4"} + } + }, + { + "name": "Center", + "from": [6.5, 14, 6.5], + "to": [9.5, 16, 9.5], + "faces": { + "north": {"uv": [6, 8.5, 7.5, 9.5], "texture": "#2"}, + "east": {"uv": [6, 8.5, 7.5, 9.5], "texture": "#2"}, + "south": {"uv": [6, 8.5, 7.5, 9.5], "texture": "#2"}, + "west": {"uv": [6, 8.5, 7.5, 9.5], "texture": "#2"}, + "up": {"uv": [6, 10, 7.5, 11.5], "texture": "#2"} + } + }, + { + "name": "WestPointer", + "from": [7, 14, 9], + "to": [9, 15, 13], + "faces": { + "east": {"uv": [9.5, 9.5, 7.5, 10], "texture": "#2"}, + "south": {"uv": [7, 9.5, 7.5, 10], "texture": "#2"}, + "west": {"uv": [9.5, 9.5, 7.5, 10], "texture": "#2"}, + "up": {"uv": [9.5, 8.5, 7.5, 9.5], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "WestPointer", + "from": [7, 14, 3], + "to": [9, 15, 7], + "faces": { + "north": {"uv": [7.5, 9.5, 7, 10], "texture": "#2"}, + "east": {"uv": [9.5, 9.5, 7.5, 10], "texture": "#2"}, + "west": {"uv": [9.5, 9.5, 7.5, 10], "texture": "#2"}, + "up": {"uv": [9.5, 8.5, 7.5, 9.5], "rotation": 90, "texture": "#2"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/valve_handle.json b/src/main/resources/assets/create/models/block/valve_handle.json new file mode 100644 index 000000000..f0397083c --- /dev/null +++ b/src/main/resources/assets/create/models/block/valve_handle.json @@ -0,0 +1,222 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "2": "create:block/fluid_valve", + "particle": "create:block/oxidized/copper_block_0" + }, + "elements": [ + { + "name": "BranchNorth", + "from": [7, 1.5, 10], + "to": [9, 3.5, 14], + "rotation": {"angle": -22.5, "axis": "x", "origin": [8, 2.5, 10.5]}, + "faces": { + "east": {"uv": [8.5, 6, 10.5, 7], "texture": "#2"}, + "west": {"uv": [8.5, 6, 10.5, 7], "rotation": 180, "texture": "#2"}, + "up": {"uv": [8.5, 6, 10.5, 7], "rotation": 270, "texture": "#2"}, + "down": {"uv": [8.5, 6, 10.5, 7], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "WheelSouth", + "from": [5, 2, 1], + "to": [11, 5, 3], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 5, 8]}, + "faces": { + "north": {"uv": [0, 13, 3, 14.5], "rotation": 180, "texture": "#2"}, + "east": {"uv": [3, 12, 4.5, 13], "rotation": 270, "texture": "#2"}, + "south": {"uv": [0, 14.5, 3, 16], "texture": "#2"}, + "west": {"uv": [3, 12, 4.5, 13], "rotation": 90, "texture": "#2"}, + "up": {"uv": [0, 12, 3, 13], "texture": "#2"}, + "down": {"uv": [0, 12, 3, 13], "rotation": 180, "texture": "#2"} + } + }, + { + "name": "WheelSouthWest", + "from": [9, 2.1, 1], + "to": [11, 4.9, 6.65685], + "rotation": {"angle": 45, "axis": "y", "origin": [11, 3, 1]}, + "faces": { + "east": {"uv": [0, 13, 3, 14.5], "texture": "#2"}, + "west": {"uv": [0, 14.5, 3, 16], "rotation": 180, "texture": "#2"}, + "up": {"uv": [0, 12, 3, 13], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 12, 3, 13], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "WheelWest", + "from": [13, 2, 5], + "to": [15, 5, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 5, 8]}, + "faces": { + "north": {"uv": [3, 12, 4.5, 13], "rotation": 90, "texture": "#2"}, + "east": {"uv": [0, 13, 3, 14.5], "rotation": 180, "texture": "#2"}, + "south": {"uv": [3, 12, 4.5, 13], "rotation": 270, "texture": "#2"}, + "west": {"uv": [0, 14.5, 3, 16], "texture": "#2"}, + "up": {"uv": [0, 12, 3, 13], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 12, 3, 13], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "WheelNorthWest", + "from": [13, 2.1, 11], + "to": [15, 4.9, 16.65685], + "rotation": {"angle": -45, "axis": "y", "origin": [15, 5, 11]}, + "faces": { + "east": {"uv": [0, 13, 3, 14.5], "rotation": 180, "texture": "#2"}, + "west": {"uv": [0, 14.5, 3, 16], "texture": "#2"}, + "up": {"uv": [0, 12, 3, 13], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 12, 3, 13], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "WheelNorth", + "from": [5, 2, 13], + "to": [11, 5, 15], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 5, 20]}, + "faces": { + "north": {"uv": [0, 14.5, 3, 16], "rotation": 180, "texture": "#2"}, + "east": {"uv": [3, 12, 4.5, 13], "rotation": 270, "texture": "#2"}, + "south": {"uv": [0, 13, 3, 14.5], "texture": "#2"}, + "west": {"uv": [3, 12, 4.5, 13], "rotation": 180, "texture": "#2"}, + "up": {"uv": [0, 12, 3, 13], "rotation": 180, "texture": "#2"}, + "down": {"uv": [0, 12, 3, 13], "texture": "#2"} + } + }, + { + "name": "WheelEast", + "from": [1, 2, 5], + "to": [3, 5, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 5, 8]}, + "faces": { + "north": {"uv": [3, 12, 4.5, 13], "rotation": 90, "texture": "#2"}, + "east": {"uv": [0, 14.5, 3, 16], "rotation": 180, "texture": "#2"}, + "south": {"uv": [3, 12, 4.5, 13], "rotation": 270, "texture": "#2"}, + "west": {"uv": [0, 13, 3, 14.5], "texture": "#2"}, + "up": {"uv": [0, 12, 3, 13], "rotation": 270, "texture": "#2"}, + "down": {"uv": [0, 12, 3, 13], "rotation": 270, "texture": "#2"} + } + }, + { + "name": "WheelSouthEast", + "from": [5, 2.1, 1], + "to": [7, 4.9, 6.65685], + "rotation": {"angle": -45, "axis": "y", "origin": [5, 3, 1]}, + "faces": { + "east": {"uv": [0, 14.5, 3, 16], "rotation": 180, "texture": "#2"}, + "west": {"uv": [0, 13, 3, 14.5], "texture": "#2"}, + "up": {"uv": [0, 12, 3, 13], "rotation": 270, "texture": "#2"}, + "down": {"uv": [0, 12, 3, 13], "rotation": 270, "texture": "#2"} + } + }, + { + "name": "WhealNorthEast", + "from": [1, 2.1, 11], + "to": [3, 4.9, 16.65685], + "rotation": {"angle": 45, "axis": "y", "origin": [1, 3, 11]}, + "faces": { + "east": {"uv": [0, 14.5, 3, 16], "rotation": 180, "texture": "#2"}, + "west": {"uv": [0, 13, 3, 14.5], "texture": "#2"}, + "up": {"uv": [0, 12, 3, 13], "rotation": 270, "texture": "#2"}, + "down": {"uv": [0, 12, 3, 13], "rotation": 270, "texture": "#2"} + } + }, + { + "name": "WheelMid", + "from": [5.5, 0, 5.5], + "to": [10.5, 5, 10.5], + "rotation": {"angle": 0, "axis": "x", "origin": [14, -7, 14]}, + "faces": { + "north": {"uv": [6, 6, 8.5, 8.5], "rotation": 180, "texture": "#2"}, + "east": {"uv": [6, 6, 8.5, 8.5], "rotation": 270, "texture": "#2"}, + "south": {"uv": [6, 6, 8.5, 8.5], "texture": "#2"}, + "west": {"uv": [6, 6, 8.5, 8.5], "rotation": 90, "texture": "#2"}, + "up": {"uv": [6, 6, 8.5, 8.5], "rotation": 180, "texture": "#2"}, + "down": {"uv": [6, 6, 8.5, 8.5], "texture": "#2"} + } + }, + { + "name": "BranchWest", + "from": [10, 1.5, 7], + "to": [14, 3.5, 9], + "rotation": {"angle": 22.5, "axis": "z", "origin": [10.5, 2.5, 8]}, + "faces": { + "north": {"uv": [8.5, 6, 10.5, 7], "rotation": 180, "texture": "#2"}, + "south": {"uv": [8.5, 6, 10.5, 7], "texture": "#2"}, + "up": {"uv": [8.5, 6, 10.5, 7], "rotation": 180, "texture": "#2"}, + "down": {"uv": [8.5, 6, 10.5, 7], "texture": "#2"} + } + }, + { + "name": "BranchEast", + "from": [2, 1.5, 7], + "to": [6, 3.5, 9], + "rotation": {"angle": -22.5, "axis": "z", "origin": [5.5, 2.5, 8.5]}, + "faces": { + "north": {"uv": [8.5, 6, 10.5, 7], "rotation": 180, "texture": "#2"}, + "south": {"uv": [8.5, 6, 10.5, 7], "texture": "#2"}, + "up": {"uv": [8.5, 6, 10.5, 7], "rotation": 180, "texture": "#2"}, + "down": {"uv": [8.5, 6, 10.5, 7], "texture": "#2"} + } + }, + { + "name": "BranchSouth", + "from": [7, 1.5, 2], + "to": [9, 3.5, 6], + "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 2.5, 5.5]}, + "faces": { + "east": {"uv": [8.5, 6, 10.5, 7], "texture": "#2"}, + "west": {"uv": [8.5, 6, 10.5, 7], "rotation": 180, "texture": "#2"}, + "up": {"uv": [8.5, 6, 10.5, 7], "rotation": 270, "texture": "#2"}, + "down": {"uv": [8.5, 6, 10.5, 7], "rotation": 90, "texture": "#2"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0.75], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 1], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 0.75, 0], + "scale": [0.35, 0.35, 0.35] + }, + "gui": { + "rotation": [30, 225, 0], + "translation": [0, 2.75, 0], + "scale": [0.75, 0.75, 0.75] + }, + "head": { + "translation": [0, 13, 0] + }, + "fixed": { + "rotation": [-90, 0, 0], + "translation": [0, 0, -3.5], + "scale": [0.5, 0.5, 0.5] + } + }, + "groups": [ + { + "name": "Wheel", + "origin": [8, 5.5, -2.5], + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/fluid_pipe.png b/src/main/resources/assets/create/textures/block/fluid_pipe.png index 16b475d5e8d64cb7a2ed93d1758023b497777397..6f96b5d30d30b36870d76696c6df360b7dd4e42b 100644 GIT binary patch delta 613 zcmX@ZHJ5dQBnLAC1B1(wu45Aw73#eMd_r8C+?>i?oJ;NPmPUK6P7BEak-;a?iuJ!!E4kMWJp zfBdc>C+_b>)`?A`(UY1_m~bXJoynRObS~}Hs#o`UCO*gx-a12f>ZD@58+t!v8P={{ zo1Gn+u3hBpVdy*0t|9mC```QWetFFNd7D>t&yKx}x%cON&&{u6RAIQp;Ir%9`S|$r zdlx#@OE%02dSb!ApS}L~=YLEIc8rn@H4IICNq;_h81s zhrAnh<*v=0{lYnsV@{K%_{`uvi{luV2lji1l=pu4P_^;aVS$U~&vmNSwR;@h8TItW zf6@J+Kf*htyV8E!D@-xAV+`8sG|5_g%d^rG+{?DRe+Kk^dUlxOJ;R;@f?ms6MJ9??=1dWF5X#wA^ykHI295F$ z3pa_o7&=VP-1PmOKYuNQ=N@OFoqUU#PilEAVu=cg;x@1o(`jb%{x0@F&-BCHzMlra vIzFuUJ8!}h!+Q%kFBK^N=9Mgs=0kG=0MUVjMN zBTqoy54AR!+%W3*ib&v+JQ7Wk$hge3i{t%`T6k;Bl!HR zmou{QQdZ8KC}}yn9@oeyZ=EXY9Ds5ZAAPMXl~>A%a)696=AeAz+?vX%U1MCN_{nBG zx!E4bAKOh8W-@85d%eEa=ZXt*GJmgA6)3)b?UwxX=dTBn7+<|}UM_reLbm_e)BepH zxAo-I)1V#zzuj-D;zD$y<;tRD({URaW1tm|^n}Cv!Gv;PGV{XbRv;Viu4--9Hjc!A zbULL<>kpbzE)}F$C~6xSW1M6b7(Wc-eS>dAGq=C-`WXp=o*Y|Q(ze09!+*KODZ53$ zJBHj`sD0{b@Eg6@J=}LTGIOudit3Eq-KojF-P*yl7zHnJ*i+$>6O8u_x?^jvtDPVS zKa-j{rSUT$x0sf;!< z9jgaQLIA5j|8zq>eDkRGQGbe2jc!xw|Hcsjx!49OK7OV7!dt7R>h z77JReUoB-dPt1ywYp*JKsi(pF`uzLTDS8O1l?AEzaZ+OQpcgO4-G8v1x;`4{95-^N zrDE@gOP_=+MzqTa7KjT-)z59RNjw(QmdEwqs__M+i09m(na zudn1~c`2)fHZsOuG?FMFRjx$$YsI}1T<4bOh39#b<;O2R4tWhpG`w)zP>56`=xN_FuH6NE?nZaH&dmo+#h-z;= z4-To9!gX4)RBdyBtx*q4M<#gFku!Fnvw1rl<`3EIN5`RQVcR3fVIB4&^B@B71|!A?%7;X!!AIy->n5reyjd$o^o0P6so5H4(t z0{B4K7-(DCW`B-_Ffa~byaDAJst38i%@0WwnB|q@%Q0ahR&y$gZ))P1xURk&{{f*e z$3klwEKiK*0pODsjfB96Vunn_bEJ$h`lcAUjyVK#_jKE~#$>+bZeyypA&PSyR#Q-J zW3FNfa^@JJIh?r~#U=+v!nwECPF*fabVu_k38FurnSX&V4{9x~!_H6@D66BfT=d_e z)7sY@4oM%@yV7rWCG7U4ml^7YtOcEBApX#oLFh?397>o96C;QUZ#0x3dXv2GKf4&> z1-lbm11DU!0hd$;-Vis9yK@-hqlSEs7slr?PBiG>^J&ki3paFtxfVHXcieq$?W4x# egGX~k{uKvc+>HgR;J}Xn0000$(ATTg+DFZ{0hoif#g^!a>q_5jq28Ikf8!s;}DM?9YW@ckU!)ZZY?(XicE-vdB z7z&f38w)ZjG85CILaZz-e0+Q?%*}0WZ2bKEtgBp1W;(hvGDR>lwoRR}=Fs8d`lf>w z(LiTxUT<3tqzp@f{DS|J2pHsN`6&W5a~60+7BevL9R^{>Eak-;om!{ zx2Rb`prw&%(lS%F3#+zdW>5aNqOM~K7W#D)9l^NQw6*@9T>&d_j4%5 zc+B)rR7w9RRcgSob;tL9A)afe+mDxQZ83dyZ^GKG8`I`?H+3xEvS!t$b*_!O%%ALH zD|vR{L(DzKr`@x8LUMfm{tA;`;ouro={(gPszoUN=ef+odOza+p=X@h zKe(b*CO3Y%lQH9B%7rF<`#%$I$6jf&GM!iCctGLmyU*IOxrx2I%nMu`TZOfxK5?x$ zY&$32@#d|l?nUYISkrGwG%q@y{_*eQ`G(yYRxCWZCl-A@-m}d4z=c*Ft8zP8rpPUd z+$$2KZ@>R;>&19t5qD%sQ|4O7`O+2An=+37e*gQhq6SCG#a5kN8(H)G1$O)|@Ucj| zY_h|aQPgk6Y0*PBnRb-36;4?8zwpis=M*EJ&XRKvkI6jxUlYp8@r1+k(QVd$fr)=4 oKD=de=}4TgJ?hT70-JwK_O_MvH$+Vq17n22)78&qol`;+0KqjbCIA2c literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/glass_fluid_pipe.png b/src/main/resources/assets/create/textures/block/glass_fluid_pipe.png index f5b36798da394edf54c801fb1d657d9839dfcb47..0ad8834d590629b341aa8c93690b3f3f6acaacc1 100644 GIT binary patch delta 286 zcmey&e2Qs;BnLAC1A~SxfAB;_g?h^XpAgq+L0(O6PO+2c0wv~!dbR|(bss#tG}`M( zcT)Ab?FTEOFHbJmlpDC>!p#e>Uan3HoEzfV?C%Oxd?D}HaUdmJ666>B9|JIKs=dPj zl;$k(h%9Dc&{F_m#;Y=N(m=s#PZ!4!jr!nJ|872JMUK_tjx`P2|NcMDcSR?9U6W^b z0OO^v{~mccsM(!4I3>_!Mt17{8LnJQOkeJOpOf2iq3l@U!k&f8vcwGCD*0+}C<$3s zyO{o)xVQ3bKyj02**)tSYHD8$+)IC{7jS&ht~mX7*LS^*emt>$r%m4o+wE!KYQKN5 S`wRm&&?TO(elF{r5}E)~!hNX# delta 456 zcmV;(0XP220`miq83+ad001BJ|6!3KAb$yPNLh0L04^Z_04^Z`2V4CA0004qNklD^nd^F z+n-9{irzuEdJ)j4+h57X@UQ5zWU1GGixzOj1i_87kK>f3y1=Tfw~ws zBpQX7Siq(e(hLHi1O>t%Js^OR4u}Du)QFry!3Mnh_Xo@&1;F%x15wRP5;e@hl^2ln y0SLhI!mU%!5z#0lEecQT_-L3~aPt28jR63(vh3vPmyi1Z0000