Paper/Spigot-API-Patches/0158-Here-s-Johnny.patch
Aikar 36f34f01c0
Updated Upstream (Bukkit/CraftBukkit)
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:
da9ef3c5 #496: Add methods to get/set ItemStacks in EquipmentSlots
3abebc9f #492: Let Tameable extend Animals rather than Entity
941111a0 #495: Expose ItemStack and hand used in PlayerShearEntityEvent
4fe19cae #494: InventoryView - Add missing Brewing FUEL_TIME

CraftBukkit Changes:
933e9094 #664: Add methods to get/set ItemStacks in EquipmentSlots
18722312 #662: Expose ItemStack and hand used in PlayerShearEntityEvent
2020-05-06 06:05:22 -04:00

43 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 12 Oct 2018 01:37:16 -0500
Subject: [PATCH] Here's Johnny!
diff --git a/src/main/java/org/bukkit/entity/Vindicator.java b/src/main/java/org/bukkit/entity/Vindicator.java
index b8ea68a8f420c1ba99c0621a15e654d3ee48c8d6..c5d9e76a6a4125eb0409967a57e3836b8f2d24a0 100644
--- a/src/main/java/org/bukkit/entity/Vindicator.java
+++ b/src/main/java/org/bukkit/entity/Vindicator.java
@@ -3,4 +3,30 @@ package org.bukkit.entity;
/**
* Represents a Vindicator.
*/
-public interface Vindicator extends Illager { }
+public interface Vindicator extends Illager {
+ // Paper start
+ /**
+ * Check if this Vindicator is set to Johnny mode.
+ * <p>
+ * When in Johnny mode the Vindicator will be hostile to any kind of mob, except
+ * for evokers, ghasts, illusioners and other vindicators. It will even be hostile
+ * to vexes. All mobs, except for endermites, phantoms, guardians, slimes and
+ * magma cubes, will try to attack the vindicator in return.
+ *
+ * @return True if in Johnny mode
+ */
+ boolean isJohnny();
+
+ /**
+ * Set this Vindicator's Johnny mode.
+ * <p>
+ * When in Johnny mode the Vindicator will be hostile to any kind of mob, except
+ * for evokers, ghasts, illusioners and other vindicators. It will even be hostile
+ * to vexes. All mobs, except for endermites, phantoms, guardians, slimes and
+ * magma cubes, will try to attack the vindicator in return.
+ *
+ * @param johnny True to enable Johnny mode
+ */
+ void setJohnny(boolean johnny);
+ // Paper end
+}