Insert Locale.ROOT into all case change methods

This commit is contained in:
Kenzie Togami
2019-05-01 00:03:37 -07:00
committed by Kenzie Togami
parent b47c70025e
commit 13a8c480e3
26 changed files with 119 additions and 76 deletions

View File

@ -22,6 +22,7 @@ package com.sk89q.worldedit.world.block;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.registry.state.Property;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;
@ -92,9 +93,11 @@ public interface BlockStateHolder<B extends BlockStateHolder<B>> {
if (getStates().isEmpty()) {
return this.getBlockType().getId();
} else {
String properties =
getStates().entrySet().stream().map(entry -> entry.getKey().getName() + "=" + entry.getValue().toString().toLowerCase()).collect(Collectors.joining(
","));
String properties = getStates().entrySet().stream()
.map(entry -> entry.getKey().getName()
+ "="
+ entry.getValue().toString().toLowerCase(Locale.ROOT))
.collect(Collectors.joining(","));
return this.getBlockType().getId() + "[" + properties + "]";
}
}