mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 02:47:43 +01:00
save stuff here
This commit is contained in:
@@ -5,34 +5,34 @@ Subject: [PATCH] Stop bees from dying after stinging
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
index 521cad59e394901e16d178c46e10d186eb3fdefd..ca977a8f3d3e7925b3abc78d2dd1a7f57771eee8 100644
|
||||
index fad2da0ba194d349de73777a7ab43bb6447298e7..2afe5a4f3abaa3f9883b13fa3895e1e15ed68d3a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -434,6 +434,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
this.hurt(this.damageSources().drown(), 1.0F);
|
||||
}
|
||||
|
||||
+ if (flag && !this.level.purpurConfig.beeDiesAfterSting) setHasStung(false); else // Purpur
|
||||
+ if (flag && !this.level().purpurConfig.beeDiesAfterSting) setHasStung(false); else // Purpur
|
||||
if (flag) {
|
||||
++this.timeSinceSting;
|
||||
if (this.timeSinceSting % 5 == 0 && this.random.nextInt(Mth.clamp(1200 - this.timeSinceSting, 1, 1200)) == 0) {
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index b1c20a1cf47a119bbe6b934d2c54cbaf143073c7..2bc13a187d743695e75ed617e9d8f01d6c6c0941 100644
|
||||
index 8ae28ced1d88e3b7ad3656a1389d9e9994992823..2ce03717081c92b79573b0252750a06f60cb030c 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -1045,6 +1045,7 @@ public class PurpurWorldConfig {
|
||||
@@ -1120,6 +1120,7 @@ public class PurpurWorldConfig {
|
||||
public boolean beeCanWorkAtNight = false;
|
||||
public boolean beeCanWorkInRain = false;
|
||||
public boolean beeAlwaysDropExp = false;
|
||||
+ public boolean beeDiesAfterSting = true;
|
||||
private void beeSettings() {
|
||||
if (PurpurConfig.version < 10) {
|
||||
double oldValue = getDouble("mobs.bee.attributes.max-health", beeMaxHealth);
|
||||
@@ -1057,6 +1058,7 @@ public class PurpurWorldConfig {
|
||||
beeRidable = getBoolean("mobs.bee.ridable", beeRidable);
|
||||
beeRidableInWater = getBoolean("mobs.bee.ridable-in-water", beeRidableInWater);
|
||||
@@ -1136,6 +1137,7 @@ public class PurpurWorldConfig {
|
||||
beeCanWorkAtNight = getBoolean("mobs.bee.can-work-at-night", beeCanWorkAtNight);
|
||||
beeCanWorkInRain = getBoolean("mobs.bee.can-work-in-rain", beeCanWorkInRain);
|
||||
beeAlwaysDropExp = getBoolean("mobs.bee.always-drop-exp", beeAlwaysDropExp);
|
||||
+ beeDiesAfterSting = getBoolean("mobs.bee.dies-after-sting", beeDiesAfterSting);
|
||||
}
|
||||
|
||||
public double blazeMaxHealth = 20.0D;
|
||||
public boolean blazeRidable = false;
|
||||
|
||||
Reference in New Issue
Block a user