mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@2040c1e Player Flying Fall Damage API (#5357) PaperMC/Paper@fa42c68 Expose pre-collision moving velocity to VehicleBlockCollisionEvent (#8457) PaperMC/Paper@90750a6 Rework filtering spawn egg and tile entity nbt config (#6613)
40 lines
2.5 KiB
Diff
40 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <blake.galbreath@gmail.com>
|
|
Date: Fri, 31 Dec 2021 06:03:12 -0600
|
|
Subject: [PATCH] Shearing jeb produces random color wool
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Sheep.java b/src/main/java/net/minecraft/world/entity/animal/Sheep.java
|
|
index 492316925f06d1bc7950c6b9d37615b2bd0138fd..99dbbe59116ae4fbdfb506a72959e3a6a0d00548 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/Sheep.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Sheep.java
|
|
@@ -314,7 +314,7 @@ public class Sheep extends Animal implements Shearable {
|
|
|
|
for (int j = 0; j < i; ++j) {
|
|
this.forceDrops = true; // CraftBukkit
|
|
- ItemEntity entityitem = this.spawnAtLocation((ItemLike) Sheep.ITEM_BY_DYE.get(this.getColor()), 1);
|
|
+ ItemEntity entityitem = this.spawnAtLocation((ItemLike) Sheep.ITEM_BY_DYE.get(this.level.purpurConfig.sheepShearJebRandomColor && hasCustomName() && getCustomName().getString().equals("jeb_") ? DyeColor.random(this.level.random) : this.getColor()), 1); // Purpur
|
|
this.forceDrops = false; // CraftBukkit
|
|
|
|
if (entityitem != null) {
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
index d7176a0a2732cbe9b14b0ad852a3531f4a47c3f5..3c97e3df12897a8aee762314e91ebcd45ef6ce4c 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -2260,6 +2260,7 @@ public class PurpurWorldConfig {
|
|
public boolean sheepBypassMobGriefing = false;
|
|
public boolean sheepTakeDamageFromWater = false;
|
|
public boolean sheepAlwaysDropExp = false;
|
|
+ public boolean sheepShearJebRandomColor = false;
|
|
private void sheepSettings() {
|
|
sheepRidable = getBoolean("mobs.sheep.ridable", sheepRidable);
|
|
sheepRidableInWater = getBoolean("mobs.sheep.ridable-in-water", sheepRidableInWater);
|
|
@@ -2274,6 +2275,7 @@ public class PurpurWorldConfig {
|
|
sheepBypassMobGriefing = getBoolean("mobs.sheep.bypass-mob-griefing", sheepBypassMobGriefing);
|
|
sheepTakeDamageFromWater = getBoolean("mobs.sheep.takes-damage-from-water", sheepTakeDamageFromWater);
|
|
sheepAlwaysDropExp = getBoolean("mobs.sheep.always-drop-exp", sheepAlwaysDropExp);
|
|
+ sheepShearJebRandomColor = getBoolean("mobs.sheep.jeb-shear-random-color", sheepShearJebRandomColor);
|
|
}
|
|
|
|
public boolean shulkerRidable = false;
|