3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-26 00:00:28 +01:00

Check if blank, not empty

Dieser Commit ist enthalten in:
FlorianMichael 2024-10-31 19:31:34 +01:00 committet von Nassim Jahnke
Ursprung bc4ad7faa3
Commit 2b840abfef
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F

Datei anzeigen

@ -565,7 +565,7 @@ public final class BlockItemPacketRewriter1_21_2 extends StructuredItemRewriter<
dataContainer.replace(StructuredDataKey.FIRE_RESISTANT, StructuredDataKey.DAMAGE_RESISTANT, fireResistant -> new DamageResistant("minecraft:is_fire"));
dataContainer.replace(StructuredDataKey.LOCK, tag -> {
final String lock = ((StringTag) tag).getValue();
if (lock.isEmpty()) {
if (lock.isBlank()) {
// Previously ignored empty values since the data was arbitrary, custom_name doesn't accept empty values
return null;
}