- Players now use the same damage mechaninism as mobs
- Fixed wrong variable for durability assigned to all swords
- Fix bug in experience
+- Fully implemented bows and arrows
---
--only throw items if registered
if self.item_drop then
+ local item
+ if type(self.item_drop) == "string" then
+ item = self.item_drop
+ elseif type(self.item_drop) == "table" then
+ item = self.item_drop[math.random(1,table.getn(self.item_drop))]
+ end
--detect if multiple items are going to be added
if self.item_max then
local data_item_amount = math.random(self.item_minimum, self.item_max)
for i = 1 ,data_item_amount do
- minetest.throw_item(vector.new(pos.x,pos.y+0.1,pos.z),self.item_drop)
+ minetest.throw_item(vector.new(pos.x,pos.y+0.1,pos.z),item)
end
else
- minetest.throw_item(vector.new(pos.x,pos.y+0.1,pos.z),self.item_drop)
+ minetest.throw_item(vector.new(pos.x,pos.y+0.1,pos.z),item)
end
end
state = 0,
view_distance = 15,
- item_drop = "mob:egg",
+ item_drop = {"mob:egg","mob:feather"},
standing_frame = {x=20,y=20},
moving_frame = {x=0,y=20},
animation_multiplier = 15,
description = "Slimeball",
inventory_image = "slimeball.png",
})
+
+minetest.register_craftitem("mob:feather", {
+ description = "Feather",
+ inventory_image = "feather.png",
+})
+
minetest.register_craftitem("mob:gunpowder", {
description = "Gunpowder",
inventory_image = "gunpowder.png",
mob skins - 22i https://github.com/22i
gunpowder, porkchop - https://github.com/minetest-texture-packs/Pixel-Perfection
string, slimeball - oil_boi
-egg - Mineclone
\ No newline at end of file
+egg - Mineclone
+feather - Mineclone
\ No newline at end of file