mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: 821ce25d9 Significantly improve performance of the end generation 2b2e4fd65 Add Wandering Trader spawn rate config options 7263cbca7 [CI-SKIP] [Auto] Rebuild Patches 1c63aff6d Villager resetOffers API 8d8d74a5f Patch 2 references an invalid variable e6d7bdca1 [CI-SKIP] fixed sed -i for bsd sed (#4782) 7ae47d4eb [CI-SKIP] Remove Waving banner fix (#4786)
This commit is contained in:
45
patches/server/0046-Pigs-give-saddle-back.patch
Normal file
45
patches/server/0046-Pigs-give-saddle-back.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
From 0000000000000000000000000000000000000000 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
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java
|
||||
index ee94c2827..7f52c3923 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPig.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPig.java
|
||||
@@ -109,6 +109,18 @@ public class EntityPig extends EntityAnimal implements ISteerable, ISaddleable {
|
||||
|
||||
if (!flag && this.hasSaddle() && !this.isVehicle() && !entityhuman.eq()) {
|
||||
if (!this.world.isClientSide) {
|
||||
+ // Purpur start
|
||||
+ if (world.purpurConfig.pigGiveSaddleBack && entityhuman.isSneaking()) {
|
||||
+ this.saddleStorage.setSaddle(false);
|
||||
+ if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
+ ItemStack saddle = new ItemStack(Items.SADDLE);
|
||||
+ if (!entityhuman.inventory.pickup(saddle)) {
|
||||
+ entityhuman.drop(saddle, false);
|
||||
+ }
|
||||
+ }
|
||||
+ return EnumInteractionResult.SUCCESS;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
entityhuman.startRiding(this);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index d8bd7ffd5..7d6c624ac 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -178,6 +178,11 @@ public class PurpurWorldConfig {
|
||||
ironGolemCanSwim = getBoolean("mobs.iron_golem.can-swim", ironGolemCanSwim);
|
||||
}
|
||||
|
||||
+ public boolean pigGiveSaddleBack = false;
|
||||
+ private void pigSettings() {
|
||||
+ pigGiveSaddleBack = getBoolean("mobs.pig.give-saddle-back", pigGiveSaddleBack);
|
||||
+ }
|
||||
+
|
||||
public String polarBearBreedableItemString = "";
|
||||
public Item polarBearBreedableItem = null;
|
||||
private void polarBearSettings() {
|
||||
Reference in New Issue
Block a user