summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--init.lua32
-rw-r--r--textures/wine_wheat_beer_glass.pngbin0 -> 279 bytes
3 files changed, 33 insertions, 1 deletions
diff --git a/README.md b/README.md
index e25c84f..300303e 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ by TenPlus1
Depends: Farming Redo
-This mod adds a barrel used to ferment grapes into glasses of wine, 9 of which can then be crafted into a bottle of wine. It can also ferment honey into mead, barley into beer and apples into cider.
+This mod adds a barrel used to ferment grapes into glasses of wine, 9 of which can then be crafted into a bottle of wine. It can also ferment honey into mead, barley into beer, wheat into weizen (wheat beer), and apples into cider.
Change log:
diff --git a/init.lua b/init.lua
index abc38f3..d73bd56 100644
--- a/init.lua
+++ b/init.lua
@@ -94,6 +94,28 @@ minetest.register_node("wine:glass_beer", {
on_use = minetest.item_eat(2),
})
+-- glass of weizen, or wheat beer
+-- The image is a lighter version of the one from RiverKpocc @ deviantart.com
+minetest.register_node("wine:glass_wheat_beer", {
+ description = S("Wheat Beer"),
+ drawtype = "torchlike", --"plantlike",
+ visual_scale = 0.8,
+ tiles = {"wine_wheat_beer_glass.png"},
+ inventory_image = "wine_wheat_beer_glass.png",
+ wield_image = "wine_wheat_beer_glass.png",
+ paramtype = "light",
+ is_ground_content = false,
+ sunlight_propagates = true,
+ walkable = false,
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.2, -0.5, -0.2, 0.2, 0.3, 0.2}
+ },
+ groups = {vessel = 1, dig_immediate = 3, attached_node = 1},
+ sounds = default.node_sound_glass_defaults(),
+ on_use = minetest.item_eat(2),
+})
+
-- glass of honey mead
minetest.register_node("wine:glass_mead", {
description = S("Honey-Mead"),
@@ -276,6 +298,7 @@ minetest.register_abm({
-- does it contain grapes or barley?
if not inv:contains_item("src", ItemStack("farming:grapes"))
and not inv:contains_item("src", ItemStack("farming:barley"))
+ and not inv:contains_item("src", ItemStack("farming:wheat"))
and not inv:contains_item("src", ItemStack("default:apple"))
and not inv:contains_item("src", ItemStack("mobs:honey")) then
return
@@ -284,6 +307,7 @@ minetest.register_abm({
-- is barrel full
if not inv:room_for_item("dst", "wine:glass_wine")
or not inv:room_for_item("dst", "wine:glass_beer")
+ or not inv:room_for_item("dst", "wine:glass_wheat_beer")
or not inv:room_for_item("dst", "wine:glass_cider")
or not inv:room_for_item("dst", "wine:glass_mead") then
meta:set_string("infotext", S("Fermenting Barrel (FULL)"))
@@ -315,6 +339,13 @@ minetest.register_abm({
inv:remove_item("src", "farming:barley")
inv:add_item("dst", "wine:glass_beer")
meta:set_float("status", 0.0)
+
+ elseif inv:contains_item("src", "farming:wheat") then
+
+ --fermented (take wheat and add glass of weizen)
+ inv:remove_item("src", "farming:wheat")
+ inv:add_item("dst", "wine:glass_wheat_beer")
+ meta:set_float("status", 0.0)
elseif inv:contains_item("src", "mobs:honey") then
@@ -350,6 +381,7 @@ if minetest.get_modpath("lucky_block") then
lucky_block:add_blocks({
{"dro", {"wine:glass_wine"}, 5},
{"dro", {"wine:glass_beer"}, 5},
+ {"dro", {"wine:glass_weizen_beer"}, 5},
{"dro", {"wine:glass_mead"}, 5},
{"dro", {"wine:glass_cider"}, 5},
{"nod", "wine:bottle_wine"},
diff --git a/textures/wine_wheat_beer_glass.png b/textures/wine_wheat_beer_glass.png
new file mode 100644
index 0000000..d88883c
--- /dev/null
+++ b/textures/wine_wheat_beer_glass.png
Binary files differ