3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-10-08 11:10:06 +02:00
Dieser Commit ist enthalten in:
Matsv 2016-10-01 20:56:14 +02:00
Ursprung 3de961f641
Commit 7d3548956e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 97CEC2A2EA31350F
2 geänderte Dateien mit 32 neuen und 31 gelöschten Zeilen

Datei anzeigen

@ -160,10 +160,6 @@ public class Entity1_11Types {
return Optional.absent();
}
public boolean is(EntityType type) {
return this == type;
}
public boolean is(EntityType... types) {
for (EntityType type : types)
if (is(type))
@ -171,14 +167,18 @@ public class Entity1_11Types {
return false;
}
public boolean is(EntityType type) {
return this == type;
}
public boolean isOrHasParent(EntityType type) {
EntityType parent = this;
do {
if (parent == type)
if (parent.equals(type))
return true;
parent = type.getParent();
parent = parent.getParent();
} while (parent != null);
return false;

Datei anzeigen

@ -161,6 +161,7 @@ public class MetadataRewriter {
}
}
}
}
if (type.is(EntityType.ARMOR_STAND) && Via.getConfig().isHologramPatch()) {
Optional<Metadata> flags = getById(metadatas, 11);
Optional<Metadata> customName = getById(metadatas, 2);
@ -191,7 +192,6 @@ public class MetadataRewriter {
}
}
}
}
} catch (Exception e) {
metadatas.remove(metadata);
if (!Via.getConfig().isSuppressMetadataErrors() || Via.getManager().isDebug()) {
@ -201,6 +201,7 @@ public class MetadataRewriter {
}
}
}
}
public static Optional<Metadata> getById(List<Metadata> metadatas, int id) {