Possible solution for #1798
This commit is contained in:
parent
6114f45d9b
commit
92b3bc6651
5 changed files with 27 additions and 20 deletions
|
@ -46,6 +46,8 @@ import reborncore.common.BaseBlockEntityProvider;
|
||||||
import reborncore.common.blocks.BlockWrenchEventHandler;
|
import reborncore.common.blocks.BlockWrenchEventHandler;
|
||||||
import reborncore.common.util.WrenchUtils;
|
import reborncore.common.util.WrenchUtils;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Rushmead
|
* Created by Rushmead
|
||||||
*/
|
*/
|
||||||
|
@ -89,7 +91,7 @@ public abstract class BlockEnergyStorage extends BaseBlockEntityProvider {
|
||||||
if (fullName.equalsIgnoreCase("LESU")) {
|
if (fullName.equalsIgnoreCase("LESU")) {
|
||||||
return "ev_multi";
|
return "ev_multi";
|
||||||
}
|
}
|
||||||
return fullName.toLowerCase();
|
return fullName.toLowerCase(Locale.ROOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Block
|
// Block
|
||||||
|
|
|
@ -32,6 +32,7 @@ import net.minecraft.world.World;
|
||||||
import reborncore.api.blockentity.IMachineGuiHandler;
|
import reborncore.api.blockentity.IMachineGuiHandler;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
public enum EGui implements IMachineGuiHandler {
|
public enum EGui implements IMachineGuiHandler {
|
||||||
|
@ -93,7 +94,7 @@ public enum EGui implements IMachineGuiHandler {
|
||||||
|
|
||||||
public static EGui byID(Identifier resourceLocation){
|
public static EGui byID(Identifier resourceLocation){
|
||||||
return Arrays.stream(values())
|
return Arrays.stream(values())
|
||||||
.filter(eGui -> eGui.name().toLowerCase().equals(resourceLocation.getPath()))
|
.filter(eGui -> eGui.name().toLowerCase(Locale.ROOT).equals(resourceLocation.getPath()))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElseThrow(() -> new RuntimeException("Failed to find gui for " + resourceLocation));
|
.orElseThrow(() -> new RuntimeException("Failed to find gui for " + resourceLocation));
|
||||||
}
|
}
|
||||||
|
@ -103,7 +104,7 @@ public enum EGui implements IMachineGuiHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Identifier getID(){
|
public Identifier getID(){
|
||||||
return new Identifier("techreborn", name().toLowerCase());
|
return new Identifier("techreborn", name().toLowerCase(Locale.ROOT));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -33,6 +33,8 @@ import net.minecraft.util.registry.Registry;
|
||||||
import reborncore.common.fluid.*;
|
import reborncore.common.fluid.*;
|
||||||
import techreborn.TechReborn;
|
import techreborn.TechReborn;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
public enum ModFluids {
|
public enum ModFluids {
|
||||||
BERYLLIUM,
|
BERYLLIUM,
|
||||||
CALCIUM,
|
CALCIUM,
|
||||||
|
@ -78,11 +80,11 @@ public enum ModFluids {
|
||||||
private final Identifier identifier;
|
private final Identifier identifier;
|
||||||
|
|
||||||
ModFluids() {
|
ModFluids() {
|
||||||
this.identifier = new Identifier(TechReborn.MOD_ID, this.toString().toLowerCase());
|
this.identifier = new Identifier(TechReborn.MOD_ID, this.toString().toLowerCase(Locale.ROOT));
|
||||||
|
|
||||||
FluidSettings fluidSettings = FluidSettings.create();
|
FluidSettings fluidSettings = FluidSettings.create();
|
||||||
|
|
||||||
Identifier texture = new Identifier(TechReborn.MOD_ID, "block/fluids/" + this.toString().toLowerCase() + "_flowing");
|
Identifier texture = new Identifier(TechReborn.MOD_ID, "block/fluids/" + this.toString().toLowerCase(Locale.ROOT) + "_flowing");
|
||||||
|
|
||||||
fluidSettings.setStillTexture(texture);
|
fluidSettings.setStillTexture(texture);
|
||||||
fluidSettings.setFlowingTexture(texture);
|
fluidSettings.setFlowingTexture(texture);
|
||||||
|
|
|
@ -31,6 +31,7 @@ import net.minecraft.sound.SoundEvent;
|
||||||
import net.minecraft.sound.SoundEvents;
|
import net.minecraft.sound.SoundEvents;
|
||||||
import net.minecraft.util.Lazy;
|
import net.minecraft.util.Lazy;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
|
||||||
|
@ -98,7 +99,7 @@ public enum TRArmorMaterial implements ArmorMaterial {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return this.toString().toLowerCase();
|
return this.toString().toLowerCase(Locale.ROOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -70,6 +70,7 @@ import techreborn.utils.InitUtils;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
public class TRContent {
|
public class TRContent {
|
||||||
|
@ -220,7 +221,7 @@ public class TRContent {
|
||||||
public final EnumPowerTier powerTier;
|
public final EnumPowerTier powerTier;
|
||||||
|
|
||||||
SolarPanels(EnumPowerTier tier, int generationRateD, int generationRateN) {
|
SolarPanels(EnumPowerTier tier, int generationRateD, int generationRateN) {
|
||||||
name = this.toString().toLowerCase();
|
name = this.toString().toLowerCase(Locale.ROOT);
|
||||||
powerTier = tier;
|
powerTier = tier;
|
||||||
block = new BlockSolarPanel(this);
|
block = new BlockSolarPanel(this);
|
||||||
this.generationRateD = generationRateD;
|
this.generationRateD = generationRateD;
|
||||||
|
@ -261,7 +262,7 @@ public class TRContent {
|
||||||
|
|
||||||
|
|
||||||
Cables(int transferRate, double cableThickness, boolean canKill, EnumPowerTier tier) {
|
Cables(int transferRate, double cableThickness, boolean canKill, EnumPowerTier tier) {
|
||||||
name = this.toString().toLowerCase();
|
name = this.toString().toLowerCase(Locale.ROOT);
|
||||||
this.transferRate = transferRate;
|
this.transferRate = transferRate;
|
||||||
this.defaultTransferRate = transferRate;
|
this.defaultTransferRate = transferRate;
|
||||||
this.cableThickness = cableThickness / 2;
|
this.cableThickness = cableThickness / 2;
|
||||||
|
@ -308,7 +309,7 @@ public class TRContent {
|
||||||
public final int maxY;
|
public final int maxY;
|
||||||
|
|
||||||
Ores(int veinSize, int veinsPerChunk, int minY, int maxY) {
|
Ores(int veinSize, int veinsPerChunk, int minY, int maxY) {
|
||||||
name = this.toString().toLowerCase();
|
name = this.toString().toLowerCase(Locale.ROOT);
|
||||||
block = new Block(FabricBlockSettings.of(Material.STONE).strength(2f, 2f).build());
|
block = new Block(FabricBlockSettings.of(Material.STONE).strength(2f, 2f).build());
|
||||||
this.veinSize = veinSize;
|
this.veinSize = veinSize;
|
||||||
this.veinsPerChunk = veinsPerChunk;
|
this.veinsPerChunk = veinsPerChunk;
|
||||||
|
@ -332,7 +333,7 @@ public class TRContent {
|
||||||
public final Block block;
|
public final Block block;
|
||||||
|
|
||||||
StorageBlocks() {
|
StorageBlocks() {
|
||||||
name = this.toString().toLowerCase();
|
name = this.toString().toLowerCase(Locale.ROOT);
|
||||||
block = new BlockStorage();
|
block = new BlockStorage();
|
||||||
InitUtils.setup(block, name + "_storage_block");
|
InitUtils.setup(block, name + "_storage_block");
|
||||||
}
|
}
|
||||||
|
@ -353,7 +354,7 @@ public class TRContent {
|
||||||
public final Block casing;
|
public final Block casing;
|
||||||
|
|
||||||
MachineBlocks(int casingHeatCapacity) {
|
MachineBlocks(int casingHeatCapacity) {
|
||||||
name = this.toString().toLowerCase();
|
name = this.toString().toLowerCase(Locale.ROOT);
|
||||||
frame = new BlockMachineFrame();
|
frame = new BlockMachineFrame();
|
||||||
InitUtils.setup(frame, name + "_machine_frame");
|
InitUtils.setup(frame, name + "_machine_frame");
|
||||||
casing = new BlockMachineCasing(casingHeatCapacity);
|
casing = new BlockMachineCasing(casingHeatCapacity);
|
||||||
|
@ -445,7 +446,7 @@ public class TRContent {
|
||||||
public final Block block;
|
public final Block block;
|
||||||
|
|
||||||
<B extends Block> Machine(B block) {
|
<B extends Block> Machine(B block) {
|
||||||
this.name = this.toString().toLowerCase();
|
this.name = this.toString().toLowerCase(Locale.ROOT);
|
||||||
this.block = block;
|
this.block = block;
|
||||||
InitUtils.setup(block, name);
|
InitUtils.setup(block, name);
|
||||||
}
|
}
|
||||||
|
@ -472,7 +473,7 @@ public class TRContent {
|
||||||
public final Item item;
|
public final Item item;
|
||||||
|
|
||||||
Dusts() {
|
Dusts() {
|
||||||
name = this.toString().toLowerCase();
|
name = this.toString().toLowerCase(Locale.ROOT);
|
||||||
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
|
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
|
||||||
InitUtils.setup(item, name + "_dust");
|
InitUtils.setup(item, name + "_dust");
|
||||||
}
|
}
|
||||||
|
@ -503,7 +504,7 @@ public class TRContent {
|
||||||
public final Item item;
|
public final Item item;
|
||||||
|
|
||||||
SmallDusts() {
|
SmallDusts() {
|
||||||
name = this.toString().toLowerCase();
|
name = this.toString().toLowerCase(Locale.ROOT);
|
||||||
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
|
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
|
||||||
InitUtils.setup(item, name + "_small_dust");
|
InitUtils.setup(item, name + "_small_dust");
|
||||||
}
|
}
|
||||||
|
@ -529,7 +530,7 @@ public class TRContent {
|
||||||
public final Item item;
|
public final Item item;
|
||||||
|
|
||||||
Gems() {
|
Gems() {
|
||||||
name = this.toString().toLowerCase();
|
name = this.toString().toLowerCase(Locale.ROOT);
|
||||||
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
|
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
|
||||||
InitUtils.setup(item, name + "_gem");
|
InitUtils.setup(item, name + "_gem");
|
||||||
}
|
}
|
||||||
|
@ -556,7 +557,7 @@ public class TRContent {
|
||||||
public final Item item;
|
public final Item item;
|
||||||
|
|
||||||
Ingots() {
|
Ingots() {
|
||||||
name = this.toString().toLowerCase();
|
name = this.toString().toLowerCase(Locale.ROOT);
|
||||||
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
|
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
|
||||||
InitUtils.setup(item, name + "_ingot");
|
InitUtils.setup(item, name + "_ingot");
|
||||||
}
|
}
|
||||||
|
@ -583,7 +584,7 @@ public class TRContent {
|
||||||
public final Item item;
|
public final Item item;
|
||||||
|
|
||||||
Nuggets() {
|
Nuggets() {
|
||||||
name = this.toString().toLowerCase();
|
name = this.toString().toLowerCase(Locale.ROOT);
|
||||||
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
|
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
|
||||||
InitUtils.setup(item, name + "_nugget");
|
InitUtils.setup(item, name + "_nugget");
|
||||||
}
|
}
|
||||||
|
@ -654,7 +655,7 @@ public class TRContent {
|
||||||
public final Item item;
|
public final Item item;
|
||||||
|
|
||||||
Parts() {
|
Parts() {
|
||||||
name = this.toString().toLowerCase();
|
name = this.toString().toLowerCase(Locale.ROOT);
|
||||||
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
|
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
|
||||||
InitUtils.setup(item, name);
|
InitUtils.setup(item, name);
|
||||||
}
|
}
|
||||||
|
@ -683,7 +684,7 @@ public class TRContent {
|
||||||
public final Item item;
|
public final Item item;
|
||||||
|
|
||||||
Plates() {
|
Plates() {
|
||||||
name = this.toString().toLowerCase();
|
name = this.toString().toLowerCase(Locale.ROOT);
|
||||||
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
|
item = new Item(new Item.Settings().group(TechReborn.ITEMGROUP));
|
||||||
InitUtils.setup(item, name + "_plate");
|
InitUtils.setup(item, name + "_plate");
|
||||||
}
|
}
|
||||||
|
@ -747,7 +748,7 @@ public class TRContent {
|
||||||
public Item item;
|
public Item item;
|
||||||
|
|
||||||
Upgrades(IUpgrade upgrade) {
|
Upgrades(IUpgrade upgrade) {
|
||||||
name = this.toString().toLowerCase();
|
name = this.toString().toLowerCase(Locale.ROOT);
|
||||||
item = new ItemUpgrade(name, upgrade);
|
item = new ItemUpgrade(name, upgrade);
|
||||||
InitUtils.setup(item, name + "_upgrade");
|
InitUtils.setup(item, name + "_upgrade");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue