Skip to content

Commit f65aa8b

Browse files
format: spotless auto-apply [bot]
1 parent c751870 commit f65aa8b

File tree

8 files changed

+54
-48
lines changed

8 files changed

+54
-48
lines changed

src/main/java/supersymmetry/api/items/CargoItemStackHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,9 @@ public boolean isFull() {
228228
return currentVolume >= maxVolume;
229229
}
230230

231-
public int mass() { return currentWeight; }
231+
public int mass() {
232+
return currentWeight;
233+
}
232234

233235
public boolean massTooHigh() {
234236
return currentWeight * 6 >= maxWeight * 5;

src/main/java/supersymmetry/api/recipes/SuSyRecipeMaps.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ public class SuSyRecipeMaps {
484484
public static final RecipeMap<SimpleRecipeBuilder> RESISTANCE_FURNACE = new RecipeMap<>("resistance_furnace",
485485
6, 2, 0, 1, new SimpleRecipeBuilder(), false)
486486
.setSound(GTSoundEvents.FURNACE);
487-
487+
488488
public static final RecipeMap<SimpleRecipeBuilder> ECCENTRIC_ROLL_CRUSHER = new RecipeMap<>(
489489
"eccentric_roll_crusher", 1, 4, 0, 0, new SimpleRecipeBuilder(), false)
490490
.setSlotOverlay(false, false, GuiTextures.DUST_OVERLAY)

src/main/java/supersymmetry/common/blocks/rocketry/BlockGuidanceSystem.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package supersymmetry.common.blocks.rocketry;
22

3-
import gregtech.api.block.IStateHarvestLevel;
4-
import gregtech.api.block.VariantBlock;
53
import net.minecraft.block.SoundType;
64
import net.minecraft.block.material.Material;
75
import net.minecraft.block.state.IBlockState;
86
import net.minecraft.util.IStringSerializable;
97

8+
import gregtech.api.block.IStateHarvestLevel;
9+
import gregtech.api.block.VariantBlock;
10+
1011
public class BlockGuidanceSystem extends VariantBlock<BlockGuidanceSystem.GuidanceSystemType> {
1112

1213
public BlockGuidanceSystem() {
@@ -18,6 +19,7 @@ public BlockGuidanceSystem() {
1819
setDefaultState(getState(BlockGuidanceSystem.GuidanceSystemType.SOYUZ));
1920
setHarvestLevel("wrench", 4);
2021
}
22+
2123
public enum GuidanceSystemType implements IStringSerializable, IStateHarvestLevel {
2224

2325
SOYUZ("soyuz", 4);

src/main/java/supersymmetry/common/metatileentities/multi/rocket/FuelRegistrySelectorWidget.java

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class FuelRegistrySelectorWidget extends AbstractWidgetGroup {
3131
public Consumer<RocketFuelEntry> cb;
3232

3333
public FuelRegistrySelectorWidget(
34-
int x, int y, int w, int h, @Nullable Consumer<RocketFuelEntry> cb) {
34+
int x, int y, int w, int h, @Nullable Consumer<RocketFuelEntry> cb) {
3535
super(new Position(x, y), new Size(w, h));
3636
this.stacks = new ArrayList<>(limit);
3737
PhantomFluidWidget initial = this.newWidget(0);
@@ -76,37 +76,37 @@ public Optional<RocketFuelEntry> search() {
7676
List<FluidStack> stacksNotNull = this.stacks.stream().filter(x -> x != null).collect(Collectors.toList());
7777

7878
for (RocketFuelEntry entry : RocketFuelEntry.getFuelRegistry().values()) {
79-
List<Fluid> fluids = stacksNotNull.stream()
80-
.map(
81-
x -> {
82-
return x.getFluid();
83-
})
84-
.collect(Collectors.toList());
85-
86-
if (entry.getComposition().stream()
87-
.map(
88-
x -> {
89-
Material mat = x.getFirst();
90-
Fluid l = mat.getFluid(FluidStorageKeys.LIQUID);
91-
if (l != null) {
92-
return l;
93-
}
94-
FluidProperty fluidprop = mat.getProperty(PropertyKey.FLUID);
95-
if (fluidprop != null) {
96-
@Nullable
97-
Fluid fluid = fluidprop.get(fluidprop.getPrimaryKey());
98-
if (fluid != null) {
99-
return fluid;
100-
}
79+
List<Fluid> fluids = stacksNotNull.stream()
80+
.map(
81+
x -> {
82+
return x.getFluid();
83+
})
84+
.collect(Collectors.toList());
85+
86+
if (entry.getComposition().stream()
87+
.map(
88+
x -> {
89+
Material mat = x.getFirst();
90+
Fluid l = mat.getFluid(FluidStorageKeys.LIQUID);
91+
if (l != null) {
92+
return l;
93+
}
94+
FluidProperty fluidprop = mat.getProperty(PropertyKey.FLUID);
95+
if (fluidprop != null) {
96+
@Nullable
97+
Fluid fluid = fluidprop.get(fluidprop.getPrimaryKey());
98+
if (fluid != null) {
99+
return fluid;
101100
}
102-
return mat.getFluid();
103-
})
104-
.allMatch(
105-
x -> {
106-
return fluids.contains(x);
107-
})) {
108-
return Optional.of(entry);
109-
}
101+
}
102+
return mat.getFluid();
103+
})
104+
.allMatch(
105+
x -> {
106+
return fluids.contains(x);
107+
})) {
108+
return Optional.of(entry);
109+
}
110110
}
111111

112112
return Optional.empty();
@@ -157,8 +157,7 @@ public void readUpdateInfo(int id, PacketBuffer buffer) {
157157
NBTTagCompound tag = buffer.readCompoundTag();
158158
FluidStack stack = FluidStack.loadFluidStackFromNBT(tag);
159159
onFluidChanged(stack, i);
160-
} catch (Exception e) {
161-
}
160+
} catch (Exception e) {}
162161
}
163162
}
164163
}

src/main/java/supersymmetry/common/rocketry/components/ComponentSpacecraft.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import supersymmetry.api.util.StructAnalysis;
2020
import supersymmetry.api.util.StructAnalysis.BuildStat;
2121
import supersymmetry.common.blocks.SuSyBlocks;
22-
import supersymmetry.common.blocks.rocketry.BlockGuidanceSystem;
2322
import supersymmetry.common.tileentities.TileEntityCoverable;
2423

2524
public class ComponentSpacecraft extends AbstractComponent<ComponentSpacecraft> {
@@ -120,7 +119,8 @@ public Optional<NBTTagCompound> spacecraftPattern(
120119
.equals(SuSyBlocks.GUIDANCE_SYSTEM);
121120

122121
Set<BlockPos> lifeSupports = blocksConnected.stream().filter(lifeSupportCheck).collect(Collectors.toSet());
123-
List<BlockPos> guidanceComputers = blocksConnected.stream().filter(guidanceComputerCheck).collect(Collectors.toList());
122+
List<BlockPos> guidanceComputers = blocksConnected.stream().filter(guidanceComputerCheck)
123+
.collect(Collectors.toList());
124124
NBTTagCompound tag = new NBTTagCompound();
125125

126126
lifeSupports.forEach(

src/main/java/supersymmetry/common/world/biome/BiomePlanetaryDecorator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
import java.util.Random;
44

5-
import net.minecraft.init.Blocks;
65
import net.minecraft.util.math.BlockPos;
76
import net.minecraft.world.World;
87
import net.minecraft.world.biome.Biome;
98
import net.minecraft.world.biome.BiomeDecorator;
109
import net.minecraft.world.gen.feature.WorldGenerator;
10+
1111
import supersymmetry.common.world.gen.MapGenLunarLavaTube;
1212
import supersymmetry.common.world.gen.WorldGenPit;
1313

src/main/java/supersymmetry/common/world/gen/MapGenLunarLavaTube.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class MapGenLunarLavaTube extends MapGenBase {
2323
protected static final IBlockState AIR = Blocks.AIR.getDefaultState();
2424
public static final IBlockState BASALT = MetaBlocks.STONE_BLOCKS.get(StoneVariantBlock.StoneVariant.SMOOTH)
2525
.getState(StoneVariantBlock.StoneType.BASALT);
26-
public static final Block PIT = Blocks.END_PORTAL_FRAME;
26+
public static final Block PIT = Blocks.END_PORTAL_FRAME;
2727

2828
// modified from net.minecraft.world.gen.MapGenCaves
2929
protected void addTunnel(long seed, int x, int z, ChunkPrimer primer, double startX, double startY, double startZ,
@@ -142,11 +142,13 @@ protected void addTunnel(long seed, int x, int z, ChunkPrimer primer, double sta
142142
// for consistency
143143
Random localRandom = new Random(localRandomSeed);
144144

145-
int x3 = MathHelper.floor(startX) - x * 16;
146-
int z3 = MathHelper.floor(startZ) - z * 16;
147-
if (0 <= x3 && x3 < 16 && 0 < z3 && z3 < 16 && width > 0x3 && localRandom.nextInt(0x4) == 1 && y2 > primer.findGroundBlockIdx(x3, z3 - 1) - 2) {
148-
fillBlock(primer, x3, 0x60, z3, null, AIR, PIT.getStateFromMeta(width > 0xa ? 7 : (int) (width - 3)));
149-
}
145+
int x3 = MathHelper.floor(startX) - x * 16;
146+
int z3 = MathHelper.floor(startZ) - z * 16;
147+
if (0 <= x3 && x3 < 16 && 0 < z3 && z3 < 16 && width > 0x3 && localRandom.nextInt(0x4) == 1 &&
148+
y2 > primer.findGroundBlockIdx(x3, z3 - 1) - 2) {
149+
fillBlock(primer, x3, 0x60, z3, null, AIR,
150+
PIT.getStateFromMeta(width > 0xa ? 7 : (int) (width - 3)));
151+
}
150152

151153
// lx: local x
152154
for (int localX = x1; localX < x2; ++localX) {

src/main/java/supersymmetry/common/world/gen/WorldGenPit.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
import net.minecraft.util.math.BlockPos;
99
import net.minecraft.world.World;
1010
import net.minecraft.world.gen.feature.WorldGenerator;
11-
import supersymmetry.api.SusyLog;
1211

1312
public class WorldGenPit extends WorldGenerator {
13+
1414
protected static final IBlockState AIR = Blocks.AIR.getDefaultState();
1515

1616
@Override
@@ -25,7 +25,8 @@ public boolean generate(World worldIn, Random rand, BlockPos position) {
2525
if (x * x + z * z <= size * size * rand.nextFloat(0x.cp0f, 0x1.4p0f)) {
2626
int top = worldIn.getHeight(position.getX() + x, position.getZ() + z);
2727
if (top < 0x40) top = 0x40;
28-
BlockPos.MutableBlockPos pos = new BlockPos.MutableBlockPos(position.getX() + x, top, position.getZ() + z);
28+
BlockPos.MutableBlockPos pos = new BlockPos.MutableBlockPos(position.getX() + x, top,
29+
position.getZ() + z);
2930

3031
for (int i = 0; i < 5; i++) {
3132
worldIn.setBlockState(pos, AIR, 2);

0 commit comments

Comments
 (0)