Skip to content

Commit

Permalink
Added and updated support for biomes
Browse files Browse the repository at this point in the history
  • Loading branch information
GirafiStudios committed May 2, 2018
1 parent cad506d commit 5b879c9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ minecraft_version=1.12.2
forge_version=14.23.3.2673
mcp_mappings=snapshot_20180425
applecore_api_version=3.1.1+309.add1b
mod_version=1.6.0
mod_version=1.6.1
12 changes: 6 additions & 6 deletions src/main/java/com/teammetallurgy/aquaculture/loot/BiomeType.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
import java.util.Map;

public class BiomeType {
public static BiomeType freshwater = new BiomeType("Freshwater", new int[] { 1, 3, 4, 7, 18, 20 });
public static BiomeType arid = new BiomeType("Arid", new int[] { 2, 17 });
public static BiomeType arctic = new BiomeType("Arctic", new int[] { 5, 10, 11, 12, 13, 19 });
public static BiomeType saltwater = new BiomeType("Saltwater", new int[] { 0, 16 });
public static BiomeType tropical = new BiomeType("Tropical", new int[] { 21, 22 });
public static BiomeType brackish = new BiomeType("Brackish", new int[] { 6 });
public static BiomeType freshwater = new BiomeType("Freshwater", new int[] { 1, 4, 6, 7, 14, 15, 18, 27, 28, 29, 33, 129, 132, 134, 155, 156, 157, 161 });
public static BiomeType arid = new BiomeType("Arid", new int[] { 2, 17, 35, 36, 37, 38, 39, 130, 133, 163, 164, 165, 166, 167 });
public static BiomeType arctic = new BiomeType("Arctic", new int[] { 3, 5, 10, 11, 12, 13, 19, 30, 25, 26, 30, 31, 32, 34, 131, 140, 158, 160, 162 });
public static BiomeType saltwater = new BiomeType("Saltwater", new int[] { 0, 16, 10, 24, 26 });
public static BiomeType tropical = new BiomeType("Tropical", new int[] { 21, 22, 23, 149, 151 });
public static BiomeType brackish = new BiomeType("Brackish", new int[] { 6, 134 });
public static BiomeType mushroom = new BiomeType("Mushroom", new int[] { 14, 15 });

protected static Map<Integer, BiomeType> biomeMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ private FishLoot() {
}

public static FishLoot instance() {
if (instance == null)
if (instance == null) {
instance = new FishLoot();

}
return instance;
}

Expand Down Expand Up @@ -61,7 +61,7 @@ public void addJunkLoot(ItemStack fish, BiomeType biome, int rarity) {
public ItemStack getRandomFish(int biomeID) {
BiomeType biome = BiomeType.getBiomeType(biomeID);

ItemStack fishStack = null;
ItemStack fishStack;
if (biome != null && fishBiomeMap.containsKey(biome))
fishStack = fishBiomeMap.get(biome).getRandomLoot();
else
Expand All @@ -74,7 +74,7 @@ public ItemStack getRandomFish(int biomeID) {
public ItemStack getRandomFish(int biomeID, int heavyLineLvl) {
BiomeType biome = BiomeType.getBiomeType(biomeID);

ItemStack fishStack = null;
ItemStack fishStack;
if (biome != null && fishBiomeMap.containsKey(biome))
fishStack = fishBiomeMap.get(biome).getRandomLoot();
else
Expand Down

0 comments on commit 5b879c9

Please sign in to comment.