mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 03:51:05 +01:00
25 lines
652 B
Lua
25 lines
652 B
Lua
MCLPlayer = class(MCLObject)
|
|
|
|
MCLPlayer:__cache_getter("meta", function(self)
|
|
return self.object:get_meta()
|
|
end)
|
|
|
|
MCLPlayer:__cache_getter("inventory", function(self)
|
|
return self.object:get_inventory()
|
|
end)
|
|
|
|
MCLPlayer:__override_pipe("death_drop", function(self, inventory, listname, index, stack)
|
|
if not mcl_gamerules.keepInventory then
|
|
return self, inventory, listname, index, stack
|
|
end
|
|
end)
|
|
|
|
function MCLPlayer:get_knockback(source, ...)
|
|
if not source.is_punch then
|
|
return MCLObject.get_knockback(self, source, ...)
|
|
end
|
|
end
|
|
|
|
function MCLPlayer:on_damage(damage, source, knockback)
|
|
MCLObject.on_damage(self, damage, source, knockback)
|
|
end
|