diff --git a/client/cpw/mods/fml/client/FMLClientHandler.java b/client/cpw/mods/fml/client/FMLClientHandler.java index 0b2fcc75b9..c8dbaa3763 100644 --- a/client/cpw/mods/fml/client/FMLClientHandler.java +++ b/client/cpw/mods/fml/client/FMLClientHandler.java @@ -495,7 +495,7 @@ public class FMLClientHandler implements IFMLSidedHandler */ public void addBiomeToDefaultWorldGenerator(BiomeGenBase biome) { - //WorldType.field_48635_b.addNewBiome(biome); + WorldType.field_48635_b.addNewBiome(biome); } /** diff --git a/client/net/minecraft/src/BaseMod.java b/client/net/minecraft/src/BaseMod.java index c6db51e76a..77db0cbf84 100644 --- a/client/net/minecraft/src/BaseMod.java +++ b/client/net/minecraft/src/BaseMod.java @@ -35,7 +35,21 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp */ public final boolean doTickInGame(float clock, Object minecraftInstance) { - return onTickInGame((Minecraft)minecraftInstance); + Minecraft mc = (Minecraft)minecraftInstance; + if (mc.field_6324_e != null) + { + return onTickInGame(mc); + } + return true; + } + public final boolean doTickInGui(float clock, Object minecraftInstance) + { + Minecraft mc = (Minecraft)minecraftInstance; + if (mc.field_40007_r != null) + { + return onTickInGUI(clock, mc, mc.field_6313_p); + } + return true; } @Override @@ -222,7 +236,7 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp * @param minecraftServer the server * @return true to continue receiving ticks */ - public boolean onTickInGame(Object minecraftInstance) + public boolean onTickInGame(Minecraft minecraftInstance) { return false; } diff --git a/client/net/minecraft/src/ModLoader.java b/client/net/minecraft/src/ModLoader.java index 126a58d027..c9a6cc2046 100644 --- a/client/net/minecraft/src/ModLoader.java +++ b/client/net/minecraft/src/ModLoader.java @@ -14,6 +14,8 @@ package net.minecraft.src; */ import java.awt.image.BufferedImage; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.logging.Logger; @@ -28,6 +30,15 @@ import cpw.mods.fml.common.modloader.ModLoaderModContainer; public class ModLoader { + private static class OverrideInfo + { + public String texture; + public String override; + public int index; + } + private static HashMap spriteInfo = new HashMap(); + private static HashMap> overrideInfo = new HashMap>(); + /** * Not used on the server. * @@ -155,8 +166,9 @@ public class ModLoader */ public static int addOverride(String fileToOverride, String fileToAdd) { - // TODO - return 0; + int idx = getUniqueSpriteIndex(fileToOverride); + addOverride(fileToOverride, fileToAdd, idx); + return idx; } /** @@ -168,7 +180,16 @@ public class ModLoader */ public static void addOverride(String path, String overlayPath, int index) { - // TODO + if (!overrideInfo.containsKey(path)) + { + overrideInfo.put(path, new ArrayList()); + } + ArrayList list = overrideInfo.get(path); + OverrideInfo info = new OverrideInfo(); + info.index = index; + info.override = overlayPath; + info.texture = path; + list.add(info); } /** @@ -427,10 +448,93 @@ public class ModLoader return FMLCommonHandler.instance().nextUniqueEntityListId(); } - static int getUniqueSpriteIndex(String path) + public static int getUniqueSpriteIndex(String path) { - // TODO - return 0; + boolean[] slots = spriteInfo.get(path); + if (slots == null) + { + if (path.equals("/terrain.png")) + { + slots = toBooleanArray( + "0000000000000000" + + "0000000000000000" + + "0000000000000000" + + "0000000000000000" + + "0000000000000000" + + "0000000000000000" + + "0000000000000000" + + "0000000000000000" + + "0000000000000000" + + "0000000000000000" + + "0000000011111100" + + "0000000011111111" + + "0000000011111000" + + "0000000111111100" + + "0000000111111000" + + "0000000000000000"); + spriteInfo.put("/terrain.png", slots); + } + else if (path.equals("/gui/items.png")) + { + slots = toBooleanArray( + "0000000000000000" + + "0000000000000000" + + "0000000000000000" + + "0000000000000000" + + "0000000000000000" + + "0000000000000000" + + "0000001000000000" + + "0000001110000000" + + "0000001000000000" + + "1111111010000000" + + "1111111010100000" + + "1111111111111100" + + "1111111111111111" + + "1111111111111111" + + "1111111111111111" + + "0000000000000000"); + spriteInfo.put("/gui/items.png", slots); + } + else + { + Exception ex = new Exception(String.format("Invalid getUniqueSpriteIndex call for texture: %s", path)); + Loader.log.throwing("ModLoader", "getUniqueSpriteIndex", ex); + throwException(ex); + return 0; + } + } + int ret = getFreeSlot(slots); + if (ret == -1) + { + Exception ex = new Exception(String.format("No more sprite indicies left for: %s", path)); + Loader.log.throwing("ModLoader", "getUniqueSpriteIndex", ex); + throwException(ex); + return 0; + } + return ret; + } + + private static boolean[] toBooleanArray(String data) + { + boolean[] ret = new boolean[data.length()]; + for (int x = 0; x < data.length(); x++) + { + ret[x] = data.charAt(x) == '1'; + } + return ret; + } + + private static int getFreeSlot(boolean[] slots) + { + for (int x = 0; x < slots.length; x++) + { + if (slots[x]) + { + slots[x] = false; + return x; + } + } + return -1; } /** @@ -797,4 +901,9 @@ public class ModLoader { FMLClientHandler.instance().raiseException(e, message, true); } + + public static void throwException(Throwable e) + { + throwException("Exception in ModLoader", e); + } } \ No newline at end of file diff --git a/client/net/minecraft/src/ModTextureAnimation.java b/client/net/minecraft/src/ModTextureAnimation.java new file mode 100644 index 0000000000..f67fe35f88 --- /dev/null +++ b/client/net/minecraft/src/ModTextureAnimation.java @@ -0,0 +1,116 @@ +/* + * The FML Forge Mod Loader suite. + * Copyright (C) 2012 cpw + * + * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 + * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +package net.minecraft.src; + +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.awt.image.ImageObserver; + +import org.lwjgl.opengl.GL11; +import static org.lwjgl.opengl.GL11.*; + +/** + * A texture override for animations, it takes a vertical image of + * texture frames and constantly rotates them in the texture. + */ +public class ModTextureAnimation extends TextureFX +{ + private final int tickRate; + private final byte[][] images; + private int index = 0; + private int ticks = 0; + + private String targetTex = null; + + public ModTextureAnimation(int icon, int target, BufferedImage image, int tickCount) + { + this(icon, 1, target, image, tickCount); + } + + public ModTextureAnimation(int icon, int size, int target, BufferedImage image, int tickCount) + { + this(icon, size, (target == 0 ? "/terrain.png" : "/gui/items.png"), image, tickCount); + } + + public ModTextureAnimation(int icon, int size, String target, BufferedImage image, int tickCount) + { + super(icon); + RenderEngine re = ModLoader.getMinecraftInstance().field_6315_n; + + targetTex = target; + field_1129_e = size; + field_1128_f = re.func_1070_a(target); + + tickRate = tickCount; + ticks = tickCount; + + func_782_a(re); + + int sWidth = image.getWidth(); + int sHeight = image.getHeight(); + int tWidth = GL11.glGetTexLevelParameteri(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH) / 16; + int tHeight = GL11.glGetTexLevelParameteri(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT) / 16; + + int frames = (int)Math.floor((double)(sHeight / sWidth)); + + if (frames < 1) + { + throw new IllegalArgumentException(String.format("Attempted to create a TextureAnimation with no complete frames: %dx%d", sWidth, sHeight)); + } + else + { + images = new byte[frames][]; + + if (sWidth != tWidth) + { + BufferedImage b = new BufferedImage(tWidth, tHeight * frames, 6); + Graphics2D g = b.createGraphics(); + g.drawImage(image, 0, 0, tWidth, tHeight * frames, 0, 0, sWidth, sHeight, (ImageObserver)null); + g.dispose(); + image = b; + } + + for (int frame = 0; frame < frames; frame++) + { + int[] pixels = new int[tWidth * tHeight]; + image.getRGB(0, tHeight * frame, tWidth, tHeight, pixels, 0, tWidth); + images[frame] = new byte[tWidth * tHeight * 4]; + + for (int i = 0; i < pixels.length; i++) + { + int i4 = i * 4; + images[frame][i4 + 0] = (byte)(pixels[i] >> 16 & 255); + images[frame][i4 + 1] = (byte)(pixels[i] >> 8 & 255); + images[frame][i4 + 2] = (byte)(pixels[i] >> 0 & 255); + images[frame][i4 + 3] = (byte)(pixels[i] >> 24 & 255); + } + } + } + } + + public void func_783_a() + { + if (++ticks >= tickRate) + { + if (++index >= images.length) + { + index = 0; + } + + field_1127_a = images[index]; + ticks = 0; + } + } +} diff --git a/client/net/minecraft/src/ModTextureStatic.java b/client/net/minecraft/src/ModTextureStatic.java new file mode 100644 index 0000000000..50353dcd30 --- /dev/null +++ b/client/net/minecraft/src/ModTextureStatic.java @@ -0,0 +1,156 @@ +/* + * The FML Forge Mod Loader suite. + * Copyright (C) 2012 cpw + * + * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 + * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +package net.minecraft.src; + +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.awt.image.ImageObserver; + +import org.lwjgl.opengl.GL11; +import static org.lwjgl.opengl.GL11.*; + +public class ModTextureStatic extends TextureFX +{ + private boolean oldanaglyph = false; + private int[] pixels = null; + private String targetTex = null; + + + public ModTextureStatic(int icon, int target, BufferedImage image) + { + this(icon, 1, target, image); + } + + public ModTextureStatic(int icon, int size, int target, BufferedImage image) + { + this(icon, size, (target == 0 ? "/terrain.png" : "/gui/items.png"), image); + } + + public ModTextureStatic(int icon, int size, String target, BufferedImage image) + { + super(icon); + RenderEngine re = ModLoader.getMinecraftInstance().field_6315_n; + + targetTex = target; + field_1129_e = size; + field_1128_f = re.func_1070_a(target); + + func_782_a(re); + + int sWidth = image.getWidth(); + int sHeight = image.getHeight(); + int tWidth = GL11.glGetTexLevelParameteri(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH ) / 16; + int tHeight = GL11.glGetTexLevelParameteri(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT) / 16; + + pixels = new int[tWidth * tHeight]; + field_1127_a = new byte[tWidth * tHeight * 4]; + + + if (tWidth == sWidth && tHeight == sHeight) + { + image.getRGB(0, 0, sWidth, sHeight, pixels, 0, sWidth); + } + else + { + BufferedImage tmp = new BufferedImage(tWidth, tHeight, 6); + Graphics2D gfx = tmp.createGraphics(); + gfx.drawImage(image, 0, 0, tWidth, tHeight, 0, 0, sWidth, sHeight, (ImageObserver)null); + tmp.getRGB(0, 0, tWidth, tHeight, pixels, 0, tWidth); + gfx.dispose(); + } + + update(); + } + + public void func_783_a() + { + if (oldanaglyph != field_1131_c) + { + update(); + } + } + + public void func_782_a(RenderEngine p_782_1_) + { + GL11.glBindTexture(GL_TEXTURE_2D, p_782_1_.func_1070_a(targetTex)); + } + + public void update() + { + for (int idx = 0; idx < pixels.length; idx++) + { + int i = idx * 4; + int a = pixels[idx] >> 24 & 255; + int r = pixels[idx] >> 16 & 255; + int g = pixels[idx] >> 8 & 255; + int b = pixels[idx] >> 0 & 255; + + if (field_1131_c) + { + r = g = b = (r + g + b) / 3; + } + + field_1127_a[i + 0] = (byte)r; + field_1127_a[i + 1] = (byte)g; + field_1127_a[i + 2] = (byte)b; + field_1127_a[i + 3] = (byte)a; + } + + oldanaglyph = field_1131_c; + } + + //Implementation of http://scale2x.sourceforge.net/algorithm.html + public static BufferedImage scale2x(BufferedImage image) + { + int w = image.getWidth(); + int h = image.getHeight(); + BufferedImage tmp = new BufferedImage(w * 2, h * 2, 2); + + for (int x = 0; x < h; ++x) + { + int x2 = x * 2; + for (int y = 0; y < w; ++y) + { + int y2 = y * 2; + int E = image.getRGB(y, x); + int D = (x == 0 ? E : image.getRGB(y, x - 1)); + int B = (y == 0 ? E : image.getRGB(y - 1, x )); + int H = (y >= w - 1 ? E : image.getRGB(y + 1, x )); + int F = (x >= h - 1 ? E : image.getRGB(y, x + 1)); + + int e0, e1, e2, e3; + + if (B != H && D != F) + { + e0 = D == B ? D : E; + e1 = B == F ? F : E; + e2 = D == H ? D : E; + e3 = H == F ? F : E; + } + else + { + e0 = e1 = e2 = e3 = E; + } + + tmp.setRGB(y2, x2, e0); + tmp.setRGB(y2 + 1, x2, e1); + tmp.setRGB(y2, x2 + 1, e2); + tmp.setRGB(y2 + 1, x2 + 1, e3); + } + } + + return tmp; + } +} diff --git a/common/cpw/mods/fml/common/Loader.java b/common/cpw/mods/fml/common/Loader.java index 2f816eb20d..ff47ffff84 100644 --- a/common/cpw/mods/fml/common/Loader.java +++ b/common/cpw/mods/fml/common/Loader.java @@ -568,4 +568,14 @@ public class Loader { return canonicalConfigDir; } + + public String getCrashInformation() + { + String ret = String.format("Forge Mod Loader version %s.%s.%s.%s for Minecraft %s\n", major, minor, rev, build, mcversion); + for (ModContainer mod : mods) + { + ret += mod.getName() + "\n"; + } + return ret; + } } diff --git a/common/cpw/mods/fml/common/modloader/ModLoaderModContainer.java b/common/cpw/mods/fml/common/modloader/ModLoaderModContainer.java index 19aa2814cd..b657ed49d2 100644 --- a/common/cpw/mods/fml/common/modloader/ModLoaderModContainer.java +++ b/common/cpw/mods/fml/common/modloader/ModLoaderModContainer.java @@ -50,6 +50,7 @@ public class ModLoaderModContainer implements ModContainer private boolean clockTicks; private boolean guiTicks; private boolean guiClockTicks; + private long lastClock; public ModLoaderModContainer(Class modClazz, File modSource) { this.modClazz = modClazz; @@ -283,13 +284,29 @@ public class ModLoaderModContainer implements ModContainer @Override public boolean shouldTick(float clock) { - return isTicking && ((!clockTicks || clock!=lastClock ) || () + if (isTicking && (!clockTicks || clock != lastClock)) + { + return true; + } + if (guiTicks && (!guiClockTicks || clock != lastClock)) + { + return true; + } return false; } @Override public void tickStart(float clock) { - isTicking = mod.doTickInGame(clock, FMLCommonHandler.instance().getMinecraftInstance()); + Object inst = FMLCommonHandler.instance().getMinecraftInstance(); + if (isTicking) + { + isTicking = mod.doTickInGame(clock, inst); + } + if (guiTicks) + { + guiTicks = mod.doTickInGui(clock, inst); + } + lastClock = clock; } @Override public void tickEnd(float clock) diff --git a/patches/minecraft/net/minecraft/src/BlockDispenser.java.patch b/patches/minecraft/net/minecraft/src/BlockDispenser.java.patch new file mode 100644 index 0000000000..7fb6086f3a --- /dev/null +++ b/patches/minecraft/net/minecraft/src/BlockDispenser.java.patch @@ -0,0 +1,24 @@ +--- ../src-base/minecraft/net/minecraft/src/BlockDispenser.java 0000-00-00 00:00:00.000000000 -0000 ++++ ../src-work/minecraft/net/minecraft/src/BlockDispenser.java 0000-00-00 00:00:00.000000000 -0000 +@@ -2,6 +2,8 @@ + + import java.util.Random; + ++import cpw.mods.fml.client.FMLClientHandler; ++ + public class BlockDispenser extends BlockContainer + { + private Random field_28035_a = new Random(); +@@ -141,7 +143,11 @@ + } + else + { +- if (var12.field_1617_c == Item.field_226_j.field_291_aS) ++ if (FMLClientHandler.instance().tryDispensingEntity(p_21033_1_, var13, var15, var17, var9, var10, var12)) ++ { ++ ; ++ } ++ else if (var12.field_1617_c == Item.field_226_j.field_291_aS) + { + EntityArrow var19 = new EntityArrow(p_21033_1_, var13, var15, var17); + var19.func_408_a((double)var9, 0.10000000149011612D, (double)var10, 1.1F, 6.0F); diff --git a/patches/minecraft/net/minecraft/src/EntityItem.java.patch b/patches/minecraft/net/minecraft/src/EntityItem.java.patch new file mode 100644 index 0000000000..ae9fd0ba32 --- /dev/null +++ b/patches/minecraft/net/minecraft/src/EntityItem.java.patch @@ -0,0 +1,18 @@ +--- ../src-base/minecraft/net/minecraft/src/EntityItem.java 0000-00-00 00:00:00.000000000 -0000 ++++ ../src-work/minecraft/net/minecraft/src/EntityItem.java 0000-00-00 00:00:00.000000000 -0000 +@@ -1,5 +1,7 @@ + package net.minecraft.src; + ++import cpw.mods.fml.client.FMLClientHandler; ++ + public class EntityItem extends Entity + { + public ItemStack field_801_a; +@@ -140,6 +142,7 @@ + + if (this.field_805_c == 0 && p_6378_1_.field_778_b.func_504_a(this.field_801_a)) + { ++ FMLClientHandler.instance().notifyItemPickup(this, p_6378_1_); + if (this.field_801_a.field_1617_c == Block.field_385_K.field_376_bc) + { + p_6378_1_.func_27026_a(AchievementList.field_25198_c); diff --git a/patches/minecraft/net/minecraft/src/GenLayerBiome.java.patch b/patches/minecraft/net/minecraft/src/GenLayerBiome.java.patch new file mode 100644 index 0000000000..abe33ffacb --- /dev/null +++ b/patches/minecraft/net/minecraft/src/GenLayerBiome.java.patch @@ -0,0 +1,17 @@ +--- ../src-base/minecraft/net/minecraft/src/GenLayerBiome.java 0000-00-00 00:00:00.000000000 -0000 ++++ ../src-work/minecraft/net/minecraft/src/GenLayerBiome.java 0000-00-00 00:00:00.000000000 -0000 +@@ -7,13 +7,8 @@ + public GenLayerBiome(long p_i1011_1_, GenLayer p_i1011_3_, WorldType p_i1011_4_) + { + super(p_i1011_1_); +- this.field_35509_b = new BiomeGenBase[] {BiomeGenBase.field_4249_h, BiomeGenBase.field_4253_d, BiomeGenBase.field_35483_e, BiomeGenBase.field_4255_b, BiomeGenBase.field_35485_c, BiomeGenBase.field_4250_g, BiomeGenBase.field_48416_w}; ++ this.field_35509_b = p_i1011_4_.getBiomesForWorldType(); + this.field_35504_a = p_i1011_3_; +- +- if (p_i1011_4_ == WorldType.field_48634_d) +- { +- this.field_35509_b = new BiomeGenBase[] {BiomeGenBase.field_4249_h, BiomeGenBase.field_4253_d, BiomeGenBase.field_35483_e, BiomeGenBase.field_4255_b, BiomeGenBase.field_35485_c, BiomeGenBase.field_4250_g}; +- } + } + + public int[] func_35500_a(int p_35500_1_, int p_35500_2_, int p_35500_3_, int p_35500_4_) diff --git a/patches/minecraft/net/minecraft/src/PanelCrashReport.java.patch b/patches/minecraft/net/minecraft/src/PanelCrashReport.java.patch new file mode 100644 index 0000000000..7d557a0a89 --- /dev/null +++ b/patches/minecraft/net/minecraft/src/PanelCrashReport.java.patch @@ -0,0 +1,20 @@ +--- ../src-base/minecraft/net/minecraft/src/PanelCrashReport.java 0000-00-00 00:00:00.000000000 -0000 ++++ ../src-work/minecraft/net/minecraft/src/PanelCrashReport.java 0000-00-00 00:00:00.000000000 -0000 +@@ -12,6 +12,8 @@ + import org.lwjgl.Sys; + import org.lwjgl.opengl.GL11; + ++import cpw.mods.fml.common.Loader; ++ + public class PanelCrashReport extends Panel + { + public PanelCrashReport(UnexpectedThrowable p_i634_1_) +@@ -43,7 +45,7 @@ + + var5 = var5 + "\n"; + var5 = var5 + var3; +- String var6 = ""; ++ String var6 = Loader.instance().getCrashInformation(); + var6 = var6 + "\n"; + var6 = var6 + "\n"; + diff --git a/patches/minecraft/net/minecraft/src/RenderBlocks.java.patch b/patches/minecraft/net/minecraft/src/RenderBlocks.java.patch new file mode 100644 index 0000000000..963a77a20a --- /dev/null +++ b/patches/minecraft/net/minecraft/src/RenderBlocks.java.patch @@ -0,0 +1,428 @@ +--- ../src-base/minecraft/net/minecraft/src/RenderBlocks.java 0000-00-00 00:00:00.000000000 -0000 ++++ ../src-work/minecraft/net/minecraft/src/RenderBlocks.java 0000-00-00 00:00:00.000000000 -0000 +@@ -7,94 +7,95 @@ + public class RenderBlocks + { + public IBlockAccess field_1772_a; +- private int field_1771_b = -1; +- private boolean field_1774_c = false; +- private boolean field_1773_d = false; ++ public int field_1771_b = -1; ++ public boolean field_1774_c = false; ++ public boolean field_1773_d = false; + public static boolean field_27406_a = true; ++ public static boolean cfgGrassFix = true; + public boolean field_31088_b = true; +- private int field_31087_g = 0; +- private int field_31086_h = 0; +- private int field_31085_i = 0; +- private int field_31084_j = 0; +- private int field_31083_k = 0; +- private int field_31082_l = 0; +- private boolean field_22385_e; +- private float field_22384_f; +- private float field_22383_g; +- private float field_22382_h; +- private float field_22381_i; +- private float field_22380_j; +- private float field_22379_k; +- private float field_22378_l; +- private float field_22377_m; +- private float field_22376_n; +- private float field_22375_o; +- private float field_22374_p; +- private float field_22373_q; +- private float field_22372_r; +- private float field_22371_s; +- private float field_22370_t; +- private float field_22369_u; +- private float field_22368_v; +- private float field_22367_w; +- private float field_22366_x; +- private float field_22365_y; +- private float field_22364_z; +- private float field_22362_A; +- private float field_22360_B; +- private float field_22358_C; +- private float field_22356_D; +- private float field_22354_E; +- private float field_22353_F; +- private int field_35936_P; +- private int field_35935_Q; +- private int field_35938_R; +- private int field_35937_S; +- private int field_35932_T; +- private int field_35931_U; +- private int field_35934_V; +- private int field_35933_W; +- private int field_35940_X; +- private int field_35939_Y; +- private int field_35941_Z; +- private int field_35951_aa; +- private int field_35952_ab; +- private int field_35949_ac; +- private int field_35950_ad; +- private int field_35955_ae; +- private int field_35956_af; +- private int field_35953_ag; +- private int field_35954_ah; +- private int field_35945_ai; +- private int field_35946_aj = 1; +- private int field_35943_ak; +- private int field_35944_al; +- private int field_35947_am; +- private int field_35948_an; +- private float field_22351_H; +- private float field_22350_I; +- private float field_22349_J; +- private float field_22348_K; +- private float field_22347_L; +- private float field_22346_M; +- private float field_22345_N; +- private float field_22344_O; +- private float field_22343_P; +- private float field_22342_Q; +- private float field_22341_R; +- private float field_22340_S; +- private boolean field_22339_T; +- private boolean field_22338_U; +- private boolean field_22337_V; +- private boolean field_22336_W; +- private boolean field_22335_X; +- private boolean field_22334_Y; +- private boolean field_22333_Z; +- private boolean field_22363_aa; +- private boolean field_22361_ab; +- private boolean field_22359_ac; +- private boolean field_22357_ad; +- private boolean field_22355_ae; ++ public int field_31087_g = 0; ++ public int field_31086_h = 0; ++ public int field_31085_i = 0; ++ public int field_31084_j = 0; ++ public int field_31083_k = 0; ++ public int field_31082_l = 0; ++ public boolean field_22385_e; ++ public float field_22384_f; ++ public float field_22383_g; ++ public float field_22382_h; ++ public float field_22381_i; ++ public float field_22380_j; ++ public float field_22379_k; ++ public float field_22378_l; ++ public float field_22377_m; ++ public float field_22376_n; ++ public float field_22375_o; ++ public float field_22374_p; ++ public float field_22373_q; ++ public float field_22372_r; ++ public float field_22371_s; ++ public float field_22370_t; ++ public float field_22369_u; ++ public float field_22368_v; ++ public float field_22367_w; ++ public float field_22366_x; ++ public float field_22365_y; ++ public float field_22364_z; ++ public float field_22362_A; ++ public float field_22360_B; ++ public float field_22358_C; ++ public float field_22356_D; ++ public float field_22354_E; ++ public float field_22353_F; ++ public int field_35936_P; ++ public int field_35935_Q; ++ public int field_35938_R; ++ public int field_35937_S; ++ public int field_35932_T; ++ public int field_35931_U; ++ public int field_35934_V; ++ public int field_35933_W; ++ public int field_35940_X; ++ public int field_35939_Y; ++ public int field_35941_Z; ++ public int field_35951_aa; ++ public int field_35952_ab; ++ public int field_35949_ac; ++ public int field_35950_ad; ++ public int field_35955_ae; ++ public int field_35956_af; ++ public int field_35953_ag; ++ public int field_35954_ah; ++ public int field_35945_ai; ++ public int field_35946_aj = 1; ++ public int field_35943_ak; ++ public int field_35944_al; ++ public int field_35947_am; ++ public int field_35948_an; ++ public float field_22351_H; ++ public float field_22350_I; ++ public float field_22349_J; ++ public float field_22348_K; ++ public float field_22347_L; ++ public float field_22346_M; ++ public float field_22345_N; ++ public float field_22344_O; ++ public float field_22343_P; ++ public float field_22342_Q; ++ public float field_22341_R; ++ public float field_22340_S; ++ public boolean field_22339_T; ++ public boolean field_22338_U; ++ public boolean field_22337_V; ++ public boolean field_22336_W; ++ public boolean field_22335_X; ++ public boolean field_22334_Y; ++ public boolean field_22333_Z; ++ public boolean field_22363_aa; ++ public boolean field_22361_ab; ++ public boolean field_22359_ac; ++ public boolean field_22357_ad; ++ public boolean field_22355_ae; + + public RenderBlocks(IBlockAccess p_i647_1_) + { +@@ -126,10 +127,40 @@ + { + int var5 = p_1234_1_.func_210_f(); + p_1234_1_.func_238_a(this.field_1772_a, p_1234_2_, p_1234_3_, p_1234_4_); +- return var5 == 0 ? this.func_1228_k(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 4 ? this.func_1222_j(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 13 ? this.func_1233_l(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 1 ? this.func_1226_h(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 19 ? this.func_1232_i(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 23 ? this.func_40726_m(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 6 ? this.func_35930_l(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 2 ? this.func_1241_b(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 3 ? this.func_1235_d(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 5 ? this.func_1242_e(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 8 ? this.func_1221_g(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 7 ? this.func_1218_o(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 9 ? this.func_1216_f((BlockRail)p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 10 ? this.func_1214_n(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 27 ? this.func_41088_a((BlockDragonEgg)p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 11 ? this.func_35925_a((BlockFence)p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 12 ? this.func_1229_c(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 14 ? this.func_22331_p(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 15 ? this.func_22332_q(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 16 ? this.func_31074_b(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_, false) : (var5 == 17 ? this.func_31080_c(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_, true) : (var5 == 18 ? this.func_35922_a((BlockPane)p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 20 ? this.func_35929_i(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 21 ? this.func_35923_a((BlockFenceGate)p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 24 ? this.func_40728_a((BlockCauldron)p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 25 ? this.func_40730_a((BlockBrewingStand)p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : (var5 == 26 ? this.func_40729_s(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_) : false)))))))))))))))))))))))))); ++ switch (var5) ++ { ++ case 0: return func_1228_k(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 4: return func_1222_j(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 13: return func_1233_l(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 1: return func_1226_h(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 19: return func_1232_i(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 23: return func_40726_m(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 6: return func_35930_l(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 2: return func_1241_b(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 3: return func_1235_d(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 5: return func_1242_e(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 8: return func_1221_g(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 7: return func_1218_o(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 9: return func_1216_f((BlockRail)p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 10: return func_1214_n(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 27: return func_41088_a((BlockDragonEgg)p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 11: return func_35925_a((BlockFence)p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 12: return func_1229_c(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 14: return func_22331_p(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 15: return func_22332_q(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 16: return func_31074_b(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_, false); ++ case 17: return func_31080_c(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_, true); ++ case 18: return func_35922_a((BlockPane)p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 20: return func_35929_i(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 21: return func_35923_a((BlockFenceGate)p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 24: return func_40728_a((BlockCauldron)p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 25: return func_40730_a((BlockBrewingStand)p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ case 26: return func_40729_s(p_1234_1_, p_1234_2_, p_1234_3_, p_1234_4_); ++ default: return ModLoader.renderWorldBlock(this, field_1772_a, p_1234_2_, p_1234_3_, p_1234_4_, p_1234_1_, var5); ++ } + } + +- private boolean func_40729_s(Block p_40729_1_, int p_40729_2_, int p_40729_3_, int p_40729_4_) ++ public boolean func_40729_s(Block p_40729_1_, int p_40729_2_, int p_40729_3_, int p_40729_4_) + { + int var5 = this.field_1772_a.func_602_e(p_40729_2_, p_40729_3_, p_40729_4_); + int var6 = var5 & 3; +@@ -169,7 +200,7 @@ + } + } + +- private boolean func_22331_p(Block p_22331_1_, int p_22331_2_, int p_22331_3_, int p_22331_4_) ++ public boolean func_22331_p(Block p_22331_1_, int p_22331_2_, int p_22331_3_, int p_22331_4_) + { + Tessellator var5 = Tessellator.field_1512_a; + int var6 = this.field_1772_a.func_602_e(p_22331_2_, p_22331_3_, p_22331_4_); +@@ -313,7 +344,7 @@ + return true; + } + +- private boolean func_40730_a(BlockBrewingStand p_40730_1_, int p_40730_2_, int p_40730_3_, int p_40730_4_) ++ public boolean func_40730_a(BlockBrewingStand p_40730_1_, int p_40730_2_, int p_40730_3_, int p_40730_4_) + { + p_40730_1_.func_213_a(0.4375F, 0.0F, 0.4375F, 0.5625F, 0.875F, 0.5625F); + this.func_1228_k(p_40730_1_, p_40730_2_, p_40730_3_, p_40730_4_); +@@ -387,7 +418,7 @@ + return true; + } + +- private boolean func_40728_a(BlockCauldron p_40728_1_, int p_40728_2_, int p_40728_3_, int p_40728_4_) ++ public boolean func_40728_a(BlockCauldron p_40728_1_, int p_40728_2_, int p_40728_3_, int p_40728_4_) + { + this.func_1228_k(p_40728_1_, p_40728_2_, p_40728_3_, p_40728_4_); + Tessellator var5 = Tessellator.field_1512_a; +@@ -470,7 +501,7 @@ + return true; + } + +- private boolean func_22332_q(Block p_22332_1_, int p_22332_2_, int p_22332_3_, int p_22332_4_) ++ public boolean func_22332_q(Block p_22332_1_, int p_22332_2_, int p_22332_3_, int p_22332_4_) + { + int var5 = this.field_1772_a.func_602_e(p_22332_2_, p_22332_3_, p_22332_4_); + int var6 = var5 & 3; +@@ -563,7 +594,7 @@ + this.field_1773_d = false; + } + +- private boolean func_31074_b(Block p_31074_1_, int p_31074_2_, int p_31074_3_, int p_31074_4_, boolean p_31074_5_) ++ public boolean func_31074_b(Block p_31074_1_, int p_31074_2_, int p_31074_3_, int p_31074_4_, boolean p_31074_5_) + { + int var6 = this.field_1772_a.func_602_e(p_31074_2_, p_31074_3_, p_31074_4_); + boolean var7 = p_31074_5_ || (var6 & 8) != 0; +@@ -676,7 +707,7 @@ + return true; + } + +- private void func_31076_a(double p_31076_1_, double p_31076_3_, double p_31076_5_, double p_31076_7_, double p_31076_9_, double p_31076_11_, float p_31076_13_, double p_31076_14_) ++ public void func_31076_a(double p_31076_1_, double p_31076_3_, double p_31076_5_, double p_31076_7_, double p_31076_9_, double p_31076_11_, float p_31076_13_, double p_31076_14_) + { + int var16 = 108; + +@@ -699,7 +730,7 @@ + var19.func_983_a(p_31076_3_, p_31076_7_, p_31076_11_, var24, var26); + } + +- private void func_31081_b(double p_31081_1_, double p_31081_3_, double p_31081_5_, double p_31081_7_, double p_31081_9_, double p_31081_11_, float p_31081_13_, double p_31081_14_) ++ public void func_31081_b(double p_31081_1_, double p_31081_3_, double p_31081_5_, double p_31081_7_, double p_31081_9_, double p_31081_11_, float p_31081_13_, double p_31081_14_) + { + int var16 = 108; + +@@ -722,7 +753,7 @@ + var19.func_983_a(p_31081_3_, p_31081_7_, p_31081_11_, var24, var26); + } + +- private void func_31077_c(double p_31077_1_, double p_31077_3_, double p_31077_5_, double p_31077_7_, double p_31077_9_, double p_31077_11_, float p_31077_13_, double p_31077_14_) ++ public void func_31077_c(double p_31077_1_, double p_31077_3_, double p_31077_5_, double p_31077_7_, double p_31077_9_, double p_31077_11_, float p_31077_13_, double p_31077_14_) + { + int var16 = 108; + +@@ -752,7 +783,7 @@ + this.field_1773_d = false; + } + +- private boolean func_31080_c(Block p_31080_1_, int p_31080_2_, int p_31080_3_, int p_31080_4_, boolean p_31080_5_) ++ public boolean func_31080_c(Block p_31080_1_, int p_31080_2_, int p_31080_3_, int p_31080_4_, boolean p_31080_5_) + { + int var6 = this.field_1772_a.func_602_e(p_31080_2_, p_31080_3_, p_31080_4_); + int var7 = BlockPistonExtension.func_31050_c(var6); +@@ -2728,7 +2759,7 @@ + } + } + +- private float func_1224_a(int p_1224_1_, int p_1224_2_, int p_1224_3_, Material p_1224_4_) ++ public float func_1224_a(int p_1224_1_, int p_1224_2_, int p_1224_3_, Material p_1224_4_) + { + int var5 = 0; + float var6 = 0.0F; +@@ -3260,7 +3291,7 @@ + var27 = p_22330_1_.func_211_a(this.field_1772_a, p_22330_2_, p_22330_3_, p_22330_4_, 2); + this.func_1220_c(p_22330_1_, (double)p_22330_2_, (double)p_22330_3_, (double)p_22330_4_, var27); + +- if (field_27406_a && var27 == 3 && this.field_1771_b < 0) ++ if (cfgGrassFix && var27 == 3 && this.field_1771_b < 0) + { + this.field_22351_H *= p_22330_5_; + this.field_22350_I *= p_22330_5_; +@@ -3383,7 +3414,7 @@ + var27 = p_22330_1_.func_211_a(this.field_1772_a, p_22330_2_, p_22330_3_, p_22330_4_, 3); + this.func_1225_d(p_22330_1_, (double)p_22330_2_, (double)p_22330_3_, (double)p_22330_4_, p_22330_1_.func_211_a(this.field_1772_a, p_22330_2_, p_22330_3_, p_22330_4_, 3)); + +- if (field_27406_a && var27 == 3 && this.field_1771_b < 0) ++ if (cfgGrassFix && var27 == 3 && this.field_1771_b < 0) + { + this.field_22351_H *= p_22330_5_; + this.field_22350_I *= p_22330_5_; +@@ -3506,7 +3537,7 @@ + var27 = p_22330_1_.func_211_a(this.field_1772_a, p_22330_2_, p_22330_3_, p_22330_4_, 4); + this.func_1231_e(p_22330_1_, (double)p_22330_2_, (double)p_22330_3_, (double)p_22330_4_, var27); + +- if (field_27406_a && var27 == 3 && this.field_1771_b < 0) ++ if (cfgGrassFix && var27 == 3 && this.field_1771_b < 0) + { + this.field_22351_H *= p_22330_5_; + this.field_22350_I *= p_22330_5_; +@@ -3629,7 +3660,7 @@ + var27 = p_22330_1_.func_211_a(this.field_1772_a, p_22330_2_, p_22330_3_, p_22330_4_, 5); + this.func_1236_f(p_22330_1_, (double)p_22330_2_, (double)p_22330_3_, (double)p_22330_4_, var27); + +- if (field_27406_a && var27 == 3 && this.field_1771_b < 0) ++ if (cfgGrassFix && var27 == 3 && this.field_1771_b < 0) + { + this.field_22351_H *= p_22330_5_; + this.field_22350_I *= p_22330_5_; +@@ -3653,7 +3684,7 @@ + return var8; + } + +- private int func_35924_c(int p_35924_1_, int p_35924_2_, int p_35924_3_, int p_35924_4_) ++ public int func_35924_c(int p_35924_1_, int p_35924_2_, int p_35924_3_, int p_35924_4_) + { + if (p_35924_1_ == 0) + { +@@ -3735,7 +3766,7 @@ + var28 = p_4152_1_.func_211_a(this.field_1772_a, p_4152_2_, p_4152_3_, p_4152_4_, 2); + this.func_1220_c(p_4152_1_, (double)p_4152_2_, (double)p_4152_3_, (double)p_4152_4_, var28); + +- if (field_27406_a && var28 == 3 && this.field_1771_b < 0) ++ if (cfgGrassFix && var28 == 3 && this.field_1771_b < 0) + { + var8.func_987_a(var18 * p_4152_5_, var21 * p_4152_6_, var24 * p_4152_7_); + this.func_1220_c(p_4152_1_, (double)p_4152_2_, (double)p_4152_3_, (double)p_4152_4_, 38); +@@ -3751,7 +3782,7 @@ + var28 = p_4152_1_.func_211_a(this.field_1772_a, p_4152_2_, p_4152_3_, p_4152_4_, 3); + this.func_1225_d(p_4152_1_, (double)p_4152_2_, (double)p_4152_3_, (double)p_4152_4_, var28); + +- if (field_27406_a && var28 == 3 && this.field_1771_b < 0) ++ if (cfgGrassFix && var28 == 3 && this.field_1771_b < 0) + { + var8.func_987_a(var18 * p_4152_5_, var21 * p_4152_6_, var24 * p_4152_7_); + this.func_1225_d(p_4152_1_, (double)p_4152_2_, (double)p_4152_3_, (double)p_4152_4_, 38); +@@ -3767,7 +3798,7 @@ + var28 = p_4152_1_.func_211_a(this.field_1772_a, p_4152_2_, p_4152_3_, p_4152_4_, 4); + this.func_1231_e(p_4152_1_, (double)p_4152_2_, (double)p_4152_3_, (double)p_4152_4_, var28); + +- if (field_27406_a && var28 == 3 && this.field_1771_b < 0) ++ if (cfgGrassFix && var28 == 3 && this.field_1771_b < 0) + { + var8.func_987_a(var19 * p_4152_5_, var22 * p_4152_6_, var25 * p_4152_7_); + this.func_1231_e(p_4152_1_, (double)p_4152_2_, (double)p_4152_3_, (double)p_4152_4_, 38); +@@ -3783,7 +3814,7 @@ + var28 = p_4152_1_.func_211_a(this.field_1772_a, p_4152_2_, p_4152_3_, p_4152_4_, 5); + this.func_1236_f(p_4152_1_, (double)p_4152_2_, (double)p_4152_3_, (double)p_4152_4_, var28); + +- if (field_27406_a && var28 == 3 && this.field_1771_b < 0) ++ if (cfgGrassFix && var28 == 3 && this.field_1771_b < 0) + { + var8.func_987_a(var19 * p_4152_5_, var22 * p_4152_6_, var25 * p_4152_7_); + this.func_1236_f(p_4152_1_, (double)p_4152_2_, (double)p_4152_3_, (double)p_4152_4_, 38); +@@ -5291,6 +5322,10 @@ + + p_1227_1_.func_213_a(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } ++ else ++ { ++ ModLoader.renderInvBlock(this, p_1227_1_, p_1227_2_, var6); ++ } + } + else + { +@@ -5347,6 +5382,17 @@ + + public static boolean func_1219_a(int p_1219_0_) + { +- return p_1219_0_ == 0 ? true : (p_1219_0_ == 13 ? true : (p_1219_0_ == 10 ? true : (p_1219_0_ == 11 ? true : (p_1219_0_ == 27 ? true : (p_1219_0_ == 22 ? true : (p_1219_0_ == 21 ? true : p_1219_0_ == 16)))))); ++ switch (p_1219_0_) ++ { ++ case 0: ++ case 13: ++ case 10: ++ case 11: ++ case 27: ++ case 22: ++ case 21: ++ case 16: return true; ++ default: return ModLoader.renderBlockIsItemFull3D(p_1219_0_); ++ } + } + } diff --git a/patches/minecraft/net/minecraft/src/WorldType.java.patch b/patches/minecraft/net/minecraft/src/WorldType.java.patch new file mode 100644 index 0000000000..0fa425495d --- /dev/null +++ b/patches/minecraft/net/minecraft/src/WorldType.java.patch @@ -0,0 +1,56 @@ +--- ../src-base/minecraft/net/minecraft/src/WorldType.java 0000-00-00 00:00:00.000000000 -0000 ++++ ../src-work/minecraft/net/minecraft/src/WorldType.java 0000-00-00 00:00:00.000000000 -0000 +@@ -1,5 +1,10 @@ + package net.minecraft.src; + ++import static net.minecraft.src.BiomeGenBase.*; ++ ++import java.util.Arrays; ++import java.util.List; ++ + public class WorldType + { + public static final WorldType[] field_48637_a = new WorldType[16]; +@@ -10,6 +15,8 @@ + private final int field_48632_f; + private boolean field_48633_g; + private boolean field_48638_h; ++ ++ private BiomeGenBase[] biomesForWorldType; + + private WorldType(int p_i1080_1_, String p_i1080_2_) + { +@@ -22,6 +29,15 @@ + this.field_48632_f = p_i1081_3_; + this.field_48633_g = true; + field_48637_a[p_i1081_1_] = this; ++ switch(p_i1081_1_) ++ { ++ case 8: ++ biomesForWorldType = new BiomeGenBase[]{field_4249_h, field_4253_d, field_35483_e, field_4255_b, field_35485_c, field_4250_g}; ++ break; ++ default: ++ biomesForWorldType = new BiomeGenBase[]{field_4249_h, field_4253_d, field_35483_e, field_4255_b, field_35485_c, field_4250_g, field_48416_w}; ++ break; ++ } + } + + public String func_48628_a() +@@ -78,4 +94,17 @@ + + return null; + } ++ ++ public BiomeGenBase[] getBiomesForWorldType() ++ { ++ return biomesForWorldType; ++ } ++ ++ public void addNewBiome(BiomeGenBase biome) ++ { ++ List biomes = Arrays.asList(biomesForWorldType); ++ biomes.add(biome); ++ biomesForWorldType = biomes.toArray(new BiomeGenBase[0]); ++ } ++ + }