From 7f8135b193bb229d1651ad12eecae7fccd0ef7cc Mon Sep 17 00:00:00 2001 From: Helvetica Volubi Date: Thu, 10 Jul 2025 03:10:32 +0800 Subject: [PATCH] fix: fix #26 & Update upstream(Luminol) --- gradle.properties | 2 +- .../0009-Add-config-to-allow-infinite-trade.patch | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index 4c44d81..afbd8b4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group=fun.bm.lophine version=1.21.7-R0.1-SNAPSHOT mcVersion=1.21.7 -luminolRef=1ce39bcde942ab2c5972c345fd63f7cc6552b26a +luminolRef=8c5f36eda46642964261a5abe1f2ff2afc3f655a org.gradle.configuration-cache=true org.gradle.caching=true diff --git a/lophine-server/minecraft-patches/features/0009-Add-config-to-allow-infinite-trade.patch b/lophine-server/minecraft-patches/features/0009-Add-config-to-allow-infinite-trade.patch index 212e80a..aa32aea 100644 --- a/lophine-server/minecraft-patches/features/0009-Add-config-to-allow-infinite-trade.patch +++ b/lophine-server/minecraft-patches/features/0009-Add-config-to-allow-infinite-trade.patch @@ -5,18 +5,20 @@ Subject: [PATCH] Add config to allow infinite trade diff --git a/net/minecraft/world/item/trading/Merchant.java b/net/minecraft/world/item/trading/Merchant.java -index 6e2fa442ddcd4ef3c4fe789b9ebac9dd409c9de7..0410d4f1405cda79eb5a5aef6f19888d3df1d1e3 100644 +index 6e2fa442ddcd4ef3c4fe789b9ebac9dd409c9de7..a876335e26daec9a9a3a2f00ee5cb23cfd913aa6 100644 --- a/net/minecraft/world/item/trading/Merchant.java +++ b/net/minecraft/world/item/trading/Merchant.java -@@ -42,7 +42,12 @@ public interface Merchant { +@@ -42,7 +42,14 @@ public interface Merchant { new SimpleMenuProvider((containerId, inventory, player1) -> new MerchantMenu(containerId, inventory, this), displayName) ); if (optionalInt.isPresent()) { - MerchantOffers offers = this.getOffers(); + // Lophine start - infinite trade + MerchantOffers offers = this.getOffers().copy(); -+ for (MerchantOffer merchantOffer : offers) { -+ merchantOffer.maxUses = 16384; ++ if (fun.bm.lophine.config.modules.misc.VillagerConfig.villagerInfiniteTrade) { ++ for (MerchantOffer merchantOffer : offers) { ++ merchantOffer.maxUses = 16384; ++ } + } + // Lophine end - infinite trade if (!offers.isEmpty()) {