From 09e12368a0d4a21f67aa08fdf5bf10b7bcdad983 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Wed, 1 Jun 2022 03:35:41 +0200 Subject: [PATCH] Slide to Unlock - Added Train Doors & Train Trapdoors --- src/generated/resources/.cache/cache | 51 ++-- .../assets/create/blockstates/train_door.json | 244 ++++++++++++++++++ .../create/blockstates/train_trapdoor.json | 68 +++++ .../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/es_cl.json | 4 +- .../assets/create/lang/unfinished/es_es.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/pl_pl.json | 4 +- .../assets/create/lang/unfinished/pt_br.json | 4 +- .../assets/create/lang/unfinished/pt_pt.json | 4 +- .../assets/create/lang/unfinished/ro_ro.json | 4 +- .../assets/create/lang/unfinished/ru_ru.json | 4 +- .../assets/create/lang/unfinished/zh_cn.json | 4 +- .../assets/create/lang/unfinished/zh_tw.json | 4 +- .../assets/create/models/item/train_door.json | 6 + .../create/models/item/train_trapdoor.json | 3 + .../crafting/kinetics/train_door.json | 32 +++ .../crafting/kinetics/train_trapdoor.json | 32 +++ .../create/loot_tables/blocks/train_door.json | 29 +++ .../loot_tables/blocks/train_trapdoor.json | 20 ++ .../recipes/crafting/kinetics/train_door.json | 14 + .../crafting/kinetics/train_trapdoor.json | 14 + .../data/minecraft/tags/blocks/doors.json | 6 + .../tags/blocks/mineable/pickaxe.json | 2 + .../data/minecraft/tags/blocks/trapdoors.json | 6 + .../minecraft/tags/blocks/wooden_doors.json | 6 + .../data/minecraft/tags/items/doors.json | 6 + .../data/minecraft/tags/items/trapdoors.json | 6 + .../java/com/simibubi/create/AllBlocks.java | 41 +++ .../com/simibubi/create/AllTileEntities.java | 8 + .../curiosities/deco/PlacardBlock.java | 5 +- .../curiosities/deco/SlidingDoorRenderer.java | 56 ++++ .../deco/SlidingDoorTileEntity.java | 70 +++++ .../curiosities/deco/TrainDoorBlock.java | 225 ++++++++++++++++ .../curiosities/deco/TrainTrapdoorBlock.java | 31 +++ .../create/foundation/block/BigOutlines.java | 4 +- .../data/recipe/StandardRecipeGen.java | 10 + .../models/block/train_door/block_bottom.json | 22 ++ .../models/block/train_door/block_top.json | 22 ++ .../create/models/block/train_trapdoor.json | 3 + .../block/train_trapdoor/block_bottom.json | 23 ++ .../block/train_trapdoor/block_open.json | 23 ++ .../block/train_trapdoor/block_top.json | 23 ++ .../textures/block/train_door_bottom.png | Bin 0 -> 338 bytes .../create/textures/block/train_door_side.png | Bin 0 -> 233 bytes .../create/textures/block/train_door_top.png | Bin 0 -> 350 bytes .../create/textures/block/train_trapdoor.png | Bin 0 -> 319 bytes .../create/textures/item/train_door.png | Bin 0 -> 328 bytes 54 files changed, 1140 insertions(+), 35 deletions(-) create mode 100644 src/generated/resources/assets/create/blockstates/train_door.json create mode 100644 src/generated/resources/assets/create/blockstates/train_trapdoor.json create mode 100644 src/generated/resources/assets/create/models/item/train_door.json create mode 100644 src/generated/resources/assets/create/models/item/train_trapdoor.json create mode 100644 src/generated/resources/data/create/advancements/recipes/create.base/crafting/kinetics/train_door.json create mode 100644 src/generated/resources/data/create/advancements/recipes/create.base/crafting/kinetics/train_trapdoor.json create mode 100644 src/generated/resources/data/create/loot_tables/blocks/train_door.json create mode 100644 src/generated/resources/data/create/loot_tables/blocks/train_trapdoor.json create mode 100644 src/generated/resources/data/create/recipes/crafting/kinetics/train_door.json create mode 100644 src/generated/resources/data/create/recipes/crafting/kinetics/train_trapdoor.json create mode 100644 src/generated/resources/data/minecraft/tags/blocks/doors.json create mode 100644 src/generated/resources/data/minecraft/tags/blocks/trapdoors.json create mode 100644 src/generated/resources/data/minecraft/tags/blocks/wooden_doors.json create mode 100644 src/generated/resources/data/minecraft/tags/items/doors.json create mode 100644 src/generated/resources/data/minecraft/tags/items/trapdoors.json create mode 100644 src/main/java/com/simibubi/create/content/curiosities/deco/SlidingDoorRenderer.java create mode 100644 src/main/java/com/simibubi/create/content/curiosities/deco/SlidingDoorTileEntity.java create mode 100644 src/main/java/com/simibubi/create/content/curiosities/deco/TrainDoorBlock.java create mode 100644 src/main/java/com/simibubi/create/content/curiosities/deco/TrainTrapdoorBlock.java create mode 100644 src/main/resources/assets/create/models/block/train_door/block_bottom.json create mode 100644 src/main/resources/assets/create/models/block/train_door/block_top.json create mode 100644 src/main/resources/assets/create/models/block/train_trapdoor.json create mode 100644 src/main/resources/assets/create/models/block/train_trapdoor/block_bottom.json create mode 100644 src/main/resources/assets/create/models/block/train_trapdoor/block_open.json create mode 100644 src/main/resources/assets/create/models/block/train_trapdoor/block_top.json create mode 100644 src/main/resources/assets/create/textures/block/train_door_bottom.png create mode 100644 src/main/resources/assets/create/textures/block/train_door_side.png create mode 100644 src/main/resources/assets/create/textures/block/train_door_top.png create mode 100644 src/main/resources/assets/create/textures/block/train_trapdoor.png create mode 100644 src/main/resources/assets/create/textures/item/train_door.png diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index e077596de..0ae8a031f 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -494,6 +494,8 @@ a2454400b1cf9889f70aebdc89c52a1be25f543c assets/create/blockstates/tiled_glass_p 96c45abe7a5d9273feaf5f747d14cee8e04b58da assets/create/blockstates/track.json 408ae1009ee8bb2f2b83753d5909c53744f7865f assets/create/blockstates/track_signal.json 60609cfbcc9be6f7e41fb493ef3147beb9750b60 assets/create/blockstates/track_station.json +b000a6cde143f8a12fc8996d1ac8b5164f75253b assets/create/blockstates/train_door.json +836c443ab8778f0ff2b16bdf5f3339a0871c273e assets/create/blockstates/train_trapdoor.json 29af21c8d82891139d48d69f0393f612f2b6f8f1 assets/create/blockstates/tuff_pillar.json a8094531617e27a545c4815ab2062bf0ffca3633 assets/create/blockstates/turntable.json c9bf881ea71aa274b2803142456f1bbed9539076 assets/create/blockstates/veridium.json @@ -548,23 +550,23 @@ bf2b0310500213ff853c748c236eb5d01f61658e assets/create/blockstates/yellow_toolbo 6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json -eba7c6db62d5deb5a111a483ee37082ef82106db assets/create/lang/en_ud.json -bfbe6e2af329fec021924581d19a0c3d1f63081d assets/create/lang/en_us.json -7c3ee0da49b4b370720085645dddd8b5723b9e8c assets/create/lang/unfinished/de_de.json -a5c2a9d869c9d08593b8ada461059dba5723b0d8 assets/create/lang/unfinished/es_cl.json -e3767d6a01cab033bddf329f8577ab30c164d6c5 assets/create/lang/unfinished/es_es.json -a7a22755b3763af031b0ef64b1e377dc4869f87f assets/create/lang/unfinished/fr_fr.json -99a34cd1814c48de4666f5387eaf5a0193b3d975 assets/create/lang/unfinished/it_it.json -8646fba326895102db99ef5aa59d0a248b11a8c6 assets/create/lang/unfinished/ja_jp.json -33dcf809b1f5b8409c16637f58bf510e3caf8b17 assets/create/lang/unfinished/ko_kr.json -ae23d4781e687b2a0c21c0bdfc4c37b7c7794bca assets/create/lang/unfinished/nl_nl.json -301467e71aa2243bbd197e70a1c0f2950edb5106 assets/create/lang/unfinished/pl_pl.json -eb75c1cfd9abe49cd161f3c13438f4b0906e6db6 assets/create/lang/unfinished/pt_br.json -4f05cfecb7fdd5a8d07a2e665f394796f7cde097 assets/create/lang/unfinished/pt_pt.json -40b56a04ad59b0876a42311acefbca478815cab6 assets/create/lang/unfinished/ro_ro.json -3db9f371de5faa7dd857c08f8af7eb65571344e6 assets/create/lang/unfinished/ru_ru.json -3f6b1f177a02c19b6202eae400771ed483496b3d assets/create/lang/unfinished/zh_cn.json -675fd73014bb134554f332499b1c669c3a0f08c1 assets/create/lang/unfinished/zh_tw.json +c7b048548ba737df7efee5731a064c8ee960bdaa assets/create/lang/en_ud.json +36b99098c2c1e74ea354e6029c793e60d0f4ae59 assets/create/lang/en_us.json +7dcf9e632b044ab669dd6f6ad3e54631c3d6139c assets/create/lang/unfinished/de_de.json +cfadcedb96c76afcbb40588d79c0349f82e47460 assets/create/lang/unfinished/es_cl.json +b4ff075c0f41ccb984b0d607cae9b418753c9be2 assets/create/lang/unfinished/es_es.json +a5f32e9f82cebf81078080f08a7d4c34c57e83ed assets/create/lang/unfinished/fr_fr.json +14604d102012db3d5d7d73704068757327e36be2 assets/create/lang/unfinished/it_it.json +f303c569fc4d5948b0114875fb5f51107fd1206b assets/create/lang/unfinished/ja_jp.json +450c9f26a1e9e69dea4f560b98038713e455d8ff assets/create/lang/unfinished/ko_kr.json +6b27dd10cdf70a887f92bd6e07727ecdb353fe05 assets/create/lang/unfinished/nl_nl.json +c7654bc1bae61f4a082c5c192aee77eb20420524 assets/create/lang/unfinished/pl_pl.json +21fdbb74b8ec7985a6b28007dea9e89573185aee assets/create/lang/unfinished/pt_br.json +b1e1b5c9bbe8edf74a7ea065419c163a498705d5 assets/create/lang/unfinished/pt_pt.json +475bee61ea113f82c28d160a1e0a878497c70294 assets/create/lang/unfinished/ro_ro.json +8e7bbcc121f75d9624912b9b973c97e06e513ee9 assets/create/lang/unfinished/ru_ru.json +98e166139f6b34fc5b3b3f82e847e45fa76dde3d assets/create/lang/unfinished/zh_cn.json +ac0c777b32535ea8d87c6812cacb54b56f824c25 assets/create/lang/unfinished/zh_tw.json 487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json 3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json @@ -2125,6 +2127,8 @@ a7d0b746637897209bd86b1a6501ecbfb46d8270 assets/create/models/item/tiled_glass_p 6b5569f25fa2d905729a3f18deb56b6c67c5dfa4 assets/create/models/item/track.json c317adb86ee47765dd7716539c65f31f329deb85 assets/create/models/item/track_signal.json 447b472ee2e4796dde9e96a2be3c12e015756845 assets/create/models/item/track_station.json +c802b2ba62dca48eaad28dafbe67961f44697696 assets/create/models/item/train_door.json +96a711ce9da69af155332f72f81f4135e859ea17 assets/create/models/item/train_trapdoor.json f8a4fa1ccecb16a3941cc46db7481ed8e8429a5e assets/create/models/item/tree_fertilizer.json 3f6810da54724de551591b46cd5b47a98a4737ef assets/create/models/item/tuff_pillar.json fb24881c4e92bbb7ffa54a71e0af6b1c66d84829 assets/create/models/item/turntable.json @@ -2478,6 +2482,8 @@ f640ded44cb4cf4c31e49deb0fc14e3495cd2edf data/create/advancements/recipes/create f3fc3d4fee0712906f833aa17185f0bacb21922f data/create/advancements/recipes/create.base/crafting/kinetics/super_glue.json 23c1ecff946d41c74d4fb78e2bbc5e348c4487f5 data/create/advancements/recipes/create.base/crafting/kinetics/track_signal.json da30636ca7e77f2947d0d28542c0b99747c9939e data/create/advancements/recipes/create.base/crafting/kinetics/track_station.json +050b8c527083e624a01f38ea8b34771a19ed2bc5 data/create/advancements/recipes/create.base/crafting/kinetics/train_door.json +3b6779f388eaf07f3c18fec33713f41f39a0032d data/create/advancements/recipes/create.base/crafting/kinetics/train_trapdoor.json 9d7bbda05cebecc0922f4d344e9a51d4c2774a18 data/create/advancements/recipes/create.base/crafting/kinetics/turntable.json c1bb8d9022dff3dcf6c42f651b421281924c7dd2 data/create/advancements/recipes/create.base/crafting/kinetics/vertical_gearboxfrom_conversion.json a67713418e505fa68ecde6b8bc83c09ccced7a65 data/create/advancements/recipes/create.base/crafting/kinetics/water_wheel.json @@ -3838,6 +3844,8 @@ da3ceb80799d349b91781b0dd43a02e548045c66 data/create/loot_tables/blocks/stressom e2846b8823918bce402eb361f703ecdc14251ccc data/create/loot_tables/blocks/track.json f589afc404f98c42d2d9b0b03bcac87f7f6444cc data/create/loot_tables/blocks/track_signal.json 4617a11e220dcd0094c29d204fe90c01495c4e9b data/create/loot_tables/blocks/track_station.json +7f337ebb7f9a6ec83af12f3cf99517762689ac25 data/create/loot_tables/blocks/train_door.json +f74bc454bda585bc5ab0b5b3e0b4d345a6ff039b data/create/loot_tables/blocks/train_trapdoor.json 8fbe59bc77b029b802c43fb8a930778dede440ea data/create/loot_tables/blocks/tuff_pillar.json 2419d50b6086e92ab05624fdf38ef2b55c0b0944 data/create/loot_tables/blocks/turntable.json 2706ebca18074fe8d7a988d2c0002c857bff5c2b data/create/loot_tables/blocks/veridium.json @@ -4120,6 +4128,8 @@ af5854ee2fa3be195ad9abcdeebe6ed7306b651c data/create/recipes/crafting/kinetics/s 21f885a674603367b67e1e993c175638cbda9ea3 data/create/recipes/crafting/kinetics/super_glue.json 456d59d0fff2b042e1e886ebbe46b84fbd212c40 data/create/recipes/crafting/kinetics/track_signal.json 3c8fd3b5fe4d264cfe405c8d222b451769c816d5 data/create/recipes/crafting/kinetics/track_station.json +c38984c432bd410261aaf6a6f30744c58481b325 data/create/recipes/crafting/kinetics/train_door.json +5e2af5ce3957d5ce4f54ceb667dcfed5cffafb32 data/create/recipes/crafting/kinetics/train_trapdoor.json 8494f5fcd85a740fa0f0384e3522d8cdd905ce49 data/create/recipes/crafting/kinetics/turntable.json 057c889b0a306f44b8835c896663154ccd9ff12f data/create/recipes/crafting/kinetics/vertical_gearboxfrom_conversion.json 4fb009b86a51b2e259bd1f73848803f6276dd820 data/create/recipes/crafting/kinetics/water_wheel.json @@ -5382,20 +5392,25 @@ e002dfedc5e8762de0f97ea1f3fa546e92e748ae data/forge/tags/items/tools/wrench.json 2db7759fe036160c14c6ed19a68604ca16f4de60 data/minecraft/tags/blocks/azalea_root_replaceable.json 9f7a428085b1aac66da32a43e9d51c7efc1f0d81 data/minecraft/tags/blocks/beacon_base_blocks.json dea0b54b33b1ae3b4fa8091dfcc4ad5687978ab1 data/minecraft/tags/blocks/climbable.json +4c7d869f28092481b6fd708fecbd19ccb8d5a543 data/minecraft/tags/blocks/doors.json 2db7759fe036160c14c6ed19a68604ca16f4de60 data/minecraft/tags/blocks/dripstone_replaceable_blocks.json 69f596fcb065e26b02ce246760432b5174191b76 data/minecraft/tags/blocks/impermeable.json 2db7759fe036160c14c6ed19a68604ca16f4de60 data/minecraft/tags/blocks/lush_ground_replaceable.json 1472ec62e43355273f0699743ccdb65324c02475 data/minecraft/tags/blocks/mineable/axe.json -9e3acb6ee234679d81e4a5810dd71a5f456a26bd data/minecraft/tags/blocks/mineable/pickaxe.json +b4942c1fc4d3f55eb5f603ebd5c6f4bad62a3cb4 data/minecraft/tags/blocks/mineable/pickaxe.json 2db7759fe036160c14c6ed19a68604ca16f4de60 data/minecraft/tags/blocks/moss_replaceable.json e157c1d3af30e409e34bbefbe15a037e6e1c8daa data/minecraft/tags/blocks/needs_iron_tool.json a08f67865337f62601c5e333b4011382d10020e4 data/minecraft/tags/blocks/needs_stone_tool.json 6bcabbc1c0479caa80a0ebc676bb34ce0052efb0 data/minecraft/tags/blocks/rails.json 49a043b38ca8d4e2fa8cba9ceee3b69715a8476e data/minecraft/tags/blocks/slabs.json bc0917bead5b198feeeaa5c5b92dddae48bbb6f5 data/minecraft/tags/blocks/stairs.json +5bf61c12f5412dc593cbed2d1cd2d20f35605cb2 data/minecraft/tags/blocks/trapdoors.json 0ec220675cbf8a6eeb47d42b7409395a0cb6ae6e data/minecraft/tags/blocks/walls.json +4c7d869f28092481b6fd708fecbd19ccb8d5a543 data/minecraft/tags/blocks/wooden_doors.json 09d26bcd0f94459f945219997277c4fbf14adeb7 data/minecraft/tags/fluids/water.json +4c7d869f28092481b6fd708fecbd19ccb8d5a543 data/minecraft/tags/items/doors.json 49cadea86f6b63d5065b859a0d0e7ad772cf51d6 data/minecraft/tags/items/piglin_loved.json 49a043b38ca8d4e2fa8cba9ceee3b69715a8476e data/minecraft/tags/items/slabs.json bc0917bead5b198feeeaa5c5b92dddae48bbb6f5 data/minecraft/tags/items/stairs.json +5bf61c12f5412dc593cbed2d1cd2d20f35605cb2 data/minecraft/tags/items/trapdoors.json 0ec220675cbf8a6eeb47d42b7409395a0cb6ae6e data/minecraft/tags/items/walls.json diff --git a/src/generated/resources/assets/create/blockstates/train_door.json b/src/generated/resources/assets/create/blockstates/train_door.json new file mode 100644 index 000000000..5dfe687ac --- /dev/null +++ b/src/generated/resources/assets/create/blockstates/train_door.json @@ -0,0 +1,244 @@ +{ + "variants": { + "facing=north,half=upper,hinge=left,open=false,visible=false": { + "model": "create:block/train_door/block_top", + "y": 270 + }, + "facing=south,half=upper,hinge=left,open=false,visible=false": { + "model": "create:block/train_door/block_top", + "y": 90 + }, + "facing=west,half=upper,hinge=left,open=false,visible=false": { + "model": "create:block/train_door/block_top", + "y": 180 + }, + "facing=east,half=upper,hinge=left,open=false,visible=false": { + "model": "create:block/train_door/block_top" + }, + "facing=north,half=lower,hinge=left,open=false,visible=false": { + "model": "create:block/train_door/block_bottom", + "y": 270 + }, + "facing=south,half=lower,hinge=left,open=false,visible=false": { + "model": "create:block/train_door/block_bottom", + "y": 90 + }, + "facing=west,half=lower,hinge=left,open=false,visible=false": { + "model": "create:block/train_door/block_bottom", + "y": 180 + }, + "facing=east,half=lower,hinge=left,open=false,visible=false": { + "model": "create:block/train_door/block_bottom" + }, + "facing=north,half=upper,hinge=right,open=false,visible=false": { + "model": "create:block/train_door/block_top", + "y": 270 + }, + "facing=south,half=upper,hinge=right,open=false,visible=false": { + "model": "create:block/train_door/block_top", + "y": 90 + }, + "facing=west,half=upper,hinge=right,open=false,visible=false": { + "model": "create:block/train_door/block_top", + "y": 180 + }, + "facing=east,half=upper,hinge=right,open=false,visible=false": { + "model": "create:block/train_door/block_top" + }, + "facing=north,half=lower,hinge=right,open=false,visible=false": { + "model": "create:block/train_door/block_bottom", + "y": 270 + }, + "facing=south,half=lower,hinge=right,open=false,visible=false": { + "model": "create:block/train_door/block_bottom", + "y": 90 + }, + "facing=west,half=lower,hinge=right,open=false,visible=false": { + "model": "create:block/train_door/block_bottom", + "y": 180 + }, + "facing=east,half=lower,hinge=right,open=false,visible=false": { + "model": "create:block/train_door/block_bottom" + }, + "facing=north,half=upper,hinge=left,open=true,visible=false": { + "model": "create:block/train_door/block_top" + }, + "facing=south,half=upper,hinge=left,open=true,visible=false": { + "model": "create:block/train_door/block_top", + "y": 180 + }, + "facing=west,half=upper,hinge=left,open=true,visible=false": { + "model": "create:block/train_door/block_top", + "y": 270 + }, + "facing=east,half=upper,hinge=left,open=true,visible=false": { + "model": "create:block/train_door/block_top", + "y": 90 + }, + "facing=north,half=lower,hinge=left,open=true,visible=false": { + "model": "create:block/train_door/block_bottom" + }, + "facing=south,half=lower,hinge=left,open=true,visible=false": { + "model": "create:block/train_door/block_bottom", + "y": 180 + }, + "facing=west,half=lower,hinge=left,open=true,visible=false": { + "model": "create:block/train_door/block_bottom", + "y": 270 + }, + "facing=east,half=lower,hinge=left,open=true,visible=false": { + "model": "create:block/train_door/block_bottom", + "y": 90 + }, + "facing=north,half=upper,hinge=right,open=true,visible=false": { + "model": "create:block/train_door/block_top", + "y": 180 + }, + "facing=south,half=upper,hinge=right,open=true,visible=false": { + "model": "create:block/train_door/block_top" + }, + "facing=west,half=upper,hinge=right,open=true,visible=false": { + "model": "create:block/train_door/block_top", + "y": 90 + }, + "facing=east,half=upper,hinge=right,open=true,visible=false": { + "model": "create:block/train_door/block_top", + "y": 270 + }, + "facing=north,half=lower,hinge=right,open=true,visible=false": { + "model": "create:block/train_door/block_bottom", + "y": 180 + }, + "facing=south,half=lower,hinge=right,open=true,visible=false": { + "model": "create:block/train_door/block_bottom" + }, + "facing=west,half=lower,hinge=right,open=true,visible=false": { + "model": "create:block/train_door/block_bottom", + "y": 90 + }, + "facing=east,half=lower,hinge=right,open=true,visible=false": { + "model": "create:block/train_door/block_bottom", + "y": 270 + }, + "facing=north,half=upper,hinge=left,open=false,visible=true": { + "model": "create:block/train_door/block_top", + "y": 270 + }, + "facing=south,half=upper,hinge=left,open=false,visible=true": { + "model": "create:block/train_door/block_top", + "y": 90 + }, + "facing=west,half=upper,hinge=left,open=false,visible=true": { + "model": "create:block/train_door/block_top", + "y": 180 + }, + "facing=east,half=upper,hinge=left,open=false,visible=true": { + "model": "create:block/train_door/block_top" + }, + "facing=north,half=lower,hinge=left,open=false,visible=true": { + "model": "create:block/train_door/block_bottom", + "y": 270 + }, + "facing=south,half=lower,hinge=left,open=false,visible=true": { + "model": "create:block/train_door/block_bottom", + "y": 90 + }, + "facing=west,half=lower,hinge=left,open=false,visible=true": { + "model": "create:block/train_door/block_bottom", + "y": 180 + }, + "facing=east,half=lower,hinge=left,open=false,visible=true": { + "model": "create:block/train_door/block_bottom" + }, + "facing=north,half=upper,hinge=right,open=false,visible=true": { + "model": "create:block/train_door/block_top", + "y": 270 + }, + "facing=south,half=upper,hinge=right,open=false,visible=true": { + "model": "create:block/train_door/block_top", + "y": 90 + }, + "facing=west,half=upper,hinge=right,open=false,visible=true": { + "model": "create:block/train_door/block_top", + "y": 180 + }, + "facing=east,half=upper,hinge=right,open=false,visible=true": { + "model": "create:block/train_door/block_top" + }, + "facing=north,half=lower,hinge=right,open=false,visible=true": { + "model": "create:block/train_door/block_bottom", + "y": 270 + }, + "facing=south,half=lower,hinge=right,open=false,visible=true": { + "model": "create:block/train_door/block_bottom", + "y": 90 + }, + "facing=west,half=lower,hinge=right,open=false,visible=true": { + "model": "create:block/train_door/block_bottom", + "y": 180 + }, + "facing=east,half=lower,hinge=right,open=false,visible=true": { + "model": "create:block/train_door/block_bottom" + }, + "facing=north,half=upper,hinge=left,open=true,visible=true": { + "model": "create:block/train_door/block_top" + }, + "facing=south,half=upper,hinge=left,open=true,visible=true": { + "model": "create:block/train_door/block_top", + "y": 180 + }, + "facing=west,half=upper,hinge=left,open=true,visible=true": { + "model": "create:block/train_door/block_top", + "y": 270 + }, + "facing=east,half=upper,hinge=left,open=true,visible=true": { + "model": "create:block/train_door/block_top", + "y": 90 + }, + "facing=north,half=lower,hinge=left,open=true,visible=true": { + "model": "create:block/train_door/block_bottom" + }, + "facing=south,half=lower,hinge=left,open=true,visible=true": { + "model": "create:block/train_door/block_bottom", + "y": 180 + }, + "facing=west,half=lower,hinge=left,open=true,visible=true": { + "model": "create:block/train_door/block_bottom", + "y": 270 + }, + "facing=east,half=lower,hinge=left,open=true,visible=true": { + "model": "create:block/train_door/block_bottom", + "y": 90 + }, + "facing=north,half=upper,hinge=right,open=true,visible=true": { + "model": "create:block/train_door/block_top", + "y": 180 + }, + "facing=south,half=upper,hinge=right,open=true,visible=true": { + "model": "create:block/train_door/block_top" + }, + "facing=west,half=upper,hinge=right,open=true,visible=true": { + "model": "create:block/train_door/block_top", + "y": 90 + }, + "facing=east,half=upper,hinge=right,open=true,visible=true": { + "model": "create:block/train_door/block_top", + "y": 270 + }, + "facing=north,half=lower,hinge=right,open=true,visible=true": { + "model": "create:block/train_door/block_bottom", + "y": 180 + }, + "facing=south,half=lower,hinge=right,open=true,visible=true": { + "model": "create:block/train_door/block_bottom" + }, + "facing=west,half=lower,hinge=right,open=true,visible=true": { + "model": "create:block/train_door/block_bottom", + "y": 90 + }, + "facing=east,half=lower,hinge=right,open=true,visible=true": { + "model": "create:block/train_door/block_bottom", + "y": 270 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/blockstates/train_trapdoor.json b/src/generated/resources/assets/create/blockstates/train_trapdoor.json new file mode 100644 index 000000000..608ce99d0 --- /dev/null +++ b/src/generated/resources/assets/create/blockstates/train_trapdoor.json @@ -0,0 +1,68 @@ +{ + "variants": { + "facing=north,half=top,open=false": { + "model": "create:block/train_trapdoor/block_top" + }, + "facing=south,half=top,open=false": { + "model": "create:block/train_trapdoor/block_top", + "y": 180 + }, + "facing=west,half=top,open=false": { + "model": "create:block/train_trapdoor/block_top", + "y": 270 + }, + "facing=east,half=top,open=false": { + "model": "create:block/train_trapdoor/block_top", + "y": 90 + }, + "facing=north,half=bottom,open=false": { + "model": "create:block/train_trapdoor/block_bottom" + }, + "facing=south,half=bottom,open=false": { + "model": "create:block/train_trapdoor/block_bottom", + "y": 180 + }, + "facing=west,half=bottom,open=false": { + "model": "create:block/train_trapdoor/block_bottom", + "y": 270 + }, + "facing=east,half=bottom,open=false": { + "model": "create:block/train_trapdoor/block_bottom", + "y": 90 + }, + "facing=north,half=top,open=true": { + "model": "create:block/train_trapdoor/block_open", + "x": 180, + "y": 180 + }, + "facing=south,half=top,open=true": { + "model": "create:block/train_trapdoor/block_open", + "x": 180 + }, + "facing=west,half=top,open=true": { + "model": "create:block/train_trapdoor/block_open", + "x": 180, + "y": 90 + }, + "facing=east,half=top,open=true": { + "model": "create:block/train_trapdoor/block_open", + "x": 180, + "y": 270 + }, + "facing=north,half=bottom,open=true": { + "model": "create:block/train_trapdoor/block_open" + }, + "facing=south,half=bottom,open=true": { + "model": "create:block/train_trapdoor/block_open", + "y": 180 + }, + "facing=west,half=bottom,open=true": { + "model": "create:block/train_trapdoor/block_open", + "y": 270 + }, + "facing=east,half=bottom,open=true": { + "model": "create:block/train_trapdoor/block_open", + "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 741554451..93c478d3c 100644 --- a/src/generated/resources/assets/create/lang/en_ud.json +++ b/src/generated/resources/assets/create/lang/en_ud.json @@ -496,6 +496,8 @@ "block.create.track": "\u029E\u0254\u0250\u0279\u27D8 u\u0131\u0250\u0279\u27D8", "block.create.track_signal": "\u05DF\u0250ub\u0131S u\u0131\u0250\u0279\u27D8", "block.create.track_station": "uo\u0131\u0287\u0250\u0287S u\u0131\u0250\u0279\u27D8", + "block.create.train_door": "\u0279oo\u15E1 u\u0131\u0250\u0279\u27D8", + "block.create.train_trapdoor": "\u0279oopd\u0250\u0279\u27D8 u\u0131\u0250\u0279\u27D8", "block.create.tuff_pillar": "\u0279\u0250\u05DF\u05DF\u0131\u0500 \u025F\u025Fn\u27D8", "block.create.turntable": "\u01DD\u05DFq\u0250\u0287u\u0279n\u27D8", "block.create.veridium": "\u026Fn\u0131p\u0131\u0279\u01DD\u039B", diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index 2d6a8a8f0..5843fd87b 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -499,6 +499,8 @@ "block.create.track": "Train Track", "block.create.track_signal": "Train Signal", "block.create.track_station": "Train Station", + "block.create.train_door": "Train Door", + "block.create.train_trapdoor": "Train Trapdoor", "block.create.tuff_pillar": "Tuff Pillar", "block.create.turntable": "Turntable", "block.create.veridium": "Veridium", 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 9a81c6b94..c1f4baf1d 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: 932", + "_": "Missing Localizations: 934", "_": "->------------------------] Game Elements [------------------------<-", @@ -500,6 +500,8 @@ "block.create.track": "UNLOCALIZED: Train Track", "block.create.track_signal": "UNLOCALIZED: Train Signal", "block.create.track_station": "UNLOCALIZED: Train Station", + "block.create.train_door": "UNLOCALIZED: Train Door", + "block.create.train_trapdoor": "UNLOCALIZED: Train Trapdoor", "block.create.tuff_pillar": "Tuffstein-Säule", "block.create.turntable": "Drehtisch", "block.create.veridium": "Veridium", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_cl.json b/src/generated/resources/assets/create/lang/unfinished/es_cl.json index 9b68fb4c1..9a4a406a7 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_cl.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_cl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 582", + "_": "Missing Localizations: 584", "_": "->------------------------] Game Elements [------------------------<-", @@ -500,6 +500,8 @@ "block.create.track": "UNLOCALIZED: Train Track", "block.create.track_signal": "UNLOCALIZED: Train Signal", "block.create.track_station": "UNLOCALIZED: Train Station", + "block.create.train_door": "UNLOCALIZED: Train Door", + "block.create.train_trapdoor": "UNLOCALIZED: Train Trapdoor", "block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar", "block.create.turntable": "Plato Giratorio", "block.create.veridium": "UNLOCALIZED: Veridium", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_es.json b/src/generated/resources/assets/create/lang/unfinished/es_es.json index 4da770dd8..526549650 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_es.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_es.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 246", + "_": "Missing Localizations: 248", "_": "->------------------------] Game Elements [------------------------<-", @@ -500,6 +500,8 @@ "block.create.track": "UNLOCALIZED: Train Track", "block.create.track_signal": "UNLOCALIZED: Train Signal", "block.create.track_station": "UNLOCALIZED: Train Station", + "block.create.train_door": "UNLOCALIZED: Train Door", + "block.create.train_trapdoor": "UNLOCALIZED: Train Trapdoor", "block.create.tuff_pillar": "Pilar de toba", "block.create.turntable": "Plataforma giratoria mecánica", "block.create.veridium": "Veridio", 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 f8850a77c..f7ab59113 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: 1820", + "_": "Missing Localizations: 1822", "_": "->------------------------] Game Elements [------------------------<-", @@ -500,6 +500,8 @@ "block.create.track": "UNLOCALIZED: Train Track", "block.create.track_signal": "UNLOCALIZED: Train Signal", "block.create.track_station": "UNLOCALIZED: Train Station", + "block.create.train_door": "UNLOCALIZED: Train Door", + "block.create.train_trapdoor": "UNLOCALIZED: Train Trapdoor", "block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar", "block.create.turntable": "Plaque tournante", "block.create.veridium": "UNLOCALIZED: Veridium", 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 2c84b711b..1d930c0fc 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: 1509", + "_": "Missing Localizations: 1511", "_": "->------------------------] Game Elements [------------------------<-", @@ -500,6 +500,8 @@ "block.create.track": "UNLOCALIZED: Train Track", "block.create.track_signal": "UNLOCALIZED: Train Signal", "block.create.track_station": "UNLOCALIZED: Train Station", + "block.create.train_door": "UNLOCALIZED: Train Door", + "block.create.train_trapdoor": "UNLOCALIZED: Train Trapdoor", "block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar", "block.create.turntable": "Piatto", "block.create.veridium": "UNLOCALIZED: Veridium", 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 7d488d9e6..f7ac41819 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: 248", + "_": "Missing Localizations: 250", "_": "->------------------------] Game Elements [------------------------<-", @@ -500,6 +500,8 @@ "block.create.track": "UNLOCALIZED: Train Track", "block.create.track_signal": "UNLOCALIZED: Train Signal", "block.create.track_station": "UNLOCALIZED: Train Station", + "block.create.train_door": "UNLOCALIZED: Train Door", + "block.create.train_trapdoor": "UNLOCALIZED: Train Trapdoor", "block.create.tuff_pillar": "凝灰岩の柱", "block.create.turntable": "ターンテーブル", "block.create.veridium": "翡翠岩", 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 fd386802e..48ba4d08b 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: 248", + "_": "Missing Localizations: 250", "_": "->------------------------] Game Elements [------------------------<-", @@ -500,6 +500,8 @@ "block.create.track": "UNLOCALIZED: Train Track", "block.create.track_signal": "UNLOCALIZED: Train Signal", "block.create.track_station": "UNLOCALIZED: Train Station", + "block.create.train_door": "UNLOCALIZED: Train Door", + "block.create.train_trapdoor": "UNLOCALIZED: Train Trapdoor", "block.create.tuff_pillar": "응회암 기둥", "block.create.turntable": "돌림판", "block.create.veridium": "심록암", 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 970cfd348..7d3fd6d3c 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: 2172", + "_": "Missing Localizations: 2174", "_": "->------------------------] Game Elements [------------------------<-", @@ -500,6 +500,8 @@ "block.create.track": "UNLOCALIZED: Train Track", "block.create.track_signal": "UNLOCALIZED: Train Signal", "block.create.track_station": "UNLOCALIZED: Train Station", + "block.create.train_door": "UNLOCALIZED: Train Door", + "block.create.train_trapdoor": "UNLOCALIZED: Train Trapdoor", "block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar", "block.create.turntable": "Draaischijf", "block.create.veridium": "UNLOCALIZED: Veridium", diff --git a/src/generated/resources/assets/create/lang/unfinished/pl_pl.json b/src/generated/resources/assets/create/lang/unfinished/pl_pl.json index efcacd966..3f5e61c16 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pl_pl.json +++ b/src/generated/resources/assets/create/lang/unfinished/pl_pl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 621", + "_": "Missing Localizations: 623", "_": "->------------------------] Game Elements [------------------------<-", @@ -500,6 +500,8 @@ "block.create.track": "UNLOCALIZED: Train Track", "block.create.track_signal": "UNLOCALIZED: Train Signal", "block.create.track_station": "UNLOCALIZED: Train Station", + "block.create.train_door": "UNLOCALIZED: Train Door", + "block.create.train_trapdoor": "UNLOCALIZED: Train Trapdoor", "block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar", "block.create.turntable": "Talerz obrotowy", "block.create.veridium": "UNLOCALIZED: Veridium", 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 75e047f63..0cfbc97d5 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: 1116", + "_": "Missing Localizations: 1118", "_": "->------------------------] Game Elements [------------------------<-", @@ -500,6 +500,8 @@ "block.create.track": "UNLOCALIZED: Train Track", "block.create.track_signal": "UNLOCALIZED: Train Signal", "block.create.track_station": "UNLOCALIZED: Train Station", + "block.create.train_door": "UNLOCALIZED: Train Door", + "block.create.train_trapdoor": "UNLOCALIZED: Train Trapdoor", "block.create.tuff_pillar": "Pilar de tufo", "block.create.turntable": "Mesa giratória", "block.create.veridium": "Veridiano", diff --git a/src/generated/resources/assets/create/lang/unfinished/pt_pt.json b/src/generated/resources/assets/create/lang/unfinished/pt_pt.json index c7990d375..cf75443ac 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pt_pt.json +++ b/src/generated/resources/assets/create/lang/unfinished/pt_pt.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1794", + "_": "Missing Localizations: 1796", "_": "->------------------------] Game Elements [------------------------<-", @@ -500,6 +500,8 @@ "block.create.track": "UNLOCALIZED: Train Track", "block.create.track_signal": "UNLOCALIZED: Train Signal", "block.create.track_station": "UNLOCALIZED: Train Station", + "block.create.train_door": "UNLOCALIZED: Train Door", + "block.create.train_trapdoor": "UNLOCALIZED: Train Trapdoor", "block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar", "block.create.turntable": "Mesa giratória", "block.create.veridium": "UNLOCALIZED: Veridium", diff --git a/src/generated/resources/assets/create/lang/unfinished/ro_ro.json b/src/generated/resources/assets/create/lang/unfinished/ro_ro.json index 088831061..9d0774e38 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ro_ro.json +++ b/src/generated/resources/assets/create/lang/unfinished/ro_ro.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 249", + "_": "Missing Localizations: 251", "_": "->------------------------] Game Elements [------------------------<-", @@ -500,6 +500,8 @@ "block.create.track": "UNLOCALIZED: Train Track", "block.create.track_signal": "UNLOCALIZED: Train Signal", "block.create.track_station": "UNLOCALIZED: Train Station", + "block.create.train_door": "UNLOCALIZED: Train Door", + "block.create.train_trapdoor": "UNLOCALIZED: Train Trapdoor", "block.create.tuff_pillar": "Coloană De Tuf", "block.create.turntable": "Placă Turnantă", "block.create.veridium": "Veridium", 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 73e6ae408..6d662a090 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: 626", + "_": "Missing Localizations: 628", "_": "->------------------------] Game Elements [------------------------<-", @@ -500,6 +500,8 @@ "block.create.track": "UNLOCALIZED: Train Track", "block.create.track_signal": "UNLOCALIZED: Train Signal", "block.create.track_station": "UNLOCALIZED: Train Station", + "block.create.train_door": "UNLOCALIZED: Train Door", + "block.create.train_trapdoor": "UNLOCALIZED: Train Trapdoor", "block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar", "block.create.turntable": "Поворотный стол", "block.create.veridium": "UNLOCALIZED: Veridium", 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 9298bfcb1..66479d416 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: 246", + "_": "Missing Localizations: 248", "_": "->------------------------] Game Elements [------------------------<-", @@ -500,6 +500,8 @@ "block.create.track": "UNLOCALIZED: Train Track", "block.create.track_signal": "UNLOCALIZED: Train Signal", "block.create.track_station": "UNLOCALIZED: Train Station", + "block.create.train_door": "UNLOCALIZED: Train Door", + "block.create.train_trapdoor": "UNLOCALIZED: Train Trapdoor", "block.create.tuff_pillar": "凝灰岩柱", "block.create.turntable": "转盘", "block.create.veridium": "辉绿矿", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json index c55c8c57e..4a68fe47e 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 640", + "_": "Missing Localizations: 642", "_": "->------------------------] Game Elements [------------------------<-", @@ -500,6 +500,8 @@ "block.create.track": "UNLOCALIZED: Train Track", "block.create.track_signal": "UNLOCALIZED: Train Signal", "block.create.track_station": "UNLOCALIZED: Train Station", + "block.create.train_door": "UNLOCALIZED: Train Door", + "block.create.train_trapdoor": "UNLOCALIZED: Train Trapdoor", "block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar", "block.create.turntable": "轉盤", "block.create.veridium": "UNLOCALIZED: Veridium", diff --git a/src/generated/resources/assets/create/models/item/train_door.json b/src/generated/resources/assets/create/models/item/train_door.json new file mode 100644 index 000000000..9d49a1da0 --- /dev/null +++ b/src/generated/resources/assets/create/models/item/train_door.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "create:item/train_door" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/item/train_trapdoor.json b/src/generated/resources/assets/create/models/item/train_trapdoor.json new file mode 100644 index 000000000..fd08d657a --- /dev/null +++ b/src/generated/resources/assets/create/models/item/train_trapdoor.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/train_trapdoor" +} \ No newline at end of file diff --git a/src/generated/resources/data/create/advancements/recipes/create.base/crafting/kinetics/train_door.json b/src/generated/resources/data/create/advancements/recipes/create.base/crafting/kinetics/train_door.json new file mode 100644 index 000000000..05cc6e7ee --- /dev/null +++ b/src/generated/resources/data/create/advancements/recipes/create.base/crafting/kinetics/train_door.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "create:crafting/kinetics/train_door" + ] + }, + "criteria": { + "has_item": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/brass" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "create:crafting/kinetics/train_door" + } + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/create/advancements/recipes/create.base/crafting/kinetics/train_trapdoor.json b/src/generated/resources/data/create/advancements/recipes/create.base/crafting/kinetics/train_trapdoor.json new file mode 100644 index 000000000..92ffc3e35 --- /dev/null +++ b/src/generated/resources/data/create/advancements/recipes/create.base/crafting/kinetics/train_trapdoor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "create:crafting/kinetics/train_trapdoor" + ] + }, + "criteria": { + "has_item": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/brass" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "create:crafting/kinetics/train_trapdoor" + } + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/create/loot_tables/blocks/train_door.json b/src/generated/resources/data/create/loot_tables/blocks/train_door.json new file mode 100644 index 000000000..f6056291a --- /dev/null +++ b/src/generated/resources/data/create/loot_tables/blocks/train_door.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "create:train_door", + "properties": { + "half": "lower" + } + } + ], + "name": "create:train_door" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/create/loot_tables/blocks/train_trapdoor.json b/src/generated/resources/data/create/loot_tables/blocks/train_trapdoor.json new file mode 100644 index 000000000..849136970 --- /dev/null +++ b/src/generated/resources/data/create/loot_tables/blocks/train_trapdoor.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "create:train_trapdoor" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/create/recipes/crafting/kinetics/train_door.json b/src/generated/resources/data/create/recipes/crafting/kinetics/train_door.json new file mode 100644 index 000000000..7751dd7ef --- /dev/null +++ b/src/generated/resources/data/create/recipes/crafting/kinetics/train_door.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "tag": "minecraft:wooden_doors" + }, + { + "tag": "forge:plates/brass" + } + ], + "result": { + "item": "create:train_door" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/create/recipes/crafting/kinetics/train_trapdoor.json b/src/generated/resources/data/create/recipes/crafting/kinetics/train_trapdoor.json new file mode 100644 index 000000000..6b37bcb5c --- /dev/null +++ b/src/generated/resources/data/create/recipes/crafting/kinetics/train_trapdoor.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "tag": "minecraft:wooden_trapdoors" + }, + { + "tag": "forge:plates/brass" + } + ], + "result": { + "item": "create:train_trapdoor" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/doors.json b/src/generated/resources/data/minecraft/tags/blocks/doors.json new file mode 100644 index 000000000..411b675e1 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/doors.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "create:train_door" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 7c3ce32fc..ccceb268e 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -119,6 +119,8 @@ "create:small_bogey", "create:large_bogey", "create:controls", + "create:train_door", + "create:train_trapdoor", "create:item_vault", "create:andesite_funnel", "create:andesite_belt_funnel", diff --git a/src/generated/resources/data/minecraft/tags/blocks/trapdoors.json b/src/generated/resources/data/minecraft/tags/blocks/trapdoors.json new file mode 100644 index 000000000..eae709bab --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/trapdoors.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "create:train_trapdoor" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/wooden_doors.json b/src/generated/resources/data/minecraft/tags/blocks/wooden_doors.json new file mode 100644 index 000000000..411b675e1 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/wooden_doors.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "create:train_door" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/items/doors.json b/src/generated/resources/data/minecraft/tags/items/doors.json new file mode 100644 index 000000000..411b675e1 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/items/doors.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "create:train_door" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/items/trapdoors.json b/src/generated/resources/data/minecraft/tags/items/trapdoors.json new file mode 100644 index 000000000..eae709bab --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/items/trapdoors.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "create:train_trapdoor" + ] +} \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index 6febaf3cb..c222c2cfc 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -66,6 +66,8 @@ import com.simibubi.create.content.contraptions.components.structureMovement.cha import com.simibubi.create.content.contraptions.components.structureMovement.chassis.RadialChassisBlock; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.StickerBlock; import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryCarriageBlock; +import com.simibubi.create.content.contraptions.components.structureMovement.interaction.DoorMovingInteraction; +import com.simibubi.create.content.contraptions.components.structureMovement.interaction.TrapdoorMovingInteraction; import com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls.ControlsBlock; import com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls.ControlsInteractionBehaviour; import com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls.ControlsMovementBehaviour; @@ -135,6 +137,8 @@ import com.simibubi.create.content.curiosities.bell.HauntedBellMovementBehaviour import com.simibubi.create.content.curiosities.bell.PeculiarBellBlock; import com.simibubi.create.content.curiosities.deco.MetalLadderBlock; import com.simibubi.create.content.curiosities.deco.PlacardBlock; +import com.simibubi.create.content.curiosities.deco.TrainDoorBlock; +import com.simibubi.create.content.curiosities.deco.TrainTrapdoorBlock; import com.simibubi.create.content.curiosities.girder.ConnectedGirderModel; import com.simibubi.create.content.curiosities.girder.GirderBlock; import com.simibubi.create.content.curiosities.girder.GirderBlockStateGenerator; @@ -226,6 +230,7 @@ import com.tterrag.registrate.util.entry.BlockEntry; import net.minecraft.client.renderer.RenderType; import net.minecraft.core.Direction.Axis; import net.minecraft.core.Direction.AxisDirection; +import net.minecraft.data.loot.BlockLoot; import net.minecraft.data.recipes.ShapelessRecipeBuilder; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.BlockTags; @@ -1550,6 +1555,42 @@ public class AllBlocks { .transform(customItemModel()) .register(); + public static final BlockEntry TRAIN_DOOR = REGISTRATE.block("train_door", TrainDoorBlock::new) + .initialProperties(Material.NETHER_WOOD) // for villager AI.. + .properties(p -> p.color(MaterialColor.TERRACOTTA_CYAN)) + .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) + .blockstate((c, p) -> { + ModelFile bottom = AssetLookup.partialBaseModel(c, p, "bottom"); + ModelFile top = AssetLookup.partialBaseModel(c, p, "top"); + p.doorBlock(c.get(), bottom, bottom, top, top); + }) + .addLayer(() -> RenderType::cutoutMipped) + .transform(pickaxeOnly()) + .onRegister(addInteractionBehaviour(new DoorMovingInteraction())) + .tag(BlockTags.DOORS) + .tag(BlockTags.WOODEN_DOORS) // for villager AI + .loot((lr, block) -> lr.add(block, BlockLoot.createDoorTable(block))) + .item() + .tag(ItemTags.DOORS) + .model((c, p) -> p.blockSprite(c, p.modLoc("item/train_door"))) + .build() + .register(); + + public static final BlockEntry TRAIN_TRAPDOOR = + REGISTRATE.block("train_trapdoor", TrainTrapdoorBlock::new) + .initialProperties(SharedProperties::softMetal) + .properties(p -> p.color(MaterialColor.TERRACOTTA_CYAN)) + .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) + .blockstate((c, p) -> p.trapdoorBlock(c.get(), AssetLookup.partialBaseModel(c, p, "bottom"), + AssetLookup.partialBaseModel(c, p, "top"), AssetLookup.partialBaseModel(c, p, "open"), true)) + .transform(pickaxeOnly()) + .tag(BlockTags.TRAPDOORS) + .onRegister(addInteractionBehaviour(new TrapdoorMovingInteraction())) + .item() + .tag(ItemTags.TRAPDOORS) + .build() + .register(); + public static final BlockEntry ITEM_VAULT = REGISTRATE.block("item_vault", ItemVaultBlock::new) .initialProperties(SharedProperties::softMetal) .properties(p -> p.color(MaterialColor.TERRACOTTA_BLUE)) diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index 3bdac8da6..56ea0d071 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -135,6 +135,8 @@ import com.simibubi.create.content.curiosities.bell.HauntedBellTileEntity; import com.simibubi.create.content.curiosities.bell.PeculiarBellTileEntity; import com.simibubi.create.content.curiosities.deco.PlacardRenderer; import com.simibubi.create.content.curiosities.deco.PlacardTileEntity; +import com.simibubi.create.content.curiosities.deco.SlidingDoorRenderer; +import com.simibubi.create.content.curiosities.deco.SlidingDoorTileEntity; import com.simibubi.create.content.curiosities.toolbox.ToolBoxInstance; import com.simibubi.create.content.curiosities.toolbox.ToolboxRenderer; import com.simibubi.create.content.curiosities.toolbox.ToolboxTileEntity; @@ -793,6 +795,12 @@ public class AllTileEntities { .renderer(() -> StationRenderer::new) .validBlocks(AllBlocks.TRACK_STATION) .register(); + + public static final BlockEntityEntry SLIDING_DOOR = Create.registrate() + .tileEntity("sliding_door", SlidingDoorTileEntity::new) + .renderer(() -> SlidingDoorRenderer::new) + .validBlocks(AllBlocks.TRAIN_DOOR) + .register(); public static final BlockEntityEntry FLAP_DISPLAY = Create.registrate() .tileEntity("flap_display", FlapDisplayTileEntity::new) diff --git a/src/main/java/com/simibubi/create/content/curiosities/deco/PlacardBlock.java b/src/main/java/com/simibubi/create/content/curiosities/deco/PlacardBlock.java index 480cbf656..b82cb1a1b 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/deco/PlacardBlock.java +++ b/src/main/java/com/simibubi/create/content/curiosities/deco/PlacardBlock.java @@ -131,7 +131,10 @@ public class PlacardBlock extends FaceAttachedHorizontalDirectionalBlock return InteractionResult.FAIL; if (pState.getValue(POWERED)) return InteractionResult.FAIL; - if (!FilterItem.test(pLevel, inHand, inBlock)) { + + boolean test = inBlock.getItem() instanceof FilterItem ? FilterItem.test(pLevel, inHand, inBlock) + : ItemHandlerHelper.canItemStacksStack(inHand, inBlock); + if (!test) { AllSoundEvents.DENY.play(pLevel, null, pPos, 1, 1); return InteractionResult.SUCCESS; } diff --git a/src/main/java/com/simibubi/create/content/curiosities/deco/SlidingDoorRenderer.java b/src/main/java/com/simibubi/create/content/curiosities/deco/SlidingDoorRenderer.java new file mode 100644 index 000000000..d2c16c03a --- /dev/null +++ b/src/main/java/com/simibubi/create/content/curiosities/deco/SlidingDoorRenderer.java @@ -0,0 +1,56 @@ +package com.simibubi.create.content.curiosities.deco; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.simibubi.create.foundation.render.CachedBufferer; +import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer; + +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; +import net.minecraft.core.Direction; +import net.minecraft.util.Mth; +import net.minecraft.world.level.block.DoorBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.DoorHingeSide; +import net.minecraft.world.level.block.state.properties.DoubleBlockHalf; +import net.minecraft.world.phys.Vec3; + +public class SlidingDoorRenderer extends SafeTileEntityRenderer { + + public SlidingDoorRenderer(Context context) {} + + @Override + protected void renderSafe(SlidingDoorTileEntity te, float partialTicks, PoseStack ms, MultiBufferSource buffer, + int light, int overlay) { + BlockState blockState = te.getBlockState(); + if (!te.shouldRenderSpecial(blockState)) + return; + + Direction facing = blockState.getValue(DoorBlock.FACING); + Direction movementDirection = facing.getClockWise(); + + if (blockState.getValue(DoorBlock.HINGE) == DoorHingeSide.LEFT) + movementDirection = movementDirection.getOpposite(); + + float value = te.animation.getValue(partialTicks); + float value2 = Mth.clamp(value * 10, 0, 1); + + Vec3 offset = Vec3.atLowerCornerOf(movementDirection.getNormal()) + .scale(value * value * 13 / 16f) + .add(Vec3.atLowerCornerOf(facing.getNormal()) + .scale(value2 * 1 / 32f)); + + VertexConsumer vb = buffer.getBuffer(RenderType.cutoutMipped()); + for (DoubleBlockHalf half : DoubleBlockHalf.values()) { + CachedBufferer.block(blockState.setValue(DoorBlock.OPEN, false) + .setValue(DoorBlock.HALF, half)) + .translate(0, half == DoubleBlockHalf.UPPER ? 1 : 0, 0) + .translate(offset) + .light(light) + .renderInto(ms, vb); + } + + } + +} diff --git a/src/main/java/com/simibubi/create/content/curiosities/deco/SlidingDoorTileEntity.java b/src/main/java/com/simibubi/create/content/curiosities/deco/SlidingDoorTileEntity.java new file mode 100644 index 000000000..a516e96a8 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/curiosities/deco/SlidingDoorTileEntity.java @@ -0,0 +1,70 @@ +package com.simibubi.create.content.curiosities.deco; + +import java.util.List; + +import com.simibubi.create.foundation.tileEntity.SmartTileEntity; +import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; +import com.simibubi.create.foundation.utility.animation.LerpedFloat; +import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser; + +import net.minecraft.core.BlockPos; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.level.block.DoorBlock; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +public class SlidingDoorTileEntity extends SmartTileEntity { + + LerpedFloat animation; + int bridgeTicks; + + public SlidingDoorTileEntity(BlockEntityType type, BlockPos pos, BlockState state) { + super(type, pos, state); + animation = LerpedFloat.linear() + .startWithValue(isOpen(state) ? 1 : 0); + } + + @Override + public void tick() { + super.tick(); + boolean open = isOpen(getBlockState()); + boolean wasSettled = animation.settled(); + animation.chase(open ? 1 : 0, .15f, Chaser.LINEAR); + animation.tickChaser(); + + if (level.isClientSide()) { + if (bridgeTicks < 2 && open) + bridgeTicks++; + else if (bridgeTicks > 0 && !open && isVisible(getBlockState())) + bridgeTicks--; + return; + } + + if (!open && !wasSettled && animation.settled() && !isVisible(getBlockState())) + showBlockModel(); + } + + protected boolean isVisible(BlockState state) { + return state.getOptionalValue(TrainDoorBlock.VISIBLE) + .orElse(true); + } + + protected boolean shouldRenderSpecial(BlockState state) { + return !isVisible(state) || bridgeTicks != 0; + } + + protected void showBlockModel() { + level.setBlock(worldPosition, getBlockState().setValue(TrainDoorBlock.VISIBLE, true), 3); + level.playSound(null, worldPosition, SoundEvents.IRON_DOOR_CLOSE, SoundSource.BLOCKS, .5f, 1); + } + + @Override + public void addBehaviours(List behaviours) {} + + public static boolean isOpen(BlockState state) { + return state.getOptionalValue(DoorBlock.OPEN) + .orElse(false); + } + +} diff --git a/src/main/java/com/simibubi/create/content/curiosities/deco/TrainDoorBlock.java b/src/main/java/com/simibubi/create/content/curiosities/deco/TrainDoorBlock.java new file mode 100644 index 000000000..4332f662d --- /dev/null +++ b/src/main/java/com/simibubi/create/content/curiosities/deco/TrainDoorBlock.java @@ -0,0 +1,225 @@ +package com.simibubi.create.content.curiosities.deco; + +import javax.annotation.Nullable; + +import com.simibubi.create.AllTileEntities; +import com.simibubi.create.content.contraptions.wrench.IWrenchable; +import com.simibubi.create.foundation.block.ITE; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.DoorBlock; +import net.minecraft.world.level.block.RenderShape; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition.Builder; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.block.state.properties.DoorHingeSide; +import net.minecraft.world.level.block.state.properties.DoubleBlockHalf; +import net.minecraft.world.level.gameevent.GameEvent; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; + +public class TrainDoorBlock extends DoorBlock implements IWrenchable, ITE { + + protected static final VoxelShape SE_AABB = Block.box(0.0D, 0.0D, -13.0D, 3.0D, 16.0D, 3.0D); + protected static final VoxelShape ES_AABB = Block.box(-13.0D, 0.0D, 0.0D, 3.0D, 16.0D, 3.0D); + + protected static final VoxelShape NW_AABB = Block.box(13.0D, 0.0D, 13.0D, 16.0D, 16.0D, 29.0D); + protected static final VoxelShape WN_AABB = Block.box(13.0D, 0.0D, 13.0D, 29.0D, 16.0D, 16.0D); + + protected static final VoxelShape SW_AABB = Block.box(13.0D, 0.0D, -13.0D, 16.0D, 16.0D, 3.0D); + protected static final VoxelShape WS_AABB = Block.box(13.0D, 0.0D, 0.0D, 29.0D, 16.0D, 3.0D); + + protected static final VoxelShape NE_AABB = Block.box(0.0D, 0.0D, 13.0D, 3.0D, 16.0D, 29.0D); + protected static final VoxelShape EN_AABB = Block.box(-13.0D, 0.0D, 13.0D, 3.0D, 16.0D, 16.0D); + + public static final BooleanProperty VISIBLE = BooleanProperty.create("visible"); + + public TrainDoorBlock(Properties p_52737_) { + super(p_52737_); + } + + @Override + protected void createBlockStateDefinition(Builder pBuilder) { + super.createBlockStateDefinition(pBuilder.add(VISIBLE)); + } + + @Override + public VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) { + if (!pState.getValue(OPEN) && pState.getValue(VISIBLE)) + return super.getShape(pState, pLevel, pPos, pContext); + + Direction direction = pState.getValue(FACING); + boolean hinge = pState.getValue(HINGE) == DoorHingeSide.RIGHT; + + return switch (direction) { + case SOUTH -> (hinge ? ES_AABB : WS_AABB); + case WEST -> (hinge ? SW_AABB : NW_AABB); + case NORTH -> (hinge ? WN_AABB : EN_AABB); + default -> (hinge ? NE_AABB : SE_AABB); + }; + } + + @Override + public VoxelShape getInteractionShape(BlockState pState, BlockGetter pLevel, BlockPos pPos) { + return getShape(pState, pLevel, pPos, CollisionContext.empty()); + } + + @Override + public BlockState getStateForPlacement(BlockPlaceContext pContext) { + BlockState stateForPlacement = super.getStateForPlacement(pContext); + if (stateForPlacement != null && stateForPlacement.getValue(OPEN)) + return stateForPlacement.setValue(VISIBLE, false); + return stateForPlacement; + } + + @Override + public BlockState updateShape(BlockState pState, Direction pFacing, BlockState pFacingState, LevelAccessor pLevel, + BlockPos pCurrentPos, BlockPos pFacingPos) { + BlockState blockState = super.updateShape(pState, pFacing, pFacingState, pLevel, pCurrentPos, pFacingPos); + if (blockState.isAir()) + return blockState; + DoubleBlockHalf doubleblockhalf = blockState.getValue(HALF); + if (pFacing.getAxis() == Direction.Axis.Y + && doubleblockhalf == DoubleBlockHalf.LOWER == (pFacing == Direction.UP)) { + return pFacingState.is(this) && pFacingState.getValue(HALF) != doubleblockhalf + ? blockState.setValue(VISIBLE, pFacingState.getValue(VISIBLE)) + : Blocks.AIR.defaultBlockState(); + } + return blockState; + } + + @Override + public void setOpen(@Nullable Entity entity, Level level, BlockState state, BlockPos pos, boolean open) { + if (!state.is(this)) + return; + if (state.getValue(OPEN) == open) + return; + BlockState changedState = state.setValue(OPEN, open); + if (open) + changedState = changedState.setValue(VISIBLE, false); + level.setBlock(pos, changedState, 10); + + DoorHingeSide hinge = changedState.getValue(HINGE); + Direction facing = changedState.getValue(FACING); + BlockPos otherPos = + pos.relative(hinge == DoorHingeSide.LEFT ? facing.getClockWise() : facing.getCounterClockWise()); + BlockState otherDoor = level.getBlockState(otherPos); + if (isDoubleDoor(changedState, hinge, facing, otherDoor)) + setOpen(entity, level, otherDoor, otherPos, open); + + this.playSound(level, pos, open); + level.gameEvent(entity, open ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE, pos); + } + + @Override + public void neighborChanged(BlockState pState, Level pLevel, BlockPos pPos, Block pBlock, BlockPos pFromPos, + boolean pIsMoving) { + boolean isPowered = pLevel.hasNeighborSignal(pPos) || pLevel.hasNeighborSignal( + pPos.relative(pState.getValue(HALF) == DoubleBlockHalf.LOWER ? Direction.UP : Direction.DOWN)); + if (defaultBlockState().is(pBlock)) + return; + if (isPowered == pState.getValue(POWERED)) + return; + + BlockState changedState = pState.setValue(POWERED, Boolean.valueOf(isPowered)) + .setValue(OPEN, Boolean.valueOf(isPowered)); + if (isPowered) + changedState = changedState.setValue(VISIBLE, false); + + if (isPowered != pState.getValue(OPEN)) { + this.playSound(pLevel, pPos, isPowered); + pLevel.gameEvent(isPowered ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE, pPos); + + DoorHingeSide hinge = changedState.getValue(HINGE); + Direction facing = changedState.getValue(FACING); + BlockPos otherPos = + pPos.relative(hinge == DoorHingeSide.LEFT ? facing.getClockWise() : facing.getCounterClockWise()); + BlockState otherDoor = pLevel.getBlockState(otherPos); + if (isDoubleDoor(changedState, hinge, facing, otherDoor)) { + otherDoor = otherDoor.setValue(POWERED, Boolean.valueOf(isPowered)) + .setValue(OPEN, Boolean.valueOf(isPowered)); + if (isPowered) + otherDoor = otherDoor.setValue(VISIBLE, false); + pLevel.setBlock(otherPos, otherDoor, 2); + } + } + + pLevel.setBlock(pPos, changedState, 2); + } + + @Override + public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, + BlockHitResult pHit) { + + pState = pState.cycle(OPEN); + if (pState.getValue(OPEN)) + pState = pState.setValue(VISIBLE, false); + pLevel.setBlock(pPos, pState, 10); + pLevel.gameEvent(pPlayer, isOpen(pState) ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE, pPos); + + DoorHingeSide hinge = pState.getValue(HINGE); + Direction facing = pState.getValue(FACING); + BlockPos otherPos = + pPos.relative(hinge == DoorHingeSide.LEFT ? facing.getClockWise() : facing.getCounterClockWise()); + BlockState otherDoor = pLevel.getBlockState(otherPos); + if (isDoubleDoor(pState, hinge, facing, otherDoor)) + use(otherDoor, pLevel, otherPos, pPlayer, pHand, pHit); + else if (pState.getValue(OPEN)) + pLevel.levelEvent(pPlayer, getOpenSound(), pPos, 0); + + return InteractionResult.sidedSuccess(pLevel.isClientSide); + } + + private boolean isDoubleDoor(BlockState pState, DoorHingeSide hinge, Direction facing, BlockState otherDoor) { + return otherDoor.getBlock() == pState.getBlock() && otherDoor.getValue(HINGE) != hinge + && otherDoor.getValue(FACING) == facing && otherDoor.getValue(OPEN) != pState.getValue(OPEN) + && otherDoor.getValue(HALF) == pState.getValue(HALF); + } + + @Override + public RenderShape getRenderShape(BlockState pState) { + return pState.getValue(VISIBLE) ? RenderShape.MODEL : RenderShape.ENTITYBLOCK_ANIMATED; + } + + private void playSound(Level pLevel, BlockPos pPos, boolean pIsOpening) { + if (pIsOpening) + pLevel.levelEvent((Player) null, this.getOpenSound(), pPos, 0); + } + + private int getOpenSound() { + return 1005; + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + if (state.getValue(HALF) == DoubleBlockHalf.UPPER) + return null; + return ITE.super.newBlockEntity(pos, state); + } + + @Override + public Class getTileEntityClass() { + return SlidingDoorTileEntity.class; + } + + @Override + public BlockEntityType getTileEntityType() { + return AllTileEntities.SLIDING_DOOR.get(); + } + +} diff --git a/src/main/java/com/simibubi/create/content/curiosities/deco/TrainTrapdoorBlock.java b/src/main/java/com/simibubi/create/content/curiosities/deco/TrainTrapdoorBlock.java new file mode 100644 index 000000000..08217e5bb --- /dev/null +++ b/src/main/java/com/simibubi/create/content/curiosities/deco/TrainTrapdoorBlock.java @@ -0,0 +1,31 @@ +package com.simibubi.create.content.curiosities.deco; + +import com.simibubi.create.content.contraptions.wrench.IWrenchable; + +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.TrapDoorBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluids; +import net.minecraft.world.phys.BlockHitResult; + +public class TrainTrapdoorBlock extends TrapDoorBlock implements IWrenchable { + + public TrainTrapdoorBlock(Properties p_57526_) { + super(p_57526_); + } + + public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, + BlockHitResult pHit) { + pState = pState.cycle(OPEN); + pLevel.setBlock(pPos, pState, 2); + if (pState.getValue(WATERLOGGED)) + pLevel.scheduleTick(pPos, Fluids.WATER, Fluids.WATER.getTickDelay(pLevel)); + playSound(pPlayer, pLevel, pPos, pState.getValue(OPEN)); + return InteractionResult.sidedSuccess(pLevel.isClientSide); + } + +} diff --git a/src/main/java/com/simibubi/create/foundation/block/BigOutlines.java b/src/main/java/com/simibubi/create/foundation/block/BigOutlines.java index b001651a6..b6d130107 100644 --- a/src/main/java/com/simibubi/create/foundation/block/BigOutlines.java +++ b/src/main/java/com/simibubi/create/foundation/block/BigOutlines.java @@ -1,5 +1,6 @@ package com.simibubi.create.foundation.block; +import com.simibubi.create.content.curiosities.deco.TrainDoorBlock; import com.simibubi.create.content.logistics.trains.track.TrackBlock; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.RaycastHelper; @@ -47,7 +48,8 @@ public class BigOutlines { BlockState blockState = mc.level.getBlockState(p); // Could be a dedicated interface for big blocks - if (!(blockState.getBlock() instanceof TrackBlock)) + if (!(blockState.getBlock() instanceof TrackBlock) + && !(blockState.getBlock() instanceof TrainDoorBlock)) continue; BlockHitResult hit = blockState.getInteractionShape(mc.level, p) diff --git a/src/main/java/com/simibubi/create/foundation/data/recipe/StandardRecipeGen.java b/src/main/java/com/simibubi/create/foundation/data/recipe/StandardRecipeGen.java index 30691b309..f156a584c 100644 --- a/src/main/java/com/simibubi/create/foundation/data/recipe/StandardRecipeGen.java +++ b/src/main/java/com/simibubi/create/foundation/data/recipe/StandardRecipeGen.java @@ -304,6 +304,16 @@ public class StandardRecipeGen extends CreateRecipeProvider { .viaShapeless(b -> b.requires(Items.ITEM_FRAME) .requires(I.brassSheet())), + TRAIN_DOOR = create(AllBlocks.TRAIN_DOOR).returns(1) + .unlockedByTag(() -> I.brass()) + .viaShapeless(b -> b.requires(ItemTags.WOODEN_DOORS) + .requires(I.brassSheet())), + + TRAIN_TRAPDOOR = create(AllBlocks.TRAIN_TRAPDOOR).returns(1) + .unlockedByTag(() -> I.brass()) + .viaShapeless(b -> b.requires(ItemTags.WOODEN_TRAPDOORS) + .requires(I.brassSheet())), + ANALOG_LEVER = create(AllBlocks.ANALOG_LEVER).unlockedBy(I::andesite) .viaShaped(b -> b.define('S', I.andesiteCasing()) .define('P', Tags.Items.RODS_WOODEN) diff --git a/src/main/resources/assets/create/models/block/train_door/block_bottom.json b/src/main/resources/assets/create/models/block/train_door/block_bottom.json new file mode 100644 index 000000000..eff184d5a --- /dev/null +++ b/src/main/resources/assets/create/models/block/train_door/block_bottom.json @@ -0,0 +1,22 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/train_door_side", + "2": "create:block/train_door_bottom", + "particle": "create:block/train_trapdoor" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [3, 16, 16], + "faces": { + "north": {"uv": [0, 12, 16, 15], "rotation": 270, "texture": "#0"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 4, 16, 7], "rotation": 270, "texture": "#0"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "down": {"uv": [0, 8, 16, 11], "rotation": 90, "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/train_door/block_top.json b/src/main/resources/assets/create/models/block/train_door/block_top.json new file mode 100644 index 000000000..ece877f61 --- /dev/null +++ b/src/main/resources/assets/create/models/block/train_door/block_top.json @@ -0,0 +1,22 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/train_door_side", + "2": "create:block/train_door_top", + "particle": "create:block/train_trapdoor" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [3, 16, 16], + "faces": { + "north": {"uv": [0, 12, 16, 15], "rotation": 90, "texture": "#0"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 4, 16, 7], "rotation": 90, "texture": "#0"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 3], "rotation": 90, "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/train_trapdoor.json b/src/main/resources/assets/create/models/block/train_trapdoor.json new file mode 100644 index 000000000..1709600af --- /dev/null +++ b/src/main/resources/assets/create/models/block/train_trapdoor.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/train_trapdoor/block_bottom" +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/train_trapdoor/block_bottom.json b/src/main/resources/assets/create/models/block/train_trapdoor/block_bottom.json new file mode 100644 index 000000000..e45403dd4 --- /dev/null +++ b/src/main/resources/assets/create/models/block/train_trapdoor/block_bottom.json @@ -0,0 +1,23 @@ +{ + "parent": "block/block", + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/train_door_side", + "1": "create:block/train_trapdoor", + "particle": "create:block/train_trapdoor" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 3, 16], + "faces": { + "north": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "east": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "south": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "west": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "up": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/train_trapdoor/block_open.json b/src/main/resources/assets/create/models/block/train_trapdoor/block_open.json new file mode 100644 index 000000000..ea25af4fd --- /dev/null +++ b/src/main/resources/assets/create/models/block/train_trapdoor/block_open.json @@ -0,0 +1,23 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/train_door_side", + "1": "create:block/train_trapdoor", + "particle": "create:block/train_trapdoor" + }, + "elements": [ + { + "from": [0, 0, 13], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#1"}, + "east": {"uv": [0, 0, 16, 3], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#1"}, + "west": {"uv": [0, 0, 16, 3], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 3], "rotation": 180, "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/train_trapdoor/block_top.json b/src/main/resources/assets/create/models/block/train_trapdoor/block_top.json new file mode 100644 index 000000000..d29e767ea --- /dev/null +++ b/src/main/resources/assets/create/models/block/train_trapdoor/block_top.json @@ -0,0 +1,23 @@ +{ + "parent": "block/block", + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/train_door_side", + "1": "create:block/train_trapdoor", + "particle": "create:block/train_trapdoor" + }, + "elements": [ + { + "from": [0, 13, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "east": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "south": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "west": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "up": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/train_door_bottom.png b/src/main/resources/assets/create/textures/block/train_door_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..fe681acbc73a1dd2bb0fee3693050f4bc6319675 GIT binary patch literal 338 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G|~0G|-od719tPv@v>8(29w|9{=neempx3pX#kdii8~vW}stvYPg}1yM!r zhA!SdJ30al%q&fkngYp2TQ_?wOl)1<<$NUUz>3Ej_SW1`cIS? z_TAaG{aQ`Okx3%=ZX7h%kM9t0`cU9gpdx4}_lJ2~z`O~%OaC|r9^jkLxOe)-jglGX zxg+8ezF3}m_p*5LD>cEd;cp+Uc^rS{Ylwi0V;YoTF|rNS%G}l0G|-oB6q`ineLG)D(4nNeLtP^|8>v*pZmonW#kmql-0D=wGCXneXJau z4a_V}ENyfQO?PwzR)o=T(mEN;<^vJ8! zSe~=of9CX0hYmqOhQ=n=oTX=$7WnlgFvPorgltXoXEW@)X8C@aT1sYEvgq1pyP4N) zdAs-f+Z8s#t{eK#OQ@U9>s++)_THwuk8R`*h_CQdcpV|c_WJbxBl;S)0(V$FY&jo) T|GKIU=oAJ|S3j3^P6NS%G}}0G|-oB6q`ineLG)D(4nNeLtP^|8>v*pZmonW#kmql-0D=wGCXneXJau z4a_V}ENyfQO--%swDgR9{R1nSDpE3%HwYAfjOHxxh%9Dc;5!V$jK}j=qyPmwJzX3_ zG=f9>z4=%aIanPXKbU8g-~Yd+dB==-+Z*T94z57}6k;Chk#e8?ocgQ44oyZe0UnBiPa`$)f5BIJ!-um_7%+lX% zp7D<&o$olDybP0 Hl+XkKy4i7l literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/item/train_door.png b/src/main/resources/assets/create/textures/item/train_door.png new file mode 100644 index 0000000000000000000000000000000000000000..8b5ad0c38e1e7e7fa7497bbe0f4096357091e28a GIT binary patch literal 328 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G|;0G|-oa|@!rpU(OJy66AT{YCDE;*v6QifZcG2FhyM^D^CCynU=3oOKLM ztJiJsK6uu^%<{skmn$yZG_|$^8sOm&`4LEolmz(&|HlLj{{GJef%2RM9+AZi419+{ znDKc2iWHz=si%u$h(>Vk*=W8a3LLBf7rR2%XuPRk@2pm9arVv;e*SRIZ>Qop1cJK+ z9#(&3jy~qpQEj6*Eo$b@R13w#r;E)GN_X&YRxJ7Z(Erz#i!bs--rdXaKAgDk;4}UU zGk!3LggHfS6Ik7$$2-3(>oB*I+oyzkXWuY~bModZUS%}}I)K5`)z4*}Q$iB}gA9Jx literal 0 HcmV?d00001