Stop bees from dying after stinging

This commit is contained in:
BillyGalbreath
2025-01-12 14:09:12 -08:00
committed by granny
parent a79838e874
commit 64c235a806
3 changed files with 10 additions and 38 deletions

View File

@@ -9,3 +9,11 @@
}
public void setStayOutOfHiveCountdown(int stayOutOfHiveCountdown) {
@@ -398,6 +_,7 @@
this.hurtServer(level, this.damageSources().drown(), 1.0F);
}
+ if (hasStung && !this.level().purpurConfig.beeDiesAfterSting) setHasStung(false); else // Purpur - Stop bees from dying after stinging
if (hasStung) {
this.timeSinceSting++;
if (this.timeSinceSting % 5 == 0 && this.random.nextInt(Mth.clamp(1200 - this.timeSinceSting, 1, 1200)) == 0) {

View File

@@ -1161,6 +1161,7 @@ public class PurpurWorldConfig {
public boolean beeCanWorkAtNight = false;
public boolean beeCanWorkInRain = false;
public boolean beeAlwaysDropExp = false;
public boolean beeDiesAfterSting = true;
private void beeSettings() {
beeRidable = getBoolean("mobs.bee.ridable", beeRidable);
beeRidableInWater = getBoolean("mobs.bee.ridable-in-water", beeRidableInWater);
@@ -1178,6 +1179,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 boolean blazeRidable = false;