mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
save stuff here
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Skeletons eat wither roses
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Skeleton.java b/src/main/java/net/minecraft/world/entity/monster/Skeleton.java
|
||||
index b4ad943cb2c84a4abc3a75a475706a0f2c93a141..74b7cec6dbee0f53e2e822af850fe2aad4f30ee7 100644
|
||||
index 9b43150a00d7fac85aa69f5a2dbffd0dfdae4b86..65d97a2c4b3fcdfa4800787ab1ef5b77f49229c8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Skeleton.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Skeleton.java
|
||||
@@ -14,6 +14,16 @@ import net.minecraft.world.item.Items;
|
||||
@@ -37,7 +37,7 @@ index b4ad943cb2c84a4abc3a75a475706a0f2c93a141..74b7cec6dbee0f53e2e822af850fe2aa
|
||||
+ public InteractionResult mobInteract(Player player, InteractionHand hand) {
|
||||
+ ItemStack stack = player.getItemInHand(hand);
|
||||
+
|
||||
+ if (level.purpurConfig.skeletonFeedWitherRoses > 0 && this.getType() != EntityType.WITHER_SKELETON && stack.getItem() == Blocks.WITHER_ROSE.asItem()) {
|
||||
+ if (level().purpurConfig.skeletonFeedWitherRoses > 0 && this.getType() != EntityType.WITHER_SKELETON && stack.getItem() == Blocks.WITHER_ROSE.asItem()) {
|
||||
+ return this.feedWitherRose(player, stack);
|
||||
+ }
|
||||
+
|
||||
@@ -45,7 +45,7 @@ index b4ad943cb2c84a4abc3a75a475706a0f2c93a141..74b7cec6dbee0f53e2e822af850fe2aa
|
||||
+ }
|
||||
+
|
||||
+ private InteractionResult feedWitherRose(Player player, ItemStack stack) {
|
||||
+ if (++witherRosesFed < level.purpurConfig.skeletonFeedWitherRoses) {
|
||||
+ if (++witherRosesFed < level().purpurConfig.skeletonFeedWitherRoses) {
|
||||
+ if (!player.getAbilities().instabuild) {
|
||||
+ stack.shrink(1);
|
||||
+ }
|
||||
@@ -94,22 +94,22 @@ index b4ad943cb2c84a4abc3a75a475706a0f2c93a141..74b7cec6dbee0f53e2e822af850fe2aa
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 3b2c8c0d98eac2fd02db468d13eed35643df6a84..422de739e5f342cfd18af3740815f80b5a5179ba 100644
|
||||
index 24377bf7a10a758bd2049031983b9d9347ccd0c4..fac5a929dec9df57217a9b835910769958d39351 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -2070,6 +2070,7 @@ public class PurpurWorldConfig {
|
||||
@@ -2431,6 +2431,7 @@ public class PurpurWorldConfig {
|
||||
public boolean skeletonTakeDamageFromWater = false;
|
||||
public boolean skeletonAlwaysDropExp = false;
|
||||
public double skeletonHeadVisibilityPercent = 0.5D;
|
||||
+ public int skeletonFeedWitherRoses = 0;
|
||||
private void skeletonSettings() {
|
||||
if (PurpurConfig.version < 10) {
|
||||
double oldValue = getDouble("mobs.skeleton.attributes.max-health", skeletonMaxHealth);
|
||||
@@ -2080,6 +2081,7 @@ public class PurpurWorldConfig {
|
||||
skeletonRidable = getBoolean("mobs.skeleton.ridable", skeletonRidable);
|
||||
skeletonRidableInWater = getBoolean("mobs.skeleton.ridable-in-water", skeletonRidableInWater);
|
||||
@@ -2444,6 +2445,7 @@ public class PurpurWorldConfig {
|
||||
skeletonTakeDamageFromWater = getBoolean("mobs.skeleton.takes-damage-from-water", skeletonTakeDamageFromWater);
|
||||
skeletonAlwaysDropExp = getBoolean("mobs.skeleton.always-drop-exp", skeletonAlwaysDropExp);
|
||||
skeletonHeadVisibilityPercent = getDouble("mobs.skeleton.head-visibility-percent", skeletonHeadVisibilityPercent);
|
||||
+ skeletonFeedWitherRoses = getInt("mobs.skeleton.feed-wither-roses", skeletonFeedWitherRoses);
|
||||
}
|
||||
|
||||
public double skeletonHorseMaxHealthMin = 15.0D;
|
||||
public boolean skeletonHorseRidableInWater = true;
|
||||
|
||||
Reference in New Issue
Block a user