Can’t craft full paint bucket from itself
This commit is contained in:
parent
c689961f93
commit
c0d495fd31
@ -55,6 +55,7 @@ These groups are mainly used for a better item sorting in Creative Mode.
|
||||
* `bucket`: Any bucket
|
||||
* `bucket_water`: Bucket with water
|
||||
* `paint_bucket`: Paint bucket. Rating is paint level (1 = empty, 2-10: contains paint)
|
||||
* `paint_bucket_not_full`: Paint bucket that isn’t full
|
||||
* `food`: Can be eaten by player. Rating: 2 = eatable, 3 = drinkable, 1 = unknown food type
|
||||
* `nav_compass`: Compass. Rating: 1 = normal compass, 2 = magnocompass
|
||||
* `spawn_egg`: Item that spawns mobs
|
||||
|
@ -39,6 +39,7 @@ rp_formspec.group_defaults = {
|
||||
tree = "rp_default:tree",
|
||||
green_grass = "rp_default:grass",
|
||||
paint_bucket = "rp_paint:bucket",
|
||||
paint_bucket_not_full = "rp_paint:bucket_0",
|
||||
}
|
||||
rp_formspec.group_names = {
|
||||
fuzzy = { S("Fuzzy"), S("Any fuzzy block") },
|
||||
@ -47,6 +48,7 @@ rp_formspec.group_names = {
|
||||
stone = { S("Stone"), S("Any stone") },
|
||||
green_grass = { S("Green Grass Clump"), S("Any green grass clump") },
|
||||
paint_bucket = { S("Paint Bucket"), S("Any paint bucket") },
|
||||
paint_bucket_not_full = { S("Non-full Paint Bucket"), S("Any paint bucket that isn’t full") },
|
||||
}
|
||||
|
||||
-- Itemslot backgrounds
|
||||
|
@ -591,7 +591,7 @@ local on_bucket_rightclick_empty = function(pos, node, clicker, itemstack, point
|
||||
end
|
||||
|
||||
for i=0, BUCKET_LEVELS do
|
||||
local id, desc, tt, mesh, img, nici, ws, overlay, painttile, paintover, construct, rightclick, stack_max
|
||||
local id, desc, tt, mesh, img, nici, pbnf, ws, overlay, painttile, paintover, construct, rightclick, stack_max
|
||||
local paint_level = i + 1
|
||||
if i == 0 then
|
||||
-- empty bucket
|
||||
@ -600,6 +600,7 @@ for i=0, BUCKET_LEVELS do
|
||||
mesh = "rp_paint_bucket_empty.obj"
|
||||
rightclick = on_bucket_rightclick_empty
|
||||
construct = on_bucket_construct_empty
|
||||
pbnf = 1
|
||||
elseif i == BUCKET_LEVELS then
|
||||
-- full bucket
|
||||
id = "rp_paint:bucket"
|
||||
@ -615,6 +616,7 @@ for i=0, BUCKET_LEVELS do
|
||||
desc = S("Paint Bucket with Paint")
|
||||
mesh = "rp_paint_bucket_m"..m..".obj"
|
||||
nici = 1
|
||||
pbnf = 1
|
||||
rightclick = on_bucket_rightclick
|
||||
construct = on_bucket_construct
|
||||
end
|
||||
@ -668,7 +670,7 @@ for i=0, BUCKET_LEVELS do
|
||||
inventory_image = img,
|
||||
wield_image = img,
|
||||
wield_scale = ws,
|
||||
groups = { bucket = 3, paint_bucket = paint_level, tool = 1, dig_immediate = 3, attached_node = 1, not_in_creative_inventory = nici },
|
||||
groups = { bucket = 3, paint_bucket = paint_level, paint_bucket_not_full = pbnf, tool = 1, dig_immediate = 3, attached_node = 1, not_in_creative_inventory = nici },
|
||||
on_construct = construct,
|
||||
on_rightclick = rightclick,
|
||||
-- Erase metadata like palette_index on drop
|
||||
@ -684,13 +686,13 @@ crafting.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
-- Fill any paint bucket at any paint level to maximum with 3 flowers
|
||||
-- (if the bucket is non-empty, this recipe is intentionally more wasteful
|
||||
-- than placing flowers into the paint bucket node)
|
||||
-- Fill any paint bucket at any non-full paint level with 3 flowers
|
||||
-- (If the bucket is non-empty, this recipe is more wasteful
|
||||
-- than placing flowers into the paint bucket node. This is intended.)
|
||||
crafting.register_craft({
|
||||
output = "rp_paint:bucket",
|
||||
items = {
|
||||
"group:paint_bucket",
|
||||
"group:paint_bucket_not_full",
|
||||
"rp_default:flower 3",
|
||||
},
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user