Check if blank, not empty

This commit is contained in:
FlorianMichael 2024-10-31 19:31:34 +01:00 committed by Nassim Jahnke
parent bc4ad7faa3
commit 2b840abfef
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F

View File

@ -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.FIRE_RESISTANT, StructuredDataKey.DAMAGE_RESISTANT, fireResistant -> new DamageResistant("minecraft:is_fire"));
dataContainer.replace(StructuredDataKey.LOCK, tag -> { dataContainer.replace(StructuredDataKey.LOCK, tag -> {
final String lock = ((StringTag) tag).getValue(); 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 // Previously ignored empty values since the data was arbitrary, custom_name doesn't accept empty values
return null; return null;
} }