geforkt von Mirrors/Paper
b62dfa0bf9
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 39ce5d3a SPIGOT-4399: ItemMeta.equals broken with AttributeModifiers CraftBukkit Changes:1cf8b5dc
SPIGOT-4400: Populators running on existing chunks116cb9a1
SPIGOT-4399: Add attribute modifier equality test5ee1c18a
SPIGOT-4398: Set ASM7_EXPERIMENTAL flag
66 Zeilen
2.9 KiB
Diff
66 Zeilen
2.9 KiB
Diff
From be7705d2b048f5b357227720f7a2d86dcd4dd661 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Sat, 10 Dec 2016 16:24:06 -0500
|
|
Subject: [PATCH] Improve the Saddle API for Horses
|
|
|
|
Not all horses with Saddles have armor. This lets us break up the horses with saddles
|
|
and access their saddle state separately from an interface shared with Armor.
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
|
index 14d0416802..e56bef3340 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
|
@@ -6,6 +6,7 @@ import net.minecraft.server.EntityHorseAbstract;
|
|
import org.apache.commons.lang.Validate;
|
|
import org.bukkit.craftbukkit.CraftServer;
|
|
import org.bukkit.craftbukkit.inventory.CraftInventoryAbstractHorse;
|
|
+import org.bukkit.craftbukkit.inventory.CraftSaddledInventory;
|
|
import org.bukkit.entity.AbstractHorse;
|
|
import org.bukkit.entity.AnimalTamer;
|
|
import org.bukkit.entity.Horse;
|
|
@@ -92,6 +93,6 @@ public abstract class CraftAbstractHorse extends CraftAnimals implements Abstrac
|
|
|
|
@Override
|
|
public AbstractHorseInventory getInventory() {
|
|
- return new CraftInventoryAbstractHorse(getHandle().inventoryChest);
|
|
+ return new CraftSaddledInventory(getHandle().inventoryChest);
|
|
}
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java
|
|
index 173818e682..2f68524049 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java
|
|
@@ -4,7 +4,7 @@ import net.minecraft.server.IInventory;
|
|
import org.bukkit.inventory.HorseInventory;
|
|
import org.bukkit.inventory.ItemStack;
|
|
|
|
-public class CraftInventoryHorse extends CraftInventoryAbstractHorse implements HorseInventory {
|
|
+public class CraftInventoryHorse extends CraftSaddledInventory implements HorseInventory {
|
|
|
|
public CraftInventoryHorse(IInventory inventory) {
|
|
super(inventory);
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java
|
|
new file mode 100644
|
|
index 0000000000..99cfbaf90b
|
|
--- /dev/null
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java
|
|
@@ -0,0 +1,15 @@
|
|
+package org.bukkit.craftbukkit.inventory;
|
|
+
|
|
+import net.minecraft.server.IInventory;
|
|
+
|
|
+import org.bukkit.inventory.AbstractHorseInventory;
|
|
+import org.bukkit.inventory.ItemStack;
|
|
+import org.bukkit.inventory.SaddledHorseInventory;
|
|
+
|
|
+public class CraftSaddledInventory extends CraftInventoryAbstractHorse implements SaddledHorseInventory {
|
|
+
|
|
+ public CraftSaddledInventory(IInventory inventory) {
|
|
+ super(inventory);
|
|
+ }
|
|
+
|
|
+}
|
|
--
|
|
2.19.0
|
|
|