diff --git a/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch b/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch index 7fc54e8f02..1e1f1185d1 100644 --- a/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch @@ -85,7 +85,7 @@ } - float f1 = this.field_78293_l ? 0.5F : 1.0F; -+ float f1 = func_78263_a(c0) / 32f; ++ float f1 = j == -1 || this.field_78293_l ? 0.5f : 1f; boolean flag = (c0 == 0 || j == -1 || this.field_78293_l) && p_78255_2_; if (flag) diff --git a/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch b/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch index d571ffad00..e739c16550 100644 --- a/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch +++ b/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch @@ -13,15 +13,33 @@ if (this.field_78779_k.func_77145_d() && this.field_78776_a.field_71439_g.func_70694_bm() != null && this.field_78776_a.field_71439_g.func_70694_bm().func_77973_b() instanceof ItemSword) { return false; -@@ -128,7 +134,7 @@ +@@ -128,13 +134,7 @@ else { world.func_175718_b(2001, p_178888_1_, Block.func_176210_f(iblockstate)); - boolean flag = world.func_175698_g(p_178888_1_); -+ boolean flag = block1.removedByPlayer(world, p_178888_1_, field_78776_a.field_71439_g, false); - if (flag) - { +- if (flag) +- { +- block1.func_176206_d(world, p_178888_1_, iblockstate); +- } +- + this.field_178895_c = new BlockPos(this.field_178895_c.func_177958_n(), -1, this.field_178895_c.func_177952_p()); + + if (!this.field_78779_k.func_77145_d()) +@@ -152,6 +152,12 @@ + } + } + ++ boolean flag = block1.removedByPlayer(world, p_178888_1_, field_78776_a.field_71439_g, false); ++ ++ if (flag) ++ { ++ block1.func_176206_d(world, p_178888_1_, iblockstate); ++ } + return flag; + } + } @@ -356,11 +362,19 @@ { if (this.field_78779_k != WorldSettings.GameType.SPECTATOR) diff --git a/patches/minecraft/net/minecraft/entity/Entity.java.patch b/patches/minecraft/net/minecraft/entity/Entity.java.patch index 2b356e9222..957649fc8a 100644 --- a/patches/minecraft/net/minecraft/entity/Entity.java.patch +++ b/patches/minecraft/net/minecraft/entity/Entity.java.patch @@ -121,7 +121,7 @@ public float func_180428_a(Explosion p_180428_1_, World p_180428_2_, BlockPos p_180428_3_, IBlockState p_180428_4_) { - return p_180428_4_.func_177230_c().func_149638_a(this); -+ return p_180428_4_.func_177230_c().getExplosionResistance(p_180428_2_, p_180428_3_.func_177963_a(0, func_70047_e(), 0), this, p_180428_1_); ++ return p_180428_4_.func_177230_c().getExplosionResistance(p_180428_2_, p_180428_3_, this, p_180428_1_); } public boolean func_174816_a(Explosion p_174816_1_, World p_174816_2_, BlockPos p_174816_3_, IBlockState p_174816_4_, float p_174816_5_) diff --git a/patches/minecraft/net/minecraft/world/World.java.patch b/patches/minecraft/net/minecraft/world/World.java.patch index 14bdc46835..b2554d20a2 100644 --- a/patches/minecraft/net/minecraft/world/World.java.patch +++ b/patches/minecraft/net/minecraft/world/World.java.patch @@ -573,16 +573,18 @@ for (int i = 0; i < this.field_73010_i.size(); ++i) { -@@ -2435,7 +2599,7 @@ +@@ -2434,8 +2598,9 @@ + Block block = p_147467_3_.func_177428_a(blockpos); j = j + p_147467_1_; k = k + p_147467_2_; ++ BlockPos worldpos = blockpos.func_177982_a(p_147467_1_, 0, p_147467_2_); - if (block.func_149688_o() == Material.field_151579_a && this.func_175699_k(blockpos) <= this.field_73012_v.nextInt(8) && this.func_175642_b(EnumSkyBlock.SKY, blockpos) <= 0) -+ if (block.isAir(this, blockpos) && this.func_175699_k(blockpos) <= this.field_73012_v.nextInt(8) && this.func_175642_b(EnumSkyBlock.SKY, blockpos) <= 0) ++ if (block.isAir(this, worldpos) && this.func_175699_k(worldpos) <= this.field_73012_v.nextInt(8) && this.func_175642_b(EnumSkyBlock.SKY, worldpos) <= 0) //Forge: isAir, and fix arguments to world positions instead of chunk position { EntityPlayer entityplayer = this.func_72977_a((double)j + 0.5D, (double)l + 0.5D, (double)k + 0.5D, 8.0D); -@@ -2475,6 +2639,11 @@ +@@ -2475,6 +2640,11 @@ public boolean func_175670_e(BlockPos p_175670_1_, boolean p_175670_2_) { @@ -594,7 +596,7 @@ BiomeGenBase biomegenbase = this.func_180494_b(p_175670_1_); float f = biomegenbase.func_180626_a(p_175670_1_); -@@ -2516,6 +2685,11 @@ +@@ -2516,6 +2686,11 @@ public boolean func_175708_f(BlockPos p_175708_1_, boolean p_175708_2_) { @@ -606,7 +608,7 @@ BiomeGenBase biomegenbase = this.func_180494_b(p_175708_1_); float f = biomegenbase.func_180626_a(p_175708_1_); -@@ -2533,7 +2707,7 @@ +@@ -2533,7 +2708,7 @@ { Block block = this.func_180495_p(p_175708_1_).func_177230_c(); @@ -615,7 +617,7 @@ { return true; } -@@ -2565,10 +2739,11 @@ +@@ -2565,10 +2740,11 @@ else { Block block = this.func_180495_p(p_175638_1_).func_177230_c(); @@ -630,7 +632,7 @@ { j = 1; } -@@ -2768,10 +2943,10 @@ +@@ -2768,10 +2944,10 @@ public List func_175674_a(Entity p_175674_1_, AxisAlignedBB p_175674_2_, Predicate p_175674_3_) { List list = Lists.newArrayList(); @@ -645,7 +647,7 @@ for (int i1 = i; i1 <= j; ++i1) { -@@ -2824,10 +2999,10 @@ +@@ -2824,10 +3000,10 @@ public List func_175647_a(Class p_175647_1_, AxisAlignedBB p_175647_2_, Predicate p_175647_3_) { @@ -660,7 +662,7 @@ List list = Lists.newArrayList(); for (int i1 = i; i1 <= j; ++i1) -@@ -2905,11 +3080,13 @@ +@@ -2905,11 +3081,13 @@ public void func_175650_b(Collection p_175650_1_) { @@ -677,7 +679,7 @@ } } -@@ -2922,7 +3099,9 @@ +@@ -2922,7 +3100,9 @@ { Block block = this.func_180495_p(p_175716_2_).func_177230_c(); AxisAlignedBB axisalignedbb = p_175716_3_ ? null : p_175716_1_.func_180640_a(this, p_175716_2_, p_175716_1_.func_176223_P()); @@ -688,7 +690,7 @@ } public int func_181545_F() -@@ -3007,7 +3186,7 @@ +@@ -3007,7 +3187,7 @@ { IBlockState iblockstate = this.func_180495_p(p_175651_1_); Block block = iblockstate.func_177230_c(); @@ -697,7 +699,7 @@ } public boolean func_175640_z(BlockPos p_175640_1_) -@@ -3134,7 +3313,7 @@ +@@ -3134,7 +3314,7 @@ public long func_72905_C() { @@ -706,7 +708,7 @@ } public long func_82737_E() -@@ -3144,17 +3323,17 @@ +@@ -3144,17 +3324,17 @@ public long func_72820_D() { @@ -727,7 +729,7 @@ if (!this.func_175723_af().func_177746_a(blockpos)) { -@@ -3166,7 +3345,7 @@ +@@ -3166,7 +3346,7 @@ public void func_175652_B(BlockPos p_175652_1_) { @@ -736,7 +738,7 @@ } @SideOnly(Side.CLIENT) -@@ -3186,12 +3365,18 @@ +@@ -3186,12 +3366,18 @@ if (!this.field_72996_f.contains(p_72897_1_)) { @@ -755,7 +757,7 @@ return true; } -@@ -3285,8 +3470,7 @@ +@@ -3285,8 +3471,7 @@ public boolean func_180502_D(BlockPos p_180502_1_) { @@ -765,7 +767,7 @@ } public MapStorage func_175693_T() -@@ -3345,12 +3529,12 @@ +@@ -3345,12 +3530,12 @@ public int func_72800_K() { @@ -780,7 +782,7 @@ } public Random func_72843_D(int p_72843_1_, int p_72843_2_, int p_72843_3_) -@@ -3405,7 +3589,7 @@ +@@ -3405,7 +3590,7 @@ @SideOnly(Side.CLIENT) public double func_72919_O() { @@ -789,7 +791,7 @@ } public void func_175715_c(int p_175715_1_, BlockPos p_175715_2_, int p_175715_3_) -@@ -3447,18 +3631,14 @@ +@@ -3447,18 +3632,14 @@ { IBlockState iblockstate = this.func_180495_p(blockpos); @@ -814,7 +816,7 @@ } } } -@@ -3528,4 +3708,81 @@ +@@ -3528,4 +3709,81 @@ int k = 128; return i >= -k && i <= k && j >= -k && j <= k; } diff --git a/src/main/java/net/minecraftforge/common/BiomeManager.java b/src/main/java/net/minecraftforge/common/BiomeManager.java index 63953e90c6..474bf18946 100644 --- a/src/main/java/net/minecraftforge/common/BiomeManager.java +++ b/src/main/java/net/minecraftforge/common/BiomeManager.java @@ -137,7 +137,7 @@ public class BiomeManager public static ImmutableList getBiomes(BiomeType type) { int idx = type.ordinal(); - List list = idx > biomes.length ? null : biomes[idx]; + List list = idx >= biomes.length ? null : biomes[idx]; return list != null ? ImmutableList.copyOf(list) : null; } @@ -169,7 +169,7 @@ public class BiomeManager if (ret.ordinal() >= biomes.length) { - biomes = Arrays.copyOf(biomes, ret.ordinal()); + biomes = Arrays.copyOf(biomes, ret.ordinal() + 1); } return ret; diff --git a/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java b/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java index cf0dbd7d45..814a68311b 100644 --- a/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java +++ b/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java @@ -710,7 +710,7 @@ public class FMLClientHandler implements IFMLSidedHandler public void showInGameModOptions(GuiIngameMenu guiIngameMenu) { - showGuiScreen(new GuiIngameModOptions(guiIngameMenu)); + showGuiScreen(new GuiModList(guiIngameMenu)); } public IModGuiFactory getGuiFactoryFor(ModContainer selectedMod) diff --git a/src/main/java/net/minecraftforge/fml/client/GuiIngameModOptions.java b/src/main/java/net/minecraftforge/fml/client/GuiIngameModOptions.java deleted file mode 100644 index fbee967cd9..0000000000 --- a/src/main/java/net/minecraftforge/fml/client/GuiIngameModOptions.java +++ /dev/null @@ -1,55 +0,0 @@ -package net.minecraftforge.fml.client; - -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -public class GuiIngameModOptions extends GuiScreen -{ - private final GuiScreen parentScreen; - protected String title = "Mod Options"; - private GuiModOptionList optionList; - - public GuiIngameModOptions(GuiScreen parentScreen) - { - this.parentScreen = parentScreen; - } - - @SuppressWarnings("unchecked") - @Override - public void initGui() - { - this.optionList=new GuiModOptionList(this); - //this.optionList.registerScrollButtons(this.buttonList, 7, 8); - this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, I18n.format("gui.done", new Object[0]))); - } - - @Override - protected void actionPerformed(GuiButton button) - { - if (button.enabled) - { - if (button.id == 200) - { - this.mc.gameSettings.saveOptions(); - this.mc.displayGuiScreen(this.parentScreen); - } - } - } - - @Override - public void drawScreen(int mouseX, int mouseY, float partialTicks) - { - // force a non-transparent background - this.drawDefaultBackground(); - this.optionList.drawScreen(mouseX, mouseY, partialTicks); - this.drawCenteredString(this.fontRendererObj, this.title, this.width / 2, 15, 0xFFFFFF); - super.drawScreen(mouseX, mouseY, partialTicks); - } - - FontRenderer getFontRenderer() { - return fontRendererObj; - } - -} diff --git a/src/main/java/net/minecraftforge/fml/client/GuiModList.java b/src/main/java/net/minecraftforge/fml/client/GuiModList.java index c3d66a8c41..8cb8efc683 100644 --- a/src/main/java/net/minecraftforge/fml/client/GuiModList.java +++ b/src/main/java/net/minecraftforge/fml/client/GuiModList.java @@ -579,7 +579,6 @@ public class GuiModList extends GuiScreen k += GuiModList.this.fontRendererObj.getStringWidth(((ChatComponentText)part).getChatComponentText_TextValue()); if (k >= x) { - System.out.println(part); GuiModList.this.func_175276_a(part); break; } diff --git a/src/main/java/net/minecraftforge/fml/client/GuiModOptionList.java b/src/main/java/net/minecraftforge/fml/client/GuiModOptionList.java deleted file mode 100644 index 21e3536f06..0000000000 --- a/src/main/java/net/minecraftforge/fml/client/GuiModOptionList.java +++ /dev/null @@ -1,47 +0,0 @@ -package net.minecraftforge.fml.client; - -import net.minecraft.client.renderer.Tessellator; - -public class GuiModOptionList extends GuiScrollingList { - - private GuiIngameModOptions parent; - - public GuiModOptionList(GuiIngameModOptions parent) - { - super(parent.mc, 150, parent.height, 32, parent.height - 65 + 4, 10, 35, parent.width, parent.height); - this.parent = parent; - } - - @Override - protected int getSize() - { - return 1; - } - - @Override - protected void elementClicked(int index, boolean doubleClick) - { - // TODO Auto-generated method stub - - } - - @Override - protected boolean isSelected(int index) - { - return false; - } - - @Override - protected void drawBackground() - { - } - - @Override - protected void drawSlot(int slotIdx, int entryRight, int slotTop, int slotBuffer, Tessellator tess) - { - this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth("Test 1", listWidth - 10), this.left + 3 , slotTop + 2, 0xFF2222); - this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth("TEST 2", listWidth - 10), this.left + 3 , slotTop + 12, 0xFF2222); - this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth("DISABLED", listWidth - 10), this.left + 3 , slotTop + 22, 0xFF2222); - } - -}