2018-08-27 09:01:09 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
|
|
Date: Fri, 24 Aug 2018 11:50:26 -0500
|
|
|
|
Subject: [PATCH] Add More Creeper API
|
|
|
|
|
|
|
|
|
2021-03-16 08:19:45 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java b/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java
|
2020-05-06 11:48:49 +02:00
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
2021-03-16 08:19:45 +01:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java
|
2018-08-27 09:01:09 +02:00
|
|
|
@@ -0,0 +0,0 @@ public class EntityCreeper extends EntityMonster {
|
|
|
|
}
|
|
|
|
|
2019-06-25 03:47:58 +02:00
|
|
|
public void ignite() {
|
|
|
|
- this.datawatcher.set(EntityCreeper.d, true);
|
|
|
|
+ // Paper start
|
|
|
|
+ setIgnited(true);
|
|
|
|
+ }
|
|
|
|
+
|
2018-08-27 09:01:09 +02:00
|
|
|
+ public void setIgnited(boolean ignited) {
|
2018-10-07 18:58:09 +02:00
|
|
|
+ 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()) {
|
2019-05-05 10:33:44 +02:00
|
|
|
+ this.datawatcher.set(EntityCreeper.d, event.isIgnited());
|
2018-10-07 18:58:09 +02:00
|
|
|
+ }
|
|
|
|
+ }
|
2018-08-27 09:01:09 +02:00
|
|
|
+ // 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
|
2020-05-06 11:48:49 +02:00
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
2018-08-27 09:01:09 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
|
|
|
|
@@ -0,0 +0,0 @@ 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
|
|
|
|
}
|