Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 19:40:07 +01:00
c97ce029e9
PaperMC believes that 1.16.2 is now ready for general release as we fixed the main issue plagueing the 1.16.x release, the MapLike data conversion issues. Until now, it was not safe for a server to convert a world to 1.16.2 without data conversion issues around villages and potentially other things. If you did, those MapLike errors meant something went wrong. This is now resolved. Big thanks to all those that helped, notably @BillyGalbreath and @Proximyst who did large parts of the update process with me. Please as always, backup your worlds and test before updating to 1.16.2! If you update to 1.16.2, there is no going back to an older build than this. --------------------------------- Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com> Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com> Co-authored-by: krolik-exe <69214078+krolik-exe@users.noreply.github.com> Co-authored-by: BillyGalbreath <BillyGalbreath@users.noreply.github.com> Co-authored-by: stonar96 <minecraft.stonar96@gmail.com> Co-authored-by: Shane Freeder <theboyetronic@gmail.com> Co-authored-by: Jason <jasonpenilla2@me.com> Co-authored-by: kashike <kashike@vq.lc> Co-authored-by: Aurora <21148213+aurorasmiles@users.noreply.github.com> Co-authored-by: KennyTV <kennytv@t-online.de> Co-authored-by: commandblockguy <commandblockguy1@gmail.com> Co-authored-by: DigitalRegent <misterwener@gmail.com> Co-authored-by: ishland <ishlandmc@yeah.net>
63 Zeilen
2.6 KiB
Diff
63 Zeilen
2.6 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/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java
|
|
index 055272e49ff522a009fcd335e2183172ada11c35..ad422dfafbfcf62f6aa483dafa9764c274414d8d 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityCreeper.java
|
|
@@ -14,7 +14,7 @@ public class EntityCreeper extends EntityMonster {
|
|
private static final DataWatcherObject<Boolean> POWERED = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.i);
|
|
private static final DataWatcherObject<Boolean> d = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.i); private static final DataWatcherObject<Boolean> isIgnitedDW = d; // Paper OBFHELPER
|
|
private int bo;
|
|
- private int fuseTicks;
|
|
+ public int fuseTicks; // Paper - public
|
|
public int maxFuseTicks = 30;
|
|
public int explosionRadius = 3;
|
|
private int bs;
|
|
@@ -254,7 +254,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 896405148c489011e4f06c43fe961045b7426377..075a5e77e2c2a873b048b9886d630e71238988da 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
|
|
@@ -88,4 +88,18 @@ 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();
|
|
+ }
|
|
+
|
|
+ public int getFuseTicks() {
|
|
+ return getHandle().fuseTicks;
|
|
+ }
|
|
+ // Paper end
|
|
}
|