mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Updated Upstream (Paper & Pufferfish)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@e4f5e1c Bump netty Pufferfish Changes: pufferfish-gg/Pufferfish@a8543a4 #33 Fix anti-xray related crash bug pufferfish-gg/Pufferfish@aefcb1a Updated Upstream (Paper)
This commit is contained in:
@@ -1,48 +0,0 @@
|
||||
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/world/entity/animal/Pig.java b/src/main/java/net/minecraft/world/entity/animal/Pig.java
|
||||
index a02476bdc34a4e3e0389abaf08687393cc3bff97..d4348bd3877813295d01d0171fee2d59981734b9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Pig.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Pig.java
|
||||
@@ -174,6 +174,17 @@ public class Pig extends Animal implements ItemSteerable, Saddleable {
|
||||
public InteractionResult mobInteract(Player player, InteractionHand hand) {
|
||||
boolean flag = this.isFood(player.getItemInHand(hand));
|
||||
|
||||
+ if (level.purpurConfig.pigGiveSaddleBack && player.isSecondaryUseActive() && !flag && isSaddled() && !isVehicle()) {
|
||||
+ this.steering.setSaddle(false);
|
||||
+ if (!player.getAbilities().instabuild) {
|
||||
+ ItemStack saddle = new ItemStack(Items.SADDLE);
|
||||
+ if (!player.getInventory().add(saddle)) {
|
||||
+ player.drop(saddle, false);
|
||||
+ }
|
||||
+ }
|
||||
+ return InteractionResult.SUCCESS;
|
||||
+ }
|
||||
+
|
||||
if (!flag && this.isSaddled() && !this.isVehicle() && !player.isSecondaryUseActive()) {
|
||||
if (!this.level.isClientSide) {
|
||||
player.startRiding(this);
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index fcdfad2d539a65365e05ce9d49fd90e6febabecd..3e7b24a03cb84255d05d8262fdce814731ba2cf5 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -888,6 +888,7 @@ public class PurpurWorldConfig {
|
||||
public boolean pigRidableInWater = false;
|
||||
public boolean pigControllable = true;
|
||||
public double pigMaxHealth = 10.0D;
|
||||
+ public boolean pigGiveSaddleBack = false;
|
||||
private void pigSettings() {
|
||||
pigRidable = getBoolean("mobs.pig.ridable", pigRidable);
|
||||
pigRidableInWater = getBoolean("mobs.pig.ridable-in-water", pigRidableInWater);
|
||||
@@ -898,6 +899,7 @@ public class PurpurWorldConfig {
|
||||
set("mobs.pig.attributes.max_health", oldValue);
|
||||
}
|
||||
pigMaxHealth = getDouble("mobs.pig.attributes.max_health", pigMaxHealth);
|
||||
+ pigGiveSaddleBack = getBoolean("mobs.pig.give-saddle-back", pigGiveSaddleBack);
|
||||
}
|
||||
|
||||
public boolean piglinRidable = false;
|
||||
Reference in New Issue
Block a user