mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-12-05 00:53:43 +01:00
f541b93c6a
Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Tuinity Changes: 76777f0 Updated Upstream (Paper) 6465aba Merge branch 'master' of https://github.com/Spottedleaf/Tuinity into ver/1.16.3 ba4dbb6 Do not allow ticket level changes while unloading playerchunks e0e7144 Aggressive state checking in region manager Purpur Changes: 0743d38 PaperPR - Add hex color code support for console logging 081f5a7 Oopsie, lets fix these snowballs :3 4895a88 Improve output of plugins command 3424c40 Minor changes to projectile despawn rate patch 9d49a31 Updated Upstream (Paper) 09e0103 add snowball to despawn rate config Rainforest Changes: 5a187d6 Update to 1.16.3.
39 lines
1.6 KiB
Diff
39 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Ivan Pekov <ivan@mrivanplays.com>
|
|
Date: Mon, 14 Sep 2020 09:48:35 +0300
|
|
Subject: [PATCH] Fix villager dupe
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
|
index da2bd7c597a3f691ec13ff37dd2ef87d44271a97..a78f48739850ca8f0a21d63bda81c60020179079 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
|
@@ -204,7 +204,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
|
} else {
|
|
this.mobTick(true);
|
|
}
|
|
- }
|
|
+ } else { checkWorkstationBreakOpenInventory(); } // Yatopia
|
|
doReputationTick();
|
|
// Paper end
|
|
|
|
@@ -284,6 +284,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
|
if (this.getVillagerData().getProfession() == VillagerProfession.NONE && this.eN()) {
|
|
this.eT();
|
|
}
|
|
+ checkWorkstationBreakOpenInventory(); // Yatopia
|
|
if (inactive) return; // Paper
|
|
|
|
super.mobTick();
|
|
@@ -1085,4 +1086,10 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
|
|
|
return optional.isPresent() ? i - (Long) optional.get() < 24000L : false;
|
|
}
|
|
+
|
|
+ // Yatopia start
|
|
+ private void checkWorkstationBreakOpenInventory() {
|
|
+ if ((!getBehaviorController().hasMemory(MemoryModuleType.JOB_SITE) || isSleeping()) && getTrader() != null) { getTrader().closeInventory(); setTradingPlayer(null); }
|
|
+ }
|
|
+ // Yatopia end
|
|
}
|