mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 12:06:41 +00:00
Use Locale.ROOT
This commit is contained in:
@ -41,6 +41,7 @@ import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
@ -895,7 +896,7 @@ public final class BlockTypes {
|
||||
for (Field field : oldFields) {
|
||||
if (field.getType() == int.class) {
|
||||
int internalId = field.getInt(null);
|
||||
String id = "minecraft:" + field.getName().toLowerCase();
|
||||
String id = "minecraft:" + field.getName().toLowerCase(Locale.ROOT);
|
||||
String defaultState = blockMap.remove(id);
|
||||
if (defaultState == null) {
|
||||
if (internalId != 0) {
|
||||
@ -927,7 +928,7 @@ public final class BlockTypes {
|
||||
|
||||
// Add to $Registry
|
||||
for (BlockType type : values) {
|
||||
$REGISTRY.put(type.getId().toLowerCase(), type);
|
||||
$REGISTRY.put(type.getId().toLowerCase(Locale.ROOT), type);
|
||||
}
|
||||
states = stateList.toArray(new BlockState[stateList.size()]);
|
||||
|
||||
@ -975,7 +976,7 @@ public final class BlockTypes {
|
||||
*/
|
||||
|
||||
public static BlockType parse(final String type) throws InputParseException {
|
||||
final String inputLower = type.toLowerCase();
|
||||
final String inputLower = type.toLowerCase(Locale.ROOT);
|
||||
String input = inputLower;
|
||||
|
||||
if (!input.split("\\[", 2)[0].contains(":")) input = "minecraft:" + input;
|
||||
|
Reference in New Issue
Block a user