mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
configurable mob size attribute (#1538)
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 92c0ee9cca064637c98d7d30699114b995f2fe92..1f1d6fcdf89051761715f2422efe74e432a8d27a 100644
|
||||
index d2cbc3707a04c9f6c1191cd279e8f26b7439d0b1..05c945ba584757f8b3ccba50734917183882b10f 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
|
||||
@@ -17,7 +17,7 @@ index 92c0ee9cca064637c98d7d30699114b995f2fe92..1f1d6fcdf89051761715f2422efe74e4
|
||||
|
||||
public Villager(EntityType<? extends Villager> entityType, Level world) {
|
||||
this(entityType, world, VillagerType.PLAINS);
|
||||
@@ -199,6 +201,48 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -200,6 +202,48 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
return this.level().purpurConfig.villagerAlwaysDropExp;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ index 92c0ee9cca064637c98d7d30699114b995f2fe92..1f1d6fcdf89051761715f2422efe74e4
|
||||
@Override
|
||||
public Brain<Villager> getBrain() {
|
||||
return (Brain<Villager>) super.getBrain(); // CraftBukkit - decompile error
|
||||
@@ -295,10 +339,19 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -296,10 +340,19 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
// Paper start
|
||||
this.customServerAiStep(false);
|
||||
}
|
||||
@@ -104,10 +104,10 @@ index 6c15d40979fd3e3d246a447c432b321fbf29ada3..6ace76a829c88e2e747dbbcce0a6582c
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 60a8d4668da016a74927555a602df6672fba5cee..144bd1e7f00e9261adacf4f15f208c02d42ca803 100644
|
||||
index ff4c614df1cd6b0749591fb5c3f38276d24e89e1..1f04607f47520983a57f07b72408354b4c4499b5 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -2812,6 +2812,9 @@ public class PurpurWorldConfig {
|
||||
@@ -2926,6 +2926,9 @@ public class PurpurWorldConfig {
|
||||
public boolean villagerAllowTrading = true;
|
||||
public boolean villagerAlwaysDropExp = false;
|
||||
public int villagerMinimumDemand = 0;
|
||||
@@ -117,7 +117,7 @@ index 60a8d4668da016a74927555a602df6672fba5cee..144bd1e7f00e9261adacf4f15f208c02
|
||||
private void villagerSettings() {
|
||||
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
|
||||
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
|
||||
@@ -2833,6 +2836,18 @@ public class PurpurWorldConfig {
|
||||
@@ -2948,6 +2951,18 @@ public class PurpurWorldConfig {
|
||||
villagerAllowTrading = getBoolean("mobs.villager.allow-trading", villagerAllowTrading);
|
||||
villagerAlwaysDropExp = getBoolean("mobs.villager.always-drop-exp", villagerAlwaysDropExp);
|
||||
villagerMinimumDemand = getInt("mobs.villager.minimum-demand", villagerMinimumDemand);
|
||||
|
||||
Reference in New Issue
Block a user