Skip to content
This repository was archived by the owner on Nov 29, 2017. It is now read-only.

Commit 8135a63

Browse files
author
phit
committed
2.1.0
fix generation code..
1 parent fcb5a66 commit 8135a63

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
modGroup=me.phit.gmb
2-
modVersion=1.10.2-2.0.3
2+
modVersion=1.10.2-2.1.0
33
modBaseName=givemebiomes
44
forgeVersion=1.10.2-12.18.3.2221
55
mcpVersion=stable_29

src/main/java/me/phit/gmb/GMBCore.java

+7-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import java.util.TreeMap;
2020

2121
public class GMBCore {
22-
public static void generate(BiomeProvider manager, String mapname, int scale, int radius, int originx, int originz, int width, int height, ICommandSender icommandsender) {
22+
public static void generate(BiomeProvider provider, String mapname, int scale, int radius, int originx, int originz, int width, int height, ICommandSender icommandsender) {
2323
File gmbpath = new File(GiveMeBiomes.savepath, mapname);
2424
File path = new File(gmbpath, "data");
2525
if (!path.exists()) {
@@ -38,7 +38,8 @@ public static void generate(BiomeProvider manager, String mapname, int scale, in
3838
int[] colors = generateColors(path);
3939

4040
icommandsender.sendMessage(new TextComponentString("Beginning render of map with 1:" + scale + " scale covering a " + radius * 2 + "x" + radius * 2 + " block area."));
41-
generateMap(manager, colors, scale, radius, originx, originz, width, height, path);
41+
42+
generateMap(provider, colors, scale, radius, originx, originz, width, height, path);
4243

4344
writeAssets(gmbpath);
4445

@@ -47,15 +48,15 @@ public static void generate(BiomeProvider manager, String mapname, int scale, in
4748
icommandsender.sendMessage(itextcomponent);
4849
}
4950

50-
private static void generateMap(BiomeProvider manager, int[] colors, int scale, int radius, int originx, int originz, int width, int height, File path) {
51+
private static void generateMap(BiomeProvider provider, int[] colors, int scale, int radius, int originx, int originz, int width, int height, File path) {
5152
int[] pixels = new int[width * height];
52-
Biome[] biomeTemp = new Biome[1];
53+
Biome[] biome = new Biome[1];
5354
int lastpercent = 0;
5455

5556
for (int y = 0; y < height; ++y) {
5657
for (int x = 0; x < width; ++x) {
57-
Biome e = manager.getBiomesForGeneration(biomeTemp, originx - radius + x * scale, originz - radius + y * scale, 1, 1)[0];
58-
pixels[y * width + x] = colors[Biome.getIdForBiome(e)];
58+
provider.getBiomes(biome, originx - radius + x * scale, originz - radius + y * scale, 1, 1);
59+
pixels[y * width + x] = colors[Biome.getIdForBiome(biome[0])];
5960

6061
double progress = (double)(y * width + x) / (double)(height * width) * 100.0D;
6162
if(Math.floor(progress) > (double)lastpercent) {

src/main/java/me/phit/gmb/GiveMeBiomes.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class GiveMeBiomes {
1313

1414
public static final String MODID = "givemebiomes";
1515
public static final String MODNAME = "GiveMeBiomes";
16-
public static final String MODVERSION = "2.0.3";
16+
public static final String MODVERSION = "2.1.0";
1717

1818
public static File savepath;
1919

0 commit comments

Comments
 (0)