mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 16:50:17 +01:00
Ensure Creeper fuseTicks are still incremented
Fixes GH-1389 Because we are no longer enabling creepers to rapidly change status every tick, in order to prevent event spam, their datawatcher value ends up negative. This datawatcher value is used to increment the fuseTicks within the creeper tick. Because the value is negative, it is constantly zero'd and therefore never incremented, instead acting the same as creepers that aren't ignited. We can just as easily increment this ourselves when the creeper is ignited, so that's what we'll do.
This commit is contained in:
parent
aabff6632d
commit
9f87cdf082
1 changed files with 12 additions and 3 deletions
|
@ -1,11 +1,11 @@
|
||||||
From db14fd6e2142e094d692eee5ad0c8210e78d4fcd Mon Sep 17 00:00:00 2001
|
From b68ac5de0a95fe88718aaaf7e2c4621543a836da Mon Sep 17 00:00:00 2001
|
||||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||||
Date: Fri, 24 Aug 2018 11:50:26 -0500
|
Date: Fri, 24 Aug 2018 11:50:26 -0500
|
||||||
Subject: [PATCH] Add More Creeper API
|
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
|
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java
|
||||||
index 19022b6e24..1729297766 100644
|
index 19022b6e2..321e00cef 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
|
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
|
||||||
+++ b/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 {
|
@@ -14,7 +14,7 @@ public class EntityCreeper extends EntityMonster {
|
||||||
|
@ -33,6 +33,15 @@ index 19022b6e24..1729297766 100644
|
||||||
|
|
||||||
int i = this.dz();
|
int i = this.dz();
|
||||||
|
|
||||||
|
@@ -102,7 +105,7 @@ public class EntityCreeper extends EntityMonster {
|
||||||
|
this.a(SoundEffects.ENTITY_CREEPER_PRIMED, 1.0F, 0.5F);
|
||||||
|
}
|
||||||
|
|
||||||
|
- this.fuseTicks += i;
|
||||||
|
+ this.fuseTicks += this.isIgnited() ? 1 : i; // Paper - workaround now that we aren't letting it get re-set every tick - GH-1389
|
||||||
|
if (this.fuseTicks < 0) {
|
||||||
|
this.fuseTicks = 0;
|
||||||
|
}
|
||||||
@@ -151,12 +154,21 @@ public class EntityCreeper extends EntityMonster {
|
@@ -151,12 +154,21 @@ public class EntityCreeper extends EntityMonster {
|
||||||
return LootTables.x;
|
return LootTables.x;
|
||||||
}
|
}
|
||||||
|
@ -82,7 +91,7 @@ index 19022b6e24..1729297766 100644
|
||||||
|
|
||||||
public boolean canCauseHeadDrop() {
|
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
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
|
||||||
index ffebb54caa..ab2b20a0d4 100644
|
index ffebb54ca..ab2b20a0d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
|
||||||
@@ -76,4 +76,22 @@ public class CraftCreeper extends CraftMonster implements Creeper {
|
@@ -76,4 +76,22 @@ public class CraftCreeper extends CraftMonster implements Creeper {
|
||||||
|
|
Loading…
Reference in a new issue