Mod port harness: drop 1.21.1's player. attribute prefix too

1.21.2 renamed player.entity_interaction_range, player.block_interaction_range
and the other player.* attributes along with generic.*, so a spear's
interaction range never matched the oracle's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Ludovic MarieandClaude Opus 5.5 committed 2026-10-30 19:24:00 +01:00
1 parent fd41f0e36f
commit a502eccc92
1 file changed
+4 -2
+4 -2
View File
@@ -90,8 +90,10 @@ def sound_upgrades(oracle, horizon):
def modifiers(entries):
"""Attribute modifiers as comparable tuples, 1.21.1's `generic.` attribute prefix dropped."""
return sorted((m['type'].replace(':generic.', ':'), m['id'], round(m['amount'], 4), m['operation'], m['slot'])
"""Attribute modifiers as comparable tuples, 1.21.1's `generic.` and `player.` attribute prefixes dropped
(1.21.2 renamed `player.entity_interaction_range` and the others too)."""
return sorted((m['type'].replace(':generic.', ':').replace(':player.', ':'), m['id'], round(m['amount'], 4),
m['operation'], m['slot'])
for m in entries)