mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: b75eeca0 Boost light task priority to ensure it doesnt hold up chunk loads 3d2bc848 Ensure VillagerTrades doesn't load async - fixes #3495 e470f1ef Add more information to Timing Reports f4a47db6 Improve Thread Pool usage to allow single threads for single cpu servers a4fe910f Fix sounds when using worldedit regen command 70ad51a8 Updated Upstream (Bukkit/CraftBukkit) d7cfa4fa Improve legacy format serialization more
53 lines
2.2 KiB
Diff
53 lines
2.2 KiB
Diff
From 9f40bd20e244a74b5840eff4e216421775c3bf51 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Sun, 12 May 2019 01:14:46 -0500
|
|
Subject: [PATCH] Pigs give saddle back
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/EntityPig.java | 12 ++++++++++++
|
|
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 2 ++
|
|
2 files changed, 14 insertions(+)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java
|
|
index e6a7f8ef37..d78666dbb2 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityPig.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityPig.java
|
|
@@ -135,6 +135,18 @@ public class EntityPig extends EntityAnimal {
|
|
return true;
|
|
}
|
|
if (hasSaddle() && !isVehicle()) {
|
|
+ // Purpur start
|
|
+ if (world.purpurConfig.pigGiveSaddleBack && entityhuman.isSneaking()) {
|
|
+ setSaddle(false);
|
|
+ if (!entityhuman.abilities.canInstantlyBuild) {
|
|
+ ItemStack saddle = new ItemStack(Items.SADDLE);
|
|
+ if (!entityhuman.inventory.pickup(saddle)) {
|
|
+ entityhuman.drop(saddle, false);
|
|
+ }
|
|
+ }
|
|
+ return true;
|
|
+ }
|
|
+ // Purpur end
|
|
entityhuman.startRiding(this);
|
|
return true;
|
|
}
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 091f30727f..85692500b4 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -413,9 +413,11 @@ public class PurpurWorldConfig {
|
|
|
|
public boolean pigRidable = false;
|
|
public boolean pigRidableInWater = false;
|
|
+ public boolean pigGiveSaddleBack = false;
|
|
private void pigSettings() {
|
|
pigRidable = getBoolean("mobs.pig.ridable", pigRidable);
|
|
pigRidableInWater = getBoolean("mobs.pig.ridable-in-water", pigRidableInWater);
|
|
+ pigGiveSaddleBack = getBoolean("mobs.pig.give-saddle-back", pigGiveSaddleBack);
|
|
}
|
|
|
|
public boolean pillagerRidable = false;
|
|
--
|
|
2.24.0
|
|
|