Improve trading villager selection based on profession
This commit is contained in:
@@ -393,6 +393,13 @@ class Game:
|
||||
obj.item_id = entry.value.item_id
|
||||
obj.item_count = entry.value.item_count
|
||||
|
||||
mob = self.g.mobs.get(packet.entity_id, None)
|
||||
if mob:
|
||||
for entry in packet.metadata:
|
||||
if mob.type == mobs.VILLAGER:
|
||||
if entry.index == 17:
|
||||
mob.profession = entry.value[1]
|
||||
|
||||
player = self.g.players.get(packet.entity_id, None)
|
||||
if player:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user