Data component cleanup - #1220
Conversation
| return UseAnim.BLOCK; | ||
| } | ||
|
|
||
| public record HexHolder(List<Iota> hex, FrozenPigment pigment) { |
There was a problem hiding this comment.
Would there be any value in making this a TreeList? I actually doubt it (I think it would need to be benchmarked) and converting on-use is going to be better than converting on-parse).
|
Wouldn't it be possible to make even alpha versions of items correctly readable by using Codecs? |
|
How would you do that? The current alpha version uses two separate components, and the new version in this PR uses one component with two fields. I know you can make a codec that accepts input in multiple formats, but that’s still just expecting multiple formats within one data component. Is there some way to make a codec that can decode two separate components into a single object? |
|
Right, sorry, that does sound like it might not be possible. What could be an option would be adding another datafixer, but I'll only be able to answer whether I think that's a good idea after I've finished doing it for the 1.20 -> 1.21 migration |
|
After getting into it a bit, I think a datafix for alpha items should definitely be possible, the only question I'm having is how to get it to run since the vanilla process appears to be tied to save file versions and I'm pretty sure that's the same between before and after this commit. |
9f30820 to
7a8996e
Compare
7a8996e to
5f347e6
Compare
There was a problem hiding this comment.
My personal opinion is that #1227 should be fixed as part of this PR. Don't know what that looks like yet, and my opinion could be "wrong" anyway.
I guess the change doesn't make sense wrt the rest of the stuff happening in the PR but it seems really weird for the TODO to change but no action to be taken.
Various minor fixes and improvements to do with item components:
ACTIONcomponent stores a ResourceKey rather than a ResourceLocationMEDIAandMAX_MEDIAcomponents using ItemMediaHolder.withMedia()