Archiviert
13
0

Skip dead entities in getEntity(UUID) API

Dieser Commit ist enthalten in:
Zach Brown 2016-03-30 09:41:12 -05:00
Ursprung 6462bb4e20
Commit a785a9460e

Datei anzeigen

@ -1,11 +1,11 @@
From eab823e7ef24a1d4a79f9cdc6efd9f7e169f7b2c Mon Sep 17 00:00:00 2001
From 0e1abba6b1186ab06e0ed8ecf5ceb00c1494c2d3 Mon Sep 17 00:00:00 2001
From: DemonWav <demonwav@gmail.com>
Date: Wed, 30 Mar 2016 01:20:11 -0500
Subject: [PATCH] Add getEntity by UUID API
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d628a32..d7ca53b 100644
index d628a32..a785412 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1622,4 +1622,17 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@ -18,7 +18,7 @@ index d628a32..d7ca53b 100644
+ Entity entity;
+ for (WorldServer world : worldServer) {
+ entity = world.getEntity(uuid);
+ if (entity != null) {
+ if (entity != null && !entity.dead) {
+ return entity;
+ }
+ }