Fix some warnings.

This commit is contained in:
drcrazy 2021-07-19 16:15:49 +03:00
parent 9cb90bb56d
commit cb6c6337a8
5 changed files with 33 additions and 21 deletions

View file

@ -498,7 +498,7 @@ public class TRContent {
public static ItemConvertible[] getCasings() {
return Arrays.stream(MachineBlocks.values())
.map((Function<MachineBlocks, ItemConvertible>) machineBlocks -> () -> machineBlocks.casing.asItem())
.map((Function<MachineBlocks, ItemConvertible>) machineBlocks -> machineBlocks.casing::asItem)
.toArray(ItemConvertible[]::new);
}
}
@ -855,8 +855,10 @@ public class TRContent {
if (blockEntity instanceof PowerAcceptorBlockEntity) {
powerAcceptor = (PowerAcceptorBlockEntity) blockEntity;
}
handler.addSpeedMulti(TechRebornConfig.overclockerSpeed);
handler.addPowerMulti(TechRebornConfig.overclockerPower);
if (handler != null) {
handler.addSpeedMulti(TechRebornConfig.overclockerSpeed);
handler.addPowerMulti(TechRebornConfig.overclockerPower);
}
if (powerAcceptor != null) {
powerAcceptor.extraPowerInput += powerAcceptor.getMaxInput(EnergySide.UNKNOWN);
powerAcceptor.extraPowerStorage += powerAcceptor.getBaseMaxPower();