Updated patches to new packages.

This commit is contained in:
LexManos 2012-12-08 19:33:29 -08:00
parent ded6b4667b
commit b02f93aeed
60 changed files with 536 additions and 472 deletions

View file

@ -1,10 +0,0 @@
--- ../src-base/common/net/minecraft/src/CallableSuspiciousClasses.java
+++ ../src-work/common/net/minecraft/src/CallableSuspiciousClasses.java
@@ -130,6 +130,6 @@
public Object call()
{
- return this.func_85085_a();
+ return "FML is installed";
}
}

View file

@ -1,19 +0,0 @@
--- ../src-base/common/net/minecraft/src/MemoryConnection.java
+++ ../src-work/common/net/minecraft/src/MemoryConnection.java
@@ -8,6 +8,8 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+
+import cpw.mods.fml.common.network.FMLNetworkHandler;
public class MemoryConnection implements INetworkManager
{
@@ -71,6 +73,7 @@
if (this.field_74441_e && this.field_74442_b.isEmpty())
{
this.field_74440_d.func_72515_a(this.field_74438_f, this.field_74439_g);
+ FMLNetworkHandler.onConnectionClosed(this, this.field_74440_d.getPlayer());
}
}

View file

@ -1,11 +0,0 @@
--- ../src-base/common/net/minecraft/src/NetHandler.java
+++ ../src-work/common/net/minecraft/src/NetHandler.java
@@ -345,4 +345,8 @@
{
return false;
}
+
+ public abstract void handleVanilla250Packet(Packet250CustomPayload payload);
+
+ public abstract EntityPlayer getPlayer();
}

View file

@ -1,20 +0,0 @@
--- ../src-base/common/net/minecraft/src/SlotFurnace.java
+++ ../src-work/common/net/minecraft/src/SlotFurnace.java
@@ -1,4 +1,6 @@
package net.minecraft.src;
+
+import cpw.mods.fml.common.registry.GameRegistry;
public class SlotFurnace extends Slot
{
@@ -72,7 +74,10 @@
}
}
+
this.field_75228_b = 0;
+
+ GameRegistry.onItemSmelted(field_75229_a, p_75208_1_);
if (p_75208_1_.field_77993_c == Item.field_77703_o.field_77779_bT)
{

View file

@ -1,19 +0,0 @@
--- ../src-base/common/net/minecraft/src/TcpConnection.java
+++ ../src-work/common/net/minecraft/src/TcpConnection.java
@@ -17,6 +17,8 @@
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import javax.crypto.SecretKey;
+
+import cpw.mods.fml.common.network.FMLNetworkHandler;
public class TcpConnection implements INetworkManager
{
@@ -387,6 +389,7 @@
if (this.field_74472_n && this.field_74473_o.isEmpty())
{
this.field_74485_r.func_72515_a(this.field_74481_v, this.field_74480_w);
+ FMLNetworkHandler.onConnectionClosed(this, this.field_74485_r.getPlayer());
}
}

View file

@ -1,12 +1,11 @@
--- ../src-base/minecraft/net/minecraft/client/GuiCreateWorld.java
+++ ../src-work/minecraft/net/minecraft/client/GuiCreateWorld.java
@@ -213,7 +213,8 @@
var2 = (long)var4.hashCode();
--- ../src-base/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
@@ -214,6 +214,8 @@
}
}
-
+
+ WorldType.field_77139_a[this.field_73916_E].onGUICreateWorldPress();
+
EnumGameType var8 = EnumGameType.func_77142_a(this.field_73927_m);
WorldSettings var6 = new WorldSettings(var2, var8, this.field_73925_n, this.field_73933_r, WorldType.field_77139_a[this.field_73916_E]);
var6.func_82750_a(this.field_82290_a);

View file

@ -1,5 +1,5 @@
--- ../src-base/minecraft/net/minecraft/client/GuiErrorScreen.java
+++ ../src-work/minecraft/net/minecraft/client/GuiErrorScreen.java
--- ../src-base/minecraft/net/minecraft/client/gui/GuiErrorScreen.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiErrorScreen.java
@@ -9,6 +9,8 @@
private String field_74001_a;
private String field_74000_b;

View file

@ -1,7 +1,7 @@
--- ../src-base/minecraft/net/minecraft/client/GuiMainMenu.java
+++ ../src-work/minecraft/net/minecraft/client/GuiMainMenu.java
--- ../src-base/minecraft/net/minecraft/client/gui/GuiMainMenu.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiMainMenu.java
@@ -1,5 +1,7 @@
package net.minecraft.client;
package net.minecraft.client.gui;
+import cpw.mods.fml.client.GuiModList;
+import cpw.mods.fml.common.FMLCommonHandler;
@ -14,19 +14,19 @@
import java.util.Date;
+import java.util.List;
import java.util.Random;
import net.minecraft.shared.DemoWorldServer;
import net.minecraft.shared.ISaveFormat;
@@ -18,6 +21,9 @@
import net.minecraft.shared.WorldInfo;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.Tessellator;
@@ -22,6 +25,9 @@
import org.lwjgl.opengl.GL11;
import org.lwjgl.util.glu.GLU;
+
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+
@SideOnly(Side.CLIENT)
public class GuiMainMenu extends GuiScreen
@@ -129,7 +135,8 @@
{
@@ -132,7 +138,8 @@
this.func_73969_a(var4, 24, var2);
}
@ -36,7 +36,7 @@
if (this.field_73882_e.field_71448_m)
{
@@ -193,6 +200,11 @@
@@ -196,6 +203,11 @@
if (p_73875_1_.field_73741_f == 4)
{
this.field_73882_e.func_71400_g();
@ -48,7 +48,7 @@
}
if (p_73875_1_.field_73741_f == 11)
@@ -411,7 +423,15 @@
@@ -414,7 +426,16 @@
var9 = var9 + " Demo";
}
@ -62,6 +62,7 @@
+ this.func_73731_b(this.field_73886_k, brd, 2, this.field_73881_g - ( 10 + i * (this.field_73886_k.field_78288_b + 1)), 16777215);
+ }
+ }
+
String var10 = "Copyright Mojang AB. Do not distribute!";
this.func_73731_b(this.field_73886_k, var10, this.field_73880_f - this.field_73886_k.func_78256_a(var10) - 2, this.field_73881_g - 10, 16777215);
super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);

View file

@ -1,10 +1,10 @@
--- ../src-base/minecraft/net/minecraft/src/GuiConnecting.java
+++ ../src-work/minecraft/net/minecraft/src/GuiConnecting.java
@@ -122,4 +122,10 @@
--- ../src-base/minecraft/net/minecraft/client/multiplayer/GuiConnecting.java
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/GuiConnecting.java
@@ -128,4 +128,10 @@
{
return p_74251_0_.field_73882_e;
}
+
+
+ public static void forceTermination(GuiConnecting gui)
+ {
+ gui.field_74258_b = true;

View file

@ -1,5 +1,5 @@
--- ../src-base/minecraft/net/minecraft/client/NetClientHandler.java
+++ ../src-work/minecraft/net/minecraft/client/NetClientHandler.java
--- ../src-base/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
@ -9,7 +9,7 @@
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
@@ -154,11 +156,14 @@
@@ -172,11 +174,14 @@
public int field_72556_d = 20;
Random field_72557_e = new Random();
@ -24,7 +24,7 @@
}
public NetClientHandler(Minecraft p_i3104_1_, IntegratedServer p_i3104_2_) throws IOException
@@ -166,6 +171,7 @@
@@ -184,6 +189,7 @@
this.field_72563_h = p_i3104_1_;
this.field_72555_g = new MemoryConnection(this);
p_i3104_2_.func_71343_a().func_71754_a((MemoryConnection)this.field_72555_g, p_i3104_1_.field_71449_j.field_74286_b);
@ -32,15 +32,15 @@
}
public void func_72547_c()
@@ -236,6 +242,7 @@
@@ -254,6 +260,7 @@
public void func_72513_a(Packet252SharedKey p_72513_1_)
{
+ this.func_72552_c(FMLNetworkHandler.getFMLFakeLoginPacket());
+ this.func_72552_c(FMLNetworkHandler.getFMLFakeLoginPacket());
this.func_72552_c(new Packet205ClientCommand(0));
}
@@ -251,6 +258,7 @@
@@ -269,6 +276,7 @@
this.field_72563_h.field_71439_g.field_70157_k = p_72455_1_.field_73561_a;
this.field_72556_d = p_72455_1_.field_73562_h;
this.field_72563_h.field_71442_b.func_78746_a(p_72455_1_.field_73557_d);
@ -48,15 +48,15 @@
this.field_72563_h.field_71474_y.func_82879_c();
}
@@ -736,6 +744,7 @@
@@ -754,6 +762,7 @@
public void func_72481_a(Packet3Chat p_72481_1_)
{
+ FMLNetworkHandler.onConnectionClosed(this.field_72555_g, this.getPlayer());
+ FMLNetworkHandler.onConnectionClosed(this.field_72555_g, this.getPlayer());
this.field_72563_h.field_71456_v.func_73827_b().func_73765_a(p_72481_1_.field_73476_b);
}
@@ -1225,6 +1234,11 @@
@@ -1243,6 +1252,11 @@
public void func_72494_a(Packet131MapData p_72494_1_)
{
@ -68,7 +68,7 @@
if (p_72494_1_.field_73438_a == Item.field_77744_bd.field_77779_bT)
{
ItemMap.func_77874_a(p_72494_1_.field_73436_b, this.field_72563_h.field_71441_e).func_76192_a(p_72494_1_.field_73437_c);
@@ -1334,6 +1348,11 @@
@@ -1352,6 +1366,11 @@
public void func_72501_a(Packet250CustomPayload p_72501_1_)
{
@ -80,7 +80,7 @@
if ("MC|TPack".equals(p_72501_1_.field_73630_a))
{
String[] var2 = (new String(p_72501_1_.field_73629_c)).split("\u0000");
@@ -1378,4 +1397,20 @@
@@ -1396,4 +1415,20 @@
{
return this.field_72555_g;
}

View file

@ -1,13 +1,13 @@
--- ../src-base/minecraft/net/minecraft/client/ItemRenderer.java
+++ ../src-work/minecraft/net/minecraft/client/ItemRenderer.java
--- ../src-base/minecraft/net/minecraft/client/renderer/ItemRenderer.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/ItemRenderer.java
@@ -1,5 +1,6 @@
package net.minecraft.client;
package net.minecraft.client.renderer;
+import cpw.mods.fml.client.TextureFXManager;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.shared.Block;
@@ -33,7 +34,12 @@
import net.minecraft.block.Block;
@@ -41,7 +42,12 @@
public void func_78443_a(EntityLiving p_78443_1_, ItemStack p_78443_2_, int p_78443_3_)
{
GL11.glPushMatrix();
@ -21,7 +21,7 @@
if (var4 != null && RenderBlocks.func_78597_b(var4.func_71857_b()))
{
@@ -130,10 +136,17 @@
@@ -138,10 +144,17 @@
float var10;
float var11;
@ -43,7 +43,7 @@
var11 = var6 * var9;
p_78439_1_.func_78374_a((double)var11, 0.0D, (double)(0.0F - var7), (double)var10, (double)p_78439_5_);
p_78439_1_.func_78374_a((double)var11, 0.0D, 0.0D, (double)var10, (double)p_78439_5_);
@@ -145,11 +158,11 @@
@@ -153,11 +166,11 @@
p_78439_1_.func_78382_b();
p_78439_1_.func_78375_b(1.0F, 0.0F, 0.0F);
@ -60,7 +60,7 @@
p_78439_1_.func_78374_a((double)var11, 1.0D, (double)(0.0F - var7), (double)var10, (double)p_78439_3_);
p_78439_1_.func_78374_a((double)var11, 1.0D, 0.0D, (double)var10, (double)p_78439_3_);
p_78439_1_.func_78374_a((double)var11, 0.0D, 0.0D, (double)var10, (double)p_78439_5_);
@@ -160,11 +173,11 @@
@@ -168,11 +181,11 @@
p_78439_1_.func_78382_b();
p_78439_1_.func_78375_b(0.0F, 1.0F, 0.0F);
@ -77,7 +77,7 @@
p_78439_1_.func_78374_a(0.0D, (double)var11, 0.0D, (double)p_78439_2_, (double)var10);
p_78439_1_.func_78374_a((double)var6, (double)var11, 0.0D, (double)p_78439_4_, (double)var10);
p_78439_1_.func_78374_a((double)var6, (double)var11, (double)(0.0F - var7), (double)p_78439_4_, (double)var10);
@@ -175,10 +188,10 @@
@@ -183,10 +196,10 @@
p_78439_1_.func_78382_b();
p_78439_1_.func_78375_b(0.0F, -1.0F, 0.0F);

View file

@ -1,19 +1,19 @@
--- ../src-base/minecraft/net/minecraft/client/RenderBlocks.java
+++ ../src-work/minecraft/net/minecraft/client/RenderBlocks.java
@@ -33,6 +33,8 @@
import net.minecraft.shared.MathHelper;
import net.minecraft.shared.Vec3;
import net.minecraft.shared.World;
--- ../src-base/minecraft/net/minecraft/client/renderer/RenderBlocks.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/RenderBlocks.java
@@ -29,6 +29,7 @@
import net.minecraft.block.BlockWall;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
+import net.minecraft.src.FMLRenderAccessLibrary;
+
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
@@ -214,7 +216,81 @@
import net.minecraft.util.Direction;
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
@@ -215,7 +216,82 @@
int var5 = p_78612_1_.func_71857_b();
p_78612_1_.func_71902_a(this.field_78669_a, p_78612_2_, p_78612_3_, p_78612_4_);
this.func_83018_a(p_78612_1_);
- return var5 == 0 ? this.func_78570_q(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 31 ? this.func_78581_r(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 4 ? this.func_78621_p(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 13 ? this.func_78584_s(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 1 ? this.func_78620_l(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 19 ? this.func_78603_m(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 23 ? this.func_78566_o(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 6 ? this.func_78614_n(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 2 ? this.func_78572_c(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 3 ? this.func_78590_h(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 5 ? this.func_78589_i(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 8 ? this.func_78576_j(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 7 ? this.func_78601_u(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 9 ? this.func_78586_a((BlockRail)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 10 ? this.func_78565_t((BlockStairs)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 27 ? this.func_78618_a((BlockDragonEgg)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 11 ? this.func_78582_a((BlockFence)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 32 ? this.func_82779_a((BlockWall)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 12 ? this.func_78594_e(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 29 ? this.func_78577_f(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 30 ? this.func_78619_g(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 14 ? this.func_78574_w(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 15 ? this.func_78610_x(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 16 ? this.func_78593_b(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_, false) : (var5 == 17 ? this.func_78608_c(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_, true) : (var5 == 18 ? this.func_78592_a((BlockPane)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 20 ? this.func_78598_k(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 21 ? this.func_78580_a((BlockFenceGate)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 24 ? this.func_78615_a((BlockCauldron)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 33 ? this.func_82780_a((BlockFlowerPot)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 35 ? this.func_82775_a((BlockAnvil)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 25 ? this.func_78585_a((BlockBrewingStand)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 26 ? this.func_78567_v(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 28 ? this.func_78616_a((BlockCocoa)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : (var5 == 34 ? this.func_82778_a((BlockBeacon)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_) : false))))))))))))))))))))))))))))))))));
+
+ switch (var5)
+ {
+ case 0:
@ -92,7 +92,7 @@
}
public boolean func_78567_v(Block p_78567_1_, int p_78567_2_, int p_78567_3_, int p_78567_4_)
@@ -6540,6 +6616,10 @@
@@ -6541,6 +6617,10 @@
this.func_83020_a(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
this.func_78595_a();
}
@ -103,7 +103,7 @@
}
else
{
@@ -6598,6 +6678,36 @@
@@ -6599,6 +6679,36 @@
public static boolean func_78597_b(int p_78597_0_)
{

View file

@ -1,7 +1,7 @@
--- ../src-base/minecraft/net/minecraft/client/RenderEngine.java
+++ ../src-work/minecraft/net/minecraft/client/RenderEngine.java
--- ../src-base/minecraft/net/minecraft/client/renderer/RenderEngine.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/RenderEngine.java
@@ -1,8 +1,11 @@
package net.minecraft.client;
package net.minecraft.client.renderer;
+import cpw.mods.fml.client.TextureFXManager;
+import cpw.mods.fml.common.FMLLog;
@ -20,17 +20,18 @@
+import java.util.logging.Logger;
+
import javax.imageio.ImageIO;
import net.minecraft.shared.IntHashMap;
import org.lwjgl.opengl.GL11;
@@ -34,6 +40,7 @@
public boolean field_78361_b = false;
import net.minecraft.client.GLAllocation;
import net.minecraft.client.GameSettings;
@@ -41,6 +47,8 @@
public TexturePackList field_78366_k;
private BufferedImage field_78364_l = new BufferedImage(64, 64, 2);
+ public static Logger log = FMLLog.getLogger();
+ public static Logger log = FMLLog.getLogger();
+
public RenderEngine(TexturePackList p_i3192_1_, GameSettings p_i3192_2_)
{
@@ -98,8 +105,9 @@
this.field_78366_k = p_i3192_1_;
@@ -104,8 +112,9 @@
this.field_78359_d.put(p_78346_1_, var7);
return var7;
}
@ -38,11 +39,11 @@
- {
+ catch (Exception var6)
+ {
+ log.log(Level.INFO, String.format("An error occured reading texture file %s (getTexture)", p_78346_1_), var6);
+ log.log(Level.INFO, String.format("An error occured reading texture file %s (getTexture)", p_78346_1_), var6);
var6.printStackTrace();
int[] var5 = this.func_78348_b(this.field_78364_l);
this.field_78359_d.put(p_78346_1_, var5);
@@ -246,6 +254,7 @@
@@ -252,6 +261,7 @@
int var3 = p_78351_1_.getWidth();
int var4 = p_78351_1_.getHeight();
@ -50,15 +51,15 @@
int[] var5 = new int[var3 * var4];
byte[] var6 = new byte[var3 * var4 * 4];
p_78351_1_.getRGB(0, 0, var3, var4, var5, 0, var3);
@@ -406,6 +415,7 @@
@@ -412,6 +422,7 @@
public void func_78355_a(TextureFX p_78355_1_)
{
+ TextureFXManager.instance().onPreRegisterEffect(p_78355_1_);
+ TextureFXManager.instance().onPreRegisterEffect(p_78355_1_);
this.field_78367_h.add(p_78355_1_);
p_78355_1_.func_76846_a();
}
@@ -418,28 +428,44 @@
@@ -424,28 +435,44 @@
{
TextureFX var3 = (TextureFX)this.field_78367_h.get(var2);
var3.field_76851_c = this.field_78365_j.field_74337_g;
@ -103,16 +104,16 @@
for (int var3 = 0; var3 < p_82772_1_.field_76849_e; ++var3)
{
+ int xOffset = p_82772_1_.field_76850_b % 16 * tWidth + var3 * tWidth;
+ int xOffset = p_82772_1_.field_76850_b % 16 * tWidth + var3 * tWidth;
for (int var4 = 0; var4 < p_82772_1_.field_76849_e; ++var4)
{
- GL11.glTexSubImage2D(GL11.GL_TEXTURE_2D, 0, p_82772_1_.field_76850_b % 16 * 16 + var3 * 16, p_82772_1_.field_76850_b / 16 * 16 + var4 * 16, 16, 16, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, this.field_78358_g);
+ int yOffset = p_82772_1_.field_76850_b / 16 * tHeight + var4 * tHeight;
+ GL11.glTexSubImage2D(GL11.GL_TEXTURE_2D, 0, xOffset, yOffset, tWidth, tHeight, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, this.field_78358_g);
+ int yOffset = p_82772_1_.field_76850_b / 16 * tHeight + var4 * tHeight;
+ GL11.glTexSubImage2D(GL11.GL_TEXTURE_2D, 0, xOffset, yOffset, tWidth, tHeight, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, this.field_78358_g);
}
}
@@ -505,8 +531,9 @@
@@ -511,8 +538,9 @@
this.field_78361_b = false;
this.field_78363_a = false;
}
@ -120,11 +121,11 @@
- {
+ catch (Exception var7)
+ {
+ log.log(Level.INFO,String.format("An error occured reading texture file %s (refreshTexture)", var9), var7);
+ log.log(Level.INFO,String.format("An error occured reading texture file %s (refreshTexture)", var9), var7);
var7.printStackTrace();
}
}
@@ -542,8 +569,9 @@
@@ -548,8 +576,9 @@
this.field_78361_b = false;
this.field_78363_a = false;
}
@ -132,7 +133,7 @@
- {
+ catch (Exception var6)
+ {
+ log.log(Level.INFO,String.format("An error occured reading texture file data %s (refreshTexture)", var9), var6);
+ log.log(Level.INFO,String.format("An error occured reading texture file data %s (refreshTexture)", var9), var6);
var6.printStackTrace();
}
}

View file

@ -1,14 +1,14 @@
--- ../src-base/minecraft/net/minecraft/client/TextureCompassFX.java
+++ ../src-work/minecraft/net/minecraft/client/TextureCompassFX.java
--- ../src-base/minecraft/net/minecraft/client/renderer/texturefx/TextureCompassFX.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texturefx/TextureCompassFX.java
@@ -1,5 +1,6 @@
package net.minecraft.client;
package net.minecraft.client.renderer.texturefx;
+import cpw.mods.fml.client.FMLTextureFX;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import java.awt.image.BufferedImage;
@@ -9,13 +10,17 @@
import net.minecraft.shared.Item;
@@ -10,13 +11,17 @@
import net.minecraft.util.ChunkCoordinates;
@SideOnly(Side.CLIENT)
-public class TextureCompassFX extends TextureFX
@ -26,7 +26,7 @@
public TextureCompassFX(Minecraft p_i3212_1_)
{
@@ -23,12 +28,24 @@
@@ -24,12 +29,25 @@
this.field_76865_g = p_i3212_1_;
this.field_76847_f = 1;
@ -42,6 +42,7 @@
+ stileSizeMask = tileSizeMask;
+ stileSizeSquareMask = tileSizeSquareMask;
+ field_76867_h = new int[tileSizeSquare];
+
try
{
- BufferedImage var2 = ImageIO.read(Minecraft.class.getResource("/gui/items.png"));
@ -55,7 +56,7 @@
}
catch (IOException var5)
{
@@ -57,7 +74,7 @@
@@ -58,7 +76,7 @@
int var17;
int var16;
@ -64,7 +65,7 @@
{
int var11 = var8[var10] >> 24 & 255;
int var12 = var8[var10] >> 16 & 255;
@@ -140,11 +157,11 @@
@@ -141,11 +159,11 @@
int var24;
int var26;
@ -81,7 +82,7 @@
var20 = 100;
var21 = 100;
var22 = 100;
@@ -166,11 +183,11 @@
@@ -167,11 +185,12 @@
var9[var19 * 4 + 3] = (byte)var23;
}
@ -90,6 +91,7 @@
- var17 = (int)(8.5D + var30 * (double)var16 * 0.3D);
- var18 = (int)(7.5D + var31 * (double)var16 * 0.3D * 0.5D);
- var19 = var18 * 16 + var17;
+
+ for (var16 = -(stileSizeBase>>2); var16 <= stileSizeBase; ++var16)
+ {
+ var17 = (int)((stileSizeBase >> 1) + 0.5D + var30 * (double)var16 * 0.3D);

View file

@ -1,12 +1,12 @@
--- ../src-base/minecraft/net/minecraft/client/TextureFlamesFX.java
+++ ../src-work/minecraft/net/minecraft/client/TextureFlamesFX.java
--- ../src-base/minecraft/net/minecraft/client/renderer/texturefx/TextureFlamesFX.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texturefx/TextureFlamesFX.java
@@ -1,18 +1,32 @@
package net.minecraft.client;
package net.minecraft.client.renderer.texturefx;
+import cpw.mods.fml.client.FMLTextureFX;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.shared.Block;
import net.minecraft.block.Block;
@SideOnly(Side.CLIENT)
-public class TextureFlamesFX extends TextureFX

View file

@ -1,13 +1,13 @@
--- ../src-base/minecraft/net/minecraft/client/TextureLavaFX.java
+++ ../src-work/minecraft/net/minecraft/client/TextureLavaFX.java
--- ../src-base/minecraft/net/minecraft/client/renderer/texturefx/TextureLavaFX.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texturefx/TextureLavaFX.java
@@ -1,12 +1,13 @@
package net.minecraft.client;
package net.minecraft.client.renderer.texturefx;
+import cpw.mods.fml.client.FMLTextureFX;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.shared.Block;
import net.minecraft.shared.MathHelper;
import net.minecraft.block.Block;
import net.minecraft.util.MathHelper;
@SideOnly(Side.CLIENT)
-public class TextureLavaFX extends TextureFX

View file

@ -1,13 +1,13 @@
--- ../src-base/minecraft/net/minecraft/client/TextureLavaFlowFX.java
+++ ../src-work/minecraft/net/minecraft/client/TextureLavaFlowFX.java
--- ../src-base/minecraft/net/minecraft/client/renderer/texturefx/TextureLavaFlowFX.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texturefx/TextureLavaFlowFX.java
@@ -1,12 +1,13 @@
package net.minecraft.client;
package net.minecraft.client.renderer.texturefx;
+import cpw.mods.fml.client.FMLTextureFX;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.shared.Block;
import net.minecraft.shared.MathHelper;
import net.minecraft.block.Block;
import net.minecraft.util.MathHelper;
@SideOnly(Side.CLIENT)
-public class TextureLavaFlowFX extends TextureFX

View file

@ -1,14 +1,14 @@
--- ../src-base/minecraft/net/minecraft/client/TexturePortalFX.java
+++ ../src-work/minecraft/net/minecraft/client/TexturePortalFX.java
--- ../src-base/minecraft/net/minecraft/client/renderer/texturefx/TexturePortalFX.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texturefx/TexturePortalFX.java
@@ -1,5 +1,6 @@
package net.minecraft.client;
package net.minecraft.client.renderer.texturefx;
+import cpw.mods.fml.client.FMLTextureFX;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import java.util.Random;
@@ -7,31 +8,39 @@
import net.minecraft.shared.MathHelper;
import net.minecraft.util.MathHelper;
@SideOnly(Side.CLIENT)
-public class TexturePortalFX extends TextureFX

View file

@ -1,7 +1,7 @@
--- ../src-base/minecraft/net/minecraft/client/TextureWatchFX.java
+++ ../src-work/minecraft/net/minecraft/client/TextureWatchFX.java
@@ -1,14 +1,20 @@
package net.minecraft.client;
--- ../src-base/minecraft/net/minecraft/client/renderer/texturefx/TextureWatchFX.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texturefx/TextureWatchFX.java
@@ -1,15 +1,21 @@
package net.minecraft.client.renderer.texturefx;
+import cpw.mods.fml.client.FMLTextureFX;
import cpw.mods.fml.common.Side;
@ -14,7 +14,8 @@
+import java.util.logging.Level;
+
import javax.imageio.ImageIO;
import net.minecraft.shared.Item;
import net.minecraft.client.Minecraft;
import net.minecraft.item.Item;
@SideOnly(Side.CLIENT)
-public class TextureWatchFX extends TextureFX
@ -22,19 +23,20 @@
{
private Minecraft field_76860_g;
private int[] field_76863_h = new int[256];
@@ -21,19 +27,37 @@
@@ -22,19 +28,39 @@
super(Item.field_77752_aS.func_77617_a(0));
this.field_76860_g = p_i3214_1_;
this.field_76847_f = 1;
+ setup();
+ }
+
+ @Override
+ public void setup()
+ {
+ super.setup();
+ field_76863_h = new int[tileSizeSquare];
+ field_76864_i = new int[tileSizeSquare];
try
{
- BufferedImage var2 = ImageIO.read(Minecraft.class.getResource("/gui/items.png"));
@ -52,7 +54,7 @@
+ {
+ BufferedImage tmp = new BufferedImage(tileSizeBase, tileSizeBase, 6);
+ Graphics2D gfx = tmp.createGraphics();
+ gfx.drawImage(var2, 0, 0, tileSizeBase, tileSizeBase, 0, 0, var2.getWidth(), var2.getHeight(), (ImageObserver) null);
+ gfx.drawImage(var2, 0, 0, tileSizeBase, tileSizeBase, 0, 0, var2.getWidth(), var2.getHeight(), (ImageObserver)null);
+ gfx.dispose();
+ var2 = tmp;
+ }
@ -62,13 +64,13 @@
- catch (IOException var5)
+ catch (Exception var5)
{
- var5.printStackTrace();
var5.printStackTrace();
+ log.log(Level.WARNING, String.format("A problem occurred with the watch texture: animation will be disabled"), var5);
+ setErrored(true);
}
}
@@ -80,7 +104,7 @@
@@ -81,7 +107,7 @@
double var5 = Math.sin(this.field_76861_j);
double var7 = Math.cos(this.field_76861_j);
@ -77,21 +79,21 @@
{
int var10 = this.field_76863_h[var9] >> 24 & 255;
int var11 = this.field_76863_h[var9] >> 16 & 255;
@@ -89,12 +113,12 @@
@@ -90,12 +116,12 @@
if (var11 == var13 && var12 == 0 && var13 > 0)
{
- double var14 = -((double)(var9 % 16) / 15.0D - 0.5D);
- double var16 = (double)(var9 / 16) / 15.0D - 0.5D;
+ double var14 = -((double)(var9 % tileSizeSquare) / tileSizeMask - 0.5D);
+ double var16 = (double)(var9 / tileSizeSquare) / tileSizeMask - 0.5D;
+ double var14 = -((double)(var9 % tileSizeBase) / tileSizeMask - 0.5D);
+ double var16 = (double)(var9 / tileSizeBase) / tileSizeMask - 0.5D;
int var18 = var11;
- int var19 = (int)((var14 * var7 + var16 * var5 + 0.5D) * 16.0D);
- int var20 = (int)((var16 * var7 - var14 * var5 + 0.5D) * 16.0D);
- int var21 = (var19 & 15) + (var20 & 15) * 16;
+ int var19 = (int)((var14 * var7 + var16 * var5 + 0.5D) * tileSizeSquare);
+ int var20 = (int)((var16 * var7 - var14 * var5 + 0.5D) * tileSizeSquare);
+ int var21 = (var19 & tileSizeMask) + (var20 & tileSizeMask) * tileSizeSquare;
+ int var19 = (int)((var14 * var7 + var16 * var5 + 0.5D) * tileSizeBase);
+ int var20 = (int)((var16 * var7 - var14 * var5 + 0.5D) * tileSizeBase);
+ int var21 = (var19 & tileSizeMask) + (var20 & tileSizeMask) * tileSizeBase;
var10 = this.field_76864_i[var21] >> 24 & 255;
var11 = (this.field_76864_i[var21] >> 16 & 255) * var11 / 255;
var12 = (this.field_76864_i[var21] >> 8 & 255) * var18 / 255;

View file

@ -1,12 +1,12 @@
--- ../src-base/minecraft/net/minecraft/client/TextureWaterFX.java
+++ ../src-work/minecraft/net/minecraft/client/TextureWaterFX.java
--- ../src-base/minecraft/net/minecraft/client/renderer/texturefx/TextureWaterFX.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texturefx/TextureWaterFX.java
@@ -1,11 +1,12 @@
package net.minecraft.client;
package net.minecraft.client.renderer.texturefx;
+import cpw.mods.fml.client.FMLTextureFX;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.shared.Block;
import net.minecraft.block.Block;
@SideOnly(Side.CLIENT)
-public class TextureWaterFX extends TextureFX

View file

@ -1,12 +1,12 @@
--- ../src-base/minecraft/net/minecraft/client/TextureWaterFlowFX.java
+++ ../src-work/minecraft/net/minecraft/client/TextureWaterFlowFX.java
--- ../src-base/minecraft/net/minecraft/client/renderer/texturefx/TextureWaterFlowFX.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texturefx/TextureWaterFlowFX.java
@@ -1,11 +1,12 @@
package net.minecraft.client;
package net.minecraft.client.renderer.texturefx;
+import cpw.mods.fml.client.FMLTextureFX;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.shared.Block;
import net.minecraft.block.Block;
@SideOnly(Side.CLIENT)
-public class TextureWaterFlowFX extends TextureFX

View file

@ -0,0 +1,10 @@
--- ../src-base/minecraft/net/minecraft/crash/CallableSuspiciousClasses.java
+++ ../src-work/minecraft/net/minecraft/crash/CallableSuspiciousClasses.java
@@ -130,6 +130,6 @@
public Object call()
{
- return this.func_85085_a();
+ return "FML is installed";
}
}

View file

@ -1,13 +1,13 @@
--- ../src-base/common/net/minecraft/src/CrashReport.java
+++ ../src-work/common/net/minecraft/src/CrashReport.java
--- ../src-base/minecraft/net/minecraft/crash/CrashReport.java
+++ ../src-work/minecraft/net/minecraft/crash/CrashReport.java
@@ -1,5 +1,6 @@
package net.minecraft.src;
package net.minecraft.crash;
+import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import java.io.File;
@@ -43,6 +44,7 @@
@@ -44,6 +45,7 @@
this.field_85061_c.func_71500_a("AABB Pool Size", new CallableCrashMemoryReport(this));
this.field_85061_c.func_71500_a("Suspicious classes", new CallableSuspiciousClasses(this));
this.field_85061_c.func_71500_a("IntCache", new CallableIntCache(this));

View file

@ -1,20 +1,20 @@
--- ../src-base/common/net/minecraft/src/EntityList.java
+++ ../src-work/common/net/minecraft/src/EntityList.java
@@ -3,6 +3,9 @@
--- ../src-base/minecraft/net/minecraft/entity/EntityList.java
+++ ../src-work/minecraft/net/minecraft/entity/EntityList.java
@@ -3,6 +3,10 @@
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
+import java.util.logging.Level;
+
+import cpw.mods.fml.common.FMLLog;
public class EntityList
{
@@ -52,10 +55,10 @@
public static Entity func_75615_a(NBTTagCompound p_75615_0_, World p_75615_1_)
+
import net.minecraft.entity.animal.EntityBat;
import net.minecraft.entity.animal.EntityChicken;
import net.minecraft.entity.animal.EntityCow;
@@ -98,9 +102,10 @@
{
Entity var2 = null;
-
+ Class var3 = null;
try
{
@ -23,7 +23,7 @@
if (var3 != null)
{
@@ -69,7 +72,17 @@
@@ -114,7 +119,17 @@
if (var2 != null)
{

View file

@ -1,15 +1,15 @@
--- ../src-base/common/net/minecraft/src/EntityTracker.java
+++ ../src-work/common/net/minecraft/src/EntityTracker.java
--- ../src-base/minecraft/net/minecraft/entity/EntityTracker.java
+++ ../src-work/minecraft/net/minecraft/entity/EntityTracker.java
@@ -4,6 +4,8 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
+
+import cpw.mods.fml.common.registry.EntityRegistry;
public class EntityTracker
{
@@ -20,6 +22,10 @@
import net.minecraft.entity.animal.EntityBat;
import net.minecraft.entity.animal.EntitySquid;
import net.minecraft.entity.animal.IAnimals;
@@ -47,6 +49,11 @@
public void func_72786_a(Entity p_72786_1_)
{
@ -17,6 +17,7 @@
+ {
+ return;
+ }
+
if (p_72786_1_ instanceof EntityPlayerMP)
{
this.func_72791_a(p_72786_1_, 512, 2);

View file

@ -1,18 +1,19 @@
--- ../src-base/common/net/minecraft/src/EntityTrackerEntry.java
+++ ../src-work/common/net/minecraft/src/EntityTrackerEntry.java
--- ../src-base/minecraft/net/minecraft/entity/EntityTrackerEntry.java
+++ ../src-work/minecraft/net/minecraft/entity/EntityTrackerEntry.java
@@ -4,6 +4,8 @@
import java.util.Iterator;
import java.util.List;
import java.util.Set;
+
+import cpw.mods.fml.common.network.FMLNetworkHandler;
public class EntityTrackerEntry
{
@@ -304,6 +306,13 @@
import net.minecraft.entity.animal.IAnimals;
import net.minecraft.entity.boss.EntityDragon;
import net.minecraft.entity.item.EntityBoat;
@@ -349,6 +351,14 @@
this.field_73137_j = this.field_73132_a.field_70159_w;
this.field_73138_k = this.field_73132_a.field_70181_x;
this.field_73135_l = this.field_73132_a.field_70179_y;
+
+ int posX = MathHelper.func_76128_c(this.field_73132_a.field_70165_t * 32.0D);
+ int posY = MathHelper.func_76128_c(this.field_73132_a.field_70163_u * 32.0D);
+ int posZ = MathHelper.func_76128_c(this.field_73132_a.field_70161_v * 32.0D);
@ -20,10 +21,10 @@
+ {
+ FMLNetworkHandler.makeEntitySpawnAdjustment(this.field_73132_a.field_70157_k, p_73117_1_, this.field_73128_d, this.field_73129_e, this.field_73126_f);
+ }
if (this.field_73143_t && !(var6 instanceof Packet24MobSpawn))
{
p_73117_1_.field_71135_a.func_72567_b(new Packet28EntityVelocity(this.field_73132_a.field_70157_k, this.field_73132_a.field_70159_w, this.field_73132_a.field_70181_x, this.field_73132_a.field_70179_y));
@@ -376,6 +385,13 @@
@@ -422,6 +432,13 @@
if (this.field_73132_a.field_70128_L)
{
System.out.println("Fetching addPacket for removed entity");

View file

@ -1,5 +1,5 @@
--- ../src-base/common/net/minecraft/src/EntityVillager.java
+++ ../src-work/common/net/minecraft/src/EntityVillager.java
--- ../src-base/minecraft/net/minecraft/entity/EntityVillager.java
+++ ../src-work/minecraft/net/minecraft/entity/EntityVillager.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
@ -9,7 +9,7 @@
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
@@ -202,7 +204,7 @@
@@ -235,7 +237,7 @@
case 4:
return "/mob/villager/butcher.png";
default:
@ -18,7 +18,7 @@
}
}
@@ -383,6 +385,7 @@
@@ -416,6 +418,7 @@
MerchantRecipeList var2;
var2 = new MerchantRecipeList();
@ -26,7 +26,7 @@
label48:
switch (this.func_70946_n())
@@ -587,7 +590,7 @@
@@ -620,7 +623,7 @@
public void func_82163_bD()
{

View file

@ -1,15 +1,15 @@
--- ../src-base/common/net/minecraft/src/EntityItem.java
+++ ../src-work/common/net/minecraft/src/EntityItem.java
--- ../src-base/minecraft/net/minecraft/entity/item/EntityItem.java
+++ ../src-work/minecraft/net/minecraft/entity/item/EntityItem.java
@@ -1,6 +1,8 @@
package net.minecraft.src;
package net.minecraft.entity.item;
import java.util.Iterator;
+
+import cpw.mods.fml.common.registry.GameRegistry;
public class EntityItem extends Entity
{
@@ -245,6 +247,8 @@
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
@@ -257,6 +259,8 @@
p_70100_1_.func_71029_a(AchievementList.field_76027_z);
}

View file

@ -1,6 +1,6 @@
--- ../src-base/common/net/minecraft/src/EntitySlime.java
+++ ../src-work/common/net/minecraft/src/EntitySlime.java
@@ -231,7 +231,7 @@
--- ../src-base/minecraft/net/minecraft/entity/monster/EntitySlime.java
+++ ../src-work/minecraft/net/minecraft/entity/monster/EntitySlime.java
@@ -242,7 +242,7 @@
{
Chunk var1 = this.field_70170_p.func_72938_d(MathHelper.func_76128_c(this.field_70165_t), MathHelper.func_76128_c(this.field_70161_v));

View file

@ -1,7 +1,7 @@
--- ../src-base/common/net/minecraft/src/EntityPlayer.java
+++ ../src-work/common/net/minecraft/src/EntityPlayer.java
--- ../src-base/minecraft/net/minecraft/entity/player/EntityPlayer.java
+++ ../src-work/minecraft/net/minecraft/entity/player/EntityPlayer.java
@@ -1,7 +1,10 @@
package net.minecraft.src;
package net.minecraft.entity.player;
+import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Side;
@ -10,8 +10,8 @@
+
import java.util.Iterator;
import java.util.List;
@@ -125,6 +128,7 @@
import net.minecraft.block.Block;
@@ -172,6 +175,7 @@
public void func_70071_h_()
{
@ -19,7 +19,7 @@
if (this.field_71074_e != null)
{
ItemStack var1 = this.field_71071_by.func_70448_g();
@@ -248,6 +252,7 @@
@@ -295,6 +299,7 @@
{
this.field_71100_bB.func_75118_a(this);
}
@ -27,7 +27,7 @@
}
public int func_82145_z()
@@ -1755,4 +1760,9 @@
@@ -1802,4 +1807,9 @@
{
return this.func_82241_s(1);
}

View file

@ -1,13 +1,13 @@
--- ../src-base/common/net/minecraft/src/SlotCrafting.java
+++ ../src-work/common/net/minecraft/src/SlotCrafting.java
@@ -1,4 +1,6 @@
package net.minecraft.src;
+
+import cpw.mods.fml.common.registry.GameRegistry;
--- ../src-base/minecraft/net/minecraft/inventory/SlotCrafting.java
+++ ../src-work/minecraft/net/minecraft/inventory/SlotCrafting.java
@@ -1,5 +1,6 @@
package net.minecraft.inventory;
public class SlotCrafting extends Slot
{
@@ -83,6 +85,7 @@
+import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
@@ -89,6 +90,7 @@
public void func_82870_a(EntityPlayer p_82870_1_, ItemStack p_82870_2_)
{

View file

@ -0,0 +1,18 @@
--- ../src-base/minecraft/net/minecraft/inventory/SlotFurnace.java
+++ ../src-work/minecraft/net/minecraft/inventory/SlotFurnace.java
@@ -1,5 +1,6 @@
package net.minecraft.inventory;
+import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.entity.EntityXPOrb;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
@@ -82,6 +83,8 @@
this.field_75228_b = 0;
+ GameRegistry.onItemSmelted(field_75229_a, p_75208_1_);
+
if (p_75208_1_.field_77993_c == Item.field_77703_o.field_77779_bT)
{
this.field_75229_a.func_71064_a(AchievementList.field_76016_k, 1);

View file

@ -1,5 +1,5 @@
--- ../src-base/common/net/minecraft/src/Item.java
+++ ../src-work/common/net/minecraft/src/Item.java
--- ../src-base/minecraft/net/minecraft/item/Item.java
+++ ../src-work/minecraft/net/minecraft/item/Item.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
@ -8,11 +8,12 @@
+
import java.util.List;
import java.util.Random;
@@ -187,6 +189,7 @@
import net.minecraft.block.Block;
@@ -205,6 +207,8 @@
}
field_77698_e[256 + p_i3659_1_] = this;
+
+ GameRegistry.newItemAdded(this);
}

View file

@ -1,6 +1,6 @@
--- ../src-base/common/net/minecraft/src/ItemMap.java
+++ ../src-work/common/net/minecraft/src/ItemMap.java
@@ -41,7 +41,7 @@
--- ../src-base/minecraft/net/minecraft/item/ItemMap.java
+++ ../src-work/minecraft/net/minecraft/item/ItemMap.java
@@ -52,7 +52,7 @@
int var5 = 128 * (1 << var4.field_76197_d);
var4.field_76201_a = Math.round((float)p_77873_2_.func_72912_H().func_76079_c() / (float)var5) * var5;
var4.field_76199_b = Math.round((float)(p_77873_2_.func_72912_H().func_76074_e() / var5)) * var5;

View file

@ -0,0 +1,19 @@
--- ../src-base/minecraft/net/minecraft/network/MemoryConnection.java
+++ ../src-work/minecraft/net/minecraft/network/MemoryConnection.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
+import cpw.mods.fml.common.network.FMLNetworkHandler;
+
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
@@ -73,6 +75,7 @@
if (this.field_74441_e && this.field_74442_b.isEmpty())
{
this.field_74440_d.func_72515_a(this.field_74438_f, this.field_74439_g);
+ FMLNetworkHandler.onConnectionClosed(this, this.field_74440_d.getPlayer());
}
}

View file

@ -1,15 +1,22 @@
--- ../src-base/common/net/minecraft/src/NetLoginHandler.java
+++ ../src-work/common/net/minecraft/src/NetLoginHandler.java
@@ -12,6 +12,8 @@
--- ../src-base/minecraft/net/minecraft/network/NetLoginHandler.java
+++ ../src-work/minecraft/net/minecraft/network/NetLoginHandler.java
@@ -12,11 +12,15 @@
import java.util.Random;
import java.util.logging.Logger;
import javax.crypto.SecretKey;
+
+import cpw.mods.fml.common.network.FMLNetworkHandler;
import net.minecraft.server.MinecraftServer;
public class NetLoginHandler extends NetHandler
@@ -42,7 +44,7 @@
+import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.packet.NetHandler;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.Packet1Login;
import net.minecraft.network.packet.Packet205ClientCommand;
+import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.network.packet.Packet252SharedKey;
import net.minecraft.network.packet.Packet253ServerAuthData;
import net.minecraft.network.packet.Packet254ServerPing;
@@ -55,7 +59,7 @@
this.func_72529_d();
}
@ -18,31 +25,32 @@
{
this.func_72527_a("Took too long to log in");
}
@@ -128,12 +130,17 @@
@@ -141,11 +145,18 @@
}
}
- public void func_72455_a(Packet1Login p_72455_1_) {}
+ public void func_72455_a(Packet1Login p_72455_1_) {
+ public void func_72455_a(Packet1Login p_72455_1_)
+ {
+ FMLNetworkHandler.handleLoginPacketOnServer(this, p_72455_1_);
+ }
public void func_72529_d()
{
- String var1 = this.field_72534_f.func_71203_ab().func_72399_a(this.field_72538_b.func_74430_c(), this.field_72543_h);
-
+ FMLNetworkHandler.onConnectionReceivedFromClient(this, this.field_72534_f, this.field_72538_b.func_74430_c(), this.field_72543_h);
+ }
+
+ public void completeConnection(String var1)
+ {
if (var1 != null)
{
this.func_72527_a(var1);
@@ -250,4 +257,20 @@
@@ -263,4 +274,21 @@
{
return p_72531_0_.field_72544_i = p_72531_1_;
}
+
+
+ public void func_72501_a(Packet250CustomPayload p_72501_1_)
+ {

View file

@ -1,15 +1,23 @@
--- ../src-base/common/net/minecraft/src/NetServerHandler.java
+++ ../src-work/common/net/minecraft/src/NetServerHandler.java
--- ../src-base/minecraft/net/minecraft/network/NetServerHandler.java
+++ ../src-work/minecraft/net/minecraft/network/NetServerHandler.java
@@ -7,6 +7,8 @@
import java.util.Iterator;
import java.util.Random;
import java.util.logging.Logger;
+
+import cpw.mods.fml.common.network.FMLNetworkHandler;
import net.minecraft.server.MinecraftServer;
public class NetServerHandler extends NetHandler
@@ -576,6 +578,7 @@
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayerMP;
@@ -32,6 +34,7 @@
import net.minecraft.network.packet.Packet108EnchantItem;
import net.minecraft.network.packet.Packet10Flying;
import net.minecraft.network.packet.Packet130UpdateSign;
+import net.minecraft.network.packet.Packet131MapData;
import net.minecraft.network.packet.Packet13PlayerLookMove;
import net.minecraft.network.packet.Packet14BlockDig;
import net.minecraft.network.packet.Packet15Place;
@@ -628,6 +631,7 @@
public void func_72481_a(Packet3Chat p_72481_1_)
{
@ -17,7 +25,7 @@
if (this.field_72574_e.func_71126_v() == 2)
{
this.func_72567_b(new Packet3Chat("Cannot send chat message."));
@@ -941,6 +944,11 @@
@@ -993,6 +997,11 @@
}
public void func_72501_a(Packet250CustomPayload p_72501_1_)
@ -29,10 +37,11 @@
{
DataInputStream var2;
ItemStack var3;
@@ -1105,4 +1113,17 @@
@@ -1157,4 +1166,18 @@
}
}
}
+
+
+ @Override
+ public void func_72494_a(Packet131MapData p_72494_1_)

View file

@ -1,15 +1,15 @@
--- ../src-base/common/net/minecraft/src/NetworkListenThread.java
+++ ../src-work/common/net/minecraft/src/NetworkListenThread.java
--- ../src-base/minecraft/net/minecraft/network/NetworkListenThread.java
+++ ../src-work/minecraft/net/minecraft/network/NetworkListenThread.java
@@ -6,6 +6,8 @@
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
+
+import cpw.mods.fml.common.FMLLog;
import net.minecraft.crash.CrashReport;
import net.minecraft.server.MinecraftServer;
public abstract class NetworkListenThread
@@ -49,6 +51,7 @@
import net.minecraft.util.ReportedException;
@@ -51,6 +53,7 @@
throw new ReportedException(var4);
}

View file

@ -0,0 +1,19 @@
--- ../src-base/minecraft/net/minecraft/network/TcpConnection.java
+++ ../src-work/minecraft/net/minecraft/network/TcpConnection.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
+import cpw.mods.fml.common.network.FMLNetworkHandler;
+
import java.io.BufferedOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -391,6 +393,7 @@
if (this.field_74472_n && this.field_74473_o.isEmpty())
{
this.field_74485_r.func_72515_a(this.field_74481_v, this.field_74480_w);
+ FMLNetworkHandler.onConnectionClosed(this, this.field_74485_r.getPlayer());
}
}

View file

@ -0,0 +1,18 @@
--- ../src-base/minecraft/net/minecraft/network/packet/NetHandler.java
+++ ../src-work/minecraft/net/minecraft/network/packet/NetHandler.java
@@ -1,4 +1,6 @@
package net.minecraft.network.packet;
+
+import net.minecraft.entity.player.EntityPlayer;
public abstract class NetHandler
{
@@ -345,4 +347,8 @@
{
return false;
}
+
+ public abstract void handleVanilla250Packet(Packet250CustomPayload payload);
+
+ public abstract EntityPlayer getPlayer();
}

View file

@ -1,6 +1,6 @@
--- ../src-base/common/net/minecraft/src/Packet.java
+++ ../src-work/common/net/minecraft/src/Packet.java
@@ -349,7 +349,7 @@
--- ../src-base/minecraft/net/minecraft/network/packet/Packet.java
+++ ../src-work/minecraft/net/minecraft/network/packet/Packet.java
@@ -353,7 +353,7 @@
func_73285_a(107, true, true, Packet107CreativeSetSlot.class);
func_73285_a(108, false, true, Packet108EnchantItem.class);
func_73285_a(130, true, true, Packet130UpdateSign.class);

View file

@ -1,28 +1,29 @@
--- ../src-base/common/net/minecraft/src/Packet1Login.java
+++ ../src-work/common/net/minecraft/src/Packet1Login.java
--- ../src-base/minecraft/net/minecraft/network/packet/Packet1Login.java
+++ ../src-work/minecraft/net/minecraft/network/packet/Packet1Login.java
@@ -3,6 +3,8 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
+
+import cpw.mods.fml.common.network.FMLNetworkHandler;
import net.minecraft.world.EnumGameType;
import net.minecraft.world.WorldType;
public class Packet1Login extends Packet
{
@@ -15,7 +17,11 @@
@@ -17,7 +19,12 @@
public byte field_73556_g;
public byte field_73562_h;
- public Packet1Login() {}
+ private boolean vanillaCompatible;
+
+ public Packet1Login() {
+
+ public Packet1Login()
+ {
+ this.vanillaCompatible = FMLNetworkHandler.vanillaLoginPacketCompatibility();
+ }
public Packet1Login(int p_i3327_1_, WorldType p_i3327_2_, EnumGameType p_i3327_3_, boolean p_i3327_4_, int p_i3327_5_, int p_i3327_6_, int p_i3327_7_, int p_i3327_8_)
{
@@ -27,6 +33,7 @@
@@ -29,6 +36,7 @@
this.field_73556_g = (byte)p_i3327_7_;
this.field_73562_h = (byte)p_i3327_8_;
this.field_73560_c = p_i3327_4_;
@ -30,11 +31,12 @@
}
public void func_73267_a(DataInputStream p_73267_1_) throws IOException
@@ -44,7 +51,14 @@
@@ -46,7 +54,16 @@
this.field_73560_c = (var3 & 8) == 8;
int var4 = var3 & -9;
this.field_73557_d = EnumGameType.func_77146_a(var4);
- this.field_73558_e = p_73267_1_.readByte();
+
+ if (vanillaCompatible)
+ {
+ this.field_73558_e = p_73267_1_.readByte();
@ -43,14 +45,16 @@
+ {
+ this.field_73558_e = p_73267_1_.readInt();
+ }
+
this.field_73555_f = p_73267_1_.readByte();
this.field_73556_g = p_73267_1_.readByte();
this.field_73562_h = p_73267_1_.readByte();
@@ -62,7 +76,14 @@
@@ -64,7 +81,16 @@
}
p_73273_1_.writeByte(var2);
- p_73273_1_.writeByte(this.field_73558_e);
+
+ if (vanillaCompatible)
+ {
+ p_73273_1_.writeByte(this.field_73558_e);
@ -59,10 +63,11 @@
+ {
+ p_73273_1_.writeInt(this.field_73558_e);
+ }
+
p_73273_1_.writeByte(this.field_73555_f);
p_73273_1_.writeByte(this.field_73556_g);
p_73273_1_.writeByte(this.field_73562_h);
@@ -82,6 +103,6 @@
@@ -84,6 +110,6 @@
var1 = this.field_73559_b.func_77127_a().length();
}

View file

@ -1,27 +1,30 @@
--- ../src-base/common/net/minecraft/server/MinecraftServer.java
+++ ../src-work/common/net/minecraft/server/MinecraftServer.java
@@ -13,6 +13,9 @@
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
--- ../src-base/minecraft/net/minecraft/server/MinecraftServer.java
+++ ../src-work/minecraft/net/minecraft/server/MinecraftServer.java
@@ -1,7 +1,11 @@
package net.minecraft.server;
+import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
+import cpw.mods.fml.relauncher.ArgsWrapper;
+import cpw.mods.fml.relauncher.FMLRelauncher;
import net.minecraft.src.AnvilSaveConverter;
import net.minecraft.src.AxisAlignedBB;
import net.minecraft.src.BehaviorArrowDispense;
@@ -382,7 +385,10 @@
+
import java.awt.GraphicsEnvironment;
import java.io.File;
import java.io.IOException;
@@ -376,7 +380,11 @@
{
if (this.func_71197_b())
{
+ FMLCommonHandler.instance().handleServerStarted();
+
long var1 = System.currentTimeMillis();
+
+ FMLCommonHandler.instance().onWorldLoadTick(field_71305_c);
for (long var50 = 0L; this.field_71317_u; this.field_71296_Q = true)
{
@@ -421,6 +427,7 @@
@@ -415,6 +423,7 @@
Thread.sleep(1L);
}
@ -29,7 +32,7 @@
}
else
{
@@ -429,6 +436,10 @@
@@ -423,6 +432,10 @@
}
catch (Throwable var48)
{
@ -40,7 +43,7 @@
var48.printStackTrace();
field_71306_a.log(Level.SEVERE, "Encountered an unexpected exception " + var48.getClass().getSimpleName(), var48);
CrashReport var2 = null;
@@ -459,6 +470,10 @@
@@ -453,6 +466,10 @@
{
try
{
@ -51,7 +54,7 @@
this.func_71260_j();
this.field_71316_v = true;
}
@@ -484,8 +499,10 @@
@@ -478,8 +495,10 @@
public void func_71217_p()
{
@ -62,7 +65,7 @@
++this.field_71315_w;
if (this.field_71295_T)
@@ -531,6 +548,7 @@
@@ -525,6 +544,7 @@
this.field_71304_b.func_76319_b();
this.field_71304_b.func_76319_b();
@ -70,7 +73,7 @@
}
public void func_71190_q()
@@ -558,6 +576,7 @@
@@ -552,6 +572,7 @@
}
this.field_71304_b.func_76320_a("tick");
@ -78,7 +81,7 @@
CrashReport var6;
try
@@ -582,6 +601,7 @@
@@ -576,6 +597,7 @@
throw new ReportedException(var6);
}
@ -86,12 +89,22 @@
this.field_71304_b.func_76319_b();
this.field_71304_b.func_76320_a("tracker");
var4.func_73039_n().func_72788_a();
@@ -1150,6 +1170,12 @@
@@ -703,7 +725,7 @@
public String getServerModName()
{
- return "vanilla";
+ return "fml";
}
public CrashReport func_71230_b(CrashReport p_71230_1_)
@@ -1144,6 +1166,13 @@
@SideOnly(Side.SERVER)
public static void main(String[] p_main_0_)
{
+ FMLRelauncher.handleServerRelaunch(new ArgsWrapper(p_main_0_));
+ }
+
+ @SideOnly(Side.SERVER)
+ public static void fmlReentry(ArgsWrapper wrap)
+ {

View file

@ -1,13 +1,13 @@
--- ../src-base/common/net/minecraft/src/ServerListenThread.java
+++ ../src-work/common/net/minecraft/src/ServerListenThread.java
--- ../src-base/minecraft/net/minecraft/server/ServerListenThread.java
+++ ../src-work/minecraft/net/minecraft/server/ServerListenThread.java
@@ -1,5 +1,6 @@
package net.minecraft.src;
package net.minecraft.server;
+import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import java.io.IOException;
@@ -51,6 +52,7 @@
@@ -53,6 +54,7 @@
catch (Exception var6)
{
var3.func_72527_a("Internal server error");

View file

@ -1,5 +1,5 @@
--- ../src-base/common/net/minecraft/src/ConsoleLogManager.java
+++ ../src-work/common/net/minecraft/src/ConsoleLogManager.java
--- ../src-base/minecraft/net/minecraft/server/dedicated/ConsoleLogManager.java
+++ ../src-work/minecraft/net/minecraft/server/dedicated/ConsoleLogManager.java
@@ -4,6 +4,8 @@
import java.util.logging.FileHandler;
import java.util.logging.Level;

View file

@ -1,13 +1,13 @@
--- ../src-base/common/net/minecraft/src/DedicatedServer.java
+++ ../src-work/common/net/minecraft/src/DedicatedServer.java
--- ../src-base/minecraft/net/minecraft/server/dedicated/DedicatedServer.java
+++ ../src-work/minecraft/net/minecraft/server/dedicated/DedicatedServer.java
@@ -1,5 +1,6 @@
package net.minecraft.src;
package net.minecraft.server.dedicated;
+import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import java.io.File;
@@ -42,6 +43,8 @@
@@ -57,6 +58,8 @@
field_71306_a.warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
}
@ -16,20 +16,21 @@
field_71306_a.info("Loading properties");
this.field_71340_o = new PropertyManager(new File("server.properties"));
@@ -111,6 +114,7 @@
@@ -125,6 +128,8 @@
field_71306_a.warning("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
field_71306_a.warning("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
}
+
+ FMLCommonHandler.instance().onServerStarted();
this.func_71210_a(new DedicatedPlayerList(this));
long var4 = System.nanoTime();
@@ -171,7 +175,7 @@
this.field_71339_n = new RConThreadMain(this);
@@ -187,6 +192,8 @@
this.field_71339_n.func_72602_a();
}
-
+ FMLCommonHandler.instance().handleServerStarting(this);
+
return true;
}

View file

@ -1,25 +1,25 @@
--- ../src-base/common/net/minecraft/src/ServerConfigurationManager.java
+++ ../src-work/common/net/minecraft/src/ServerConfigurationManager.java
@@ -12,6 +12,10 @@
import java.util.List;
import java.util.Set;
import java.util.logging.Logger;
+
+import cpw.mods.fml.common.network.FMLNetworkHandler;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.server.MinecraftServer;
--- ../src-base/minecraft/net/minecraft/server/management/ServerConfigurationManager.java
+++ ../src-work/minecraft/net/minecraft/server/management/ServerConfigurationManager.java
@@ -2,6 +2,9 @@
public abstract class ServerConfigurationManager
@@ -81,6 +85,7 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
+import cpw.mods.fml.common.network.FMLNetworkHandler;
+import cpw.mods.fml.common.registry.GameRegistry;
+
import java.io.File;
import java.net.SocketAddress;
import java.text.SimpleDateFormat;
@@ -107,6 +110,8 @@
}
p_72355_2_.func_71116_b();
+
+ FMLNetworkHandler.handlePlayerLogin(p_72355_2_, var6, p_72355_1_);
}
public void func_72364_a(WorldServer[] p_72364_1_)
@@ -147,6 +152,7 @@
@@ -173,6 +178,7 @@
public void func_72367_e(EntityPlayerMP p_72367_1_)
{
@ -27,7 +27,7 @@
this.func_72391_b(p_72367_1_);
WorldServer var2 = p_72367_1_.func_71121_q();
var2.func_72900_e(p_72367_1_);
@@ -296,6 +302,7 @@
@@ -322,6 +328,7 @@
var8.func_72838_d(var7);
this.field_72404_b.add(var7);
var7.func_71116_b();
@ -35,10 +35,11 @@
return var7;
}
@@ -321,6 +328,7 @@
@@ -347,6 +354,8 @@
PotionEffect var7 = (PotionEffect)var6.next();
p_72356_1_.field_71135_a.func_72567_b(new Packet41EntityEffect(p_72356_1_.field_70157_k, var7));
}
+
+ GameRegistry.onPlayerChangedDimension(p_72356_1_);
}

View file

@ -1,7 +1,7 @@
--- ../src-base/common/net/minecraft/src/TileEntity.java
+++ ../src-work/common/net/minecraft/src/TileEntity.java
@@ -1,9 +1,11 @@
package net.minecraft.src;
--- ../src-base/minecraft/net/minecraft/tileentity/TileEntity.java
+++ ../src-work/minecraft/net/minecraft/tileentity/TileEntity.java
@@ -1,9 +1,12 @@
package net.minecraft.tileentity;
+import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Side;
@ -9,15 +9,16 @@
import java.util.HashMap;
import java.util.Map;
+import java.util.logging.Level;
public class TileEntity
{
@@ -75,10 +77,10 @@
public static TileEntity func_70317_c(NBTTagCompound p_70317_0_)
+
import net.minecraft.block.Block;
import net.minecraft.block.TileEntityRecordPlayer;
import net.minecraft.crash.CrashReportCategory;
@@ -82,9 +85,11 @@
{
TileEntity var1 = null;
-
+ Class var2 = null;
+
try
{
- Class var2 = (Class)field_70326_a.get(p_70317_0_.func_74779_i("id"));
@ -25,7 +26,7 @@
if (var2 != null)
{
@@ -92,7 +94,17 @@
@@ -98,7 +103,17 @@
if (var1 != null)
{
@ -44,7 +45,7 @@
}
else
{
@@ -177,7 +189,7 @@
@@ -183,7 +198,7 @@
public void func_85027_a(CrashReportCategory p_85027_1_)
{
p_85027_1_.func_71500_a("Name", new CallableTileEntityName(this));

View file

@ -1,17 +1,9 @@
--- ../src-base/common/net/minecraft/src/TileEntityFurnace.java
+++ ../src-work/common/net/minecraft/src/TileEntityFurnace.java
@@ -1,4 +1,6 @@
package net.minecraft.src;
+
+import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
@@ -273,8 +275,15 @@
return 300;
--- ../src-base/minecraft/net/minecraft/tileentity/TileEntityFurnace.java
+++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityFurnace.java
@@ -287,7 +287,15 @@
}
}
-
- return var2 instanceof ItemTool && ((ItemTool)var2).func_77861_e().equals("WOOD") ? 200 : (var2 instanceof ItemSword && ((ItemSword)var2).func_77825_f().equals("WOOD") ? 200 : (var2 instanceof ItemHoe && ((ItemHoe)var2).func_77842_f().equals("WOOD") ? 200 : (var1 == Item.field_77669_D.field_77779_bT ? 100 : (var1 == Item.field_77705_m.field_77779_bT ? 1600 : (var1 == Item.field_77775_ay.field_77779_bT ? 20000 : (var1 == Block.field_71987_y.field_71990_ca ? 100 : (var1 == Item.field_77731_bo.field_77779_bT ? 2400 : 0)))))));
+ if (var2 instanceof ItemTool && ((ItemTool) var2).func_77861_e().equals("WOOD")) return 200;
+ if (var2 instanceof ItemSword && ((ItemSword) var2).func_77825_f().equals("WOOD")) return 200;

View file

@ -1,14 +1,14 @@
--- ../src-base/common/net/minecraft/src/StringTranslate.java
+++ ../src-work/common/net/minecraft/src/StringTranslate.java
@@ -9,6 +9,8 @@
import java.util.IllegalFormatException;
import java.util.Properties;
import java.util.TreeMap;
+
+import cpw.mods.fml.common.registry.LanguageRegistry;
--- ../src-base/minecraft/net/minecraft/util/StringTranslate.java
+++ ../src-work/minecraft/net/minecraft/util/StringTranslate.java
@@ -2,6 +2,8 @@
public class StringTranslate
{
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
+import cpw.mods.fml.common.registry.LanguageRegistry;
+
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
@@ -80,6 +82,7 @@
}
}

View file

@ -1,11 +1,11 @@
--- ../src-base/common/net/minecraft/src/World.java
+++ ../src-work/common/net/minecraft/src/World.java
@@ -1764,13 +1764,13 @@
--- ../src-base/minecraft/net/minecraft/world/World.java
+++ ../src-work/minecraft/net/minecraft/world/World.java
@@ -1796,13 +1796,14 @@
}
}
- this.field_72989_L = false;
-
if (!this.field_73000_b.isEmpty())
{
this.field_73009_h.removeAll(this.field_73000_b);
@ -16,7 +16,7 @@
this.field_72984_F.func_76318_c("pendingTileEntities");
@@ -3595,7 +3595,7 @@
@@ -3627,7 +3628,7 @@
@SideOnly(Side.CLIENT)
public double func_72919_O()
{

View file

@ -1,6 +1,6 @@
--- ../src-base/common/net/minecraft/src/WorldProvider.java
+++ ../src-work/common/net/minecraft/src/WorldProvider.java
@@ -37,20 +37,12 @@
--- ../src-base/minecraft/net/minecraft/world/WorldProvider.java
+++ ../src-work/minecraft/net/minecraft/world/WorldProvider.java
@@ -48,20 +48,12 @@
protected void func_76572_b()
{
@ -23,7 +23,7 @@
}
public boolean func_76566_a(int p_76566_1_, int p_76566_2_)
@@ -168,19 +160,19 @@
@@ -179,19 +171,19 @@
public int func_76557_i()
{

View file

@ -1,7 +1,7 @@
--- ../src-base/common/net/minecraft/src/WorldType.java
+++ ../src-work/common/net/minecraft/src/WorldType.java
@@ -1,10 +1,20 @@
package net.minecraft.src;
--- ../src-base/minecraft/net/minecraft/world/WorldType.java
+++ ../src-work/minecraft/net/minecraft/world/WorldType.java
@@ -1,10 +1,25 @@
package net.minecraft.world;
+
+import java.util.Arrays;
+import java.util.Random;
@ -13,15 +13,20 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
+import net.minecraft.world.*;
+import net.minecraft.world.gen.*;
+import net.minecraft.world.biome.*;
+import net.minecraft.world.chunk.IChunkProvider;
+
public class WorldType
{
+ public static final BiomeGenBase[] base11Biomes = new BiomeGenBase[] {BiomeGenBase.field_76769_d, BiomeGenBase.field_76767_f, BiomeGenBase.field_76770_e, BiomeGenBase.field_76780_h, BiomeGenBase.field_76772_c, BiomeGenBase.field_76768_g};
+ public static final BiomeGenBase[] base12Biomes = ObjectArrays.concat(base11Biomes, BiomeGenBase.field_76782_w);
+
+
public static final WorldType[] field_77139_a = new WorldType[16];
public static final WorldType field_77137_b = (new WorldType(0, "default", 1)).func_77129_f();
public static final WorldType field_77138_c = new WorldType(1, "flat");
@@ -15,6 +25,8 @@
@@ -15,6 +30,8 @@
private final int field_77134_g;
private boolean field_77140_h;
private boolean field_77141_i;
@ -30,22 +35,23 @@
public WorldType(int p_i3737_1_, String p_i3737_2_)
{
@@ -28,6 +40,14 @@
@@ -28,6 +45,15 @@
this.field_77140_h = true;
this.field_82748_f = p_i3738_1_;
field_77139_a[p_i3738_1_] = this;
+
+ switch (p_i3738_1_)
+ {
+ case 8:
+ biomesForWorldType = base11Biomes;
+ break;
+ default:
+ biomesForWorldType = base12Biomes;
+ case 8:
+ biomesForWorldType = base11Biomes;
+ break;
+ default:
+ biomesForWorldType = base12Biomes;
+ }
}
public String func_77127_a()
@@ -91,4 +111,69 @@
@@ -91,4 +117,70 @@
{
return this.field_82748_f;
}
@ -110,6 +116,7 @@
+ {
+ return this == field_77138_c ? random.nextInt(4) != 1 : false;
+ }
+
+ /**
+ * Called when 'Create New World' button is pressed before starting game
+ */

View file

@ -1,16 +1,17 @@
--- ../src-base/common/net/minecraft/src/AnvilChunkLoader.java
+++ ../src-work/common/net/minecraft/src/AnvilChunkLoader.java
@@ -9,6 +9,9 @@
--- ../src-base/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java
+++ ../src-work/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java
@@ -9,6 +9,10 @@
import java.util.Iterator;
import java.util.List;
import java.util.Set;
+import java.util.logging.Level;
+
+import cpw.mods.fml.common.FMLLog;
public class AnvilChunkLoader implements IThreadedFileIO, IChunkLoader
{
@@ -223,9 +226,18 @@
+
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;
import net.minecraft.nbt.CompressedStreamTools;
@@ -237,9 +241,18 @@
p_75820_1_.field_76644_m = true;
var10 = new NBTTagCompound();
@ -32,7 +33,7 @@
}
}
}
@@ -238,8 +250,17 @@
@@ -252,8 +265,17 @@
{
TileEntity var21 = (TileEntity)var17.next();
var10 = new NBTTagCompound();

View file

@ -1,15 +1,15 @@
--- ../src-base/common/net/minecraft/src/ChunkProviderServer.java
+++ ../src-work/common/net/minecraft/src/ChunkProviderServer.java
--- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderServer.java
+++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderServer.java
@@ -6,6 +6,8 @@
import java.util.Iterator;
import java.util.List;
import java.util.Set;
+
+import cpw.mods.fml.common.registry.GameRegistry;
public class ChunkProviderServer implements IChunkProvider
{
@@ -194,6 +196,7 @@
import net.minecraft.crash.CrashReport;
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.entity.EnumCreatureType;
@@ -210,6 +212,7 @@
if (this.field_73246_d != null)
{
this.field_73246_d.func_73153_a(p_73153_1_, p_73153_2_, p_73153_3_);

View file

@ -1,6 +1,6 @@
--- ../src-base/common/net/minecraft/src/GenLayerBiome.java
+++ ../src-work/common/net/minecraft/src/GenLayerBiome.java
@@ -7,13 +7,8 @@
--- ../src-base/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java
+++ ../src-work/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java
@@ -10,13 +10,8 @@
public GenLayerBiome(long p_i3888_1_, GenLayer p_i3888_3_, WorldType p_i3888_4_)
{
super(p_i3888_1_);

View file

@ -1,15 +1,15 @@
--- ../src-base/common/net/minecraft/src/StructureVillagePieces.java
+++ ../src-work/common/net/minecraft/src/StructureVillagePieces.java
--- ../src-base/minecraft/net/minecraft/world/gen/structure/StructureVillagePieces.java
+++ ../src-work/minecraft/net/minecraft/world/gen/structure/StructureVillagePieces.java
@@ -4,6 +4,8 @@
import java.util.Iterator;
import java.util.List;
import java.util.Random;
+
+import cpw.mods.fml.common.registry.VillagerRegistry;
import net.minecraft.util.MathHelper;
public class StructureVillagePieces
{
@@ -19,6 +21,8 @@
@@ -20,6 +22,8 @@
var2.add(new StructureVillagePieceWeight(ComponentVillageField2.class, 3, MathHelper.func_76136_a(p_75084_0_, 2 + p_75084_1_, 4 + p_75084_1_ * 2)));
var2.add(new StructureVillagePieceWeight(ComponentVillageHouse2.class, 15, MathHelper.func_76136_a(p_75084_0_, 0, 1 + p_75084_1_)));
var2.add(new StructureVillagePieceWeight(ComponentVillageHouse3.class, 8, MathHelper.func_76136_a(p_75084_0_, 0 + p_75084_1_, 3 + p_75084_1_ * 2)));
@ -18,7 +18,7 @@
Iterator var3 = var2.iterator();
while (var3.hasNext())
@@ -91,6 +95,10 @@
@@ -92,6 +96,10 @@
else if (var9 == ComponentVillageHouse3.class)
{
var10 = ComponentVillageHouse3.func_74921_a(p_75083_0_, p_75083_2_, p_75083_3_, p_75083_4_, p_75083_5_, p_75083_6_, p_75083_7_, p_75083_8_);

View file

@ -1,6 +1,15 @@
--- ../src-base/common/net/minecraft/src/MapData.java
+++ ../src-work/common/net/minecraft/src/MapData.java
@@ -12,7 +12,7 @@
--- ../src-base/minecraft/net/minecraft/world/storage/MapData.java
+++ ../src-work/minecraft/net/minecraft/world/storage/MapData.java
@@ -9,7 +9,7 @@
import java.util.Map;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.*;
import net.minecraft.world.World;
import net.minecraft.world.WorldSavedData;
@@ -17,7 +17,7 @@
{
public int field_76201_a;
public int field_76199_b;
@ -9,7 +18,7 @@
public byte field_76197_d;
public byte[] field_76198_e = new byte[16384];
public List field_76196_g = new ArrayList();
@@ -26,7 +26,16 @@
@@ -31,7 +31,17 @@
public void func_76184_a(NBTTagCompound p_76184_1_)
{
@ -24,10 +33,11 @@
+ {
+ this.field_76200_c = ((NBTTagInt)dimension).field_74748_a;
+ }
+
this.field_76201_a = p_76184_1_.func_74762_e("xCenter");
this.field_76199_b = p_76184_1_.func_74762_e("zCenter");
this.field_76197_d = p_76184_1_.func_74771_c("scale");
@@ -77,7 +86,7 @@
@@ -82,7 +92,7 @@
public void func_76187_b(NBTTagCompound p_76187_1_)
{

View file

@ -1,20 +1,20 @@
--- ../src-base/common/net/minecraft/src/SaveHandler.java
+++ ../src-work/common/net/minecraft/src/SaveHandler.java
--- ../src-base/minecraft/net/minecraft/world/storage/SaveHandler.java
+++ ../src-work/minecraft/net/minecraft/world/storage/SaveHandler.java
@@ -7,6 +7,8 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.logging.Logger;
+
+import cpw.mods.fml.common.FMLCommonHandler;
public class SaveHandler implements ISaveHandler, IPlayerFileData
{
@@ -97,17 +99,23 @@
File var1 = new File(this.field_75770_b, "level.dat");
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.nbt.NBTTagCompound;
@@ -104,16 +106,24 @@
NBTTagCompound var2;
NBTTagCompound var3;
-
+ WorldInfo worldInfo = null;
+
if (var1.exists())
{
try
@ -35,7 +35,7 @@
var5.printStackTrace();
}
}
@@ -120,7 +128,9 @@
@@ -126,7 +136,9 @@
{
var2 = CompressedStreamTools.func_74796_a(new FileInputStream(var1));
var3 = var2.func_74775_l("Data");
@ -46,21 +46,21 @@
}
catch (Exception var4)
{
@@ -136,7 +146,7 @@
@@ -142,6 +154,8 @@
NBTTagCompound var3 = p_75755_1_.func_76082_a(p_75755_2_);
NBTTagCompound var4 = new NBTTagCompound();
var4.func_74782_a("Data", var3);
-
+
+ FMLCommonHandler.instance().handleWorldDataSave(this, p_75755_1_, var4);
try
{
File var5 = new File(this.field_75770_b, "level.dat_new");
@@ -174,7 +184,7 @@
@@ -180,6 +194,8 @@
NBTTagCompound var2 = p_75761_1_.func_76066_a();
NBTTagCompound var3 = new NBTTagCompound();
var3.func_74782_a("Data", var2);
-
+
+ FMLCommonHandler.instance().handleWorldDataSave(this, p_75761_1_, var3);
try
{
File var4 = new File(this.field_75770_b, "level.dat_new");

View file

@ -1,23 +1,26 @@
--- ../src-base/common/net/minecraft/src/WorldInfo.java
+++ ../src-work/common/net/minecraft/src/WorldInfo.java
@@ -1,4 +1,8 @@
package net.minecraft.src;
--- ../src-base/minecraft/net/minecraft/world/storage/WorldInfo.java
+++ ../src-work/minecraft/net/minecraft/world/storage/WorldInfo.java
@@ -1,8 +1,11 @@
package net.minecraft.world.storage;
+
+import java.util.Map;
+
+import com.google.common.collect.Maps;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
@@ -29,6 +33,7 @@
import net.minecraft.crash.CrashReportCategory;
+import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.EnumGameType;
import net.minecraft.world.GameRules;
@@ -35,6 +38,7 @@
private boolean field_76110_t;
private boolean field_76109_u;
private GameRules field_82577_x;
+ private Map<String,NBTBase> additionalProperties;
+ private Map<String, NBTBase> additionalProperties;
protected WorldInfo()
{
@@ -528,4 +533,24 @@
@@ -534,4 +538,24 @@
{
return p_85131_0_.field_76110_t;
}