Possible solution for #1798
This commit is contained in:
parent
6114f45d9b
commit
92b3bc6651
5 changed files with 27 additions and 20 deletions
|
@ -32,6 +32,7 @@ import net.minecraft.world.World;
|
|||
import reborncore.api.blockentity.IMachineGuiHandler;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public enum EGui implements IMachineGuiHandler {
|
||||
|
@ -93,7 +94,7 @@ public enum EGui implements IMachineGuiHandler {
|
|||
|
||||
public static EGui byID(Identifier resourceLocation){
|
||||
return Arrays.stream(values())
|
||||
.filter(eGui -> eGui.name().toLowerCase().equals(resourceLocation.getPath()))
|
||||
.filter(eGui -> eGui.name().toLowerCase(Locale.ROOT).equals(resourceLocation.getPath()))
|
||||
.findFirst()
|
||||
.orElseThrow(() -> new RuntimeException("Failed to find gui for " + resourceLocation));
|
||||
}
|
||||
|
@ -103,7 +104,7 @@ public enum EGui implements IMachineGuiHandler {
|
|||
}
|
||||
|
||||
public Identifier getID(){
|
||||
return new Identifier("techreborn", name().toLowerCase());
|
||||
return new Identifier("techreborn", name().toLowerCase(Locale.ROOT));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue