From 7df865b3cb58cbcf5d88daa1587ebbda5c77a8e4 Mon Sep 17 00:00:00 2001 From: reidbhuntley Date: Tue, 29 Jun 2021 22:32:49 -0400 Subject: [PATCH] No longer just for books - Allow Linked Controllers to be placed onto and used from Lecterns - Set Linked Controller max stack size to 1 --- src/generated/resources/.cache/cache | 34 ++-- .../blockstates/lectern_controller.json | 64 +++++++ .../resources/assets/create/lang/en_ud.json | 1 + .../resources/assets/create/lang/en_us.json | 5 + .../assets/create/lang/unfinished/de_de.json | 7 +- .../assets/create/lang/unfinished/es_es.json | 7 +- .../assets/create/lang/unfinished/es_mx.json | 7 +- .../assets/create/lang/unfinished/fr_fr.json | 7 +- .../assets/create/lang/unfinished/it_it.json | 7 +- .../assets/create/lang/unfinished/ja_jp.json | 7 +- .../assets/create/lang/unfinished/ko_kr.json | 7 +- .../assets/create/lang/unfinished/nl_nl.json | 7 +- .../assets/create/lang/unfinished/pl_pl.json | 7 +- .../assets/create/lang/unfinished/pt_br.json | 7 +- .../assets/create/lang/unfinished/ru_ru.json | 7 +- .../assets/create/lang/unfinished/zh_cn.json | 7 +- .../assets/create/lang/unfinished/zh_tw.json | 7 +- .../resources/assets/create/sounds.json | 18 ++ .../blocks/lectern_controller.json | 19 ++ .../java/com/simibubi/create/AllBlocks.java | 10 ++ .../java/com/simibubi/create/AllItems.java | 3 +- .../com/simibubi/create/AllSoundEvents.java | 10 ++ .../com/simibubi/create/AllTileEntities.java | 10 ++ .../item/LecternControllerBlock.java | 92 ++++++++++ .../item/LecternControllerRenderer.java | 48 +++++ .../item/LecternControllerTileEntity.java | 169 ++++++++++++++++++ .../item/LinkedControllerBindPacket.java | 13 +- .../item/LinkedControllerClientHandler.java | 34 +++- .../item/LinkedControllerInputPacket.java | 15 +- .../logistics/item/LinkedControllerItem.java | 40 ++++- .../item/LinkedControllerItemRenderer.java | 54 +++--- .../item/LinkedControllerPacketBase.java | 73 ++++++-- .../LinkedControllerStopLecternPacket.java | 26 +++ .../simibubi/create/events/InputEvents.java | 11 ++ .../foundation/networking/AllPackets.java | 4 +- .../assets/create/lang/default/tooltips.json | 2 + 36 files changed, 757 insertions(+), 89 deletions(-) create mode 100644 src/generated/resources/assets/create/blockstates/lectern_controller.json create mode 100644 src/generated/resources/data/create/loot_tables/blocks/lectern_controller.json create mode 100644 src/main/java/com/simibubi/create/content/logistics/item/LecternControllerBlock.java create mode 100644 src/main/java/com/simibubi/create/content/logistics/item/LecternControllerRenderer.java create mode 100644 src/main/java/com/simibubi/create/content/logistics/item/LecternControllerTileEntity.java create mode 100644 src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerStopLecternPacket.java diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index cbd09f705..aa40a7854 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -199,6 +199,7 @@ a4cfcdc038af0f93a58d88ea8860b34d73632ff4 assets/create/blockstates/layered_dolom 038f532f7364c1e793196fcc5856df9ceff93578 assets/create/blockstates/layered_limestone.json 8535d628f8834be62cdf62ef4b60c2ce3a7af99f assets/create/blockstates/layered_scoria.json 419d7fffc5cbd392f10211afa8d17e3eb8df8380 assets/create/blockstates/layered_weathered_limestone.json +6a3c81d62c7c5a5fa2f4a1e239319d83875bbe55 assets/create/blockstates/lectern_controller.json 029904f21970947a4423a6e0c8c65c4e02f2e8e6 assets/create/blockstates/light_blue_sail.json 2a0a8b1715700bf1e284ee57ef9f7f163c12f3ee assets/create/blockstates/light_blue_seat.json 9bee040558a6b24e21f837fc808e17fae1883e71 assets/create/blockstates/light_blue_valve_handle.json @@ -409,21 +410,21 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j 6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json -7818080b0809c3a01f28c05c0ed7edf8bcbc7b1d assets/create/lang/en_ud.json -8fa6882a7cb3a89aef2b4b15378be513e0b39035 assets/create/lang/en_us.json -cd1667de5c4baede2cc6b40c18a1dfdbeab4ca92 assets/create/lang/unfinished/de_de.json -33ee62f5383be9038c5f33c6bba7cd352de962b3 assets/create/lang/unfinished/es_es.json -2e00b6f84ca1ed6532d0cb13ce6d534544c128d7 assets/create/lang/unfinished/es_mx.json -e9168dac5cce730ea1425a2d39aa979f7b944ef8 assets/create/lang/unfinished/fr_fr.json -45974fc63f80241b481367895e6f4059821d9d98 assets/create/lang/unfinished/it_it.json -b8292ad388663d5bb144813c81c23737b19a6696 assets/create/lang/unfinished/ja_jp.json -a33f8a2d9675c58420d12a807a079b29979dbb2a assets/create/lang/unfinished/ko_kr.json -9f109e77eb4a258ed30633d423889612dfc3689a assets/create/lang/unfinished/nl_nl.json -08c31f2734fe78242ef889d001cebee28c3cc33a assets/create/lang/unfinished/pl_pl.json -7af2e8033d29038d077c5f7b0b0433d38b9c6f8b assets/create/lang/unfinished/pt_br.json -0a6e6219f07d3eb68c45e2eaebbb5327383a6b06 assets/create/lang/unfinished/ru_ru.json -994953150b977f373424f1e7193c7d5bc1ad1ba3 assets/create/lang/unfinished/zh_cn.json -ebfe8edd3bd161efc819fced5e25f02e2bc93888 assets/create/lang/unfinished/zh_tw.json +391e1552053f8fbb148b0bdf2e61f74ae4782100 assets/create/lang/en_ud.json +0e4ba265ae6ab6a81da261f075eef3dc65f688d1 assets/create/lang/en_us.json +012e68268dc9b1a23d726430ca1708fea249cbd6 assets/create/lang/unfinished/de_de.json +c69e245a2549cb045768cd08e16b74a4d3694360 assets/create/lang/unfinished/es_es.json +df23300aa54b5da18f430f8bb15738c1b994b317 assets/create/lang/unfinished/es_mx.json +213cbf99412e5080cb1c48a7c83e03e9ab05d3e5 assets/create/lang/unfinished/fr_fr.json +a9bacc0a4febe3ae012ccf32d01a7a6a2467004d assets/create/lang/unfinished/it_it.json +7c9e02f792fb32785ba9c9afa24c58f2a0b8faa7 assets/create/lang/unfinished/ja_jp.json +050f377d87dcb72b1bd19b57f5c0c02d5c572201 assets/create/lang/unfinished/ko_kr.json +dc06754d80e667eb957b5ff81f628e912bc72d21 assets/create/lang/unfinished/nl_nl.json +147c23ff2d3dd778a88da7a1f1e79befc8b9b62f assets/create/lang/unfinished/pl_pl.json +1b40342e2f2782e4b7e5802a3a72c0df8977bbf1 assets/create/lang/unfinished/pt_br.json +ad720b0b156624c2481f54f23260fe992cf88c5b assets/create/lang/unfinished/ru_ru.json +5adb90c525b9541fc22f67eb79f2d946fb859082 assets/create/lang/unfinished/zh_cn.json +69bf228174d5d88ffbb10d45409c3edf9bd0c99b 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 @@ -1658,7 +1659,7 @@ d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bear 866fbb0ce2878a73e0440d1caf6534c8bd7c384f assets/create/models/item/zinc_ingot.json a80fb25a0b655e76be986b5b49fcb0f03461a1ab assets/create/models/item/zinc_nugget.json b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json -60e8433e4fecca8ff5002978844169eefc929394 assets/create/sounds.json +b378f90ba8723a109fa960dfddf63149a34cb26f assets/create/sounds.json 0f1b4b980afba9bf2caf583b88e261bba8b10313 data/create/advancements/aesthetics.json 187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json 0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json @@ -2591,6 +2592,7 @@ fa8a5922f7346a15a80b5c7e5dfc26d24ea98728 data/create/loot_tables/blocks/layered_ 197ecf9c00c06f6014ecbec678a5466492902cb0 data/create/loot_tables/blocks/layered_limestone.json 0ec9e366708637a01e600a2a12cc267d81b3f69b data/create/loot_tables/blocks/layered_scoria.json 54816065cd735dfe53b1eb551110ba18c6e3746a data/create/loot_tables/blocks/layered_weathered_limestone.json +4b34cda34416f58045b10e61a0c8ae2b29cb0794 data/create/loot_tables/blocks/lectern_controller.json 28ae0ee8a0b1fb6becae6264de687fe17940708e data/create/loot_tables/blocks/light_blue_sail.json b403848d3a4b4ad7a048e70c21e200e40d0c67e3 data/create/loot_tables/blocks/light_blue_seat.json 32afe3fff74ccda4151567961fa6c0b8e3735358 data/create/loot_tables/blocks/light_blue_valve_handle.json diff --git a/src/generated/resources/assets/create/blockstates/lectern_controller.json b/src/generated/resources/assets/create/blockstates/lectern_controller.json new file mode 100644 index 000000000..8b7b2962b --- /dev/null +++ b/src/generated/resources/assets/create/blockstates/lectern_controller.json @@ -0,0 +1,64 @@ +{ + "variants": { + "facing=north,has_book=false,powered=false": { + "model": "minecraft:block/lectern" + }, + "facing=south,has_book=false,powered=false": { + "model": "minecraft:block/lectern", + "y": 180 + }, + "facing=west,has_book=false,powered=false": { + "model": "minecraft:block/lectern", + "y": 270 + }, + "facing=east,has_book=false,powered=false": { + "model": "minecraft:block/lectern", + "y": 90 + }, + "facing=north,has_book=true,powered=false": { + "model": "minecraft:block/lectern" + }, + "facing=south,has_book=true,powered=false": { + "model": "minecraft:block/lectern", + "y": 180 + }, + "facing=west,has_book=true,powered=false": { + "model": "minecraft:block/lectern", + "y": 270 + }, + "facing=east,has_book=true,powered=false": { + "model": "minecraft:block/lectern", + "y": 90 + }, + "facing=north,has_book=false,powered=true": { + "model": "minecraft:block/lectern" + }, + "facing=south,has_book=false,powered=true": { + "model": "minecraft:block/lectern", + "y": 180 + }, + "facing=west,has_book=false,powered=true": { + "model": "minecraft:block/lectern", + "y": 270 + }, + "facing=east,has_book=false,powered=true": { + "model": "minecraft:block/lectern", + "y": 90 + }, + "facing=north,has_book=true,powered=true": { + "model": "minecraft:block/lectern" + }, + "facing=south,has_book=true,powered=true": { + "model": "minecraft:block/lectern", + "y": 180 + }, + "facing=west,has_book=true,powered=true": { + "model": "minecraft:block/lectern", + "y": 270 + }, + "facing=east,has_book=true,powered=true": { + "model": "minecraft:block/lectern", + "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 56be2c1fd..42c97f237 100644 --- a/src/generated/resources/assets/create/lang/en_ud.json +++ b/src/generated/resources/assets/create/lang/en_ud.json @@ -200,6 +200,7 @@ "block.create.layered_limestone": "\u01DDuo\u0287s\u01DD\u026F\u0131\uA780 p\u01DD\u0279\u01DD\u028E\u0250\uA780", "block.create.layered_scoria": "\u0250\u0131\u0279o\u0254S p\u01DD\u0279\u01DD\u028E\u0250\uA780", "block.create.layered_weathered_limestone": "\u01DDuo\u0287s\u01DD\u026F\u0131\uA780 p\u01DD\u0279\u01DD\u0265\u0287\u0250\u01DDM p\u01DD\u0279\u01DD\u028E\u0250\uA780", + "block.create.lectern_controller": "\u0279\u01DD\u05DF\u05DFo\u0279\u0287uo\u0186 u\u0279\u01DD\u0287\u0254\u01DD\uA780", "block.create.light_blue_sail": "\u05DF\u0131\u0250S \u01DDn\u05DF\u15FA \u0287\u0265b\u0131\uA780", "block.create.light_blue_seat": "\u0287\u0250\u01DDS \u01DDn\u05DF\u15FA \u0287\u0265b\u0131\uA780", "block.create.light_blue_valve_handle": "\u01DD\u05DFpu\u0250H \u01DD\u028C\u05DF\u0250\u039B \u01DDn\u05DF\u15FA \u0287\u0265b\u0131\uA780", diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index 44805bd94..a0a68d42d 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -203,6 +203,7 @@ "block.create.layered_limestone": "Layered Limestone", "block.create.layered_scoria": "Layered Scoria", "block.create.layered_weathered_limestone": "Layered Weathered Limestone", + "block.create.lectern_controller": "Lectern Controller", "block.create.light_blue_sail": "Light Blue Sail", "block.create.light_blue_seat": "Light Blue Seat", "block.create.light_blue_valve_handle": "Light Blue Valve Handle", @@ -1191,6 +1192,7 @@ "create.subtitle.schematicannon_finish": "Schematicannon dings", "create.subtitle.scroll_value": "Scroll-input clicks", "create.subtitle.crafter_craft": "Crafter crafts", + "create.subtitle.controller_put": "Controller thumps", "create.subtitle.saw_process": "Mechanical Saw processes", "create.subtitle.cranking": "Hand Crank turns", "create.subtitle.wrench_remove": "Component breaks", @@ -1206,6 +1208,7 @@ "create.subtitle.copper_armor_equip": "Diving equipment clinks", "create.subtitle.cursed_bell_use": "Cursed Bell tolls", "create.subtitle.cursed_bell_convert": "Cursed Bell awakens", + "create.subtitle.controller_take": "Lectern empties", "create.subtitle.mechanical_press_activation": "Mechanical Press clangs", "create.subtitle.contraption_assemble": "Contraption moves", "create.subtitle.crafter_click": "Crafter clicks", @@ -1400,6 +1403,8 @@ "item.create.linked_controller.tooltip.behaviour2": "Opens the manual _Configuration Interface_.", "item.create.linked_controller.tooltip.condition3": "R-Click on Redstone Link Receiver", "item.create.linked_controller.tooltip.behaviour3": "Enables _Bind Mode_, press one of the _six controls_ to bind it to the _Links' Frequency_.", + "item.create.linked_controller.tooltip.condition4": "R-Click on Lectern", + "item.create.linked_controller.tooltip.behaviour4": "Places the Controller into the Lectern for easy activation. (R-Click while Sneaking to retrieve it)", "item.create.diving_helmet.tooltip": "DIVING HELMET", "item.create.diving_helmet.tooltip.summary": "Together with a _Copper_ _Backtank_, allows the wielder to _breathe_ _underwater_ for an extended amount of time.", 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 603f78411..05eb7b92f 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: 1085", + "_": "Missing Localizations: 1090", "_": "->------------------------] Game Elements [------------------------<-", @@ -204,6 +204,7 @@ "block.create.layered_limestone": "Geschichteter Kalkstein", "block.create.layered_scoria": "Geschichtete Schlacke", "block.create.layered_weathered_limestone": "Geschichteter Verwitterter Kalkstein", + "block.create.lectern_controller": "UNLOCALIZED: Lectern Controller", "block.create.light_blue_sail": "Hellblaues Segel", "block.create.light_blue_seat": "Hellblauer Sitz", "block.create.light_blue_valve_handle": "Hellblauer Ventilgriff", @@ -1192,6 +1193,7 @@ "create.subtitle.schematicannon_finish": "Bauplankanone endet", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.crafter_craft": "UNLOCALIZED: Crafter crafts", + "create.subtitle.controller_put": "UNLOCALIZED: Controller thumps", "create.subtitle.saw_process": "UNLOCALIZED: Mechanical Saw processes", "create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns", "create.subtitle.wrench_remove": "UNLOCALIZED: Component breaks", @@ -1207,6 +1209,7 @@ "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.cursed_bell_use": "UNLOCALIZED: Cursed Bell tolls", "create.subtitle.cursed_bell_convert": "UNLOCALIZED: Cursed Bell awakens", + "create.subtitle.controller_take": "UNLOCALIZED: Lectern empties", "create.subtitle.mechanical_press_activation": "Mechanische Presse wird aktiviert", "create.subtitle.contraption_assemble": "UNLOCALIZED: Contraption moves", "create.subtitle.crafter_click": "UNLOCALIZED: Crafter clicks", @@ -1401,6 +1404,8 @@ "item.create.linked_controller.tooltip.behaviour2": "UNLOCALIZED: Opens the manual _Configuration Interface_.", "item.create.linked_controller.tooltip.condition3": "UNLOCALIZED: R-Click on Redstone Link Receiver", "item.create.linked_controller.tooltip.behaviour3": "UNLOCALIZED: Enables _Bind Mode_, press one of the _six controls_ to bind it to the _Links' Frequency_.", + "item.create.linked_controller.tooltip.condition4": "UNLOCALIZED: R-Click on Lectern", + "item.create.linked_controller.tooltip.behaviour4": "UNLOCALIZED: Places the Controller into the Lectern for easy activation. (R-Click while Sneaking to retrieve it)", "item.create.diving_helmet.tooltip": "UNLOCALIZED: DIVING HELMET", "item.create.diving_helmet.tooltip.summary": "UNLOCALIZED: Together with a _Copper_ _Backtank_, allows the wielder to _breathe_ _underwater_ for an extended amount of time.", 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 404d15d8a..6ff5a32c9 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: 846", + "_": "Missing Localizations: 851", "_": "->------------------------] Game Elements [------------------------<-", @@ -204,6 +204,7 @@ "block.create.layered_limestone": "Piedra caliza estratificada", "block.create.layered_scoria": "Escoria estratificada", "block.create.layered_weathered_limestone": "Caliza erosionada estratificada", + "block.create.lectern_controller": "UNLOCALIZED: Lectern Controller", "block.create.light_blue_sail": "Vela azul claro", "block.create.light_blue_seat": "Asiento azul claro", "block.create.light_blue_valve_handle": "Asa de válvula azul claro", @@ -1192,6 +1193,7 @@ "create.subtitle.schematicannon_finish": "Acabados de Schematicannon", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.crafter_craft": "UNLOCALIZED: Crafter crafts", + "create.subtitle.controller_put": "UNLOCALIZED: Controller thumps", "create.subtitle.saw_process": "UNLOCALIZED: Mechanical Saw processes", "create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns", "create.subtitle.wrench_remove": "UNLOCALIZED: Component breaks", @@ -1207,6 +1209,7 @@ "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.cursed_bell_use": "UNLOCALIZED: Cursed Bell tolls", "create.subtitle.cursed_bell_convert": "UNLOCALIZED: Cursed Bell awakens", + "create.subtitle.controller_take": "UNLOCALIZED: Lectern empties", "create.subtitle.mechanical_press_activation": "La Prensa Mecánica se activa", "create.subtitle.contraption_assemble": "UNLOCALIZED: Contraption moves", "create.subtitle.crafter_click": "UNLOCALIZED: Crafter clicks", @@ -1401,6 +1404,8 @@ "item.create.linked_controller.tooltip.behaviour2": "UNLOCALIZED: Opens the manual _Configuration Interface_.", "item.create.linked_controller.tooltip.condition3": "UNLOCALIZED: R-Click on Redstone Link Receiver", "item.create.linked_controller.tooltip.behaviour3": "UNLOCALIZED: Enables _Bind Mode_, press one of the _six controls_ to bind it to the _Links' Frequency_.", + "item.create.linked_controller.tooltip.condition4": "UNLOCALIZED: R-Click on Lectern", + "item.create.linked_controller.tooltip.behaviour4": "UNLOCALIZED: Places the Controller into the Lectern for easy activation. (R-Click while Sneaking to retrieve it)", "item.create.diving_helmet.tooltip": "UNLOCALIZED: DIVING HELMET", "item.create.diving_helmet.tooltip.summary": "UNLOCALIZED: Together with a _Copper_ _Backtank_, allows the wielder to _breathe_ _underwater_ for an extended amount of time.", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_mx.json b/src/generated/resources/assets/create/lang/unfinished/es_mx.json index e95d500e2..41c54226a 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_mx.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_mx.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1452", + "_": "Missing Localizations: 1457", "_": "->------------------------] Game Elements [------------------------<-", @@ -204,6 +204,7 @@ "block.create.layered_limestone": "Caliza en Capas", "block.create.layered_scoria": "Escoria en Capas", "block.create.layered_weathered_limestone": "Caliza Meteorizada en Capas", + "block.create.lectern_controller": "UNLOCALIZED: Lectern Controller", "block.create.light_blue_sail": "Vela Azul Claro", "block.create.light_blue_seat": "Asiento Azul Claro", "block.create.light_blue_valve_handle": "Manija de Válvula Azul Claro", @@ -1192,6 +1193,7 @@ "create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.crafter_craft": "UNLOCALIZED: Crafter crafts", + "create.subtitle.controller_put": "UNLOCALIZED: Controller thumps", "create.subtitle.saw_process": "UNLOCALIZED: Mechanical Saw processes", "create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns", "create.subtitle.wrench_remove": "UNLOCALIZED: Component breaks", @@ -1207,6 +1209,7 @@ "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.cursed_bell_use": "UNLOCALIZED: Cursed Bell tolls", "create.subtitle.cursed_bell_convert": "UNLOCALIZED: Cursed Bell awakens", + "create.subtitle.controller_take": "UNLOCALIZED: Lectern empties", "create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs", "create.subtitle.contraption_assemble": "UNLOCALIZED: Contraption moves", "create.subtitle.crafter_click": "UNLOCALIZED: Crafter clicks", @@ -1401,6 +1404,8 @@ "item.create.linked_controller.tooltip.behaviour2": "UNLOCALIZED: Opens the manual _Configuration Interface_.", "item.create.linked_controller.tooltip.condition3": "UNLOCALIZED: R-Click on Redstone Link Receiver", "item.create.linked_controller.tooltip.behaviour3": "UNLOCALIZED: Enables _Bind Mode_, press one of the _six controls_ to bind it to the _Links' Frequency_.", + "item.create.linked_controller.tooltip.condition4": "UNLOCALIZED: R-Click on Lectern", + "item.create.linked_controller.tooltip.behaviour4": "UNLOCALIZED: Places the Controller into the Lectern for easy activation. (R-Click while Sneaking to retrieve it)", "item.create.diving_helmet.tooltip": "UNLOCALIZED: DIVING HELMET", "item.create.diving_helmet.tooltip.summary": "UNLOCALIZED: Together with a _Copper_ _Backtank_, allows the wielder to _breathe_ _underwater_ for an extended amount of time.", 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 a82f16e89..6128bd7c1 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: 1337", + "_": "Missing Localizations: 1342", "_": "->------------------------] Game Elements [------------------------<-", @@ -204,6 +204,7 @@ "block.create.layered_limestone": "UNLOCALIZED: Layered Limestone", "block.create.layered_scoria": "UNLOCALIZED: Layered Scoria", "block.create.layered_weathered_limestone": "UNLOCALIZED: Layered Weathered Limestone", + "block.create.lectern_controller": "UNLOCALIZED: Lectern Controller", "block.create.light_blue_sail": "UNLOCALIZED: Light Blue Sail", "block.create.light_blue_seat": "UNLOCALIZED: Light Blue Seat", "block.create.light_blue_valve_handle": "UNLOCALIZED: Light Blue Valve Handle", @@ -1192,6 +1193,7 @@ "create.subtitle.schematicannon_finish": "Fin de schémacanon", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.crafter_craft": "UNLOCALIZED: Crafter crafts", + "create.subtitle.controller_put": "UNLOCALIZED: Controller thumps", "create.subtitle.saw_process": "UNLOCALIZED: Mechanical Saw processes", "create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns", "create.subtitle.wrench_remove": "UNLOCALIZED: Component breaks", @@ -1207,6 +1209,7 @@ "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.cursed_bell_use": "UNLOCALIZED: Cursed Bell tolls", "create.subtitle.cursed_bell_convert": "UNLOCALIZED: Cursed Bell awakens", + "create.subtitle.controller_take": "UNLOCALIZED: Lectern empties", "create.subtitle.mechanical_press_activation": "Activation de la presse mechanique", "create.subtitle.contraption_assemble": "UNLOCALIZED: Contraption moves", "create.subtitle.crafter_click": "UNLOCALIZED: Crafter clicks", @@ -1401,6 +1404,8 @@ "item.create.linked_controller.tooltip.behaviour2": "UNLOCALIZED: Opens the manual _Configuration Interface_.", "item.create.linked_controller.tooltip.condition3": "UNLOCALIZED: R-Click on Redstone Link Receiver", "item.create.linked_controller.tooltip.behaviour3": "UNLOCALIZED: Enables _Bind Mode_, press one of the _six controls_ to bind it to the _Links' Frequency_.", + "item.create.linked_controller.tooltip.condition4": "UNLOCALIZED: R-Click on Lectern", + "item.create.linked_controller.tooltip.behaviour4": "UNLOCALIZED: Places the Controller into the Lectern for easy activation. (R-Click while Sneaking to retrieve it)", "item.create.diving_helmet.tooltip": "UNLOCALIZED: DIVING HELMET", "item.create.diving_helmet.tooltip.summary": "UNLOCALIZED: Together with a _Copper_ _Backtank_, allows the wielder to _breathe_ _underwater_ for an extended amount of time.", 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 1b9599e71..379d05acf 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: 863", + "_": "Missing Localizations: 868", "_": "->------------------------] Game Elements [------------------------<-", @@ -204,6 +204,7 @@ "block.create.layered_limestone": "Calcare stratificato", "block.create.layered_scoria": "Scoria stratificata", "block.create.layered_weathered_limestone": "Calcare consumato stratificato", + "block.create.lectern_controller": "UNLOCALIZED: Lectern Controller", "block.create.light_blue_sail": "Vela azzurra", "block.create.light_blue_seat": "Sedile azzurro", "block.create.light_blue_valve_handle": "Maniglia per valvola azzurra", @@ -1192,6 +1193,7 @@ "create.subtitle.schematicannon_finish": "Finiture cannoneschematico", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.crafter_craft": "UNLOCALIZED: Crafter crafts", + "create.subtitle.controller_put": "UNLOCALIZED: Controller thumps", "create.subtitle.saw_process": "UNLOCALIZED: Mechanical Saw processes", "create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns", "create.subtitle.wrench_remove": "UNLOCALIZED: Component breaks", @@ -1207,6 +1209,7 @@ "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.cursed_bell_use": "UNLOCALIZED: Cursed Bell tolls", "create.subtitle.cursed_bell_convert": "UNLOCALIZED: Cursed Bell awakens", + "create.subtitle.controller_take": "UNLOCALIZED: Lectern empties", "create.subtitle.mechanical_press_activation": "Pressa meccanica attiva", "create.subtitle.contraption_assemble": "UNLOCALIZED: Contraption moves", "create.subtitle.crafter_click": "UNLOCALIZED: Crafter clicks", @@ -1401,6 +1404,8 @@ "item.create.linked_controller.tooltip.behaviour2": "UNLOCALIZED: Opens the manual _Configuration Interface_.", "item.create.linked_controller.tooltip.condition3": "UNLOCALIZED: R-Click on Redstone Link Receiver", "item.create.linked_controller.tooltip.behaviour3": "UNLOCALIZED: Enables _Bind Mode_, press one of the _six controls_ to bind it to the _Links' Frequency_.", + "item.create.linked_controller.tooltip.condition4": "UNLOCALIZED: R-Click on Lectern", + "item.create.linked_controller.tooltip.behaviour4": "UNLOCALIZED: Places the Controller into the Lectern for easy activation. (R-Click while Sneaking to retrieve it)", "item.create.diving_helmet.tooltip": "UNLOCALIZED: DIVING HELMET", "item.create.diving_helmet.tooltip.summary": "UNLOCALIZED: Together with a _Copper_ _Backtank_, allows the wielder to _breathe_ _underwater_ for an extended amount of time.", 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 454c78ef4..88953f448 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: 229", + "_": "Missing Localizations: 234", "_": "->------------------------] Game Elements [------------------------<-", @@ -204,6 +204,7 @@ "block.create.layered_limestone": "石灰岩の組石", "block.create.layered_scoria": "スコリアの組石", "block.create.layered_weathered_limestone": "風化した石灰岩の組石", + "block.create.lectern_controller": "UNLOCALIZED: Lectern Controller", "block.create.light_blue_sail": "空色の帆", "block.create.light_blue_seat": "空色のシート", "block.create.light_blue_valve_handle": "空色のバルブハンドル", @@ -1192,6 +1193,7 @@ "create.subtitle.schematicannon_finish": "概略図砲が作業を終える", "create.subtitle.scroll_value": "スクロールのカチカチ音", "create.subtitle.crafter_craft": "メカニカルクラフターがクラフトする", + "create.subtitle.controller_put": "UNLOCALIZED: Controller thumps", "create.subtitle.saw_process": "UNLOCALIZED: Mechanical Saw processes", "create.subtitle.cranking": "ハンドクランクが回る", "create.subtitle.wrench_remove": "機械を壊す", @@ -1207,6 +1209,7 @@ "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.cursed_bell_use": "UNLOCALIZED: Cursed Bell tolls", "create.subtitle.cursed_bell_convert": "UNLOCALIZED: Cursed Bell awakens", + "create.subtitle.controller_take": "UNLOCALIZED: Lectern empties", "create.subtitle.mechanical_press_activation": "メカニカルプレスがガーンと鳴る", "create.subtitle.contraption_assemble": "からくりが動く", "create.subtitle.crafter_click": "メカニカルクラフターのカチカチ音", @@ -1401,6 +1404,8 @@ "item.create.linked_controller.tooltip.behaviour2": "UNLOCALIZED: Opens the manual _Configuration Interface_.", "item.create.linked_controller.tooltip.condition3": "UNLOCALIZED: R-Click on Redstone Link Receiver", "item.create.linked_controller.tooltip.behaviour3": "UNLOCALIZED: Enables _Bind Mode_, press one of the _six controls_ to bind it to the _Links' Frequency_.", + "item.create.linked_controller.tooltip.condition4": "UNLOCALIZED: R-Click on Lectern", + "item.create.linked_controller.tooltip.behaviour4": "UNLOCALIZED: Places the Controller into the Lectern for easy activation. (R-Click while Sneaking to retrieve it)", "item.create.diving_helmet.tooltip": "UNLOCALIZED: DIVING HELMET", "item.create.diving_helmet.tooltip.summary": "UNLOCALIZED: Together with a _Copper_ _Backtank_, allows the wielder to _breathe_ _underwater_ for an extended amount of time.", 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 01565bc7e..1ef6e2fb8 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: 916", + "_": "Missing Localizations: 921", "_": "->------------------------] Game Elements [------------------------<-", @@ -204,6 +204,7 @@ "block.create.layered_limestone": "층이 있는 석회암", "block.create.layered_scoria": "층이 있는 스코리아", "block.create.layered_weathered_limestone": "층이 있는 풍화된 석회암", + "block.create.lectern_controller": "UNLOCALIZED: Lectern Controller", "block.create.light_blue_sail": "하늘색 날개", "block.create.light_blue_seat": "하늘색 좌석", "block.create.light_blue_valve_handle": "하늘색 밸브 손잡이", @@ -1192,6 +1193,7 @@ "create.subtitle.schematicannon_finish": "청사진 대포가 끝남", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.crafter_craft": "UNLOCALIZED: Crafter crafts", + "create.subtitle.controller_put": "UNLOCALIZED: Controller thumps", "create.subtitle.saw_process": "UNLOCALIZED: Mechanical Saw processes", "create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns", "create.subtitle.wrench_remove": "UNLOCALIZED: Component breaks", @@ -1207,6 +1209,7 @@ "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.cursed_bell_use": "UNLOCALIZED: Cursed Bell tolls", "create.subtitle.cursed_bell_convert": "UNLOCALIZED: Cursed Bell awakens", + "create.subtitle.controller_take": "UNLOCALIZED: Lectern empties", "create.subtitle.mechanical_press_activation": "압착기가 가동됨", "create.subtitle.contraption_assemble": "UNLOCALIZED: Contraption moves", "create.subtitle.crafter_click": "UNLOCALIZED: Crafter clicks", @@ -1401,6 +1404,8 @@ "item.create.linked_controller.tooltip.behaviour2": "UNLOCALIZED: Opens the manual _Configuration Interface_.", "item.create.linked_controller.tooltip.condition3": "UNLOCALIZED: R-Click on Redstone Link Receiver", "item.create.linked_controller.tooltip.behaviour3": "UNLOCALIZED: Enables _Bind Mode_, press one of the _six controls_ to bind it to the _Links' Frequency_.", + "item.create.linked_controller.tooltip.condition4": "UNLOCALIZED: R-Click on Lectern", + "item.create.linked_controller.tooltip.behaviour4": "UNLOCALIZED: Places the Controller into the Lectern for easy activation. (R-Click while Sneaking to retrieve it)", "item.create.diving_helmet.tooltip": "UNLOCALIZED: DIVING HELMET", "item.create.diving_helmet.tooltip.summary": "UNLOCALIZED: Together with a _Copper_ _Backtank_, allows the wielder to _breathe_ _underwater_ for an extended amount of time.", 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 5a39e646f..b0258d7c6 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: 1718", + "_": "Missing Localizations: 1723", "_": "->------------------------] Game Elements [------------------------<-", @@ -204,6 +204,7 @@ "block.create.layered_limestone": "UNLOCALIZED: Layered Limestone", "block.create.layered_scoria": "UNLOCALIZED: Layered Scoria", "block.create.layered_weathered_limestone": "UNLOCALIZED: Layered Weathered Limestone", + "block.create.lectern_controller": "UNLOCALIZED: Lectern Controller", "block.create.light_blue_sail": "UNLOCALIZED: Light Blue Sail", "block.create.light_blue_seat": "UNLOCALIZED: Light Blue Seat", "block.create.light_blue_valve_handle": "UNLOCALIZED: Light Blue Valve Handle", @@ -1192,6 +1193,7 @@ "create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.crafter_craft": "UNLOCALIZED: Crafter crafts", + "create.subtitle.controller_put": "UNLOCALIZED: Controller thumps", "create.subtitle.saw_process": "UNLOCALIZED: Mechanical Saw processes", "create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns", "create.subtitle.wrench_remove": "UNLOCALIZED: Component breaks", @@ -1207,6 +1209,7 @@ "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.cursed_bell_use": "UNLOCALIZED: Cursed Bell tolls", "create.subtitle.cursed_bell_convert": "UNLOCALIZED: Cursed Bell awakens", + "create.subtitle.controller_take": "UNLOCALIZED: Lectern empties", "create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs", "create.subtitle.contraption_assemble": "UNLOCALIZED: Contraption moves", "create.subtitle.crafter_click": "UNLOCALIZED: Crafter clicks", @@ -1401,6 +1404,8 @@ "item.create.linked_controller.tooltip.behaviour2": "UNLOCALIZED: Opens the manual _Configuration Interface_.", "item.create.linked_controller.tooltip.condition3": "UNLOCALIZED: R-Click on Redstone Link Receiver", "item.create.linked_controller.tooltip.behaviour3": "UNLOCALIZED: Enables _Bind Mode_, press one of the _six controls_ to bind it to the _Links' Frequency_.", + "item.create.linked_controller.tooltip.condition4": "UNLOCALIZED: R-Click on Lectern", + "item.create.linked_controller.tooltip.behaviour4": "UNLOCALIZED: Places the Controller into the Lectern for easy activation. (R-Click while Sneaking to retrieve it)", "item.create.diving_helmet.tooltip": "UNLOCALIZED: DIVING HELMET", "item.create.diving_helmet.tooltip.summary": "UNLOCALIZED: Together with a _Copper_ _Backtank_, allows the wielder to _breathe_ _underwater_ for an extended amount of time.", 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 6f2a97a8e..8e234744d 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: 205", + "_": "Missing Localizations: 210", "_": "->------------------------] Game Elements [------------------------<-", @@ -204,6 +204,7 @@ "block.create.layered_limestone": "Warstwowy wapień", "block.create.layered_scoria": "Warstwowy żużel", "block.create.layered_weathered_limestone": "Warstwowy zwietrzały wapień", + "block.create.lectern_controller": "UNLOCALIZED: Lectern Controller", "block.create.light_blue_sail": "Jasnoniebieski żagiel", "block.create.light_blue_seat": "Jasnoniebieskie siedzenie", "block.create.light_blue_valve_handle": "Jasnoniebieskie pokrętło", @@ -1192,6 +1193,7 @@ "create.subtitle.schematicannon_finish": "Schematoarmata skończyła", "create.subtitle.scroll_value": "Kliknięcie", "create.subtitle.crafter_craft": "Mechaniczny stół rzemieślniczy konstruuje", + "create.subtitle.controller_put": "UNLOCALIZED: Controller thumps", "create.subtitle.saw_process": "UNLOCALIZED: Mechanical Saw processes", "create.subtitle.cranking": "Ręczna korba obraca się", "create.subtitle.wrench_remove": "Komponent niszczy się", @@ -1207,6 +1209,7 @@ "create.subtitle.copper_armor_equip": "Sprzęt do nurkowania pobrzękuje", "create.subtitle.cursed_bell_use": "UNLOCALIZED: Cursed Bell tolls", "create.subtitle.cursed_bell_convert": "UNLOCALIZED: Cursed Bell awakens", + "create.subtitle.controller_take": "UNLOCALIZED: Lectern empties", "create.subtitle.mechanical_press_activation": "Mechaniczna prasa się uruchamia", "create.subtitle.contraption_assemble": "Maszyna przesuwa się", "create.subtitle.crafter_click": "Mechaniczny stół rzemieślniczy stuka", @@ -1401,6 +1404,8 @@ "item.create.linked_controller.tooltip.behaviour2": "UNLOCALIZED: Opens the manual _Configuration Interface_.", "item.create.linked_controller.tooltip.condition3": "UNLOCALIZED: R-Click on Redstone Link Receiver", "item.create.linked_controller.tooltip.behaviour3": "UNLOCALIZED: Enables _Bind Mode_, press one of the _six controls_ to bind it to the _Links' Frequency_.", + "item.create.linked_controller.tooltip.condition4": "UNLOCALIZED: R-Click on Lectern", + "item.create.linked_controller.tooltip.behaviour4": "UNLOCALIZED: Places the Controller into the Lectern for easy activation. (R-Click while Sneaking to retrieve it)", "item.create.diving_helmet.tooltip": "UNLOCALIZED: DIVING HELMET", "item.create.diving_helmet.tooltip.summary": "UNLOCALIZED: Together with a _Copper_ _Backtank_, allows the wielder to _breathe_ _underwater_ for an extended amount of time.", 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 9456ef618..13e965ac2 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: 1759", + "_": "Missing Localizations: 1764", "_": "->------------------------] Game Elements [------------------------<-", @@ -204,6 +204,7 @@ "block.create.layered_limestone": "UNLOCALIZED: Layered Limestone", "block.create.layered_scoria": "UNLOCALIZED: Layered Scoria", "block.create.layered_weathered_limestone": "UNLOCALIZED: Layered Weathered Limestone", + "block.create.lectern_controller": "UNLOCALIZED: Lectern Controller", "block.create.light_blue_sail": "UNLOCALIZED: Light Blue Sail", "block.create.light_blue_seat": "UNLOCALIZED: Light Blue Seat", "block.create.light_blue_valve_handle": "UNLOCALIZED: Light Blue Valve Handle", @@ -1192,6 +1193,7 @@ "create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.crafter_craft": "UNLOCALIZED: Crafter crafts", + "create.subtitle.controller_put": "UNLOCALIZED: Controller thumps", "create.subtitle.saw_process": "UNLOCALIZED: Mechanical Saw processes", "create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns", "create.subtitle.wrench_remove": "UNLOCALIZED: Component breaks", @@ -1207,6 +1209,7 @@ "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.cursed_bell_use": "UNLOCALIZED: Cursed Bell tolls", "create.subtitle.cursed_bell_convert": "UNLOCALIZED: Cursed Bell awakens", + "create.subtitle.controller_take": "UNLOCALIZED: Lectern empties", "create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs", "create.subtitle.contraption_assemble": "UNLOCALIZED: Contraption moves", "create.subtitle.crafter_click": "UNLOCALIZED: Crafter clicks", @@ -1401,6 +1404,8 @@ "item.create.linked_controller.tooltip.behaviour2": "UNLOCALIZED: Opens the manual _Configuration Interface_.", "item.create.linked_controller.tooltip.condition3": "UNLOCALIZED: R-Click on Redstone Link Receiver", "item.create.linked_controller.tooltip.behaviour3": "UNLOCALIZED: Enables _Bind Mode_, press one of the _six controls_ to bind it to the _Links' Frequency_.", + "item.create.linked_controller.tooltip.condition4": "UNLOCALIZED: R-Click on Lectern", + "item.create.linked_controller.tooltip.behaviour4": "UNLOCALIZED: Places the Controller into the Lectern for easy activation. (R-Click while Sneaking to retrieve it)", "item.create.diving_helmet.tooltip": "UNLOCALIZED: DIVING HELMET", "item.create.diving_helmet.tooltip.summary": "UNLOCALIZED: Together with a _Copper_ _Backtank_, allows the wielder to _breathe_ _underwater_ for an extended amount of time.", 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 6b58a8c53..ecc9f79a0 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: 762", + "_": "Missing Localizations: 767", "_": "->------------------------] Game Elements [------------------------<-", @@ -204,6 +204,7 @@ "block.create.layered_limestone": "Слоистый известняк", "block.create.layered_scoria": "Слоистый пепел", "block.create.layered_weathered_limestone": "Слоистый выветренный известняк", + "block.create.lectern_controller": "UNLOCALIZED: Lectern Controller", "block.create.light_blue_sail": "Голубой парус", "block.create.light_blue_seat": "Голубое сиденье", "block.create.light_blue_valve_handle": "Голубой ручной вентиль", @@ -1192,6 +1193,7 @@ "create.subtitle.schematicannon_finish": "Схематичная пушка закончила работу", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.crafter_craft": "UNLOCALIZED: Crafter crafts", + "create.subtitle.controller_put": "UNLOCALIZED: Controller thumps", "create.subtitle.saw_process": "UNLOCALIZED: Mechanical Saw processes", "create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns", "create.subtitle.wrench_remove": "UNLOCALIZED: Component breaks", @@ -1207,6 +1209,7 @@ "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.cursed_bell_use": "UNLOCALIZED: Cursed Bell tolls", "create.subtitle.cursed_bell_convert": "UNLOCALIZED: Cursed Bell awakens", + "create.subtitle.controller_take": "UNLOCALIZED: Lectern empties", "create.subtitle.mechanical_press_activation": "Механический пресс активирован", "create.subtitle.contraption_assemble": "UNLOCALIZED: Contraption moves", "create.subtitle.crafter_click": "UNLOCALIZED: Crafter clicks", @@ -1401,6 +1404,8 @@ "item.create.linked_controller.tooltip.behaviour2": "UNLOCALIZED: Opens the manual _Configuration Interface_.", "item.create.linked_controller.tooltip.condition3": "UNLOCALIZED: R-Click on Redstone Link Receiver", "item.create.linked_controller.tooltip.behaviour3": "UNLOCALIZED: Enables _Bind Mode_, press one of the _six controls_ to bind it to the _Links' Frequency_.", + "item.create.linked_controller.tooltip.condition4": "UNLOCALIZED: R-Click on Lectern", + "item.create.linked_controller.tooltip.behaviour4": "UNLOCALIZED: Places the Controller into the Lectern for easy activation. (R-Click while Sneaking to retrieve it)", "item.create.diving_helmet.tooltip": "UNLOCALIZED: DIVING HELMET", "item.create.diving_helmet.tooltip.summary": "UNLOCALIZED: Together with a _Copper_ _Backtank_, allows the wielder to _breathe_ _underwater_ for an extended amount of time.", 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 fbb8c741a..7179fae3b 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: 251", "_": "->------------------------] Game Elements [------------------------<-", @@ -204,6 +204,7 @@ "block.create.layered_limestone": "层叠石灰岩", "block.create.layered_scoria": "层叠熔渣", "block.create.layered_weathered_limestone": "层叠风化石灰岩", + "block.create.lectern_controller": "UNLOCALIZED: Lectern Controller", "block.create.light_blue_sail": "淡蓝色风帆", "block.create.light_blue_seat": "淡蓝色坐垫", "block.create.light_blue_valve_handle": "淡蓝色阀门手轮", @@ -1192,6 +1193,7 @@ "create.subtitle.schematicannon_finish": "蓝图加农炮:叮", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.crafter_craft": "UNLOCALIZED: Crafter crafts", + "create.subtitle.controller_put": "UNLOCALIZED: Controller thumps", "create.subtitle.saw_process": "UNLOCALIZED: Mechanical Saw processes", "create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns", "create.subtitle.wrench_remove": "UNLOCALIZED: Component breaks", @@ -1207,6 +1209,7 @@ "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.cursed_bell_use": "UNLOCALIZED: Cursed Bell tolls", "create.subtitle.cursed_bell_convert": "UNLOCALIZED: Cursed Bell awakens", + "create.subtitle.controller_take": "UNLOCALIZED: Lectern empties", "create.subtitle.mechanical_press_activation": "辊压机:工作中", "create.subtitle.contraption_assemble": "UNLOCALIZED: Contraption moves", "create.subtitle.crafter_click": "UNLOCALIZED: Crafter clicks", @@ -1401,6 +1404,8 @@ "item.create.linked_controller.tooltip.behaviour2": "UNLOCALIZED: Opens the manual _Configuration Interface_.", "item.create.linked_controller.tooltip.condition3": "UNLOCALIZED: R-Click on Redstone Link Receiver", "item.create.linked_controller.tooltip.behaviour3": "UNLOCALIZED: Enables _Bind Mode_, press one of the _six controls_ to bind it to the _Links' Frequency_.", + "item.create.linked_controller.tooltip.condition4": "UNLOCALIZED: R-Click on Lectern", + "item.create.linked_controller.tooltip.behaviour4": "UNLOCALIZED: Places the Controller into the Lectern for easy activation. (R-Click while Sneaking to retrieve it)", "item.create.diving_helmet.tooltip": "UNLOCALIZED: DIVING HELMET", "item.create.diving_helmet.tooltip.summary": "UNLOCALIZED: Together with a _Copper_ _Backtank_, allows the wielder to _breathe_ _underwater_ for an extended amount of time.", 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 e0286db63..78593af33 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: 241", + "_": "Missing Localizations: 246", "_": "->------------------------] Game Elements [------------------------<-", @@ -204,6 +204,7 @@ "block.create.layered_limestone": "疊層石灰岩", "block.create.layered_scoria": "疊層火成岩", "block.create.layered_weathered_limestone": "疊層風化石灰岩", + "block.create.lectern_controller": "UNLOCALIZED: Lectern Controller", "block.create.light_blue_sail": "淡藍色風帆", "block.create.light_blue_seat": "淡藍色坐墊", "block.create.light_blue_valve_handle": "淡藍色閥門開關", @@ -1192,6 +1193,7 @@ "create.subtitle.schematicannon_finish": "藍圖大炮完成任務", "create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks", "create.subtitle.crafter_craft": "UNLOCALIZED: Crafter crafts", + "create.subtitle.controller_put": "UNLOCALIZED: Controller thumps", "create.subtitle.saw_process": "UNLOCALIZED: Mechanical Saw processes", "create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns", "create.subtitle.wrench_remove": "UNLOCALIZED: Component breaks", @@ -1207,6 +1209,7 @@ "create.subtitle.copper_armor_equip": "UNLOCALIZED: Diving equipment clinks", "create.subtitle.cursed_bell_use": "UNLOCALIZED: Cursed Bell tolls", "create.subtitle.cursed_bell_convert": "UNLOCALIZED: Cursed Bell awakens", + "create.subtitle.controller_take": "UNLOCALIZED: Lectern empties", "create.subtitle.mechanical_press_activation": "液壓機工作", "create.subtitle.contraption_assemble": "UNLOCALIZED: Contraption moves", "create.subtitle.crafter_click": "UNLOCALIZED: Crafter clicks", @@ -1401,6 +1404,8 @@ "item.create.linked_controller.tooltip.behaviour2": "UNLOCALIZED: Opens the manual _Configuration Interface_.", "item.create.linked_controller.tooltip.condition3": "UNLOCALIZED: R-Click on Redstone Link Receiver", "item.create.linked_controller.tooltip.behaviour3": "UNLOCALIZED: Enables _Bind Mode_, press one of the _six controls_ to bind it to the _Links' Frequency_.", + "item.create.linked_controller.tooltip.condition4": "UNLOCALIZED: R-Click on Lectern", + "item.create.linked_controller.tooltip.behaviour4": "UNLOCALIZED: Places the Controller into the Lectern for easy activation. (R-Click while Sneaking to retrieve it)", "item.create.diving_helmet.tooltip": "UNLOCALIZED: DIVING HELMET", "item.create.diving_helmet.tooltip.summary": "UNLOCALIZED: Together with a _Copper_ _Backtank_, allows the wielder to _breathe_ _underwater_ for an extended amount of time.", diff --git a/src/generated/resources/assets/create/sounds.json b/src/generated/resources/assets/create/sounds.json index cbfc13e27..2cfa74ee3 100644 --- a/src/generated/resources/assets/create/sounds.json +++ b/src/generated/resources/assets/create/sounds.json @@ -58,6 +58,24 @@ ], "subtitle": "create.subtitle.controller_click" }, + "controller_put": { + "sounds": [ + { + "name": "minecraft:item.book.put", + "type": "event" + } + ], + "subtitle": "create.subtitle.controller_put" + }, + "controller_take": { + "sounds": [ + { + "name": "minecraft:entity.item_frame.remove_item", + "type": "event" + } + ], + "subtitle": "create.subtitle.controller_take" + }, "copper_armor_equip": { "sounds": [ { diff --git a/src/generated/resources/data/create/loot_tables/blocks/lectern_controller.json b/src/generated/resources/data/create/loot_tables/blocks/lectern_controller.json new file mode 100644 index 000000000..6e9c3e84c --- /dev/null +++ b/src/generated/resources/data/create/loot_tables/blocks/lectern_controller.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:lectern" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ 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 a0a410712..a1ea323c4 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -157,6 +157,7 @@ import com.simibubi.create.content.logistics.block.redstone.RedstoneContactBlock import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkBlock; import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkGenerator; import com.simibubi.create.content.logistics.block.redstone.StockpileSwitchBlock; +import com.simibubi.create.content.logistics.item.LecternControllerBlock; import com.simibubi.create.content.schematics.block.SchematicTableBlock; import com.simibubi.create.content.schematics.block.SchematicannonBlock; import com.simibubi.create.foundation.block.DyedBlockList; @@ -1279,6 +1280,15 @@ public class AllBlocks { .transform(customItemModel("diodes", "latch_off")) .register(); + public static final BlockEntry LECTERN_CONTROLLER = + REGISTRATE.block("lectern_controller", LecternControllerBlock::new) + .initialProperties(() -> Blocks.LECTERN) + .blockstate((c,p) -> p.horizontalBlock(c.get(), p.models() + .getExistingFile(p.mcLoc("block/lectern")))) + .loot((lt, block) -> lt.registerDropping(block, Blocks.LECTERN)) + .register(); + + // Curiosities static { diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java index c7ca446fb..aecc4270a 100644 --- a/src/main/java/com/simibubi/create/AllItems.java +++ b/src/main/java/com/simibubi/create/AllItems.java @@ -1,10 +1,10 @@ package com.simibubi.create; -import static com.simibubi.create.AllTags.forgeItemTag; import static com.simibubi.create.AllTags.AllItemTags.CREATE_INGOTS; import static com.simibubi.create.AllTags.AllItemTags.CRUSHED_ORES; import static com.simibubi.create.AllTags.AllItemTags.NUGGETS; import static com.simibubi.create.AllTags.AllItemTags.PLATES; +import static com.simibubi.create.AllTags.forgeItemTag; import static com.simibubi.create.content.AllSections.CURIOSITIES; import static com.simibubi.create.content.AllSections.KINETICS; import static com.simibubi.create.content.AllSections.LOGISTICS; @@ -249,6 +249,7 @@ public class AllItems { public static final ItemEntry LINKED_CONTROLLER = REGISTRATE.item("linked_controller", LinkedControllerItem::new) + .properties(p -> p.maxStackSize(1)) .transform(CreateRegistrate.customRenderedItem(() -> LinkedControllerModel::new)) .model(AssetLookup.itemModelWithPartials()) .register(); diff --git a/src/main/java/com/simibubi/create/AllSoundEvents.java b/src/main/java/com/simibubi/create/AllSoundEvents.java index 80822308c..8830fdb11 100644 --- a/src/main/java/com/simibubi/create/AllSoundEvents.java +++ b/src/main/java/com/simibubi/create/AllSoundEvents.java @@ -174,6 +174,16 @@ public class AllSoundEvents { .category(SoundCategory.BLOCKS) .build(), + CONTROLLER_PUT = create("controller_put").subtitle("Controller thumps") + .playExisting(SoundEvents.ITEM_BOOK_PUT, 1f, 1f) + .category(SoundCategory.BLOCKS) + .build(), + + CONTROLLER_TAKE = create("controller_take").subtitle("Lectern empties") + .playExisting(SoundEvents.ENTITY_ITEM_FRAME_REMOVE_ITEM, 1f, 1f) + .category(SoundCategory.BLOCKS) + .build(), + SAW_ACTIVATE_WOOD = create("saw_activate_wood").subtitle("Mechanical Saw activates") .playExisting(SoundEvents.ENTITY_BOAT_PADDLE_LAND, .75f, 1.5f) .category(SoundCategory.BLOCKS) diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index 179998138..7ec222efc 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -155,6 +155,8 @@ import com.simibubi.create.content.logistics.block.redstone.NixieTubeRenderer; import com.simibubi.create.content.logistics.block.redstone.NixieTubeTileEntity; import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkTileEntity; import com.simibubi.create.content.logistics.block.redstone.StockpileSwitchTileEntity; +import com.simibubi.create.content.logistics.item.LecternControllerRenderer; +import com.simibubi.create.content.logistics.item.LecternControllerTileEntity; import com.simibubi.create.content.schematics.block.SchematicTableTileEntity; import com.simibubi.create.content.schematics.block.SchematicannonInstance; import com.simibubi.create.content.schematics.block.SchematicannonRenderer; @@ -660,6 +662,14 @@ public class AllTileEntities { .renderer(() -> AdjustableRepeaterRenderer::new) .register(); + public static final TileEntityEntry LECTERN_CONTROLLER = + Create.registrate() + .tileEntity("lectern_controller", LecternControllerTileEntity::new) + .validBlocks(AllBlocks.LECTERN_CONTROLLER) + .renderer(() -> LecternControllerRenderer::new) + .register(); + + // Curiosities public static final TileEntityEntry COPPER_BACKTANK = Create.registrate() .tileEntity("copper_backtank", CopperBacktankTileEntity::new) .instance(() -> CopperBacktankInstance::new) diff --git a/src/main/java/com/simibubi/create/content/logistics/item/LecternControllerBlock.java b/src/main/java/com/simibubi/create/content/logistics/item/LecternControllerBlock.java new file mode 100644 index 000000000..989fe2d92 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/logistics/item/LecternControllerBlock.java @@ -0,0 +1,92 @@ +package com.simibubi.create.content.logistics.item; + +import javax.annotation.Nullable; + +import com.simibubi.create.AllSoundEvents; +import com.simibubi.create.AllTileEntities; +import com.simibubi.create.foundation.block.ITE; + +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.LecternBlock; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.World; + +public class LecternControllerBlock extends LecternBlock implements ITE { + + public LecternControllerBlock(Properties properties) { + super(properties); + setDefaultState(getDefaultState().with(HAS_BOOK, true)); + } + + @Nullable + @Override + public TileEntity createNewTileEntity(IBlockReader p_196283_1_) { + return null; + } + + @Nullable + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return AllTileEntities.LECTERN_CONTROLLER.create(); + } + + @Override + public Class getTileEntityClass() { + return LecternControllerTileEntity.class; + } + + @Override + public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { + if (!player.isSneaking() && LecternControllerTileEntity.playerInRange(player, world, pos)) { + if (!world.isRemote) + withTileEntityDo(world, pos, te -> te.tryStartUsing(player)); + return ActionResultType.SUCCESS; + } + + if (player.isSneaking()) { + if (!world.isRemote) + replaceWithLectern(state, world, pos); + return ActionResultType.SUCCESS; + } + + return ActionResultType.PASS; + } + + @Override + public void onReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) { + if (!state.isIn(newState.getBlock())) { + if (!world.isRemote) + withTileEntityDo(world, pos, te -> te.dropController(state)); + + super.onReplaced(state, world, pos, newState, isMoving); + } + } + + @Override + public int getComparatorInputOverride(BlockState state, World world, BlockPos pos) { + return 15; + } + + public void replaceLectern(BlockState lecternState, World world, BlockPos pos, ItemStack controller) { + world.setBlockState(pos, getDefaultState() + .with(FACING, lecternState.get(FACING)) + .with(POWERED, lecternState.get(POWERED))); + withTileEntityDo(world, pos, te -> te.setController(controller)); + } + + public void replaceWithLectern(BlockState state, World world, BlockPos pos) { + AllSoundEvents.CONTROLLER_TAKE.playOnServer(world, pos); + world.setBlockState(pos, Blocks.LECTERN.getDefaultState() + .with(FACING, state.get(FACING)) + .with(POWERED, state.get(POWERED))); + } + +} diff --git a/src/main/java/com/simibubi/create/content/logistics/item/LecternControllerRenderer.java b/src/main/java/com/simibubi/create/content/logistics/item/LecternControllerRenderer.java new file mode 100644 index 000000000..bbe2eaf63 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/logistics/item/LecternControllerRenderer.java @@ -0,0 +1,48 @@ +package com.simibubi.create.content.logistics.item; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.AllItems; +import com.simibubi.create.foundation.item.render.PartialItemModelRenderer; +import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer; +import com.simibubi.create.foundation.utility.AngleHelper; +import com.simibubi.create.foundation.utility.MatrixStacker; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Direction; + +public class LecternControllerRenderer extends SafeTileEntityRenderer { + + public LecternControllerRenderer(TileEntityRendererDispatcher dispatcher) { + super(dispatcher); + } + + @Override + protected void renderSafe(LecternControllerTileEntity te, float partialTicks, MatrixStack ms, + IRenderTypeBuffer buffer, int light, int overlay) { + + ItemStack stack = AllItems.LINKED_CONTROLLER.asStack(); + TransformType transformType = TransformType.NONE; + LinkedControllerModel mainModel = ((LinkedControllerModel) Minecraft.getInstance() + .getItemRenderer() + .getItemModelWithOverrides(stack, null, null)); + PartialItemModelRenderer renderer = PartialItemModelRenderer.of(stack, transformType, ms, buffer, overlay); + boolean active = te.hasUser(); + boolean usedByMe = te.isUsedBy(Minecraft.getInstance().player); + + Direction facing = te.getBlockState().get(LecternControllerBlock.FACING); + MatrixStacker msr = MatrixStacker.of(ms); + + ms.push(); + msr.translate(0.5, 1.45, 0.5); + msr.rotateY(AngleHelper.horizontalAngle(facing) - 90); + msr.translate(0.28, 0, 0); + msr.rotateZ(-22.0); + LinkedControllerItemRenderer.renderLinkedController(stack, mainModel, renderer, transformType, ms, light, active, usedByMe); + ms.pop(); + } + +} diff --git a/src/main/java/com/simibubi/create/content/logistics/item/LecternControllerTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/item/LecternControllerTileEntity.java new file mode 100644 index 000000000..9329019de --- /dev/null +++ b/src/main/java/com/simibubi/create/content/logistics/item/LecternControllerTileEntity.java @@ -0,0 +1,169 @@ +package com.simibubi.create.content.logistics.item; + +import java.util.List; +import java.util.UUID; + +import com.simibubi.create.AllSoundEvents; +import com.simibubi.create.foundation.tileEntity.SmartTileEntity; +import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; + +import net.minecraft.block.BlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.ItemEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.common.ForgeMod; +import net.minecraftforge.fml.DistExecutor; + +public class LecternControllerTileEntity extends SmartTileEntity { + + private ItemStack controller; + private UUID user; + private UUID prevUser; // used only on client + private boolean deactivatedThisTick; // used only on server + + public LecternControllerTileEntity(TileEntityType type) { + super(type); + } + + @Override + public void addBehaviours(List behaviours) { } + + @Override + protected void write(CompoundNBT compound, boolean clientPacket) { + super.write(compound, clientPacket); + compound.put("Controller", controller.write(new CompoundNBT())); + if (user != null) + compound.putUniqueId("User", user); + } + + @Override + protected void fromTag(BlockState state, CompoundNBT compound, boolean clientPacket) { + super.fromTag(state, compound, clientPacket); + controller = ItemStack.read(compound.getCompound("Controller")); + user = compound.hasUniqueId("User") ? compound.getUniqueId("User") : null; + } + + public ItemStack getController() { + return controller; + } + + public boolean hasUser() { return user != null; } + + public boolean isUsedBy(PlayerEntity player) { + return hasUser() && user.equals(player.getUniqueID()); + } + + public void tryStartUsing(PlayerEntity player) { + if (!deactivatedThisTick && !hasUser() && !playerIsUsingLectern(player) && playerInRange(player, world, pos)) + startUsing(player); + } + + public void tryStopUsing(PlayerEntity player) { + if (isUsedBy(player)) + stopUsing(player); + } + + private void startUsing(PlayerEntity player) { + user = player.getUniqueID(); + player.getPersistentData().putBoolean("IsUsingLecternController", true); + sendData(); + } + + private void stopUsing(PlayerEntity player) { + user = null; + if (player != null) + player.getPersistentData().remove("IsUsingLecternController"); + deactivatedThisTick = true; + sendData(); + } + + public static boolean playerIsUsingLectern(PlayerEntity player) { + return player.getPersistentData().contains("IsUsingLecternController"); + } + + @Override + public void tick() { + super.tick(); + + if (world.isRemote) { + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> this::tryToggleActive); + prevUser = user; + } + + if (!world.isRemote) { + deactivatedThisTick = false; + + if (!(world instanceof ServerWorld)) + return; + if (user == null) + return; + + Entity entity = ((ServerWorld) world).getEntityByUuid(user); + if (!(entity instanceof PlayerEntity)) { + stopUsing(null); + return; + } + + PlayerEntity player = (PlayerEntity) entity; + if (!playerInRange(player, world, pos) || !playerIsUsingLectern(player)) + stopUsing(player); + } + } + + @OnlyIn(Dist.CLIENT) + private void tryToggleActive() { + if (user == null && Minecraft.getInstance().player.getUniqueID().equals(prevUser)) { + LinkedControllerClientHandler.deactivateInLectern(); + } else if (prevUser == null && Minecraft.getInstance().player.getUniqueID().equals(user)) { + LinkedControllerClientHandler.activateInLectern(pos); + } + } + + public void setController(ItemStack newController) { + controller = newController; + if (newController != null) { + AllSoundEvents.CONTROLLER_PUT.playOnServer(world, pos); + } + } + + public void swapControllers(ItemStack stack, PlayerEntity player, Hand hand, BlockState state) { + ItemStack newController = stack.copy(); + stack.setCount(0); + if (player.getHeldItem(hand).isEmpty()) { + player.setHeldItem(hand, controller); + } else { + dropController(state); + } + setController(newController); + } + + public void dropController(BlockState state) { + Direction dir = state.get(LecternControllerBlock.FACING); + double x = pos.getX() + 0.5 + 0.25*dir.getXOffset(); + double y = pos.getY() + 1; + double z = pos.getZ() + 0.5 + 0.25*dir.getZOffset(); + ItemEntity itementity = new ItemEntity(world, x, y, z, controller.copy()); + itementity.setDefaultPickupDelay(); + world.addEntity(itementity); + controller = null; + } + + public static boolean playerInRange(PlayerEntity player, World world, BlockPos pos) { + //double modifier = world.isRemote ? 0 : 1.0; + double reach = 0.4*player.getAttributeValue(ForgeMod.REACH_DISTANCE.get());// + modifier; + return player.getDistanceSq(Vector3d.ofCenter(pos)) < reach*reach; + } + +} diff --git a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerBindPacket.java b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerBindPacket.java index 2671e1d14..3a0366d67 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerBindPacket.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerBindPacket.java @@ -18,23 +18,26 @@ public class LinkedControllerBindPacket extends LinkedControllerPacketBase { private BlockPos linkLocation; public LinkedControllerBindPacket(int button, BlockPos linkLocation) { + super((BlockPos) null); this.button = button; this.linkLocation = linkLocation; } public LinkedControllerBindPacket(PacketBuffer buffer) { + super(buffer); this.button = buffer.readVarInt(); this.linkLocation = buffer.readBlockPos(); } @Override public void write(PacketBuffer buffer) { + super.write(buffer); buffer.writeVarInt(button); buffer.writeBlockPos(linkLocation); } @Override - protected void handle(ServerPlayerEntity player, ItemStack heldItem) { + protected void handleItem(ServerPlayerEntity player, ItemStack heldItem) { if (player.isSpectator()) return; @@ -42,7 +45,7 @@ public class LinkedControllerBindPacket extends LinkedControllerPacketBase { LinkBehaviour linkBehaviour = TileEntityBehaviour.get(player.world, linkLocation, LinkBehaviour.TYPE); if (linkBehaviour == null) return; - + Pair pair = linkBehaviour.getNetworkKey(); frequencyItems.setStackInSlot(button * 2, pair.getKey() .getStack() @@ -51,8 +54,10 @@ public class LinkedControllerBindPacket extends LinkedControllerPacketBase { .getStack() .copy()); - heldItem.getTag() - .put("Items", frequencyItems.serializeNBT()); + heldItem.getTag().put("Items", frequencyItems.serializeNBT()); } + @Override + protected void handleLectern(ServerPlayerEntity player, LecternControllerTileEntity lectern) { } + } diff --git a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerClientHandler.java b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerClientHandler.java index 279470766..860fc3f38 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerClientHandler.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerClientHandler.java @@ -41,6 +41,7 @@ public class LinkedControllerClientHandler { public static Mode MODE = Mode.IDLE; public static int PACKET_RATE = 5; public static Collection currentlyPressed = new HashSet<>(); + private static BlockPos lecternPos; private static BlockPos selectedLocation = BlockPos.ZERO; private static Vector controls; @@ -71,19 +72,42 @@ public class LinkedControllerClientHandler { } public static void toggle() { - if (MODE == Mode.IDLE) + if (MODE == Mode.IDLE) { MODE = Mode.ACTIVE; - else { + lecternPos = null; + } else { MODE = Mode.IDLE; onReset(); } } + public static void activateInLectern(BlockPos lecternAt) { + if (MODE == Mode.IDLE) { + MODE = Mode.ACTIVE; + lecternPos = lecternAt; + } + } + + public static void deactivateInLectern() { + if (MODE == Mode.ACTIVE && inLectern()) { + MODE = Mode.IDLE; + onReset(); + } + } + + public static boolean inLectern() { + return lecternPos != null; + } + protected static void onReset() { getControls().forEach(kb -> kb.setPressed(isActuallyPressed(kb))); packetCooldown = 0; selectedLocation = BlockPos.ZERO; + if (inLectern()) + AllPackets.channel.sendToServer(new LinkedControllerStopLecternPacket(lecternPos)); + lecternPos = null; + if (!currentlyPressed.isEmpty()) AllPackets.channel.sendToServer(new LinkedControllerInputPacket(currentlyPressed, false)); currentlyPressed.clear(); @@ -114,7 +138,7 @@ public class LinkedControllerClientHandler { return; } - if (!AllItems.LINKED_CONTROLLER.isIn(heldItem)) { + if (!inLectern() && !AllItems.LINKED_CONTROLLER.isIn(heldItem)) { heldItem = player.getHeldItemOffhand(); if (!AllItems.LINKED_CONTROLLER.isIn(heldItem)) { MODE = Mode.IDLE; @@ -150,13 +174,13 @@ public class LinkedControllerClientHandler { if (MODE == Mode.ACTIVE) { // Released Keys if (!releasedKeys.isEmpty()) { - AllPackets.channel.sendToServer(new LinkedControllerInputPacket(releasedKeys, false)); + AllPackets.channel.sendToServer(new LinkedControllerInputPacket(releasedKeys, false, lecternPos)); AllSoundEvents.CONTROLLER_CLICK.playAt(player.world, player.getBlockPos(), 1f, .5f, true); } // Newly Pressed Keys if (!newKeys.isEmpty()) { - AllPackets.channel.sendToServer(new LinkedControllerInputPacket(newKeys, true)); + AllPackets.channel.sendToServer(new LinkedControllerInputPacket(newKeys, true, lecternPos)); packetCooldown = PACKET_RATE; AllSoundEvents.CONTROLLER_CLICK.playAt(player.world, player.getBlockPos(), 1f, .75f, true); } diff --git a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerInputPacket.java b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerInputPacket.java index 4a6834424..1b2414602 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerInputPacket.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerInputPacket.java @@ -17,11 +17,17 @@ public class LinkedControllerInputPacket extends LinkedControllerPacketBase { private boolean press; public LinkedControllerInputPacket(Collection activatedButtons, boolean press) { + this(activatedButtons, press, null); + } + + public LinkedControllerInputPacket(Collection activatedButtons, boolean press, BlockPos lecternPos) { + super(lecternPos); this.activatedButtons = activatedButtons; this.press = press; } public LinkedControllerInputPacket(PacketBuffer buffer) { + super(buffer); activatedButtons = new ArrayList<>(); press = buffer.readBoolean(); int size = buffer.readVarInt(); @@ -31,13 +37,20 @@ public class LinkedControllerInputPacket extends LinkedControllerPacketBase { @Override public void write(PacketBuffer buffer) { + super.write(buffer); buffer.writeBoolean(press); buffer.writeVarInt(activatedButtons.size()); activatedButtons.forEach(buffer::writeVarInt); } @Override - protected void handle(ServerPlayerEntity player, ItemStack heldItem) { + protected void handleLectern(ServerPlayerEntity player, LecternControllerTileEntity lectern) { + if (lectern.isUsedBy(player)) + handleItem(player, lectern.getController()); + } + + @Override + protected void handleItem(ServerPlayerEntity player, ItemStack heldItem) { World world = player.getEntityWorld(); UUID uniqueID = player.getUniqueID(); BlockPos pos = player.getBlockPos(); diff --git a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerItem.java b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerItem.java index 04af661ae..55380f3b6 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerItem.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerItem.java @@ -6,6 +6,9 @@ import com.simibubi.create.content.logistics.RedstoneLinkNetworkHandler; import com.simibubi.create.content.logistics.RedstoneLinkNetworkHandler.Frequency; import com.simibubi.create.foundation.utility.Couple; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.LecternBlock; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerInventory; import net.minecraft.entity.player.ServerPlayerEntity; @@ -35,19 +38,39 @@ public class LinkedControllerItem extends Item implements INamedContainerProvide } @Override - public ActionResultType onItemUse(ItemUseContext ctx) { + public ActionResultType onItemUseFirst(ItemStack stack, ItemUseContext ctx) { PlayerEntity player = ctx.getPlayer(); if (player == null) return ActionResultType.PASS; World world = ctx.getWorld(); + BlockPos pos = ctx.getPos(); + BlockState hitState = world.getBlockState(pos); - if (!player.isSneaking() && player.isAllowEdit() - && AllBlocks.REDSTONE_LINK.has(world.getBlockState(ctx.getPos()))) { - if (world.isRemote) - DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> this.toggleBindMode(ctx.getPos())); - player.getCooldownTracker() - .setCooldown(this, 2); - return ActionResultType.SUCCESS; + if (player.isAllowEdit()) { + if (player.isSneaking()) { + if (AllBlocks.LECTERN_CONTROLLER.has(hitState)) { + if (!world.isRemote) + AllBlocks.LECTERN_CONTROLLER.get().withTileEntityDo(world, pos, te -> + te.swapControllers(stack, player, ctx.getHand(), hitState)); + return ActionResultType.SUCCESS; + } + } else { + if (AllBlocks.REDSTONE_LINK.has(hitState)) { + if (world.isRemote) + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> this.toggleBindMode(ctx.getPos())); + player.getCooldownTracker() + .setCooldown(this, 2); + return ActionResultType.SUCCESS; + } + + if (hitState.isIn(Blocks.LECTERN) && !hitState.get(LecternBlock.HAS_BOOK)) { + if (!world.isRemote) { + ItemStack lecternStack = player.isCreative() ? stack.copy() : stack.split(1); + AllBlocks.LECTERN_CONTROLLER.get().replaceLectern(hitState, world, pos, lecternStack); + } + return ActionResultType.SUCCESS; + } + } } return onItemRightClick(world, player, ctx.getHand()).getType(); @@ -70,6 +93,7 @@ public class LinkedControllerItem extends Item implements INamedContainerProvide DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> this::toggleActive); player.getCooldownTracker() .setCooldown(this, 2); + return ActionResult.success(heldItem); } return ActionResult.pass(heldItem); diff --git a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerItemRenderer.java b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerItemRenderer.java index a7e524e5a..000bb8273 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerItemRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerItemRenderer.java @@ -54,6 +54,14 @@ public class LinkedControllerItemRenderer extends CustomRenderedItemModelRendere protected void render(ItemStack stack, LinkedControllerModel model, PartialItemModelRenderer renderer, ItemCameraTransforms.TransformType transformType, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { + + renderLinkedController(stack, model, renderer, transformType, ms, light, null, null); + } + + public static void renderLinkedController(ItemStack stack, LinkedControllerModel model, + PartialItemModelRenderer renderer, ItemCameraTransforms.TransformType transformType, MatrixStack ms, + int light, Boolean active, Boolean usedByMe) { + float pt = AnimationTickHolder.getPartialTicks(); MatrixStacker msr = MatrixStacker.of(ms); @@ -62,33 +70,37 @@ public class LinkedControllerItemRenderer extends CustomRenderedItemModelRendere Minecraft mc = Minecraft.getInstance(); boolean rightHanded = mc.gameSettings.mainHand == HandSide.RIGHT; TransformType mainHand = - rightHanded ? TransformType.FIRST_PERSON_RIGHT_HAND : TransformType.FIRST_PERSON_LEFT_HAND; + rightHanded ? TransformType.FIRST_PERSON_RIGHT_HAND : TransformType.FIRST_PERSON_LEFT_HAND; TransformType offHand = - rightHanded ? TransformType.FIRST_PERSON_LEFT_HAND : TransformType.FIRST_PERSON_RIGHT_HAND; + rightHanded ? TransformType.FIRST_PERSON_LEFT_HAND : TransformType.FIRST_PERSON_RIGHT_HAND; - boolean active = false; - boolean noControllerInMain = !AllItems.LINKED_CONTROLLER.isIn(mc.player.getHeldItemMainhand()); + if (active == null) { + active = false; - if (transformType == mainHand || (transformType == offHand && noControllerInMain)) { - float equip = equipProgress.getValue(pt); - int handModifier = transformType == TransformType.FIRST_PERSON_LEFT_HAND ? -1 : 1; - msr.translate(0, equip / 4, equip / 4 * handModifier); - msr.rotateY(equip * -30 * handModifier); - msr.rotateZ(equip * -30); - active = true; + boolean noControllerInMain = !AllItems.LINKED_CONTROLLER.isIn(mc.player.getHeldItemMainhand()); + if (transformType == mainHand || (transformType == offHand && noControllerInMain)) { + float equip = equipProgress.getValue(pt); + int handModifier = transformType == TransformType.FIRST_PERSON_LEFT_HAND ? -1 : 1; + msr.translate(0, equip / 4, equip / 4 * handModifier); + msr.rotateY(equip * -30 * handModifier); + msr.rotateZ(equip * -30); + active = true; + } + + if (transformType == TransformType.GUI) { + if (stack == mc.player.getHeldItemMainhand()) + active = true; + if (stack == mc.player.getHeldItemOffhand() && noControllerInMain) + active = true; + } + + active &= LinkedControllerClientHandler.MODE != Mode.IDLE; + usedByMe = active; } - if (transformType == TransformType.GUI) { - if (stack == mc.player.getHeldItemMainhand()) - active = true; - if (stack == mc.player.getHeldItemOffhand() && noControllerInMain) - active = true; - } - - active &= LinkedControllerClientHandler.MODE != Mode.IDLE; renderer.render(active ? model.getPartial("powered") : model.getOriginalModel(), light); - if (!active) { + if (!usedByMe) { ms.pop(); return; } @@ -122,7 +134,7 @@ public class LinkedControllerItemRenderer extends CustomRenderedItemModelRendere ms.pop(); } - protected void button(PartialItemModelRenderer renderer, MatrixStack ms, int light, float pt, IBakedModel button, + protected static void button(PartialItemModelRenderer renderer, MatrixStack ms, int light, float pt, IBakedModel button, float b, int index) { ms.push(); ms.translate(0, b * buttons.get(index) diff --git a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerPacketBase.java b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerPacketBase.java index bbc5918c4..78a844af7 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerPacketBase.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerPacketBase.java @@ -7,31 +7,66 @@ import com.simibubi.create.foundation.networking.SimplePacketBase; import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.item.ItemStack; +import net.minecraft.network.PacketBuffer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraftforge.fml.network.NetworkEvent.Context; public abstract class LinkedControllerPacketBase extends SimplePacketBase { - @Override - public void handle(Supplier context) { - context.get() - .enqueueWork(() -> { - ServerPlayerEntity player = context.get() - .getSender(); - if (player == null) - return; + private BlockPos lecternPos; - ItemStack heldItem = player.getHeldItemMainhand(); - if (!AllItems.LINKED_CONTROLLER.isIn(heldItem)) { - heldItem = player.getHeldItemOffhand(); - if (!AllItems.LINKED_CONTROLLER.isIn(heldItem)) - return; - } - handle(player, heldItem); - }); - context.get() - .setPacketHandled(true); + public LinkedControllerPacketBase(BlockPos lecternPos) { + this.lecternPos = lecternPos; } - protected abstract void handle(ServerPlayerEntity player, ItemStack heldItem); + public LinkedControllerPacketBase(PacketBuffer buffer) { + if (buffer.readBoolean()) { + lecternPos = new BlockPos(buffer.readInt(), buffer.readInt(), buffer.readInt()); + } + } + + protected boolean inLectern() { + return lecternPos != null; + } + + @Override + public void write(PacketBuffer buffer) { + buffer.writeBoolean(inLectern()); + if (inLectern()) { + buffer.writeInt(lecternPos.getX()); + buffer.writeInt(lecternPos.getY()); + buffer.writeInt(lecternPos.getZ()); + } + } + + @Override + public void handle(Supplier context) { + context.get().enqueueWork(() -> { + ServerPlayerEntity player = context.get().getSender(); + if (player == null) + return; + + if (inLectern()) { + TileEntity te = player.world.getTileEntity(lecternPos); + if (!(te instanceof LecternControllerTileEntity)) + return; + handleLectern(player, (LecternControllerTileEntity) te); + } else { + ItemStack controller = player.getHeldItemMainhand(); + if (!AllItems.LINKED_CONTROLLER.isIn(controller)) { + controller = player.getHeldItemOffhand(); + if (!AllItems.LINKED_CONTROLLER.isIn(controller)) + return; + } + handleItem(player, controller); + } + }); + + context.get().setPacketHandled(true); + } + + protected abstract void handleItem(ServerPlayerEntity player, ItemStack heldItem); + protected abstract void handleLectern(ServerPlayerEntity player, LecternControllerTileEntity lectern); } diff --git a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerStopLecternPacket.java b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerStopLecternPacket.java new file mode 100644 index 000000000..50ab091f6 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerStopLecternPacket.java @@ -0,0 +1,26 @@ +package com.simibubi.create.content.logistics.item; + +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.math.BlockPos; + +public class LinkedControllerStopLecternPacket extends LinkedControllerPacketBase { + + public LinkedControllerStopLecternPacket(PacketBuffer buffer) { + super(buffer); + } + + public LinkedControllerStopLecternPacket(BlockPos lecternPos) { + super(lecternPos); + } + + @Override + protected void handleLectern(ServerPlayerEntity player, LecternControllerTileEntity lectern) { + lectern.tryStopUsing(player); + } + + @Override + protected void handleItem(ServerPlayerEntity player, ItemStack heldItem) { } + +} diff --git a/src/main/java/com/simibubi/create/events/InputEvents.java b/src/main/java/com/simibubi/create/events/InputEvents.java index 6cdcb3ff7..b40da1974 100644 --- a/src/main/java/com/simibubi/create/events/InputEvents.java +++ b/src/main/java/com/simibubi/create/events/InputEvents.java @@ -1,11 +1,13 @@ package com.simibubi.create.events; import com.simibubi.create.CreateClient; +import com.simibubi.create.content.logistics.item.LinkedControllerClientHandler; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringHandler; import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollValueHandler; import net.minecraft.client.Minecraft; import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.client.event.InputEvent.ClickInputEvent; import net.minecraftforge.client.event.InputEvent.KeyInputEvent; import net.minecraftforge.client.event.InputEvent.MouseInputEvent; import net.minecraftforge.client.event.InputEvent.MouseScrollEvent; @@ -51,4 +53,13 @@ public class InputEvents { CreateClient.SCHEMATIC_AND_QUILL_HANDLER.onMouseInput(button, pressed); } + @SubscribeEvent + public static void onClickInput(ClickInputEvent event) { + if (Minecraft.getInstance().currentScreen != null) + return; + + if (event.isUseItem()) + LinkedControllerClientHandler.deactivateInLectern(); + } + } diff --git a/src/main/java/com/simibubi/create/foundation/networking/AllPackets.java b/src/main/java/com/simibubi/create/foundation/networking/AllPackets.java index 12c6842a7..c5df8bc17 100644 --- a/src/main/java/com/simibubi/create/foundation/networking/AllPackets.java +++ b/src/main/java/com/simibubi/create/foundation/networking/AllPackets.java @@ -34,6 +34,7 @@ import com.simibubi.create.content.logistics.block.depot.EjectorTriggerPacket; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmPlacementPacket; import com.simibubi.create.content.logistics.item.LinkedControllerBindPacket; import com.simibubi.create.content.logistics.item.LinkedControllerInputPacket; +import com.simibubi.create.content.logistics.item.LinkedControllerStopLecternPacket; import com.simibubi.create.content.logistics.item.filter.FilterScreenPacket; import com.simibubi.create.content.logistics.packet.ConfigureFlexcratePacket; import com.simibubi.create.content.logistics.packet.ConfigureStockswitchPacket; @@ -93,6 +94,7 @@ public enum AllPackets { EJECTOR_ELYTRA(EjectorElytraPacket.class, EjectorElytraPacket::new, PLAY_TO_SERVER), LINKED_CONTROLLER_INPUT(LinkedControllerInputPacket.class, LinkedControllerInputPacket::new, PLAY_TO_SERVER), LINKED_CONTROLLER_BIND(LinkedControllerBindPacket.class, LinkedControllerBindPacket::new, PLAY_TO_SERVER), + LINKED_CONTROLLER_USE_LECTERN(LinkedControllerStopLecternPacket.class, LinkedControllerStopLecternPacket::new, PLAY_TO_SERVER), C_CONFIGURE_CONFIG(CConfigureConfigPacket.class, CConfigureConfigPacket::new, PLAY_TO_SERVER), SUBMIT_GHOST_ITEM(GhostItemSubmitPacket.class, GhostItemSubmitPacket::new, PLAY_TO_SERVER), BLUEPRINT_COMPLETE_RECIPE(BlueprintAssignCompleteRecipePacket.class, BlueprintAssignCompleteRecipePacket::new, PLAY_TO_SERVER), @@ -126,7 +128,7 @@ public enum AllPackets { private LoadedPacket packet; - private AllPackets(Class type, Function factory, + AllPackets(Class type, Function factory, NetworkDirection direction) { packet = new LoadedPacket<>(type, factory, direction); } diff --git a/src/main/resources/assets/create/lang/default/tooltips.json b/src/main/resources/assets/create/lang/default/tooltips.json index 69aa10b5e..de63406a8 100644 --- a/src/main/resources/assets/create/lang/default/tooltips.json +++ b/src/main/resources/assets/create/lang/default/tooltips.json @@ -185,6 +185,8 @@ "item.create.linked_controller.tooltip.behaviour2": "Opens the manual _Configuration Interface_.", "item.create.linked_controller.tooltip.condition3": "R-Click on Redstone Link Receiver", "item.create.linked_controller.tooltip.behaviour3": "Enables _Bind Mode_, press one of the _six controls_ to bind it to the _Links' Frequency_.", + "item.create.linked_controller.tooltip.condition4": "R-Click on Lectern", + "item.create.linked_controller.tooltip.behaviour4": "Places the Controller into the Lectern for easy activation. (R-Click while Sneaking to retrieve it)", "item.create.diving_helmet.tooltip": "DIVING HELMET", "item.create.diving_helmet.tooltip.summary": "Together with a _Copper_ _Backtank_, allows the wielder to _breathe_ _underwater_ for an extended amount of time.",