The minecraft:ominous_item_spawner
entity introduced in 24w13a doesn't load the spawn_item_after_ticks
field when being read from NBT. This means that they instantly drop their contents when reloaded, and they cannot be summoned.
The code in OminousItemSpawner#readAdditionalSaveData
appears to have a typo when reading the field (it calls the method, but does not store it back into the field on the entity):
protected void readAdditionalSaveData(CompoundTag lvt1) {
ItemStack lvt2 = lvt1.contains("item", 10) ? ItemStack.parse(this.registryAccess(), lvt1.getCompound("item")).orElse(ItemStack.EMPTY) : ItemStack.EMPTY;
this.setItem(lvt2);
lvt1.getLong("spawn_item_after_ticks");
}
This bug has effects on vanilla gameplay. If you activate an ominous trial spawner and wait for an item spawner to appear, quitting and re-entering the world causes the item spawner to immediately drop its contents.
Note that you can summon the entity with commands, but it will always drop its contents immediately regardless of the value of
spawn_item_after_ticks
.