mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@730882f Chunk System and Starlight WIP PaperMC/Paper@512fd08 Update Gradle Wrapper to v8.8 PaperMC/Paper@097284d Bump tiny-remapper to 0.10.3 PaperMC/Paper@ee9b820 Update more optimization patches PaperMC/Paper@5d834b1 rebuild patches PaperMC/Paper@4bc15f1 Updated Upstream (Bukkit/CraftBukkit) PaperMC/Paper@0b6701d Revert DamageSource#getCausingEntity to vanilla PaperMC/Paper@5bd7f4e Update AbstractArrow item method implementations for 1.20.6 (#10885) PaperMC/Paper@fb511c6 Fix Player#sendBlockState (#10855) PaperMC/Paper@b420038 Fix ItemMeta#removeEnchantments (#10886) PaperMC/Paper@a835ad1 Merge remote-tracking branch 'origin/dev/1.21' into dev/1.21 PaperMC/Paper@04dad71 Improve enchantWithLevels logic PaperMC/Paper@0008fa1 Add back more optimization patches PaperMC/Paper@56b5b7d Fix max chunk status checks PaperMC/Paper@c1aefee correctly change enchantment registry to a 'delayed' version PaperMC/Paper@d41636f Add back RecipeIterator fixes patch (#10887) PaperMC/Paper@7df4725 Configurable damage tick when blocking with shield (#10877) PaperMC/Paper@3555a77 Properly forward DispenseEvent #getItem to saddle PaperMC/Paper@e339ec2 Deprecate BlockData#getDestroySpeed for removal PaperMC/Paper@b090c65 Remove unnecessary changes from chunk status fix PaperMC/Paper@5e7cd07 add some generated typed/tag keys PaperMC/Paper@5a5412c Owen fixing stuff!!! PaperMC/Paper@7240d9d Restore functionality to sand dupe setting
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Lobotomize stuck villagers
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
index 567bb9e6c9ac9092469742b7d4e1ed73d8bd5519..96e9ba6da536c06a2bdb3522d1e0a5f1ea516707 100644
|
||||
index de09bae637ea8637d13b55cd406d5dd2de72b00d..92b2dfd2d4013ab6ae1114ab319c7bdaf674afe1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -142,6 +142,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -66,32 +66,27 @@ index 567bb9e6c9ac9092469742b7d4e1ed73d8bd5519..96e9ba6da536c06a2bdb3522d1e0a5f1
|
||||
@Override
|
||||
public Brain<Villager> getBrain() {
|
||||
return (Brain<Villager>) super.getBrain(); // CraftBukkit - decompile error
|
||||
@@ -275,9 +319,23 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
|
||||
@Override
|
||||
protected void customServerAiStep() {
|
||||
+ // Paper start
|
||||
+ this.customServerAiStep(false);
|
||||
+ }
|
||||
@@ -290,10 +334,19 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
// Paper start
|
||||
this.customServerAiStep(false);
|
||||
}
|
||||
- protected void customServerAiStep(final boolean inactive) {
|
||||
+ protected void customServerAiStep(boolean inactive) { // Purpur - not final
|
||||
+ // Paper end
|
||||
// Paper end
|
||||
this.level().getProfiler().push("villagerBrain");
|
||||
- this.getBrain().tick((ServerLevel) this.level(), this);
|
||||
- /*// Purpur start // Purpur - TODO: Pufferfish
|
||||
+ // Purpur start
|
||||
+ if (this.level().purpurConfig.villagerLobotomizeEnabled) {
|
||||
+ // treat as inactive if lobotomized
|
||||
+ // inactive = inactive || checkLobotomized(); // Purpur - TODO: 1-21: check later
|
||||
+ inactive = inactive || checkLobotomized();
|
||||
+ } else {
|
||||
+ this.isLobotomized = false;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+ /*if (!inactive) this.getBrain().tick((ServerLevel) this.level(), this); // Paper
|
||||
+ else if (this.isLobotomized && shouldRestock()) restock(); // Purpur*/ // Purpur - TODO: 1-21: check later
|
||||
+ /*// Purpur start // Purpur - TODO: Pufferfish
|
||||
if (!inactive) this.getBrain().tick((ServerLevel) this.level(), this); // Paper
|
||||
+ else if (this.isLobotomized && shouldRestock()) restock(); // Purpur
|
||||
/*// Purpur start // Purpur - TODO: Pufferfish
|
||||
if (!inactive && (getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) { // Purpur - only use brain if no rider
|
||||
this.getBrain().tick((ServerLevel) this.level(), this); // Paper
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
index 6c15d40979fd3e3d246a447c432b321fbf29ada3..6ace76a829c88e2e747dbbcce0a6582c615fc56d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
|
||||
Reference in New Issue
Block a user