Compare villager gossip and breeding with vanilla

Gossip and gifts between villagers (TradeWithVillager) move into the
library so the mob_ai probe runs them as the game does; both villagers now
lock their gaze on each other, as lockGazeAndWalkToEachOther does. The
probe reads the oracle's villager flags, prints villager data (food,
inventory, gossip, reputation) and adds babies as they are born. The
oracle seeds TriggerGate's shuffles too, which were left to the clock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-13 00:27:35 +02:00
parent ad2758fc9c
commit e0a025c5bd
8 changed files with 446 additions and 160 deletions
+28
View File
@@ -77,6 +77,34 @@ def scenarios():
'player 12.5 -60 0.5',
'mob minecraft:villager 0.5 -60 0.5 0 51 persistent',
])
# Two villagers gossip (TradeWithVillager): what one heard of the player
# passes to the other, weakened, once in 1200 ticks; idle and at the bell.
gossips = ('gossip=player:minor_negative:100 gossip=player:major_positive:15 '
'gossip=player:trading:20 gossip=player:minor_positive:3')
for name, opts, extra in [('villager_gossip_idle', 'time=100', []),
('villager_gossip_bell', 'time=9500', ['block 0 -60 -6 minecraft:bell'])]:
add(name, 400, extra + [
'player 14.5 -60 0.5',
f'mob minecraft:villager 0.5 -60 0.5 0 61 persistent {gossips}',
'mob minecraft:villager 2.5 -60 0.5 180 62 persistent gossip=player:minor_positive:50',
], opts)
# Two villagers with bread breed (VillagerMakeLove): they eat, a baby is
# born and takes a free bed, the parents rest for 6000 ticks.
beds = []
for x in (-6, -3, 3, 6):
beds += [f'block {x} -60 6 minecraft:red_bed[facing=north,part=foot]',
f'block {x} -60 5 minecraft:red_bed[facing=north,part=head]']
for name, seeds in [('villager_breed', (71, 72)), ('villager_breed_2', (73, 74))]:
add(name, 900, beds + [
'player 14.5 -60 0.5',
f'mob minecraft:villager 0.5 -60 0.5 0 {seeds[0]} persistent inv=bread*3',
f'mob minecraft:villager 2.5 -60 0.5 180 {seeds[1]} persistent inv=bread*3 food=4',
], 'time=100')
# Too little food: no breeding.
add('villager_breed_hungry', 400, beds[:2] + [
'mob minecraft:villager 0.5 -60 0.5 0 75 persistent inv=bread*2',
'mob minecraft:villager 2.5 -60 0.5 180 76 persistent inv=bread*3',
], 'time=100')
# Breezes: idle, and fighting a player near, in, and beyond the inner jump circle.
add('breeze_alone', 200, ['mob minecraft:breeze 0.5 -60 0.5 90 61 persistent'])
add('breeze_player', 200, ['player 8.5 -60 0.5', 'mob minecraft:breeze 0.5 -60 0.5 0 62 persistent'])