1
0
Fork 0

Compare commits

...

12 Commits

Author SHA1 Message Date
WolfySoy b8b1bc1ab2 Merge pull request 'leather_horse_armor' (#4) from leather_horse_armor into mod-master
Reviewed-on: #4
2024-07-02 12:25:21 +02:00
WolfySoy d236b7d97d Merge pull request 'PotionEffectTweaks' (#3) from PotionEffectTweaks into mod-master
Reviewed-on: #3
2024-07-02 12:24:15 +02:00
WolfySoy 562805f11b Merge branch 'mod-master' into PotionEffectTweaks 2024-07-02 12:23:29 +02:00
WolfySoy e1fd60fc43 Merge pull request 'master' (#1) from VoxeLibre/VoxeLibre:master into PotionEffectTweaks
Reviewed-on: #1
2024-07-02 11:49:26 +02:00
WolfySoy ddf159f0c0 Code fix Pt2 2024-07-02 05:45:08 -04:00
WolfySoy c9a45064a3 Fix Duplicated Code MisClick 2024-07-02 05:41:02 -04:00
WolfySoy 5ac975cae3 Update Honey Potion to Clear Poision 2024-07-02 05:39:53 -04:00
WolfySoy 61a8f46590 Updated with correct Armor Image thanks to (@SmokeyDope) and added Leather Horse Armor to texture convert csv 2024-07-01 22:47:46 -04:00
WolfySoy 5169d87802 Merge branch 'master' into leather_horse_armor 2024-07-02 03:48:38 +02:00
WolfySoy 3f734ec550 Merge branch 'master' into leather_horse_armor 2023-07-23 20:13:04 +00:00
WolfySoy b6231d2d85 Leather horse armor pixel perfection textures 2023-07-21 20:53:00 -04:00
WolfySoy 4c986dc0d0 Added leather horse armor w placeholder textures, accurate dmg reduct.
Added leather horse armor
Tweaked horse armor damage reduction precentages to be more like Minecraft's
Added placeholder files for leather horse armor textures (currently just iron horse armor textures)
2023-07-21 20:09:49 -04:00
6 changed files with 87 additions and 12 deletions

View File

@ -68,18 +68,67 @@ minetest.register_node("mcl_honey:honeycomb_block", {
})
-- Honey
-- rewirtten mobitems' drink_milk_delayed for honey
local function drink_honey_delayed(itemstack, player, pointed_thing)
if pointed_thing.type == "node" then
local node = minetest.get_node(pointed_thing.under)
if player and not player:get_player_control().sneak then
if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then
return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, player, itemstack) or itemstack
end
end
elseif pointed_thing.type == "object" then
return itemstack
end
local function drink_honey(itemstack, player, pointed_thing)
-- Check if we were allowed to drink this (eat delay check)
if mcl_hunger.active and (
player:get_inventory():get_stack("main", player:get_wield_index(), itemstack) == "mcl_honey:honey_bottle" or
minetest.is_creative_enabled(player:get_player_name())
) then
-- mcl_hunger.stop_poison(player)
end
mcl_potions.clear_effect(player, "poison")
end
-- Wrapper for handling mcl_hunger delayed eating
local name = player:get_player_name()
local hunger_internal = mcl_hunger.eat_internal[name]
hunger_internal._custom_itemstack = itemstack -- Used as comparison to make sure the custom wrapper executes only when the same item is eaten
hunger_internal._custom_var = {
itemstack = itemstack,
player = player,
pointed_thing = pointed_thing,
}
hunger_internal._custom_func = drink_honey
hunger_internal._custom_wrapper = function(name)
local hunger_internal2 = mcl_hunger.eat_internal[name]
hunger_internal2._custom_func(
hunger_internal2._custom_var.itemstack,
hunger_internal2._custom_var.player,
hunger_internal2._custom_var.pointed_thing
)
end
minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, player, pointed_thing)
end
-- Register the honey bottle item
minetest.register_craftitem("mcl_honey:honey_bottle", {
description = S("Honey Bottle"),
_doc_items_longdesc = S("Honey Bottle is used to craft honey blocks and to restore hunger points."),
_doc_items_usagehelp = S("Drinking will restore 6 hunger points. Can also be used to craft honey blocks."),
inventory_image = "mcl_honey_honey_bottle.png",
groups = { craftitem = 1, food = 3, eatable = 6, can_eat_when_full = 1 },
on_place = minetest.item_eat(6, "mcl_potions:glass_bottle"),
on_secondary_use = minetest.item_eat(6, "mcl_potions:glass_bottle"),
_mcl_saturation = 1.2,
stack_max = 16,
description = S("Honey Bottle"),
docitems_longdesc = S("Honey Bottle is used to craft honey blocks and to restore hunger points. It also stops poisoning"),
docitems_usagehelp = S("Drinking will restore 6 hunger points and stop poison. Can also be used to craft honey blocks."),
inventory_image = "mcl_honey_honey_bottle.png",
groups = { craftitem = 1, food = 3, eatable = 6, can_eat_when_full = 1 },
on_place = drink_honey_delayed,
on_secondary_use = drink_honey_delayed,
mclsaturation = 1.2,
stack_max = 16,
})
minetest.register_node("mcl_honey:honey_block", {
description = S("Honey Block"),
_doc_items_longdesc = S("Honey Block. Used as a decoration and in redstone. Is sticky on some sides."),

View File

@ -440,6 +440,22 @@ minetest.register_craftitem("mcl_mobitems:heart_of_the_sea", {
local horse_armor_use = S("Place it on a horse to put on the horse armor. Donkeys and mules can't wear horse armor.")
-- https://minecraft.fandom.com/wiki/Armor#Damage_protection
minetest.register_craftitem("mcl_mobitems:leather_horse_armor", {
description = S("Leather Horse Armor"),
_doc_items_longdesc = S("Leather horse armor can be worn by horses to increase their protection from harm a little."),
_doc_items_usagehelp = horse_armor_use,
inventory_image = "mcl_mobitems_leather_horse_armor.png",
_horse_overlay_image = "mcl_mobitems_horse_armor_leather.png",
sounds = {
_mcl_armor_equip = "mcl_armor_equip_leather",
},
stack_max = 1,
groups = { horse_armor = 88 },
})
minetest.register_craftitem("mcl_mobitems:iron_horse_armor", {
description = S("Iron Horse Armor"),
_doc_items_longdesc = S("Iron horse armor can be worn by horses to increase their protection from harm a bit."),
@ -450,9 +466,10 @@ minetest.register_craftitem("mcl_mobitems:iron_horse_armor", {
_mcl_armor_equip = "mcl_armor_equip_iron",
},
stack_max = 1,
groups = { horse_armor = 85 },
groups = { horse_armor = 80 },
})
minetest.register_craftitem("mcl_mobitems:gold_horse_armor", {
description = S("Golden Horse Armor"),
_doc_items_longdesc = S("Golden horse armor can be worn by horses to increase their protection from harm."),
@ -463,7 +480,7 @@ minetest.register_craftitem("mcl_mobitems:gold_horse_armor", {
_mcl_armor_equip = "mcl_armor_equip_iron",
},
stack_max = 1,
groups = { horse_armor = 60 },
groups = { horse_armor = 72 },
})
minetest.register_craftitem("mcl_mobitems:diamond_horse_armor", {
@ -476,7 +493,7 @@ minetest.register_craftitem("mcl_mobitems:diamond_horse_armor", {
_mcl_armor_equip = "mcl_armor_equip_diamond",
},
stack_max = 1,
groups = { horse_armor = 45 },
groups = { horse_armor = 56 },
})
minetest.register_alias("mobs_mc:iron_horse_armor", "mcl_mobitems:iron_horse_armor")
@ -618,6 +635,13 @@ minetest.register_craft({
{"mcl_mobitems:slimeball","mcl_mobitems:slimeball","mcl_mobitems:slimeball",}},
})
minetest.register_craft({
output = "mcl_mobitems:leather_horse_armor",
recipe = {{"mcl_mobitems:leather","","mcl_mobitems:leather",},
{"mcl_mobitems:leather","mcl_mobitems:leather","mcl_mobitems:leather",},
{"mcl_mobitems:leather","","mcl_mobitems:leather",}},
})
minetest.register_on_item_eat(function (hp_change, replace_with_item, itemstack, user, pointed_thing) -- poisoning with spider eye
if itemstack:get_name() == "mcl_mobitems:spider_eye" then
mcl_potions.give_effect_by_level("poison", user, 1, 4)

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -667,6 +667,8 @@ Source path,Source file,Target file,xs,ys,xl,yl,xt,yt,Blacklisted?
/assets/minecraft/textures/item,heart_of_the_sea.png,mcl_mobitems_heart_of_the_sea.png,,,,,,,
/assets/minecraft/textures/item,ink_sac.png,mcl_mobitems_ink_sac.png,,,,,,,
/assets/minecraft/textures/item,iron_horse_armor.png,mcl_mobitems_iron_horse_armor.png,,,,,,,
/assets/minecraft/textures/item,leather_horse_armor.png,mcl_mobitems_leather_horse_armor.png,,,,,,,
/assets/minecraft/textures/item,leather_horse_armor.png,mobs_mc_leather_horse_armor.png,,,,,,,
/assets/minecraft/textures/item,nautilus_shell.png,mcl_mobitems_nautilus_shell.png,,,,,,,
/assets/minecraft/textures/item,warped_fungus_on_a_stick.png,mcl_mobitems_warped_fungus_on_a_stick.png,,,,,,,
/assets/minecraft/textures/item,golden_horse_armor.png,mcl_mobitems_gold_horse_armor.png,,,,,,,

1 Source path Source file Target file xs ys xl yl xt yt Blacklisted?
667 /assets/minecraft/textures/item heart_of_the_sea.png mcl_mobitems_heart_of_the_sea.png
668 /assets/minecraft/textures/item ink_sac.png mcl_mobitems_ink_sac.png
669 /assets/minecraft/textures/item iron_horse_armor.png mcl_mobitems_iron_horse_armor.png
670 /assets/minecraft/textures/item leather_horse_armor.png mcl_mobitems_leather_horse_armor.png
671 /assets/minecraft/textures/item leather_horse_armor.png mobs_mc_leather_horse_armor.png
672 /assets/minecraft/textures/item nautilus_shell.png mcl_mobitems_nautilus_shell.png
673 /assets/minecraft/textures/item warped_fungus_on_a_stick.png mcl_mobitems_warped_fungus_on_a_stick.png
674 /assets/minecraft/textures/item golden_horse_armor.png mcl_mobitems_gold_horse_armor.png