mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-15 07:01:36 +08:00
SPIGOT-1208: Don't skip ticks for explosive creepers.
This commit is contained in:
parent
7aa4900879
commit
b7124e06be
@ -1,4 +1,4 @@
|
||||
From 6e6193c0e175991dcb0e464d39c193c9aa46f27e Mon Sep 17 00:00:00 2001
|
||||
From 3d3e6d4cc0b9781591c399fdd5a187fb21f06348 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sun, 2 Jun 2013 15:10:56 +1000
|
||||
Subject: [PATCH] Skeleton API Implementations
|
||||
@ -25,7 +25,7 @@ index 82a41b0..5377181 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 554e3b7..e3db8e1 100644
|
||||
index 2bbbdd3..ff01a2d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1380,4 +1380,14 @@ public class CraftWorld implements World {
|
||||
@ -64,10 +64,10 @@ index dca8520..bf48e6e 100644
|
||||
+ // Spigot end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 8f5c058..93193ac 100644
|
||||
index 5693e3a..4c0ac67 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -537,4 +537,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -538,4 +538,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
public void setOp(boolean value) {
|
||||
perm.setOp(value);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6fc7e7a2d7a52bf18cc053d9e045689c15e04c59 Mon Sep 17 00:00:00 2001
|
||||
From c32e02f99891c045b408e3b5b922fa1bda94b672 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <git@md-5.net>
|
||||
Date: Mon, 14 Apr 2014 10:38:04 +1000
|
||||
Subject: [PATCH] Obfuscation Helpers
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] Obfuscation Helpers
|
||||
Provides several friendly named methods which map to a obfuscated method. Obfuscated methods which are used frequently should be added to this file to ease with updates to new Minecraft versions.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b99d043..f4d8254 100644
|
||||
index 352409d..b79a2e7 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1286,6 +1286,12 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
@@ -1287,6 +1287,12 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0784a5cd4f1442f8e9f0627010215946b9832ac4 Mon Sep 17 00:00:00 2001
|
||||
From aeb61b3275fa914e67e52712e4ef290120fb2226 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 10 Jan 2013 00:18:11 -0500
|
||||
Subject: [PATCH] Spigot Timings
|
||||
@ -242,7 +242,7 @@ index 360d2ee..b8920fd 100644
|
||||
|
||||
this.world.methodProfiler.b();
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f4d8254..e42c0ba 100644
|
||||
index b79a2e7..5d1aa0b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -45,6 +45,7 @@ import jline.console.ConsoleReader;
|
||||
@ -253,7 +253,7 @@ index f4d8254..e42c0ba 100644
|
||||
// CraftBukkit end
|
||||
|
||||
public abstract class MinecraftServer implements Runnable, ICommandListener, IAsyncTaskHandler, IMojangStatistics {
|
||||
@@ -615,6 +616,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
@@ -616,6 +617,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
protected void z() {}
|
||||
|
||||
protected void A() throws ExceptionWorldConflict { // CraftBukkit - added throws
|
||||
@ -261,7 +261,7 @@ index f4d8254..e42c0ba 100644
|
||||
long i = System.nanoTime();
|
||||
|
||||
++this.ticks;
|
||||
@@ -641,10 +643,12 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
@@ -642,10 +644,12 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
}
|
||||
|
||||
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
|
||||
@ -274,7 +274,7 @@ index f4d8254..e42c0ba 100644
|
||||
}
|
||||
|
||||
this.methodProfiler.a("tallying");
|
||||
@@ -661,6 +665,8 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
@@ -662,6 +666,8 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
|
||||
this.methodProfiler.b();
|
||||
this.methodProfiler.b();
|
||||
@ -283,7 +283,7 @@ index f4d8254..e42c0ba 100644
|
||||
}
|
||||
|
||||
public void B() {
|
||||
@@ -675,16 +681,23 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
@@ -676,16 +682,23 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
|
||||
this.methodProfiler.c("levels");
|
||||
|
||||
@ -307,7 +307,7 @@ index f4d8254..e42c0ba 100644
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
if (this.ticks % 20 == 0) {
|
||||
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
||||
@@ -692,6 +705,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
@@ -693,6 +706,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean("doDaylightCycle"))); // Add support for per player time
|
||||
}
|
||||
}
|
||||
@ -315,7 +315,7 @@ index f4d8254..e42c0ba 100644
|
||||
|
||||
int i;
|
||||
|
||||
@@ -715,7 +729,9 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
@@ -716,7 +730,9 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
CrashReport crashreport;
|
||||
|
||||
try {
|
||||
@ -325,7 +325,7 @@ index f4d8254..e42c0ba 100644
|
||||
} catch (Throwable throwable) {
|
||||
crashreport = CrashReport.a(throwable, "Exception ticking world");
|
||||
worldserver.a(crashreport);
|
||||
@@ -723,7 +739,9 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
@@ -724,7 +740,9 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
}
|
||||
|
||||
try {
|
||||
@ -335,7 +335,7 @@ index f4d8254..e42c0ba 100644
|
||||
} catch (Throwable throwable1) {
|
||||
crashreport = CrashReport.a(throwable1, "Exception ticking world entities");
|
||||
worldserver.a(crashreport);
|
||||
@@ -732,7 +750,9 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
@@ -733,7 +751,9 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
|
||||
this.methodProfiler.b();
|
||||
this.methodProfiler.a("tracker");
|
||||
@ -345,7 +345,7 @@ index f4d8254..e42c0ba 100644
|
||||
this.methodProfiler.b();
|
||||
this.methodProfiler.b();
|
||||
// } // CraftBukkit
|
||||
@@ -741,14 +761,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
@@ -742,14 +762,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
}
|
||||
|
||||
this.methodProfiler.c("connection");
|
||||
@ -529,7 +529,7 @@ index 61db17c..e34964f 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 9c0bcfe..8a1165c 100644
|
||||
index bb0e146..f300850 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -223,10 +223,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@ -599,7 +599,7 @@ index d296924..a8a8e64 100644
|
||||
|
||||
public Spigot spigot()
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 07d1ee4..fc2a1ab 100644
|
||||
index dc06dcb..59eb83e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -257,9 +257,11 @@ public class CraftWorld implements World {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5241276f74e49fc7d3c71cdfce4910076885633d Mon Sep 17 00:00:00 2001
|
||||
From e1f60c92d7fecfb32ad0a17e038abe5bbfca92f4 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 3 Feb 2013 05:10:21 -0500
|
||||
Subject: [PATCH] Entity Activation Range
|
||||
@ -125,7 +125,7 @@ index 04863b3..3359160 100644
|
||||
super(world);
|
||||
this.j = 10.0D;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||
index aa36bf2..3c7814d 100644
|
||||
index 34820c5..d7be6c2 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||
@@ -5,6 +5,15 @@ public class EntityFireworks extends Entity {
|
||||
@ -238,10 +238,10 @@ index 558574f..41d2d87 100644
|
||||
public static final HashMap<String, CustomTimingsHandler> pluginTaskTimingMap = new HashMap<String, CustomTimingsHandler>();
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
new file mode 100644
|
||||
index 0000000..d3f4af1
|
||||
index 0000000..3da76ff
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -0,0 +1,284 @@
|
||||
@@ -0,0 +1,289 @@
|
||||
+package org.spigotmc;
|
||||
+
|
||||
+import java.util.ArrayList;
|
||||
@ -255,6 +255,7 @@ index 0000000..d3f4af1
|
||||
+import net.minecraft.server.EntityArrow;
|
||||
+import net.minecraft.server.EntityComplexPart;
|
||||
+import net.minecraft.server.EntityCreature;
|
||||
+import net.minecraft.server.EntityCreeper;
|
||||
+import net.minecraft.server.EntityEnderCrystal;
|
||||
+import net.minecraft.server.EntityEnderDragon;
|
||||
+import net.minecraft.server.EntityFireball;
|
||||
@ -274,6 +275,7 @@ index 0000000..d3f4af1
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import net.minecraft.server.World;
|
||||
+import org.bukkit.craftbukkit.SpigotTimings;
|
||||
+import org.bukkit.entity.Creeper;
|
||||
+
|
||||
+public class ActivationRange
|
||||
+{
|
||||
@ -475,6 +477,9 @@ index 0000000..d3f4af1
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ if (entity instanceof EntityCreeper && ((EntityCreeper) entity).cn()) { // isExplosive
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
|
Loading…
Reference in New Issue
Block a user