-
-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0bcd1ca
commit dc4454c
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
patches/server/0254-Stop-bees-from-dying-after-stinging.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: BillyGalbreath <Blake.Galbreath@Gmail.com> | ||
Date: Mon, 3 Jan 2022 01:19:46 -0600 | ||
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 350863ed11b62600dc88324283637a01162acd21..6819e007d892ee855d3e9fdab0340538cd81abf8 100644 | ||
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java | ||
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java | ||
@@ -451,6 +451,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { | ||
this.hurt(DamageSource.DROWN, 1.0F); | ||
} | ||
|
||
+ 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, (int) 1, (int) 1200)) == 0) { | ||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java | ||
index 3bd820de8f7ddf74f4e0f606265f33833134e977..bcfe7baa38fbb29abce49444f4ca82f23041d76d 100644 | ||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java | ||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java | ||
@@ -1070,6 +1070,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); | ||
@@ -1085,6 +1086,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; |