mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
975444e5d2
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: b76ceb4f5 PR-1235: Move EntityType return to base Entity class e795d7490 SPIGOT-7458: Exception when Entity CommandSender executes Vanilla command 46c7fc3b1 SPIGOT-7452: Player#openSign cannot edit d91e5aa0b SPIGOT-7447: Rewrite --forceUpgrade to minimise diff and properly handle CraftBukkit world layout 921ae06d6 Revert "SPIGOT-7447: Fix --forceUpgrade" Spigot Changes: 94e187b5 Rebuild patches 3bce7935 SPIGOT-7091: Update bungeecord-chat
60 lines
2.3 KiB
Diff
60 lines
2.3 KiB
Diff
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
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
|
@@ -0,0 +0,0 @@ public class Creeper extends Monster implements PowerableMob {
|
|
}
|
|
|
|
if (nbt.getBoolean("ignited")) {
|
|
- this.ignite();
|
|
+ this.entityData.set(Creeper.DATA_IS_IGNITED, true); // Paper - set directly to avoid firing event
|
|
}
|
|
|
|
}
|
|
@@ -0,0 +0,0 @@ public class Creeper extends Monster implements PowerableMob {
|
|
}
|
|
|
|
public void ignite() {
|
|
- this.entityData.set(Creeper.DATA_IS_IGNITED, 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.entityData.set(Creeper.DATA_IS_IGNITED, event.isIgnited());
|
|
+ }
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
|
|
public boolean canDropMobsSkull() {
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- 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 String toString() {
|
|
return "CraftCreeper";
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public void setIgnited(boolean ignited) {
|
|
+ getHandle().setIgnited(ignited);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public boolean isIgnited() {
|
|
+ return getHandle().isIgnited();
|
|
+ }
|
|
+ // Paper end
|
|
}
|