
aom_item_entity.LISTEN("on_step", function(self, dtime, moveresult, ...)
    local idef = ItemStack(self.itemstring):get_definition()
    if idef and idef._on_item_step then
        return idef._on_item_step(self, dtime, moveresult, ...)
    end
end)

aom_item_entity.LISTEN("on_item_drop", function(self, item, dropper)
    -- item def callbacks
    local idef = item:get_definition()
    if idef and idef._on_item_drop then
        local stack = idef._on_item_drop(self, item, dropper)
        if stack then
            aom_item_entity.SIGNAL("set_item", self, stack)
        end
    end
end)

aom_item_entity.LISTEN("on_item_picked_up", function(self, item, picker)
    -- item def callbacks
    local idef = item:get_definition()
    if idef and idef._on_item_pickup then
        idef._on_item_pickup(self, item, picker)
    end
end)
