From 04d56390537903905405f7f8c8843fb632dbf613 Mon Sep 17 00:00:00 2001 From: bigtho80 <97521928+bigtho80@users.noreply.github.com> Date: Sun, 21 Dec 2025 21:42:46 +0100 Subject: [PATCH] Prevent placement of alcohol buckets (#2491) * Prevent alcohol bucket usage on right click Signed-off-by: bigtho80 <97521928+bigtho80@users.noreply.github.com> * Rename cancelalcoholbucket to cancelalcoholbucket.js Signed-off-by: bigtho80 <97521928+bigtho80@users.noreply.github.com> * rename cancelalcoholbucket.js into nonplaceableliquid.js and edit to add tfc:nonplaceable tag Signed-off-by: bigtho80 <97521928+bigtho80@users.noreply.github.com> * Add non-placeable liquid items to event Added various non-placeable liquid items to the event. Signed-off-by: bigtho80 <97521928+bigtho80@users.noreply.github.com> --------- Signed-off-by: bigtho80 <97521928+bigtho80@users.noreply.github.com> --- .../server_scripts/tfc/nonplaceableliquid.js | 5 ++++ kubejs/server_scripts/tfc/tags.js | 24 ++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 kubejs/server_scripts/tfc/nonplaceableliquid.js diff --git a/kubejs/server_scripts/tfc/nonplaceableliquid.js b/kubejs/server_scripts/tfc/nonplaceableliquid.js new file mode 100644 index 000000000..5d60d5f72 --- /dev/null +++ b/kubejs/server_scripts/tfc/nonplaceableliquid.js @@ -0,0 +1,5 @@ +ItemEvents.rightClicked(event => { + if (event.item.hasTag('tfc:nonplaceable')) { + event.cancel() + } +}) diff --git a/kubejs/server_scripts/tfc/tags.js b/kubejs/server_scripts/tfc/tags.js index 09fb018dd..253d820d1 100644 --- a/kubejs/server_scripts/tfc/tags.js +++ b/kubejs/server_scripts/tfc/tags.js @@ -85,6 +85,28 @@ function registerTFCItemTags(event) { usableOnToolRack.forEach((entry) => { event.add("tfc:usable_on_tool_rack", entry); }); + + //liquid non placeable + event.add("tfc:nonplaceable", "tfc:bucket/beer") + event.add("tfc:nonplaceable", "tfc:bucket/cider") + event.add("tfc:nonplaceable", "tfc:bucket/rum") + event.add("tfc:nonplaceable", "tfc:bucket/sake") + event.add("tfc:nonplaceable", "tfc:bucket/vodka") + event.add("tfc:nonplaceable", "tfc:bucket/whiskey") + event.add("tfc:nonplaceable", "tfc:bucket/corn_whiskey") + event.add("tfc:nonplaceable", "tfc:bucket/rye_whiskey") + + event.add("tfc:nonplaceable", "tfcagedalcohol:bucket/aged_beer") + event.add("tfc:nonplaceable", "tfcagedalcohol:bucket/aged_cider") + event.add("tfc:nonplaceable", "tfcagedalcohol:bucket/aged_rum") + event.add("tfc:nonplaceable", "tfcagedalcohol:bucket/aged_sake") + event.add("tfc:nonplaceable", "tfcagedalcohol:bucket/aged_vodka") + event.add("tfc:nonplaceable", "tfcagedalcohol:bucket/aged_whiskey") + event.add("tfc:nonplaceable", "tfcagedalcohol:bucket/aged_corn_whiskey") + event.add("tfc:nonplaceable", "tfcagedalcohol:bucket/aged_rye_whiskey") + event.add("tfc:nonplaceable", "tfcagedalcohol:bucket/aged_mead") + + event.add("tfc:nonplaceable", "tfc_gurman:nalivka_bucket") // Ингредиенты для закваски event.add("tfg:ferments_to_rennet", "tfc:food/soybean"); @@ -712,4 +734,4 @@ function registerTFCFluidTags(event) { event.add("c:hidden_from_recipe_viewers", "tfc:metal/high_carbon_black_steel"); event.add("c:hidden_from_recipe_viewers", "tfc:metal/high_carbon_red_steel"); event.add("c:hidden_from_recipe_viewers", "tfc:metal/high_carbon_blue_steel"); -} \ No newline at end of file +}