diff --git a/gradle.properties b/gradle.properties index c3de48b8..584eab34 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,11 +8,11 @@ yarn_mappings=1.20.6+build.1 loader_version=0.15.10 #Fabric api -fabric_version=0.97.6+1.20.6 +fabric_version=0.100.0+1.20.6 maven_group = eu.pb4 -mod_version = 0.8.2 +mod_version = 0.8.3 minecraft_version_supported = ">=1.20.5-" diff --git a/polymer-core/src/main/java/eu/pb4/polymer/core/api/item/PolymerItemUtils.java b/polymer-core/src/main/java/eu/pb4/polymer/core/api/item/PolymerItemUtils.java index 3f887353..71957865 100644 --- a/polymer-core/src/main/java/eu/pb4/polymer/core/api/item/PolymerItemUtils.java +++ b/polymer-core/src/main/java/eu/pb4/polymer/core/api/item/PolymerItemUtils.java @@ -552,7 +552,7 @@ public static void markAsPolymer(DataComponentType... types) { } public static boolean isPolymerComponent(DataComponentType type) { - return UNSYNCED_COMPONENTS.add(type); + return UNSYNCED_COMPONENTS.contains(type); } public static ItemStack getClientItemStack(ItemStack stack, ServerPlayerEntity player) { diff --git a/polymer-core/src/main/java/eu/pb4/polymer/core/impl/client/InternalClientRegistry.java b/polymer-core/src/main/java/eu/pb4/polymer/core/impl/client/InternalClientRegistry.java index 70b29158..79ec07c6 100644 --- a/polymer-core/src/main/java/eu/pb4/polymer/core/impl/client/InternalClientRegistry.java +++ b/polymer-core/src/main/java/eu/pb4/polymer/core/impl/client/InternalClientRegistry.java @@ -388,7 +388,13 @@ private static void setItemGroupPage(ItemGroup group, int page) { ((ClientItemGroupExtension) group).polymerCore$setPage(page); if (CompatStatus.FABRIC_ITEM_GROUP) { try { - ((net.fabricmc.fabric.impl.itemgroup.FabricItemGroup) group).setPage(page); + try { + ((net.fabricmc.fabric.impl.itemgroup.FabricItemGroupImpl) group).fabric_setPage(page); + } catch (Throwable e) { + var method = group.getClass().getMethod("setPage", int.class); + method.invoke(group, page); + } + } catch (Throwable e) { PolymerImpl.LOGGER.warn("Couldn't set page of ItemGroup (FABRIC)", e); }