Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 00:00:41 +01:00
Potion -> Effect from the last commit
Dieser Commit ist enthalten in:
Ursprung
02387dc6e2
Commit
682e4b3edd
@ -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;
|
||||
};
|
||||
}
|
||||
|
@ -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);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren