Equip, saddle and light from dispensers as vanilla does
Villagers, piglins, piglin brutes, allays, dolphins, foxes and pandas can pick up loot from construction (their constructors call setCanPickUpLoot), so they take dispensed equipment without spawn finalization. Nautilus saddles play item.nautilus_saddle_equip. The oracle level is the overworld, so fire in an obsidian frame lights a portal there too, and it answers getEntity(id) and level-wide entity queries, which leash cutting needs. Unseeded item motion is compared within its full spread (item motion plus a shearing sheep's push). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -272,8 +272,9 @@ def cases(facts, count, seed, only):
|
||||
if target['type'] == 'minecraft:sulfur_cube' and rng.random() < 0.5:
|
||||
target['equip'] = {'body': plain(rng.choice(SWALLOWED))}
|
||||
# Leads: tied to an earlier target, or that target holds this one's.
|
||||
if entities and rng.random() < 0.3:
|
||||
target['leash'] = rng.randrange(len(entities))
|
||||
holders = [i for i, e in enumerate(entities) if e['type'] != 'minecraft:armor_stand']
|
||||
if holders and rng.random() < 0.3:
|
||||
target['leash'] = rng.choice(holders)
|
||||
entities.append(target)
|
||||
if bare == 'shears' and len(entities) == 1 and rng.random() < 0.3:
|
||||
# A holder out of the dispenser's reach whose lead runs to the target.
|
||||
@@ -320,7 +321,9 @@ def numbers_close(java, rust):
|
||||
for x, y in zip(a, b):
|
||||
if x.startswith('~'):
|
||||
try:
|
||||
if abs(float(x[1:]) - float(y)) > 0.25:
|
||||
# An item's own motion spans 0.2 per axis, and a shearing
|
||||
# sheep pushes each wool with its own random by up to 0.1 more.
|
||||
if abs(float(x[1:]) - float(y)) > 0.4:
|
||||
return False
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user