3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-10-03 08:21:06 +02:00

Potion -> Effect from the last commit

Dieser Commit ist enthalten in:
Camotoy 2021-10-11 21:16:17 -04:00
Ursprung 02387dc6e2
Commit 682e4b3edd
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F
2 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -56,7 +56,7 @@ import java.util.*;
@Translator(packet = ServerDeclareCommandsPacket.class)
public class JavaDeclareCommandsTranslator extends PacketTranslator<ServerDeclareCommandsPacket> {
private static final String[] ALL_POTION_IDENTIFIERS = EntityUtils.getAllPotionIdentifiers();
private static final String[] ALL_EFFECT_IDENTIFIERS = EntityUtils.getAllEffectIdentifiers();
private static final String[] ENUM_BOOLEAN = {"true", "false"};
private static final String[] VALID_COLORS;
private static final String[] VALID_SCOREBOARD_SLOTS;
@ -223,7 +223,7 @@ public class JavaDeclareCommandsTranslator extends PacketTranslator<ServerDeclar
case ENTITY_SUMMON -> EntityType.ALL_JAVA_IDENTIFIERS;
case COLOR -> VALID_COLORS;
case SCOREBOARD_SLOT -> VALID_SCOREBOARD_SLOTS;
case MOB_EFFECT -> ALL_POTION_IDENTIFIERS;
case MOB_EFFECT -> ALL_EFFECT_IDENTIFIERS;
default -> CommandParam.STRING;
};
}

Datei anzeigen

@ -40,9 +40,9 @@ import java.util.Locale;
public final class EntityUtils {
/**
* @return a new String array of all known potion identifiers
* @return a new String array of all known effect identifiers
*/
public static String[] getAllPotionIdentifiers() {
public static String[] getAllEffectIdentifiers() {
String[] identifiers = new String[Effect.VALUES.length];
for (int i = 0; i < Effect.VALUES.length; i++) {
identifiers[i] = "minecraft:" + Effect.VALUES[i].name().toLowerCase(Locale.ROOT);