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>
This commit is contained in:
bigtho80 2025-12-21 21:42:46 +01:00 committed by GitHub
parent 8e77b5dfc5
commit 04d5639053
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 28 additions and 1 deletions

View file

@ -0,0 +1,5 @@
ItemEvents.rightClicked(event => {
if (event.item.hasTag('tfc:nonplaceable')) {
event.cancel()
}
})

View file

@ -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");
}
}