Spectrum icon indicating copy to clipboard operation
Spectrum copied to clipboard

Datafixers for blocks / items implementing InkStorage

Open unilock opened this issue 1 year ago • 1 comments

TODO:

  • [x] Figure out how to register these things...
  • [ ] Get InkStorageBlockFix working (???)
  • [ ] Include more inventories as data fixing targets:
    • [ ] Spectrum's BlockEntities with Inventories
    • [ ] PlayerEntity Inventories
    • [ ] Arbitrary modded blocks (!?)

unilock avatar Sep 09 '24 18:09 unilock

Since data fixers for items seem to be nigh-impossible to thoroughly implement and apply in an environment with other mods, perhaps a custom recipe could be used to convert the NBT data of pre-1.8 InkStorageItems?

A data fixer for InkStorageBlocks does appear to be necessary, however.

unilock avatar Sep 12 '24 16:09 unilock

Would it be feasible to implement InkStorage conversion during NBT deserialization, at least for InkStorageBlocks? As in, detect if the InkStorage is using old Ink IDs when fromNbt is called, do the conversion then, and maybe add a new NBT field that indicates that the block has been "datafixed".

unilock avatar Nov 11 '24 12:11 unilock

Could you explain the scope of this PR? Mainly wondering if this is targetting 1.7.0 -> 1.8.0 data

Noaaan avatar Nov 11 '24 12:11 Noaaan

@Noaaan

Mainly wondering if this is targetting 1.7.0 -> 1.8.0 data

That is what the original goal of this PR was, yes.

unilock avatar Nov 11 '24 13:11 unilock

Would it be feasible to implement InkStorage conversion during NBT deserialization, at least for InkStorageBlocks? As in, detect if the InkStorage is using old Ink IDs when fromNbt is called, do the conversion then, and maybe add a new NBT field that indicates that the block has been "datafixed".

Certainly! Though that feels like a lot of work for something that would only be useful once.

DaFuqs avatar Nov 18 '24 14:11 DaFuqs

Closing in favor of #619 - datafixers are evil

unilock avatar Dec 01 '24 20:12 unilock