Skip to content

Commit

Permalink
Apply spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
glowredman committed May 16, 2023
1 parent 0ced96f commit b26c703
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,7 @@ protected List<Mothership> getMothershipListToRender() {
for (final Mothership ms : msData.getMotherships().values()) {
if ((ms == this.selectedBody || ms.getParent() == this.selectedBody && this.selectionCount != 1)
&& (this.ticksSinceSelection > 35 || this.selectedBody == ms
|| this.lastSelectedBody instanceof Mothership ship
&& ship.getParent().equals(ms))
|| this.lastSelectedBody instanceof Mothership ship && ship.getParent().equals(ms))
|| this.isSiblingOf(this.selectedBody, ms)) {
result.add(ms);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ public List<Mothership> getMothershipsForParent(final CelestialBody parent) {
if (parent == null) {
return new ArrayList<>(0);
}
return this.mothershipIdList.values().stream().filter(ship -> parent.equals(ship.getParent())).collect(Collectors.toList());
return this.mothershipIdList.values().stream().filter(ship -> parent.equals(ship.getParent()))
.collect(Collectors.toList());
}

/**
Expand Down Expand Up @@ -255,7 +256,8 @@ public Mothership getByMothershipId(final int id) {
}

public Mothership getByName(final String name) {
return this.mothershipIdList.values().stream().filter(ship -> ship.getName().equals(name)).findFirst().orElse(null);
return this.mothershipIdList.values().stream().filter(ship -> ship.getName().equals(name)).findFirst()
.orElse(null);
}

@Override
Expand Down
20 changes: 11 additions & 9 deletions src/main/java/de/katzenpapst/amunra/world/AmunraChunkProvider.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package de.katzenpapst.amunra.world;

import java.util.ArrayList;
import java.util.List;

import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry;
import net.minecraft.world.chunk.IChunkProvider;

import java.util.ArrayList;
import java.util.List;

import micdoodle8.mods.galacticraft.api.prefab.world.gen.ChunkProviderSpace;
import micdoodle8.mods.galacticraft.api.prefab.world.gen.MapGenBaseMeta;
import micdoodle8.mods.galacticraft.core.entities.EntityEvolvedCreeper;
Expand All @@ -21,10 +21,12 @@ abstract public class AmunraChunkProvider extends ChunkProviderSpace {
public static final int CHUNK_SIZE_X = 16;
public static final int CHUNK_SIZE_Y = 256;
public static final int CHUNK_SIZE_Z = 16;
protected BiomeGenBase[] biomes = {BiomeGenBaseOrbit.space};

protected BiomeGenBase[] biomes = { BiomeGenBaseOrbit.space };
protected SpawnListEntry[] creatures = {};
protected SpawnListEntry[] monsters = {new SpawnListEntry(EntityEvolvedSkeleton.class, 100, 4, 4), new SpawnListEntry(EntityEvolvedCreeper.class, 100, 4, 4), new SpawnListEntry(EntityEvolvedZombie.class, 100, 4, 4)};
protected SpawnListEntry[] monsters = { new SpawnListEntry(EntityEvolvedSkeleton.class, 100, 4, 4),
new SpawnListEntry(EntityEvolvedCreeper.class, 100, 4, 4),
new SpawnListEntry(EntityEvolvedZombie.class, 100, 4, 4) };
protected final List<MapGenBaseMeta> worldGenerators = new ArrayList<>();

public AmunraChunkProvider(final World world, final long seed, final boolean mapFeaturesEnabled) {
Expand All @@ -36,7 +38,7 @@ public int getCraterProbability() {
// vestigial
return 2000;
}

@Override
protected BiomeGenBase[] getBiomesForGeneration() {
return this.biomes;
Expand All @@ -46,12 +48,12 @@ protected BiomeGenBase[] getBiomesForGeneration() {
protected SpawnListEntry[] getCreatures() {
return this.creatures;
}

@Override
protected SpawnListEntry[] getMonsters() {
return this.monsters;
}

@Override
protected List<MapGenBaseMeta> getWorldGenerators() {
return this.worldGenerators;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public HorusChunkProvider(final World world, final long seed, final boolean mapF
this.stoneBlock,
15,
true);

this.worldGenerators.add(this.volcanoGen);
this.worldGenerators.add(this.pyramid);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public class MaahesChunkProvider extends AmunraChunkProvider {

public MaahesChunkProvider(final World world, final long seed, final boolean mapFeaturesEnabled) {
super(world, seed, mapFeaturesEnabled);
this.creatures = new SpawnListEntry[] {new SpawnListEntry(EntityPorcodon.class, 50, 4, 10)};
this.monsters = new SpawnListEntry[] {new SpawnListEntry(EntityAlienBug.class, 100, 4, 4)};
this.creatures = new SpawnListEntry[] { new SpawnListEntry(EntityPorcodon.class, 50, 4, 10) };
this.monsters = new SpawnListEntry[] { new SpawnListEntry(EntityAlienBug.class, 100, 4, 4) };
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public SethChunkProvider(final World world, final long seed, final boolean mapFe
this.volcanoGen = new VolcanoGenerator(this.waterBlock, this.rockBlock, this.dirtBlock, 60, false);

this.crystalGen = new CrystalFormation(ARBlocks.blockGlowingCoral, this.waterBlock);

this.monsters = new SpawnListEntry[] {};
this.biomes = new BiomeGenBase[] { BiomeGenBase.iceMountains };
this.worldGenerators.add(this.volcanoGen);
Expand Down

0 comments on commit b26c703

Please sign in to comment.