The title does probably not contain the right words for this, but I have a question; I use ConfigurateTranslator.instance().translateData(DyeColors.LIME.getColor().toContainer()) to get a specific DyeColor (in this case “LIME”) into my config, that part works great. It results in lime { Blue=25 ContentVersion=1 Green=204 Red=127 }(tabs don’t work?)
and then you would use something like ConfigurateTranslator.instance().translateFrom(getNode("lime")) to create a DataContainer, but how do I make this DataContainer a DyeColor again?
I don’t think there’s an easy way to go back to DyeColor though.
DyeColor is actually a CatalogType so it is possible to store the String ID of the color, dyeColor.getId(), then convert back using Sponge.getRegistry().getType(DyeColor.class, colorId);