aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches-Unmapped/0275-Add-More-Creeper-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Spigot-Server-Patches-Unmapped/0275-Add-More-Creeper-API.patch')
-rw-r--r--Spigot-Server-Patches-Unmapped/0275-Add-More-Creeper-API.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/Spigot-Server-Patches-Unmapped/0275-Add-More-Creeper-API.patch b/Spigot-Server-Patches-Unmapped/0275-Add-More-Creeper-API.patch
new file mode 100644
index 0000000000..faced7350e
--- /dev/null
+++ b/Spigot-Server-Patches-Unmapped/0275-Add-More-Creeper-API.patch
@@ -0,0 +1,49 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: BillyGalbreath <[email protected]>
+Date: Fri, 24 Aug 2018 11:50:26 -0500
+Subject: [PATCH] Add More Creeper API
+
+
+diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java b/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java
+index cbb973e077e04e5221bcc837f434b7093bdbcc2a..b47f71ca1f1c8bbd1a521836d9cb5d676a33ec76 100644
+--- a/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java
++++ b/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java
+@@ -290,7 +290,18 @@ public class EntityCreeper extends EntityMonster {
+ }
+
+ public void ignite() {
+- this.datawatcher.set(EntityCreeper.d, true);
++ // Paper start
++ setIgnited(true);
++ }
++
++ public void setIgnited(boolean ignited) {
++ if (isIgnited() != ignited) {
++ com.destroystokyo.paper.event.entity.CreeperIgniteEvent event = new com.destroystokyo.paper.event.entity.CreeperIgniteEvent((org.bukkit.entity.Creeper) getBukkitEntity(), ignited);
++ if (event.callEvent()) {
++ this.datawatcher.set(EntityCreeper.d, event.isIgnited());
++ }
++ }
++ // Paper end
+ }
+
+ public boolean canCauseHeadDrop() {
+diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
+index 167b8f0c742be07ee0c5d698e04d6e29addda70c..629518d4bb314a1d46e32397b6fb7b90bce94e83 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
+@@ -101,4 +101,14 @@ public class CraftCreeper extends CraftMonster implements Creeper {
+ public EntityType getType() {
+ return EntityType.CREEPER;
+ }
++
++ // Paper start
++ public void setIgnited(boolean ignited) {
++ getHandle().setIgnited(ignited);
++ }
++
++ public boolean isIgnited() {
++ return getHandle().isIgnited();
++ }
++ // Paper end
+ }