From 675af419ce0a4fe29bcb268c7682896040960206 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Wed, 11 Nov 2020 23:59:40 +0100 Subject: [PATCH] Fixing user errors - Added hints when looking at - Mechanical arms with no targets - Funnels attempted to be used like 0.2 transposers - Bearings that require an update to attach to their blocks - Added some additional feedback when players apply filters - Spouts now place two blocks above a depot/belt when used - Basins can no longer be placed directly under a press or mixer - Fixed prismarine recipe cycles from various mod interactions --- src/generated/resources/.cache/cache | 22 ++++---- .../resources/assets/create/lang/en_us.json | 15 ++++- .../assets/create/lang/unfinished/de_de.json | 17 +++++- .../assets/create/lang/unfinished/fr_fr.json | 17 +++++- .../assets/create/lang/unfinished/it_it.json | 17 +++++- .../assets/create/lang/unfinished/ja_jp.json | 17 +++++- .../assets/create/lang/unfinished/ko_kr.json | 17 +++++- .../assets/create/lang/unfinished/nl_nl.json | 17 +++++- .../assets/create/lang/unfinished/pt_br.json | 17 +++++- .../assets/create/lang/unfinished/ru_ru.json | 17 +++++- .../assets/create/lang/unfinished/zh_cn.json | 17 +++++- .../recipes/crushing/prismarine_crystals.json | 11 +--- .../java/com/simibubi/create/AllBlocks.java | 2 +- .../mixer/BasinOperatorBlockItem.java | 16 ++++-- .../bearing/MechanicalBearingTileEntity.java | 24 ++++++++ .../goggles/IHaveGoggleInformation.java | 2 +- .../contraptions/processing/BasinBlock.java | 9 +++ .../elementary/CogWheelPlacementHelper.java | 5 ++ .../block/funnel/FunnelTileEntity.java | 53 +++++++++++++++++- .../ArmInteractionPointHandler.java | 22 ++++++-- .../block/mechanicalArm/ArmTileEntity.java | 24 ++++++-- .../data/recipe/CrushingRecipeGen.java | 5 +- .../create/foundation/item/TooltipHelper.java | 12 ++++ .../behaviour/filtering/FilteringHandler.java | 56 +++++++++++++------ .../assets/create/lang/default/messages.json | 16 +++++- 25 files changed, 371 insertions(+), 76 deletions(-) create mode 100644 src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogWheelPlacementHelper.java diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 5a0ab6556..1ee9d27fe 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -392,16 +392,16 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json be82e2e68c74c572e72979a6d4a5ec5e571931e2 assets/create/lang/en_ud.json -b953a264ec3044b955431fb988c0bafcb9b57388 assets/create/lang/en_us.json -97fe71d544f1bc7552e6c9d1f328ae02cb1a1947 assets/create/lang/unfinished/de_de.json -052819c4d2177bfc5cee9675300866d724f4b63f assets/create/lang/unfinished/fr_fr.json -67d67f305c83e021e2ae37e03b9bf4aa2661bc87 assets/create/lang/unfinished/it_it.json -b0e3fc5a71b5127b832e38daece78ca9db9ce303 assets/create/lang/unfinished/ja_jp.json -610f399864dfa9d7fd258570853f7d577c5aee31 assets/create/lang/unfinished/ko_kr.json -12215221adcb015c5c74dbfe5affa920cd570580 assets/create/lang/unfinished/nl_nl.json -ead7216188692e96fb060b35213f1ef6b0682e87 assets/create/lang/unfinished/pt_br.json -e9d95034f9b33eb8e41792740ed2d8c488af6676 assets/create/lang/unfinished/ru_ru.json -32a2c4af9a5247f3bc7a5c2f502376e1e580d8bc assets/create/lang/unfinished/zh_cn.json +640c617ea3827d1ec40ab634da05f0c5af800f25 assets/create/lang/en_us.json +57bbb98446e72a74cb0735b424e9811b61af0c74 assets/create/lang/unfinished/de_de.json +4a0592f11dba8b26765e7abab386e46a2366afb8 assets/create/lang/unfinished/fr_fr.json +9bb92001a7e88fedff2a2868d2e80243a9306880 assets/create/lang/unfinished/it_it.json +c12f58d8ca37c34148a9e8358846e6911870210c assets/create/lang/unfinished/ja_jp.json +7cf5988ec697add8deac90791ca0c30c57321ee0 assets/create/lang/unfinished/ko_kr.json +1b41fd6a902cf5e845d9eb6aa60c066080a3d20e assets/create/lang/unfinished/nl_nl.json +362fb090bbf8a66b874ffa2a550f32b7c6ee2d7d assets/create/lang/unfinished/pt_br.json +0764d4f607734ed33299629ea7aceb6c3e67ba0f assets/create/lang/unfinished/ru_ru.json +23b2b6f091083dbb505e10febebfa4cab06c1db2 assets/create/lang/unfinished/zh_cn.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json @@ -2762,7 +2762,7 @@ d73a0ed13112e001dad61d6ea66fd729c86e7b62 data/create/recipes/crushing/nether_qua 70116a5a9d1f93ae377e1526ca99582190cf2e3e data/create/recipes/crushing/nether_wart_block_quark.json 0dfe5092af96fbaeddaace6d3b1c45fa6f4cf7fe data/create/recipes/crushing/netherrack.json 71397f0ae2e175181195b8b2894d108e0cdc3da7 data/create/recipes/crushing/obsidian.json -88d7ab3d6407010876e328f5f20a4ed9ddda7e3e data/create/recipes/crushing/prismarine_crystals.json +0185e8d17cc17b0ac822169f4b2968d95468b4a2 data/create/recipes/crushing/prismarine_crystals.json 42299b3a0596c7743404496205854ac2324aedd7 data/create/recipes/crushing/redstone_ore.json 94589aa3171fcfda8eed76000d53a36ea6fd7e53 data/create/recipes/crushing/sand.json dc4cf8b759f5eeee0ccfa6aaad204fbeea487b7f data/create/recipes/crushing/wool.json diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index d5d409eae..a0d312f3e 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -709,6 +709,9 @@ "create.logistics.fluid_filter": "Fluid Filter", "create.logistics.firstFrequency": "Freq. #1", "create.logistics.secondFrequency": "Freq. #2", + "create.logistics.filter.apply": "Applied filter to %1$s.", + "create.logistics.filter.apply_click_again": "Applied filter to %1$s, click again to copy the amount.", + "create.logistics.filter.apply_count": "Applied extraction count to filter.", "create.gui.goggles.generator_stats": "Generator Stats:", "create.gui.goggles.kinetic_stats": "Kinetic Stats:", @@ -749,7 +752,7 @@ "create.schematicAndQuill.noTarget": "Hold [Ctrl] to select Air blocks.", "create.schematicAndQuill.abort": "Removed selection.", "create.schematicAndQuill.title": "Schematic Name:", - "create.schematicAndQuill.convert": "Save and Deploy Immediately", + "create.schematicAndQuill.convetr": "Save and Deploy Immediately", "create.schematicAndQuill.fallbackName": "My Schematic", "create.schematicAndQuill.saved": "Saved as %1$s", @@ -949,6 +952,7 @@ "create.mechanical_arm.extract_from": "Take items from %1$s", "create.mechanical_arm.deposit_to": "Deposit items to %1$s", + "create.mechanical_arm.summary": "Mechanical Arm has %1$s input(s) and %2$s output(s).", "create.mechanical_arm.points_outside_range": "%1$s selected interaction point(s) removed due to range limitations.", "create.logistics.when_multiple_outputs_available": "When Multiple Outputs Available", @@ -965,6 +969,15 @@ "create.tunnel.selection_mode.randomize": "Randomize", "create.tunnel.selection_mode.synchronize": "Synchronize Inputs", + "create.hint.mechanical_arm_no_targets.title": "No Targets", + "create.hint.mechanical_arm_no_targets": "It appears this _Mechnanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", + "create.hint.horizontal_funnel.title": "Horizontal Funnels", + "create.hint.horizontal_funnel": "cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", + "create.hint.upward_funnel.title": "Funnels facing upward", + "create.hint.upward_funnel": "can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", + "create.hint.empty_bearing.title": "Update Bearing", + "create.hint.empty_bearing": "_Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", + "create.gui.config.overlay1": "Hi :)", "create.gui.config.overlay2": "This is a sample overlay", "create.gui.config.overlay3": "Click or drag with your mouse", 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 a23e4c29a..e1534a0c6 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: 1026", + "_": "Missing Localizations: 1038", "_": "->------------------------] Game Elements [------------------------<-", @@ -710,6 +710,9 @@ "create.logistics.fluid_filter": "UNLOCALIZED: Fluid Filter", "create.logistics.firstFrequency": "Freq. #1", "create.logistics.secondFrequency": "Freq. #2", + "create.logistics.filter.apply": "UNLOCALIZED: Applied filter to %1$s.", + "create.logistics.filter.apply_click_again": "UNLOCALIZED: Applied filter to %1$s, click again to copy the amount.", + "create.logistics.filter.apply_count": "UNLOCALIZED: Applied extraction count to filter.", "create.gui.goggles.generator_stats": "UNLOCALIZED: Generator Stats:", "create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:", @@ -750,7 +753,7 @@ "create.schematicAndQuill.noTarget": "Halte [Strg] zur Auswahl von Luft.", "create.schematicAndQuill.abort": "Auswahl zurückgesetzt.", "create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:", - "create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately", + "create.schematicAndQuill.convetr": "UNLOCALIZED: Save and Deploy Immediately", "create.schematicAndQuill.fallbackName": "Mein Bauplan", "create.schematicAndQuill.saved": "Gespeichert als %1$s", @@ -950,6 +953,7 @@ "create.mechanical_arm.extract_from": "UNLOCALIZED: Take items from %1$s", "create.mechanical_arm.deposit_to": "UNLOCALIZED: Deposit items to %1$s", + "create.mechanical_arm.summary": "UNLOCALIZED: Mechanical Arm has %1$s input(s) and %2$s output(s).", "create.mechanical_arm.points_outside_range": "UNLOCALIZED: %1$s selected interaction point(s) removed due to range limitations.", "create.logistics.when_multiple_outputs_available": "UNLOCALIZED: When Multiple Outputs Available", @@ -966,6 +970,15 @@ "create.tunnel.selection_mode.randomize": "UNLOCALIZED: Randomize", "create.tunnel.selection_mode.synchronize": "UNLOCALIZED: Synchronize Inputs", + "create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets", + "create.hint.mechanical_arm_no_targets": "UNLOCALIZED: It appears this _Mechnanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", + "create.hint.horizontal_funnel.title": "UNLOCALIZED: Horizontal Funnels", + "create.hint.horizontal_funnel": "UNLOCALIZED: cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", + "create.hint.upward_funnel.title": "UNLOCALIZED: Funnels facing upward", + "create.hint.upward_funnel": "UNLOCALIZED: can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", + "create.hint.empty_bearing.title": "UNLOCALIZED: Update Bearing", + "create.hint.empty_bearing": "UNLOCALIZED: _Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", + "create.gui.config.overlay1": "UNLOCALIZED: Hi :)", "create.gui.config.overlay2": "UNLOCALIZED: This is a sample overlay", "create.gui.config.overlay3": "UNLOCALIZED: Click or drag with your mouse", 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 a0ee15143..1a117cf05 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: 655", + "_": "Missing Localizations: 667", "_": "->------------------------] Game Elements [------------------------<-", @@ -710,6 +710,9 @@ "create.logistics.fluid_filter": "UNLOCALIZED: Fluid Filter", "create.logistics.firstFrequency": "Freq. #1", "create.logistics.secondFrequency": "Freq. #2", + "create.logistics.filter.apply": "UNLOCALIZED: Applied filter to %1$s.", + "create.logistics.filter.apply_click_again": "UNLOCALIZED: Applied filter to %1$s, click again to copy the amount.", + "create.logistics.filter.apply_count": "UNLOCALIZED: Applied extraction count to filter.", "create.gui.goggles.generator_stats": "Statistiques du générateur:", "create.gui.goggles.kinetic_stats": "Statistiques cinétiques:", @@ -750,7 +753,7 @@ "create.schematicAndQuill.noTarget": "Enfoncez [Ctrl] pour sélectionner les blocs d'air.", "create.schematicAndQuill.abort": "Sélection supprimée.", "create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:", - "create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately", + "create.schematicAndQuill.convetr": "UNLOCALIZED: Save and Deploy Immediately", "create.schematicAndQuill.fallbackName": "Mon schéma", "create.schematicAndQuill.saved": "Sauvegardé en tant que %1$s", @@ -950,6 +953,7 @@ "create.mechanical_arm.extract_from": "UNLOCALIZED: Take items from %1$s", "create.mechanical_arm.deposit_to": "UNLOCALIZED: Deposit items to %1$s", + "create.mechanical_arm.summary": "UNLOCALIZED: Mechanical Arm has %1$s input(s) and %2$s output(s).", "create.mechanical_arm.points_outside_range": "UNLOCALIZED: %1$s selected interaction point(s) removed due to range limitations.", "create.logistics.when_multiple_outputs_available": "UNLOCALIZED: When Multiple Outputs Available", @@ -966,6 +970,15 @@ "create.tunnel.selection_mode.randomize": "UNLOCALIZED: Randomize", "create.tunnel.selection_mode.synchronize": "UNLOCALIZED: Synchronize Inputs", + "create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets", + "create.hint.mechanical_arm_no_targets": "UNLOCALIZED: It appears this _Mechnanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", + "create.hint.horizontal_funnel.title": "UNLOCALIZED: Horizontal Funnels", + "create.hint.horizontal_funnel": "UNLOCALIZED: cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", + "create.hint.upward_funnel.title": "UNLOCALIZED: Funnels facing upward", + "create.hint.upward_funnel": "UNLOCALIZED: can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", + "create.hint.empty_bearing.title": "UNLOCALIZED: Update Bearing", + "create.hint.empty_bearing": "UNLOCALIZED: _Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", + "create.gui.config.overlay1": "UNLOCALIZED: Hi :)", "create.gui.config.overlay2": "UNLOCALIZED: This is a sample overlay", "create.gui.config.overlay3": "UNLOCALIZED: Click or drag with your mouse", 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 d188b68c1..0060f3e34 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: 639", + "_": "Missing Localizations: 651", "_": "->------------------------] Game Elements [------------------------<-", @@ -710,6 +710,9 @@ "create.logistics.fluid_filter": "UNLOCALIZED: Fluid Filter", "create.logistics.firstFrequency": "Freq. #1", "create.logistics.secondFrequency": "Freq. #2", + "create.logistics.filter.apply": "UNLOCALIZED: Applied filter to %1$s.", + "create.logistics.filter.apply_click_again": "UNLOCALIZED: Applied filter to %1$s, click again to copy the amount.", + "create.logistics.filter.apply_count": "UNLOCALIZED: Applied extraction count to filter.", "create.gui.goggles.generator_stats": "Statistiche del Generatore:", "create.gui.goggles.kinetic_stats": "Statistiche Cinetiche:", @@ -750,7 +753,7 @@ "create.schematicAndQuill.noTarget": "Premi [Ctrl] per selezionare il Blocco d'Aria.", "create.schematicAndQuill.abort": "Selezione rimossa.", "create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:", - "create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately", + "create.schematicAndQuill.convetr": "UNLOCALIZED: Save and Deploy Immediately", "create.schematicAndQuill.fallbackName": "La mia Schematica", "create.schematicAndQuill.saved": "Salvata come %1$s", @@ -950,6 +953,7 @@ "create.mechanical_arm.extract_from": "UNLOCALIZED: Take items from %1$s", "create.mechanical_arm.deposit_to": "UNLOCALIZED: Deposit items to %1$s", + "create.mechanical_arm.summary": "UNLOCALIZED: Mechanical Arm has %1$s input(s) and %2$s output(s).", "create.mechanical_arm.points_outside_range": "UNLOCALIZED: %1$s selected interaction point(s) removed due to range limitations.", "create.logistics.when_multiple_outputs_available": "UNLOCALIZED: When Multiple Outputs Available", @@ -966,6 +970,15 @@ "create.tunnel.selection_mode.randomize": "UNLOCALIZED: Randomize", "create.tunnel.selection_mode.synchronize": "UNLOCALIZED: Synchronize Inputs", + "create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets", + "create.hint.mechanical_arm_no_targets": "UNLOCALIZED: It appears this _Mechnanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", + "create.hint.horizontal_funnel.title": "UNLOCALIZED: Horizontal Funnels", + "create.hint.horizontal_funnel": "UNLOCALIZED: cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", + "create.hint.upward_funnel.title": "UNLOCALIZED: Funnels facing upward", + "create.hint.upward_funnel": "UNLOCALIZED: can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", + "create.hint.empty_bearing.title": "UNLOCALIZED: Update Bearing", + "create.hint.empty_bearing": "UNLOCALIZED: _Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", + "create.gui.config.overlay1": "UNLOCALIZED: Hi :)", "create.gui.config.overlay2": "UNLOCALIZED: This is a sample overlay", "create.gui.config.overlay3": "UNLOCALIZED: Click or drag with your mouse", 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 4e720b00c..cb238c3f1 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: 638", + "_": "Missing Localizations: 650", "_": "->------------------------] Game Elements [------------------------<-", @@ -710,6 +710,9 @@ "create.logistics.fluid_filter": "UNLOCALIZED: Fluid Filter", "create.logistics.firstFrequency": "Freq. #1", "create.logistics.secondFrequency": "Freq. #2", + "create.logistics.filter.apply": "UNLOCALIZED: Applied filter to %1$s.", + "create.logistics.filter.apply_click_again": "UNLOCALIZED: Applied filter to %1$s, click again to copy the amount.", + "create.logistics.filter.apply_count": "UNLOCALIZED: Applied extraction count to filter.", "create.gui.goggles.generator_stats": "ジェネレータの統計:", "create.gui.goggles.kinetic_stats": "動力の統計:", @@ -750,7 +753,7 @@ "create.schematicAndQuill.noTarget": "[Ctrl] を押したままで空気ブロックを選択します", "create.schematicAndQuill.abort": "選択を削除しました。", "create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:", - "create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately", + "create.schematicAndQuill.convetr": "UNLOCALIZED: Save and Deploy Immediately", "create.schematicAndQuill.fallbackName": "My Schematic", "create.schematicAndQuill.saved": "%1$s として保存しました", @@ -950,6 +953,7 @@ "create.mechanical_arm.extract_from": "UNLOCALIZED: Take items from %1$s", "create.mechanical_arm.deposit_to": "UNLOCALIZED: Deposit items to %1$s", + "create.mechanical_arm.summary": "UNLOCALIZED: Mechanical Arm has %1$s input(s) and %2$s output(s).", "create.mechanical_arm.points_outside_range": "UNLOCALIZED: %1$s selected interaction point(s) removed due to range limitations.", "create.logistics.when_multiple_outputs_available": "UNLOCALIZED: When Multiple Outputs Available", @@ -966,6 +970,15 @@ "create.tunnel.selection_mode.randomize": "UNLOCALIZED: Randomize", "create.tunnel.selection_mode.synchronize": "UNLOCALIZED: Synchronize Inputs", + "create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets", + "create.hint.mechanical_arm_no_targets": "UNLOCALIZED: It appears this _Mechnanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", + "create.hint.horizontal_funnel.title": "UNLOCALIZED: Horizontal Funnels", + "create.hint.horizontal_funnel": "UNLOCALIZED: cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", + "create.hint.upward_funnel.title": "UNLOCALIZED: Funnels facing upward", + "create.hint.upward_funnel": "UNLOCALIZED: can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", + "create.hint.empty_bearing.title": "UNLOCALIZED: Update Bearing", + "create.hint.empty_bearing": "UNLOCALIZED: _Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", + "create.gui.config.overlay1": "UNLOCALIZED: Hi :)", "create.gui.config.overlay2": "UNLOCALIZED: This is a sample overlay", "create.gui.config.overlay3": "UNLOCALIZED: Click or drag with your mouse", 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 9729d9e81..f0e1433f1 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: 639", + "_": "Missing Localizations: 651", "_": "->------------------------] Game Elements [------------------------<-", @@ -710,6 +710,9 @@ "create.logistics.fluid_filter": "UNLOCALIZED: Fluid Filter", "create.logistics.firstFrequency": "주파수. #1", "create.logistics.secondFrequency": "주파수. #2", + "create.logistics.filter.apply": "UNLOCALIZED: Applied filter to %1$s.", + "create.logistics.filter.apply_click_again": "UNLOCALIZED: Applied filter to %1$s, click again to copy the amount.", + "create.logistics.filter.apply_count": "UNLOCALIZED: Applied extraction count to filter.", "create.gui.goggles.generator_stats": "발전 상태:", "create.gui.goggles.kinetic_stats": "가동 상태:", @@ -750,7 +753,7 @@ "create.schematicAndQuill.noTarget": "[Ctrl]을 눌러 공기 블럭을 선택하기.", "create.schematicAndQuill.abort": "위치 제거됨.", "create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:", - "create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately", + "create.schematicAndQuill.convetr": "UNLOCALIZED: Save and Deploy Immediately", "create.schematicAndQuill.fallbackName": "내 청사진", "create.schematicAndQuill.saved": "%1$s로 저장됨", @@ -950,6 +953,7 @@ "create.mechanical_arm.extract_from": "UNLOCALIZED: Take items from %1$s", "create.mechanical_arm.deposit_to": "UNLOCALIZED: Deposit items to %1$s", + "create.mechanical_arm.summary": "UNLOCALIZED: Mechanical Arm has %1$s input(s) and %2$s output(s).", "create.mechanical_arm.points_outside_range": "UNLOCALIZED: %1$s selected interaction point(s) removed due to range limitations.", "create.logistics.when_multiple_outputs_available": "UNLOCALIZED: When Multiple Outputs Available", @@ -966,6 +970,15 @@ "create.tunnel.selection_mode.randomize": "UNLOCALIZED: Randomize", "create.tunnel.selection_mode.synchronize": "UNLOCALIZED: Synchronize Inputs", + "create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets", + "create.hint.mechanical_arm_no_targets": "UNLOCALIZED: It appears this _Mechnanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", + "create.hint.horizontal_funnel.title": "UNLOCALIZED: Horizontal Funnels", + "create.hint.horizontal_funnel": "UNLOCALIZED: cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", + "create.hint.upward_funnel.title": "UNLOCALIZED: Funnels facing upward", + "create.hint.upward_funnel": "UNLOCALIZED: can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", + "create.hint.empty_bearing.title": "UNLOCALIZED: Update Bearing", + "create.hint.empty_bearing": "UNLOCALIZED: _Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", + "create.gui.config.overlay1": "UNLOCALIZED: Hi :)", "create.gui.config.overlay2": "UNLOCALIZED: This is a sample overlay", "create.gui.config.overlay3": "UNLOCALIZED: Click or drag with your mouse", 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 93c43a6d1..e66f411f0 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: 967", + "_": "Missing Localizations: 979", "_": "->------------------------] Game Elements [------------------------<-", @@ -710,6 +710,9 @@ "create.logistics.fluid_filter": "UNLOCALIZED: Fluid Filter", "create.logistics.firstFrequency": "Freq. #1", "create.logistics.secondFrequency": "Freq. #2", + "create.logistics.filter.apply": "UNLOCALIZED: Applied filter to %1$s.", + "create.logistics.filter.apply_click_again": "UNLOCALIZED: Applied filter to %1$s, click again to copy the amount.", + "create.logistics.filter.apply_count": "UNLOCALIZED: Applied extraction count to filter.", "create.gui.goggles.generator_stats": "UNLOCALIZED: Generator Stats:", "create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:", @@ -750,7 +753,7 @@ "create.schematicAndQuill.noTarget": "Houd [Ctrl] ingedrukt om een Lucht block te kiezen.", "create.schematicAndQuill.abort": "Keuze verwijderd.", "create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:", - "create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately", + "create.schematicAndQuill.convetr": "UNLOCALIZED: Save and Deploy Immediately", "create.schematicAndQuill.fallbackName": "Mijn Bouwtekening", "create.schematicAndQuill.saved": "Opgeslagen als %1$s", @@ -950,6 +953,7 @@ "create.mechanical_arm.extract_from": "UNLOCALIZED: Take items from %1$s", "create.mechanical_arm.deposit_to": "UNLOCALIZED: Deposit items to %1$s", + "create.mechanical_arm.summary": "UNLOCALIZED: Mechanical Arm has %1$s input(s) and %2$s output(s).", "create.mechanical_arm.points_outside_range": "UNLOCALIZED: %1$s selected interaction point(s) removed due to range limitations.", "create.logistics.when_multiple_outputs_available": "UNLOCALIZED: When Multiple Outputs Available", @@ -966,6 +970,15 @@ "create.tunnel.selection_mode.randomize": "UNLOCALIZED: Randomize", "create.tunnel.selection_mode.synchronize": "UNLOCALIZED: Synchronize Inputs", + "create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets", + "create.hint.mechanical_arm_no_targets": "UNLOCALIZED: It appears this _Mechnanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", + "create.hint.horizontal_funnel.title": "UNLOCALIZED: Horizontal Funnels", + "create.hint.horizontal_funnel": "UNLOCALIZED: cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", + "create.hint.upward_funnel.title": "UNLOCALIZED: Funnels facing upward", + "create.hint.upward_funnel": "UNLOCALIZED: can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", + "create.hint.empty_bearing.title": "UNLOCALIZED: Update Bearing", + "create.hint.empty_bearing": "UNLOCALIZED: _Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", + "create.gui.config.overlay1": "UNLOCALIZED: Hi :)", "create.gui.config.overlay2": "UNLOCALIZED: This is a sample overlay", "create.gui.config.overlay3": "UNLOCALIZED: Click or drag with your mouse", 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 b7aa3e484..56d4f0db7 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: 1033", + "_": "Missing Localizations: 1045", "_": "->------------------------] Game Elements [------------------------<-", @@ -710,6 +710,9 @@ "create.logistics.fluid_filter": "UNLOCALIZED: Fluid Filter", "create.logistics.firstFrequency": "UNLOCALIZED: Freq. #1", "create.logistics.secondFrequency": "UNLOCALIZED: Freq. #2", + "create.logistics.filter.apply": "UNLOCALIZED: Applied filter to %1$s.", + "create.logistics.filter.apply_click_again": "UNLOCALIZED: Applied filter to %1$s, click again to copy the amount.", + "create.logistics.filter.apply_count": "UNLOCALIZED: Applied extraction count to filter.", "create.gui.goggles.generator_stats": "UNLOCALIZED: Generator Stats:", "create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:", @@ -750,7 +753,7 @@ "create.schematicAndQuill.noTarget": "Seguro [Ctrl] para selecionar Blocos de Ar.", "create.schematicAndQuill.abort": "Seleção removida.", "create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:", - "create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately", + "create.schematicAndQuill.convetr": "UNLOCALIZED: Save and Deploy Immediately", "create.schematicAndQuill.fallbackName": "Meu Esquema", "create.schematicAndQuill.saved": "Salvo como %1$s", @@ -950,6 +953,7 @@ "create.mechanical_arm.extract_from": "UNLOCALIZED: Take items from %1$s", "create.mechanical_arm.deposit_to": "UNLOCALIZED: Deposit items to %1$s", + "create.mechanical_arm.summary": "UNLOCALIZED: Mechanical Arm has %1$s input(s) and %2$s output(s).", "create.mechanical_arm.points_outside_range": "UNLOCALIZED: %1$s selected interaction point(s) removed due to range limitations.", "create.logistics.when_multiple_outputs_available": "UNLOCALIZED: When Multiple Outputs Available", @@ -966,6 +970,15 @@ "create.tunnel.selection_mode.randomize": "UNLOCALIZED: Randomize", "create.tunnel.selection_mode.synchronize": "UNLOCALIZED: Synchronize Inputs", + "create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets", + "create.hint.mechanical_arm_no_targets": "UNLOCALIZED: It appears this _Mechnanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", + "create.hint.horizontal_funnel.title": "UNLOCALIZED: Horizontal Funnels", + "create.hint.horizontal_funnel": "UNLOCALIZED: cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", + "create.hint.upward_funnel.title": "UNLOCALIZED: Funnels facing upward", + "create.hint.upward_funnel": "UNLOCALIZED: can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", + "create.hint.empty_bearing.title": "UNLOCALIZED: Update Bearing", + "create.hint.empty_bearing": "UNLOCALIZED: _Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", + "create.gui.config.overlay1": "UNLOCALIZED: Hi :)", "create.gui.config.overlay2": "UNLOCALIZED: This is a sample overlay", "create.gui.config.overlay3": "UNLOCALIZED: Click or drag with your mouse", 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 c31c1bcb5..1b3d0f477 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: 308", + "_": "Missing Localizations: 320", "_": "->------------------------] Game Elements [------------------------<-", @@ -710,6 +710,9 @@ "create.logistics.fluid_filter": "UNLOCALIZED: Fluid Filter", "create.logistics.firstFrequency": "Частота #1", "create.logistics.secondFrequency": "Частота #2", + "create.logistics.filter.apply": "UNLOCALIZED: Applied filter to %1$s.", + "create.logistics.filter.apply_click_again": "UNLOCALIZED: Applied filter to %1$s, click again to copy the amount.", + "create.logistics.filter.apply_count": "UNLOCALIZED: Applied extraction count to filter.", "create.gui.goggles.generator_stats": "Статистика генератора:", "create.gui.goggles.kinetic_stats": "Кинетическая статистика:", @@ -750,7 +753,7 @@ "create.schematicAndQuill.noTarget": "Удерживайте [Ctrl], чтобы выбрать воздушные блоки.", "create.schematicAndQuill.abort": "Выделение убрано", "create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:", - "create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately", + "create.schematicAndQuill.convetr": "UNLOCALIZED: Save and Deploy Immediately", "create.schematicAndQuill.fallbackName": "Моя схематика", "create.schematicAndQuill.saved": "Сохранено как %1$s", @@ -950,6 +953,7 @@ "create.mechanical_arm.extract_from": "UNLOCALIZED: Take items from %1$s", "create.mechanical_arm.deposit_to": "UNLOCALIZED: Deposit items to %1$s", + "create.mechanical_arm.summary": "UNLOCALIZED: Mechanical Arm has %1$s input(s) and %2$s output(s).", "create.mechanical_arm.points_outside_range": "UNLOCALIZED: %1$s selected interaction point(s) removed due to range limitations.", "create.logistics.when_multiple_outputs_available": "UNLOCALIZED: When Multiple Outputs Available", @@ -966,6 +970,15 @@ "create.tunnel.selection_mode.randomize": "UNLOCALIZED: Randomize", "create.tunnel.selection_mode.synchronize": "UNLOCALIZED: Synchronize Inputs", + "create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets", + "create.hint.mechanical_arm_no_targets": "UNLOCALIZED: It appears this _Mechnanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", + "create.hint.horizontal_funnel.title": "UNLOCALIZED: Horizontal Funnels", + "create.hint.horizontal_funnel": "UNLOCALIZED: cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", + "create.hint.upward_funnel.title": "UNLOCALIZED: Funnels facing upward", + "create.hint.upward_funnel": "UNLOCALIZED: can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", + "create.hint.empty_bearing.title": "UNLOCALIZED: Update Bearing", + "create.hint.empty_bearing": "UNLOCALIZED: _Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", + "create.gui.config.overlay1": "UNLOCALIZED: Hi :)", "create.gui.config.overlay2": "UNLOCALIZED: This is a sample overlay", "create.gui.config.overlay3": "UNLOCALIZED: Click or drag with your mouse", 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 23a3412e0..b4a6ac12f 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: 321", + "_": "Missing Localizations: 333", "_": "->------------------------] Game Elements [------------------------<-", @@ -710,6 +710,9 @@ "create.logistics.fluid_filter": "UNLOCALIZED: Fluid Filter", "create.logistics.firstFrequency": "频道. #1", "create.logistics.secondFrequency": "频道. #2", + "create.logistics.filter.apply": "UNLOCALIZED: Applied filter to %1$s.", + "create.logistics.filter.apply_click_again": "UNLOCALIZED: Applied filter to %1$s, click again to copy the amount.", + "create.logistics.filter.apply_count": "UNLOCALIZED: Applied extraction count to filter.", "create.gui.goggles.generator_stats": "产能器状态:", "create.gui.goggles.kinetic_stats": "动能状态:", @@ -750,7 +753,7 @@ "create.schematicAndQuill.noTarget": "按住Ctrl选择空气方块.", "create.schematicAndQuill.abort": "删除选择.", "create.schematicAndQuill.title": "UNLOCALIZED: Schematic Name:", - "create.schematicAndQuill.convert": "UNLOCALIZED: Save and Deploy Immediately", + "create.schematicAndQuill.convetr": "UNLOCALIZED: Save and Deploy Immediately", "create.schematicAndQuill.fallbackName": "我的蓝图", "create.schematicAndQuill.saved": "另存为 %1$s", @@ -950,6 +953,7 @@ "create.mechanical_arm.extract_from": "UNLOCALIZED: Take items from %1$s", "create.mechanical_arm.deposit_to": "UNLOCALIZED: Deposit items to %1$s", + "create.mechanical_arm.summary": "UNLOCALIZED: Mechanical Arm has %1$s input(s) and %2$s output(s).", "create.mechanical_arm.points_outside_range": "UNLOCALIZED: %1$s selected interaction point(s) removed due to range limitations.", "create.logistics.when_multiple_outputs_available": "UNLOCALIZED: When Multiple Outputs Available", @@ -966,6 +970,15 @@ "create.tunnel.selection_mode.randomize": "UNLOCALIZED: Randomize", "create.tunnel.selection_mode.synchronize": "UNLOCALIZED: Synchronize Inputs", + "create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets", + "create.hint.mechanical_arm_no_targets": "UNLOCALIZED: It appears this _Mechnanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", + "create.hint.horizontal_funnel.title": "UNLOCALIZED: Horizontal Funnels", + "create.hint.horizontal_funnel": "UNLOCALIZED: cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", + "create.hint.upward_funnel.title": "UNLOCALIZED: Funnels facing upward", + "create.hint.upward_funnel": "UNLOCALIZED: can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", + "create.hint.empty_bearing.title": "UNLOCALIZED: Update Bearing", + "create.hint.empty_bearing": "UNLOCALIZED: _Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", + "create.gui.config.overlay1": "UNLOCALIZED: Hi :)", "create.gui.config.overlay2": "UNLOCALIZED: This is a sample overlay", "create.gui.config.overlay3": "UNLOCALIZED: Click or drag with your mouse", diff --git a/src/generated/resources/data/create/recipes/crushing/prismarine_crystals.json b/src/generated/resources/data/create/recipes/crushing/prismarine_crystals.json index bedfb41c0..0bacec70e 100644 --- a/src/generated/resources/data/create/recipes/crushing/prismarine_crystals.json +++ b/src/generated/resources/data/create/recipes/crushing/prismarine_crystals.json @@ -7,18 +7,13 @@ ], "results": [ { - "item": "minecraft:prismarine_shard", - "count": 2 + "item": "minecraft:quartz", + "count": 1 }, { "item": "minecraft:quartz", "count": 2, - "chance": 0.75 - }, - { - "item": "minecraft:prismarine_shard", - "count": 2, - "chance": 0.25 + "chance": 0.5 }, { "item": "minecraft:glowstone_dust", diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index 532a3e540..f0d61584c 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -614,7 +614,7 @@ public class AllBlocks { .initialProperties(SharedProperties::softMetal) .blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.partialBaseModel(ctx, prov))) .addLayer(() -> RenderType::getCutoutMipped) - .item() + .item(BasinOperatorBlockItem::new) .transform(customItemModel()) .register(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/BasinOperatorBlockItem.java b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/BasinOperatorBlockItem.java index 4604140d2..ae91c16c8 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/BasinOperatorBlockItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/BasinOperatorBlockItem.java @@ -18,11 +18,17 @@ public class BasinOperatorBlockItem extends BlockItem { @Override public ActionResultType tryPlace(BlockItemUseContext context) { - - BlockPos placedOnPos = context.getPos().offset(context.getFace().getOpposite()); - BlockState placedOnState = context.getWorld().getBlockState(placedOnPos); - if (AllBlocks.BASIN.has(placedOnState)) { - if (context.getWorld().getBlockState(placedOnPos.up(2)).getMaterial().isReplaceable()) + BlockPos placedOnPos = context.getPos() + .offset(context.getFace() + .getOpposite()); + BlockState placedOnState = context.getWorld() + .getBlockState(placedOnPos); + if (AllBlocks.BASIN.has(placedOnState) || AllBlocks.BELT.has(placedOnState) + || AllBlocks.DEPOT.has(placedOnState)) { + if (context.getWorld() + .getBlockState(placedOnPos.up(2)) + .getMaterial() + .isReplaceable()) context = BlockItemUseContext.func_221536_a(context, placedOnPos.up(2), Direction.UP); else return ActionResultType.FAIL; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/MechanicalBearingTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/MechanicalBearingTileEntity.java index 620c5a1b1..b64162e31 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/MechanicalBearingTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/MechanicalBearingTileEntity.java @@ -6,6 +6,7 @@ import java.util.List; import com.simibubi.create.content.contraptions.base.GeneratingKineticTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionEntity; +import com.simibubi.create.foundation.item.TooltipHelper; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollOptionBehaviour; import com.simibubi.create.foundation.utility.AngleHelper; @@ -256,4 +257,27 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp return running; } + @Override + public boolean addToTooltip(List tooltip, boolean isPlayerSneaking) { + if (super.addToTooltip(tooltip, isPlayerSneaking)) + return true; + if (isPlayerSneaking) + return false; + if (isWindmill()) + return false; + if (getSpeed() == 0) + return false; + if (running) + return false; + BlockState state = getBlockState(); + if (!(state.getBlock() instanceof BearingBlock)) + return false; + BlockState attachedState = world.getBlockState(pos.offset(state.get(BearingBlock.FACING))); + if (attachedState.getMaterial() + .isReplaceable()) + return false; + TooltipHelper.addHint(tooltip, "hint.empty_bearing"); + return true; + } + } diff --git a/src/main/java/com/simibubi/create/content/contraptions/goggles/IHaveGoggleInformation.java b/src/main/java/com/simibubi/create/content/contraptions/goggles/IHaveGoggleInformation.java index f41753606..728f1c631 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/goggles/IHaveGoggleInformation.java +++ b/src/main/java/com/simibubi/create/content/contraptions/goggles/IHaveGoggleInformation.java @@ -9,7 +9,7 @@ import java.util.List; public interface IHaveGoggleInformation { DecimalFormat decimalFormat = new DecimalFormat("#.##"); - String spacing = " "; + public static String spacing = " "; /** * this method will be called when looking at a TileEntity that implemented this interface diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinBlock.java b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinBlock.java index afbbde0fa..d02a73d53 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinBlock.java @@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorldReader; import net.minecraft.world.World; import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.ItemHandlerHelper; @@ -56,6 +57,14 @@ public class BasinBlock extends Block implements ITE, IWrenchab protected void fillStateContainer(Builder p_206840_1_) { super.fillStateContainer(p_206840_1_.add(FACING)); } + + @Override + public boolean isValidPosition(BlockState state, IWorldReader world, BlockPos pos) { + TileEntity tileEntity = world.getTileEntity(pos.up()); + if (tileEntity instanceof BasinOperatingTileEntity) + return false; + return true; + } @Override public TileEntity createTileEntity(BlockState state, IBlockReader world) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogWheelPlacementHelper.java b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogWheelPlacementHelper.java new file mode 100644 index 000000000..5f4e7a3e6 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogWheelPlacementHelper.java @@ -0,0 +1,5 @@ +package com.simibubi.create.content.contraptions.relays.elementary; + +public class CogWheelPlacementHelper { + +} diff --git a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java index ca034a723..378b19249 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java @@ -5,12 +5,16 @@ import java.util.function.Function; import java.util.function.Predicate; import com.simibubi.create.AllBlocks; +import com.simibubi.create.content.contraptions.components.saw.SawTileEntity; +import com.simibubi.create.content.contraptions.goggles.IHaveHoveringInformation; import com.simibubi.create.content.contraptions.relays.belt.BeltHelper; import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack; +import com.simibubi.create.content.logistics.block.chute.ChuteTileEntity; import com.simibubi.create.content.logistics.block.funnel.BeltFunnelBlock.Shape; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue; +import com.simibubi.create.foundation.item.TooltipHelper; import com.simibubi.create.foundation.tileEntity.SmartTileEntity; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour; @@ -24,11 +28,16 @@ import net.minecraft.block.BlockState; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.state.properties.BlockStateProperties; +import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.ItemHandlerHelper; -public class FunnelTileEntity extends SmartTileEntity { +public class FunnelTileEntity extends SmartTileEntity implements IHaveHoveringInformation { private FilteringBehaviour filtering; private InvManipulationBehaviour invManipulation; @@ -311,4 +320,46 @@ public class FunnelTileEntity extends SmartTileEntity { .onFunnelTransfer(world, pos, stack); } + @Override + // Hint players not to use funnels like 0.2 transposers + public boolean addToTooltip(List tooltip, boolean isPlayerSneaking) { + if (isPlayerSneaking) + return false; + BlockState state = getBlockState(); + if (!(state.getBlock() instanceof FunnelBlock)) + return false; + Direction funnelFacing = FunnelBlock.getFunnelFacing(state); + + if (world.getBlockState(pos.offset(funnelFacing.getOpposite())) + .getMaterial() + .isReplaceable()) + return false; + + BlockPos inputPos = pos.offset(funnelFacing); + TileEntity tileEntity = world.getTileEntity(inputPos); + if (tileEntity == null) + return false; + if (tileEntity instanceof BeltTileEntity) + return false; + if (tileEntity instanceof SawTileEntity) + return false; + if (tileEntity instanceof ChuteTileEntity) + return false; + + LazyOptional capability = tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY); + if (!capability.isPresent()) + return false; + + if (funnelFacing == Direction.DOWN) { + TooltipHelper.addHint(tooltip, "hint.upward_funnel"); + return true; + } + if (!funnelFacing.getAxis() + .isHorizontal()) + return false; + + TooltipHelper.addHint(tooltip, "hint.horizontal_funnel"); + return true; + } + } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPointHandler.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPointHandler.java index 573bc1c28..e461ed678 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPointHandler.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPointHandler.java @@ -14,6 +14,7 @@ import com.simibubi.create.foundation.utility.Lang; import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -94,15 +95,28 @@ public class ArmInteractionPointHandler { int removed = 0; for (Iterator iterator = currentSelection.iterator(); iterator.hasNext();) { ArmInteractionPoint point = iterator.next(); - if (point.pos.withinDistance(pos, ArmTileEntity.getRange())) + if (point.pos.withinDistance(pos, ArmTileEntity.getRange())) continue; iterator.remove(); removed++; } - if (removed > 0) - Minecraft.getInstance().player.sendStatusMessage(new StringTextComponent( - TextFormatting.RED + Lang.translate("mechanical_arm.points_outside_range", removed)), true); + ClientPlayerEntity player = Minecraft.getInstance().player; + if (removed > 0) { + player.sendStatusMessage(Lang.createTranslationTextComponent("mechanical_arm.points_outside_range", removed) + .applyTextStyle(TextFormatting.RED), true); + } else { + int inputs = 0; + int outputs = 0; + for (ArmInteractionPoint armInteractionPoint : currentSelection) { + if (armInteractionPoint.mode == Mode.DEPOSIT) + outputs++; + else + inputs++; + } + player.sendStatusMessage(Lang.createTranslationTextComponent("mechanical_arm.summary", inputs, outputs) + .applyTextStyle(TextFormatting.WHITE), true); + } AllPackets.channel.sendToServer(new ArmPlacementPacket(currentSelection, pos)); currentSelection.clear(); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmTileEntity.java index 26af2e2ad..56505fd29 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmTileEntity.java @@ -12,6 +12,7 @@ import com.simibubi.create.foundation.advancement.AllTriggers; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.gui.AllIcons; import com.simibubi.create.foundation.gui.widgets.InterpolatedAngle; +import com.simibubi.create.foundation.item.TooltipHelper; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.CenteredSideValueBoxTransform; import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.INamedIconOptions; @@ -137,7 +138,7 @@ public class ArmTileEntity extends KineticTileEntity { sendData(); } } - + @Override @OnlyIn(Dist.CLIENT) public AxisAlignedBB getRenderBoundingBox() { @@ -202,7 +203,7 @@ public class ArmTileEntity extends KineticTileEntity { protected void searchForItem() { if (redstoneLocked) return; - + boolean foundInput = false; // for round robin, we start looking after the last used index, for default we // start at 0; @@ -256,7 +257,7 @@ public class ArmTileEntity extends KineticTileEntity { ArmInteractionPoint armInteractionPoint = outputs.get(i); if (!armInteractionPoint.isStillValid(world)) continue; - + ItemStack remainder = armInteractionPoint.insert(world, held, true); if (remainder.equals(heldItem, false)) continue; @@ -345,7 +346,7 @@ public class ArmTileEntity extends KineticTileEntity { } return stack; } - + public void redstoneUpdate() { if (world.isRemote) return; @@ -441,6 +442,21 @@ public class ArmTileEntity extends KineticTileEntity { return AllConfigs.SERVER.logistics.mechanicalArmRange.get(); } + @Override + public boolean addToTooltip(List tooltip, boolean isPlayerSneaking) { + if (super.addToTooltip(tooltip, isPlayerSneaking)) + return true; + if (isPlayerSneaking) + return false; + if (!inputs.isEmpty()) + return false; + if (!outputs.isEmpty()) + return false; + + TooltipHelper.addHint(tooltip, "hint.mechanical_arm_no_targets"); + return true; + } + private class SelectionModeValueBox extends CenteredSideValueBoxTransform { public SelectionModeValueBox() { diff --git a/src/main/java/com/simibubi/create/foundation/data/recipe/CrushingRecipeGen.java b/src/main/java/com/simibubi/create/foundation/data/recipe/CrushingRecipeGen.java index 8a62ab387..b5e74e900 100644 --- a/src/main/java/com/simibubi/create/foundation/data/recipe/CrushingRecipeGen.java +++ b/src/main/java/com/simibubi/create/foundation/data/recipe/CrushingRecipeGen.java @@ -21,9 +21,8 @@ public class CrushingRecipeGen extends ProcessingRecipeGen { .output(.25f, Items.BLAZE_POWDER, 3)), PRISMARINE_CRYSTALS = create(() -> Items.PRISMARINE_CRYSTALS, b -> b.duration(150) - .output(Items.PRISMARINE_SHARD, 2) - .output(.75f, Items.QUARTZ, 2) - .output(.25f, Items.PRISMARINE_SHARD, 2) + .output(1f, Items.QUARTZ, 1) + .output(.5f, Items.QUARTZ, 2) .output(.1f, Items.GLOWSTONE_DUST, 2)), OBSIDIAN = create(() -> Blocks.OBSIDIAN, b -> b.duration(500) diff --git a/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java b/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java index fea30a1d3..c4d6b40af 100644 --- a/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java +++ b/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java @@ -1,6 +1,8 @@ package com.simibubi.create.foundation.item; import static net.minecraft.util.text.TextFormatting.DARK_GRAY; +import static net.minecraft.util.text.TextFormatting.GOLD; +import static net.minecraft.util.text.TextFormatting.GRAY; import java.util.ArrayList; import java.util.HashMap; @@ -13,6 +15,7 @@ import com.simibubi.create.AllItems; import com.simibubi.create.content.AllSections; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.components.flywheel.engine.EngineBlock; +import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation; import com.simibubi.create.content.curiosities.tools.AllToolTiers; import com.simibubi.create.foundation.item.ItemDescription.Palette; import com.simibubi.create.foundation.utility.Lang; @@ -42,6 +45,15 @@ public class TooltipHelper { + Lang.translate("tooltip.holdKey", colorFormat + Lang.translate("tooltip.keyShift") + DARK_GRAY); } + public static void addHint(List tooltip, String hintKey, Object... messageParams) { + String spacing = IHaveGoggleInformation.spacing; + tooltip.add(spacing + GOLD + Lang.translate(hintKey + ".title")); + String hint = Lang.translate(hintKey); + List cutString = TooltipHelper.cutString(spacing + hint, GRAY, TextFormatting.WHITE); + for (int i = 0; i < cutString.size(); i++) + tooltip.add((i == 0 ? "" : spacing) + cutString.get(i)); + } + public static void referTo(IItemProvider item, Supplier itemWithTooltip) { tooltipReferrals.put(item.asItem(), () -> itemWithTooltip.get() .asItem() diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringHandler.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringHandler.java index c911e8680..77b6de8b0 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringHandler.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringHandler.java @@ -5,6 +5,7 @@ import com.simibubi.create.content.logistics.item.filter.FilterItem; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform; import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform.Sided; +import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.RaycastHelper; import net.minecraft.client.Minecraft; @@ -19,6 +20,8 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.RayTraceResult; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -26,6 +29,7 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.LogicalSide; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; +import net.minecraftforge.items.ItemHandlerHelper; @EventBusSubscriber public class FilteringHandler { @@ -56,27 +60,43 @@ public class FilteringHandler { return; if (behaviour.slotPositioning instanceof ValueBoxTransform.Sided) ((Sided) behaviour.slotPositioning).fromSide(ray.getFace()); + if (!behaviour.testHit(ray.getHitVec())) + return; - if (behaviour.testHit(ray.getHitVec())) { - if (event.getSide() != LogicalSide.CLIENT) { - ItemStack heldItem = player.getHeldItem(hand) - .copy(); - if (!player.isCreative()) { - if (behaviour.getFilter() - .getItem() instanceof FilterItem) - player.inventory.placeItemBackInInventory(world, behaviour.getFilter()); - if (heldItem.getItem() instanceof FilterItem) - player.getHeldItem(hand) - .shrink(1); - } - if (heldItem.getItem() instanceof FilterItem) - heldItem.setCount(1); - behaviour.setFilter(heldItem); + ItemStack toApply = player.getHeldItem(hand) + .copy(); + + if (event.getSide() != LogicalSide.CLIENT) { + if (!player.isCreative()) { + if (behaviour.getFilter() + .getItem() instanceof FilterItem) + player.inventory.placeItemBackInInventory(world, behaviour.getFilter()); + if (toApply.getItem() instanceof FilterItem) + player.getHeldItem(hand) + .shrink(1); } - event.setCanceled(true); - event.setCancellationResult(ActionResultType.SUCCESS); - world.playSound(null, pos, SoundEvents.ENTITY_ITEM_FRAME_ADD_ITEM, SoundCategory.BLOCKS, .25f, .1f); + if (toApply.getItem() instanceof FilterItem) + toApply.setCount(1); + behaviour.setFilter(toApply); + + } else { + ItemStack filter = behaviour.getFilter(); + String feedback = "apply_click_again"; + if (toApply.getItem() instanceof FilterItem || !behaviour.isCountVisible()) + feedback = "apply"; + else if (ItemHandlerHelper.canItemStacksStack(toApply, filter)) + feedback = "apply_count"; + String translationKey = world.getBlockState(pos) + .getBlock() + .getTranslationKey(); + String formattedText = new TranslationTextComponent(translationKey).getFormattedText(); + player.sendStatusMessage(Lang.createTranslationTextComponent("logistics.filter." + feedback, formattedText) + .applyTextStyle(TextFormatting.WHITE), true); } + + event.setCanceled(true); + event.setCancellationResult(ActionResultType.SUCCESS); + world.playSound(null, pos, SoundEvents.ENTITY_ITEM_FRAME_ADD_ITEM, SoundCategory.BLOCKS, .25f, .1f); } @OnlyIn(Dist.CLIENT) diff --git a/src/main/resources/assets/create/lang/default/messages.json b/src/main/resources/assets/create/lang/default/messages.json index 18eb79e92..6a397e433 100644 --- a/src/main/resources/assets/create/lang/default/messages.json +++ b/src/main/resources/assets/create/lang/default/messages.json @@ -161,6 +161,10 @@ "create.logistics.firstFrequency": "Freq. #1", "create.logistics.secondFrequency": "Freq. #2", + "create.logistics.filter.apply": "Applied filter to %1$s.", + "create.logistics.filter.apply_click_again": "Applied filter to %1$s, click again to copy the amount.", + "create.logistics.filter.apply_count": "Applied extraction count to filter.", + "create.gui.goggles.generator_stats": "Generator Stats:", "create.gui.goggles.kinetic_stats": "Kinetic Stats:", "create.gui.goggles.at_current_speed": "At current Speed", @@ -205,7 +209,7 @@ "create.schematicAndQuill.noTarget": "Hold [Ctrl] to select Air blocks.", "create.schematicAndQuill.abort": "Removed selection.", "create.schematicAndQuill.title": "Schematic Name:", - "create.schematicAndQuill.convert": "Save and Deploy Immediately", + "create.schematicAndQuill.convetr": "Save and Deploy Immediately", "create.schematicAndQuill.fallbackName": "My Schematic", "create.schematicAndQuill.saved": "Saved as %1$s", @@ -415,6 +419,7 @@ "create.mechanical_arm.extract_from": "Take items from %1$s", "create.mechanical_arm.deposit_to": "Deposit items to %1$s", + "create.mechanical_arm.summary": "Mechanical Arm has %1$s input(s) and %2$s output(s).", "create.mechanical_arm.points_outside_range": "%1$s selected interaction point(s) removed due to range limitations.", "create.logistics.when_multiple_outputs_available": "When Multiple Outputs Available", @@ -431,6 +436,15 @@ "create.tunnel.selection_mode.randomize": "Randomize", "create.tunnel.selection_mode.synchronize": "Synchronize Inputs", + "create.hint.mechanical_arm_no_targets.title": "No Targets", + "create.hint.mechanical_arm_no_targets": "It appears this _Mechnanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", + "create.hint.horizontal_funnel.title": "Horizontal Funnels", + "create.hint.horizontal_funnel": "cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", + "create.hint.upward_funnel.title": "Funnels facing upward", + "create.hint.upward_funnel": "can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", + "create.hint.empty_bearing.title": "Update Bearing", + "create.hint.empty_bearing": "_Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", + "create.gui.config.overlay1": "Hi :)", "create.gui.config.overlay2": "This is a sample overlay", "create.gui.config.overlay3": "Click or drag with your mouse",