Skip to content

Commit 4bd998f

Browse files
authored
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 <unilock@fennet.rentals>
1 parent 68f98fa commit 4bd998f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/mixin/object/builder/TradeOffersTypeAwareBuyForOneEmeraldFactoryMixin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ public abstract class TradeOffersTypeAwareBuyForOneEmeraldFactoryMixin {
4141
* We want to prevent this default logic so modded villager types will work.
4242
* So we return an empty stream so an exception is never thrown.
4343
*/
44-
@Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Lnet/minecraft/registry/DefaultedRegistry;stream()Ljava/util/stream/Stream;"))
44+
@Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Lnet/minecraft/registry/DefaultedRegistry;stream()Ljava/util/stream/Stream;"), require = 0)
4545
private <T> Stream<T> disableVanillaCheck(DefaultedRegistry<VillagerType> instance) {
4646
return Stream.empty();
4747
}
4848

4949
/**
5050
* To prevent "item" -> "air" trades, if the result of a type aware trade is air, make sure no offer is created.
5151
*/
52-
@Inject(method = "create", at = @At(value = "NEW", target = "net/minecraft/village/TradeOffer"), locals = LocalCapture.CAPTURE_FAILEXCEPTION, cancellable = true)
52+
@Inject(method = "create", at = @At(value = "NEW", target = "net/minecraft/village/TradeOffer"), locals = LocalCapture.CAPTURE_FAILEXCEPTION, cancellable = true, require = 0)
5353
private void failOnNullItem(Entity entity, Random random, CallbackInfoReturnable<TradeOffer> cir, ItemStack buyingItem) {
5454
if (buyingItem.isEmpty()) { // Will return true for an "empty" item stack that had null passed in the ctor
5555
cir.setReturnValue(null); // Return null to prevent creation of empty trades

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fabric-client-tags-api-v1-version=1.1.2
6767

6868
# FFAPI Properties
6969
loom.platform=forge
70-
forge_version=1.20.1-47.2.6
70+
forge_version=1.20.1-47.3.27
7171
pack_format=15
7272
forgified_version=1.11.10
7373
forge_fabric_loader_version=2.6.0+0.15.0+1.20.1

0 commit comments

Comments
 (0)