mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-28 11:29:12 +00:00
45 lines
2.4 KiB
Diff
45 lines
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Thu, 28 Sep 2023 17:00:22 +0800
|
|
Subject: [PATCH] Villager infinite discounts
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipType.java b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipType.java
|
|
index c3d1d7b525a6f2b708144ebe9bc28dfadcfe11fa..55b4386fc57286548161f9ee91e19e22e35ba3c9 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipType.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipType.java
|
|
@@ -15,9 +15,9 @@ public enum GossipType implements StringRepresentable {
|
|
public static final int REPUTATION_CHANGE_PER_TRADE = 2;
|
|
public final String id;
|
|
public final int weight;
|
|
- public int max;
|
|
+ public int max; // Leaves - not final
|
|
public final int decayPerDay;
|
|
- public int decayPerTransfer;
|
|
+ public int decayPerTransfer; // Leaves - not final
|
|
public static final Codec<GossipType> CODEC = StringRepresentable.fromEnum(GossipType::values);
|
|
|
|
private GossipType(String key, int multiplier, int maxReputation, int decay, int shareDecrement) {
|
|
diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java
|
|
index 1d4d357465edf888f1d52755c382dcd8e015fc09..dc15ec2edf4577e1a116f0fa7ecbfb63ba623aa6 100644
|
|
--- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java
|
|
+++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java
|
|
@@ -19,6 +19,7 @@ import top.leavesmc.leaves.protocol.CarpetServerProtocol.CarpetRules;
|
|
import top.leavesmc.leaves.util.LeavesUpdateHelper;
|
|
import top.leavesmc.leaves.protocol.bladeren.BladerenProtocol.LeavesFeatureSet;
|
|
import top.leavesmc.leaves.protocol.bladeren.BladerenProtocol.LeavesFeature;
|
|
+import net.minecraft.world.entity.ai.gossip.GossipType;
|
|
|
|
import java.io.File;
|
|
import java.lang.reflect.InvocationTargetException;
|
|
@@ -896,6 +897,9 @@ public final class LeavesConfig {
|
|
private static void villagerInfiniteDiscounts() {
|
|
villagerInfiniteDiscounts = getBoolean("settings.modify.minecraft-old.villager-infinite-discounts", villagerInfiniteDiscounts);
|
|
if (villagerInfiniteDiscounts) {
|
|
+ GossipType.MAJOR_POSITIVE.max = 100;
|
|
+ GossipType.MAJOR_POSITIVE.decayPerTransfer = 100;
|
|
+ GossipType.MINOR_POSITIVE.max = 200;
|
|
}
|
|
}
|
|
|