From cf68abbe0f9a43f3a6bf9fb0e2c1e8d8127cfa5c Mon Sep 17 00:00:00 2001 From: Su5eD Date: Sat, 14 Dec 2024 13:20:51 +0100 Subject: [PATCH 1/9] Simple fix for Continuity models Relates to #177 --- .../api/renderer/v1/model/ForwardingBakedModel.java | 8 +++++++- gradle.properties | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/fabric-renderer-api-v1/src/client/java/net/fabricmc/fabric/api/renderer/v1/model/ForwardingBakedModel.java b/fabric-renderer-api-v1/src/client/java/net/fabricmc/fabric/api/renderer/v1/model/ForwardingBakedModel.java index f86a07035..989517105 100644 --- a/fabric-renderer-api-v1/src/client/java/net/fabricmc/fabric/api/renderer/v1/model/ForwardingBakedModel.java +++ b/fabric-renderer-api-v1/src/client/java/net/fabricmc/fabric/api/renderer/v1/model/ForwardingBakedModel.java @@ -127,7 +127,13 @@ public boolean useAmbientOcclusion(BlockState state, RenderLayer renderType) { @Override public BakedModel applyTransform(ModelTransformationMode transformType, MatrixStack poseStack, boolean applyLeftHandTransform) { - return wrapped.applyTransform(transformType, poseStack, applyLeftHandTransform); + BakedModel result = wrapped.applyTransform(transformType, poseStack, applyLeftHandTransform); + + if (result == wrapped) { + return this; + } + + return result; } @Override diff --git a/gradle.properties b/gradle.properties index 7885fb9c0..093324e38 100644 --- a/gradle.properties +++ b/gradle.properties @@ -69,5 +69,5 @@ fabric-client-tags-api-v1-version=1.1.2 loom.platform=forge forge_version=1.20.1-47.2.6 pack_format=15 -forgified_version=1.11.8 +forgified_version=1.11.9 forge_fabric_loader_version=2.6.0+0.15.0+1.20.1 From 4ca75152a51b49f38685d789aa294953203e094f Mon Sep 17 00:00:00 2001 From: Katherine Date: Wed, 29 Jan 2025 08:53:33 -0500 Subject: [PATCH 2/9] Fix bed occupation state check in LivingEntityMixin#setOccupiedState (#188) Removes the incorrect inversion and checks for originalState.contains(BedBlock.OCCUPIED) as the original Fabric API does Signed-off-by: unilock --- .../fabricmc/fabric/mixin/entity/event/LivingEntityMixin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/mixin/entity/event/LivingEntityMixin.java b/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/mixin/entity/event/LivingEntityMixin.java index c4d8122d6..6b7d00367 100644 --- a/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/mixin/entity/event/LivingEntityMixin.java +++ b/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/mixin/entity/event/LivingEntityMixin.java @@ -128,7 +128,7 @@ private void setOccupiedState(BlockState state, World world, BlockPos pos, Livin // when the bed doesn't have the property. BlockState originalState = fabric_originalState != null ? fabric_originalState : state; - if (!EntitySleepEvents.SET_BED_OCCUPATION_STATE.invoker().setBedOccupationState((LivingEntity) (Object) this, pos, originalState, occupied)) { + if (EntitySleepEvents.SET_BED_OCCUPATION_STATE.invoker().setBedOccupationState((LivingEntity) (Object) this, pos, originalState, occupied) || originalState.contains(BedBlock.OCCUPIED)) { originalState.setBedOccupied(world, pos, entity, occupied); } From 68f98fab25766b7cb53aa5b06805657073513adc Mon Sep 17 00:00:00 2001 From: Su5eD <51261569+Su5eD@users.noreply.github.com> Date: Wed, 29 Jan 2025 14:54:10 +0100 Subject: [PATCH 3/9] Bump implementation version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 093324e38..9645597fc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -69,5 +69,5 @@ fabric-client-tags-api-v1-version=1.1.2 loom.platform=forge forge_version=1.20.1-47.2.6 pack_format=15 -forgified_version=1.11.9 +forgified_version=1.11.10 forge_fabric_loader_version=2.6.0+0.15.0+1.20.1 From 4bd998fae54c5e75f5b72bfc0af21b15dd76100a Mon Sep 17 00:00:00 2001 From: Katherine Date: Fri, 7 Feb 2025 17:26:35 -0500 Subject: [PATCH 4/9] Fix running on Forge 47.3.26+ (#191) Update Forge and mark TradeOffersTypeAwareBuyForOneEmeraldFactoryMixin injectors as not required, for Forge 47.3.26+ (#191) Signed-off-by: unilock --- .../TradeOffersTypeAwareBuyForOneEmeraldFactoryMixin.java | 4 ++-- gradle.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/mixin/object/builder/TradeOffersTypeAwareBuyForOneEmeraldFactoryMixin.java b/fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/mixin/object/builder/TradeOffersTypeAwareBuyForOneEmeraldFactoryMixin.java index 3baca35b2..df6856937 100644 --- a/fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/mixin/object/builder/TradeOffersTypeAwareBuyForOneEmeraldFactoryMixin.java +++ b/fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/mixin/object/builder/TradeOffersTypeAwareBuyForOneEmeraldFactoryMixin.java @@ -41,7 +41,7 @@ public abstract class TradeOffersTypeAwareBuyForOneEmeraldFactoryMixin { * We want to prevent this default logic so modded villager types will work. * So we return an empty stream so an exception is never thrown. */ - @Redirect(method = "", at = @At(value = "INVOKE", target = "Lnet/minecraft/registry/DefaultedRegistry;stream()Ljava/util/stream/Stream;")) + @Redirect(method = "", at = @At(value = "INVOKE", target = "Lnet/minecraft/registry/DefaultedRegistry;stream()Ljava/util/stream/Stream;"), require = 0) private Stream disableVanillaCheck(DefaultedRegistry instance) { return Stream.empty(); } @@ -49,7 +49,7 @@ private Stream disableVanillaCheck(DefaultedRegistry instan /** * To prevent "item" -> "air" trades, if the result of a type aware trade is air, make sure no offer is created. */ - @Inject(method = "create", at = @At(value = "NEW", target = "net/minecraft/village/TradeOffer"), locals = LocalCapture.CAPTURE_FAILEXCEPTION, cancellable = true) + @Inject(method = "create", at = @At(value = "NEW", target = "net/minecraft/village/TradeOffer"), locals = LocalCapture.CAPTURE_FAILEXCEPTION, cancellable = true, require = 0) private void failOnNullItem(Entity entity, Random random, CallbackInfoReturnable cir, ItemStack buyingItem) { if (buyingItem.isEmpty()) { // Will return true for an "empty" item stack that had null passed in the ctor cir.setReturnValue(null); // Return null to prevent creation of empty trades diff --git a/gradle.properties b/gradle.properties index 9645597fc..2893cd1e6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -67,7 +67,7 @@ fabric-client-tags-api-v1-version=1.1.2 # FFAPI Properties loom.platform=forge -forge_version=1.20.1-47.2.6 +forge_version=1.20.1-47.3.27 pack_format=15 forgified_version=1.11.10 forge_fabric_loader_version=2.6.0+0.15.0+1.20.1 From 0d72830cec3562a9ce37f2e5e21210c18594b5da Mon Sep 17 00:00:00 2001 From: Su5eD Date: Fri, 7 Feb 2025 23:49:47 +0100 Subject: [PATCH 5/9] Update build workflow --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 04990a90f..2123f6825 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,15 +34,15 @@ jobs: with: reports: | **/build/reports/checkstyle/*.xml - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Artifacts path: build/libs/ - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Artifacts path: ./*/build/libs/ - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Maven Local path: ~/.m2/repository From 8ac14bfaec593acef397e95ece4d5e50b3723855 Mon Sep 17 00:00:00 2001 From: Su5eD Date: Fri, 7 Feb 2025 23:50:01 +0100 Subject: [PATCH 6/9] Bump impl version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 2893cd1e6..249f5f8c4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -69,5 +69,5 @@ fabric-client-tags-api-v1-version=1.1.2 loom.platform=forge forge_version=1.20.1-47.3.27 pack_format=15 -forgified_version=1.11.10 +forgified_version=1.11.11 forge_fabric_loader_version=2.6.0+0.15.0+1.20.1 From a13eabb845a0f8487cd328248dcc4a867a975c1f Mon Sep 17 00:00:00 2001 From: Su5eD Date: Sat, 8 Feb 2025 00:06:00 +0100 Subject: [PATCH 7/9] Try fixing the workflow again --- .github/workflows/build.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2123f6825..71375619f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,14 +34,6 @@ jobs: with: reports: | **/build/reports/checkstyle/*.xml - - uses: actions/upload-artifact@v4 - with: - name: Artifacts - path: build/libs/ - - uses: actions/upload-artifact@v4 - with: - name: Artifacts - path: ./*/build/libs/ - uses: actions/upload-artifact@v4 with: name: Maven Local From 9e342fc1ccaca55a4dbf4a5d59bc4c2a72b2c33c Mon Sep 17 00:00:00 2001 From: Nico Mexis Date: Mon, 10 Mar 2025 17:23:12 +0100 Subject: [PATCH 8/9] Fix conflicting resource conditions (#204) Fixes #154 Fixes #129 This is somewhat akin to 59440bcc3f445bcbeb3181d7fd156f43ae11582c, but for 1.20.1 --- .../fabric/api/resource/conditions/v1/ResourceConditions.java | 1 + 1 file changed, 1 insertion(+) diff --git a/fabric-resource-conditions-api-v1/src/main/java/net/fabricmc/fabric/api/resource/conditions/v1/ResourceConditions.java b/fabric-resource-conditions-api-v1/src/main/java/net/fabricmc/fabric/api/resource/conditions/v1/ResourceConditions.java index 4f26822b8..a1d3af254 100644 --- a/fabric-resource-conditions-api-v1/src/main/java/net/fabricmc/fabric/api/resource/conditions/v1/ResourceConditions.java +++ b/fabric-resource-conditions-api-v1/src/main/java/net/fabricmc/fabric/api/resource/conditions/v1/ResourceConditions.java @@ -122,6 +122,7 @@ public static Predicate get(Identifier identifier) { *

If an exception is thrown during condition testing, it will be caught and logged, and false will be returned. */ public static boolean objectMatchesConditions(JsonObject object) { + if (JsonHelper.hasArray(object, "conditions")) return true; try { JsonArray conditions = JsonHelper.getArray(object, CONDITIONS_KEY, null); From 015a611b9f9827c0c8b94586e0e89312bec6ab49 Mon Sep 17 00:00:00 2001 From: Su5eD <51261569+Su5eD@users.noreply.github.com> Date: Mon, 10 Mar 2025 17:27:14 +0100 Subject: [PATCH 9/9] Bump impl version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 249f5f8c4..56b3bc56a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -69,5 +69,5 @@ fabric-client-tags-api-v1-version=1.1.2 loom.platform=forge forge_version=1.20.1-47.3.27 pack_format=15 -forgified_version=1.11.11 +forgified_version=1.11.12 forge_fabric_loader_version=2.6.0+0.15.0+1.20.1