diff --git a/gradle.properties b/gradle.properties index c48cc772..201b7be1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ loader_version_range=[4,) mod_id=sophisticatedbackpacks mod_name=Sophisticated Backpacks mod_license=GNU General Public License v3.0 -mod_version=3.20.26 +mod_version=3.20.27 mod_group_id=sophisticatedbackpacks mod_authors=P3pp3rF1y, Ridanisaurus mod_description=Fancy and functional backpacks. @@ -34,7 +34,7 @@ chipped_cf_file_id=5506938 resourcefullib_cf_file_id=5483169 athena_cf_file_id=5431579 curios_cf_file_id=5546342 -sc_version=[1.21-0.7.10,1.22) +sc_version=[1.21-1.0.2,1.22) #publish curseforge_id=422301 diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/wrapper/BackpackRenderInfo.java b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/wrapper/BackpackRenderInfo.java index b11c9586..9eaf7630 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/wrapper/BackpackRenderInfo.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/wrapper/BackpackRenderInfo.java @@ -2,6 +2,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.component.CustomData; import net.p3pp3rf1y.sophisticatedcore.init.ModCoreDataComponents; import net.p3pp3rf1y.sophisticatedcore.renderdata.RenderInfo; @@ -19,11 +20,11 @@ public BackpackRenderInfo(ItemStack backpack, Supplier getSaveHandler) @Override protected void serializeRenderInfo(CompoundTag renderInfo) { - backpack.set(ModCoreDataComponents.RENDER_INFO_TAG, renderInfo); + backpack.set(ModCoreDataComponents.RENDER_INFO_TAG, CustomData.of(renderInfo)); } @Override protected Optional getRenderInfoTag() { - return Optional.ofNullable(backpack.get(ModCoreDataComponents.RENDER_INFO_TAG)); + return Optional.ofNullable(backpack.get(ModCoreDataComponents.RENDER_INFO_TAG)).map(CustomData::copyTag); } }