Initial 4096 fix based of mDiyo's work.
This commit is contained in:
parent
7aaf3e98d2
commit
c3bdc6e583
18 changed files with 284 additions and 39 deletions
|
@ -38,6 +38,7 @@ public class ForgeHooksClient
|
||||||
{
|
{
|
||||||
private static Field textureID = null;
|
private static Field textureID = null;
|
||||||
private static boolean textureIDChecked = false;
|
private static boolean textureIDChecked = false;
|
||||||
|
public static boolean enable4096 = false; //If the server has told us that 4096 is enabled.
|
||||||
|
|
||||||
public static boolean onBlockHighlight(RenderGlobal render, EntityPlayer player, MovingObjectPosition target, int i, ItemStack itemstack, float partialTicks)
|
public static boolean onBlockHighlight(RenderGlobal render, EntityPlayer player, MovingObjectPosition target, int i, ItemStack itemstack, float partialTicks)
|
||||||
{
|
{
|
||||||
|
@ -575,6 +576,7 @@ public class ForgeHooksClient
|
||||||
*/
|
*/
|
||||||
public static Packet onSendLogin(Packet1Login pkt)
|
public static Packet onSendLogin(Packet1Login pkt)
|
||||||
{
|
{
|
||||||
|
enable4096 = false; //Disable 4096 packet modification untill the server says yes.
|
||||||
pkt.serverMode = ForgePacket.FORGE_ID;
|
pkt.serverMode = ForgePacket.FORGE_ID;
|
||||||
pkt.field_48170_e = ForgeHooks.buildVersion;
|
pkt.field_48170_e = ForgeHooks.buildVersion;
|
||||||
return pkt;
|
return pkt;
|
||||||
|
|
|
@ -160,6 +160,8 @@ public class PacketHandlerClient extends PacketHandlerBase
|
||||||
{
|
{
|
||||||
System.out.println("S->C: " + packet.toString(true));
|
System.out.println("S->C: " + packet.toString(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ForgeHooksClient.enable4096 = packet.has4096;
|
||||||
|
|
||||||
ForgeHooks.networkMods.clear();
|
ForgeHooks.networkMods.clear();
|
||||||
NetworkMod[] mods = MinecraftForge.getNetworkMods();
|
NetworkMod[] mods = MinecraftForge.getNetworkMods();
|
||||||
|
|
|
@ -12,6 +12,7 @@ import net.minecraft.src.Entity;
|
||||||
import net.minecraft.src.EntityMinecart;
|
import net.minecraft.src.EntityMinecart;
|
||||||
import net.minecraft.src.Item;
|
import net.minecraft.src.Item;
|
||||||
import net.minecraft.src.ItemStack;
|
import net.minecraft.src.ItemStack;
|
||||||
|
import net.minecraft.src.Material;
|
||||||
import net.minecraft.src.ModLoader;
|
import net.minecraft.src.ModLoader;
|
||||||
import net.minecraft.src.NetworkManager;
|
import net.minecraft.src.NetworkManager;
|
||||||
import net.minecraft.src.Packet;
|
import net.minecraft.src.Packet;
|
||||||
|
@ -20,6 +21,7 @@ import net.minecraft.src.Packet132TileEntityData;
|
||||||
import net.minecraft.src.World;
|
import net.minecraft.src.World;
|
||||||
import net.minecraft.src.forge.oredict.OreDictionary;
|
import net.minecraft.src.forge.oredict.OreDictionary;
|
||||||
|
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
@ -1202,6 +1204,35 @@ public class MinecraftForge
|
||||||
return isClient == 1;
|
return isClient == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method invoked by FML before any other mods are loaded.
|
||||||
|
*/
|
||||||
|
public static void initialize()
|
||||||
|
{
|
||||||
|
//Cause the classes to initialize if they already haven't
|
||||||
|
Block.stone.getTextureFile();
|
||||||
|
Item.appleGold.getTextureFile();
|
||||||
|
|
||||||
|
Block filler = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
filler = Block.class.getConstructor(int.class, Material.class).newInstance(256, Material.air);
|
||||||
|
}catch (Exception e){}
|
||||||
|
|
||||||
|
if (filler == null)
|
||||||
|
{
|
||||||
|
throw new RuntimeException("Could not create Forge filler block");
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int x = 256; x < 4096; x++)
|
||||||
|
{
|
||||||
|
if (Item.itemsList[x - 256] != null)
|
||||||
|
{
|
||||||
|
Block.blocksList[x] = filler;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
addDungeonMob("Skeleton", 1.0f);
|
addDungeonMob("Skeleton", 1.0f);
|
||||||
|
|
|
@ -21,7 +21,6 @@ public abstract class ForgePacket
|
||||||
|
|
||||||
public Packet getPacket()
|
public Packet getPacket()
|
||||||
{
|
{
|
||||||
|
|
||||||
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
|
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
|
||||||
DataOutputStream data = new DataOutputStream(bytes);
|
DataOutputStream data = new DataOutputStream(bytes);
|
||||||
try
|
try
|
||||||
|
|
|
@ -2,6 +2,7 @@ package net.minecraft.src.forge.packets;
|
||||||
|
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
import java.io.DataOutputStream;
|
import java.io.DataOutputStream;
|
||||||
|
import java.io.EOFException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -13,6 +14,7 @@ public class PacketModList extends ForgePacket
|
||||||
public String[] Mods;
|
public String[] Mods;
|
||||||
public Hashtable<Integer, String> ModIDs = new Hashtable<Integer, String>();
|
public Hashtable<Integer, String> ModIDs = new Hashtable<Integer, String>();
|
||||||
public int Length = -1;
|
public int Length = -1;
|
||||||
|
public boolean has4096 = false;
|
||||||
|
|
||||||
public PacketModList(boolean server)
|
public PacketModList(boolean server)
|
||||||
{
|
{
|
||||||
|
@ -39,6 +41,7 @@ public class PacketModList extends ForgePacket
|
||||||
data.writeUTF(entry.getValue());
|
data.writeUTF(entry.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
data.writeBoolean(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -64,6 +67,15 @@ public class PacketModList extends ForgePacket
|
||||||
ModIDs.put(data.readInt(), data.readUTF());
|
ModIDs.put(data.readInt(), data.readUTF());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
has4096 = data.readBoolean();
|
||||||
|
}
|
||||||
|
catch (EOFException e)
|
||||||
|
{
|
||||||
|
has4096 = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -55,6 +55,10 @@ public class PacketHandlerServer extends PacketHandlerBase
|
||||||
net.kickPlayer("Invalid mod list response, Size: " + pkt.Length);
|
net.kickPlayer("Invalid mod list response, Size: " + pkt.Length);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!pkt.has4096)
|
||||||
|
{
|
||||||
|
net.kickPlayer("Must have Forge build #136+ (4096 fix) to connect to this server");
|
||||||
|
}
|
||||||
if (pkt.Mods.length == 0)
|
if (pkt.Mods.length == 0)
|
||||||
{
|
{
|
||||||
ModLoader.getLogger().log(Level.INFO, net.getUsername() + " joined with no mods");
|
ModLoader.getLogger().log(Level.INFO, net.getUsername() + " joined with no mods");
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
--- ../src_base/minecraft/net/minecraft/src/EntityEnderman.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
|
+++ ../src_work/minecraft/net/minecraft/src/EntityEnderman.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
|
||||||
|
public class EntityEnderman extends EntityMob
|
||||||
|
{
|
||||||
|
- private static boolean[] canCarryBlocks = new boolean[256];
|
||||||
|
+ private static boolean[] canCarryBlocks = new boolean[Block.blocksList.length];
|
||||||
|
|
||||||
|
/** Is the enderman attacking another entity? */
|
||||||
|
public boolean isAttacking = false;
|
|
@ -14,7 +14,7 @@
|
||||||
{
|
{
|
||||||
/** The RNG used by the Item subclasses. */
|
/** The RNG used by the Item subclasses. */
|
||||||
protected static Random itemRand = new Random();
|
protected static Random itemRand = new Random();
|
||||||
@@ -188,7 +191,10 @@
|
@@ -188,14 +191,17 @@
|
||||||
|
|
||||||
/** full name of item from language file */
|
/** full name of item from language file */
|
||||||
private String itemName;
|
private String itemName;
|
||||||
|
@ -26,6 +26,14 @@
|
||||||
protected Item(int par1)
|
protected Item(int par1)
|
||||||
{
|
{
|
||||||
this.shiftedIndex = 256 + par1;
|
this.shiftedIndex = 256 + par1;
|
||||||
|
|
||||||
|
if (itemsList[256 + par1] != null)
|
||||||
|
{
|
||||||
|
- System.out.println("CONFLICT @ " + par1);
|
||||||
|
+ System.out.println("CONFLICT @ " + par1 + " item slot already occupied by " + itemsList[256 + par1] + " while adding " + this);
|
||||||
|
}
|
||||||
|
|
||||||
|
itemsList[256 + par1] = this;
|
||||||
@@ -551,7 +557,7 @@
|
@@ -551,7 +557,7 @@
|
||||||
float var17 = MathHelper.sin(-var5 * 0.017453292F);
|
float var17 = MathHelper.sin(-var5 * 0.017453292F);
|
||||||
float var18 = var15 * var16;
|
float var18 = var15 * var16;
|
||||||
|
|
20
forge/patches/minecraft/net/minecraft/src/ItemMap.java.patch
Normal file
20
forge/patches/minecraft/net/minecraft/src/ItemMap.java.patch
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
--- ../src_base/minecraft/net/minecraft/src/ItemMap.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
|
+++ ../src_work/minecraft/net/minecraft/src/ItemMap.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
|
@@ -83,7 +83,7 @@
|
||||||
|
byte var23 = 0;
|
||||||
|
byte var24 = 0;
|
||||||
|
byte var25 = 0;
|
||||||
|
- int[] var26 = new int[256];
|
||||||
|
+ int[] var26 = new int[Block.blocksList.length];
|
||||||
|
Chunk var27 = par1World.getChunkFromBlockCoords(var21, var22);
|
||||||
|
int var28 = var21 & 15;
|
||||||
|
int var29 = var22 & 15;
|
||||||
|
@@ -173,7 +173,7 @@
|
||||||
|
var33 = 0;
|
||||||
|
var34 = 0;
|
||||||
|
|
||||||
|
- for (var35 = 0; var35 < 256; ++var35)
|
||||||
|
+ for (var35 = 0; var35 < Block.blocksList.length; ++var35)
|
||||||
|
{
|
||||||
|
if (var26[var35] > var33)
|
||||||
|
{
|
|
@ -13,7 +13,7 @@
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL12;
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
@@ -35,21 +41,27 @@
|
@@ -35,22 +41,21 @@
|
||||||
public void renderItem(EntityLiving par1EntityLiving, ItemStack par2ItemStack, int par3)
|
public void renderItem(EntityLiving par1EntityLiving, ItemStack par2ItemStack, int par3)
|
||||||
{
|
{
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture(par2ItemStack.getItem().getTextureFile()));
|
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture(par2ItemStack.getItem().getTextureFile()));
|
||||||
+ ForgeHooksClient.renderEquippedItem(customRenderer, renderBlocksInstance, par1EntityLiving, par2ItemStack);
|
+ ForgeHooksClient.renderEquippedItem(customRenderer, renderBlocksInstance, par1EntityLiving, par2ItemStack);
|
||||||
+ }
|
+ }
|
||||||
+ else if (par2ItemStack.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType()))
|
+ else if (par2ItemStack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType()))
|
||||||
{
|
{
|
||||||
- GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/terrain.png"));
|
- GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/terrain.png"));
|
||||||
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture(par2ItemStack.getItem().getTextureFile()));
|
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture(par2ItemStack.getItem().getTextureFile()));
|
||||||
|
@ -33,19 +33,19 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (par2ItemStack.itemID < 256)
|
- if (par2ItemStack.itemID < 256)
|
||||||
{
|
- {
|
||||||
- GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/terrain.png"));
|
- GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/terrain.png"));
|
||||||
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture(par2ItemStack.getItem().getTextureFile()));
|
- }
|
||||||
}
|
- else
|
||||||
else
|
- {
|
||||||
{
|
|
||||||
- GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/gui/items.png"));
|
- GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/gui/items.png"));
|
||||||
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture(par2ItemStack.getItem().getTextureFile()));
|
- }
|
||||||
}
|
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture(par2ItemStack.getItem().getTextureFile()));
|
||||||
|
|
||||||
Tessellator var4 = Tessellator.instance;
|
Tessellator var4 = Tessellator.instance;
|
||||||
@@ -246,8 +258,10 @@
|
int var5 = par1EntityLiving.getItemIcon(par2ItemStack, par3);
|
||||||
|
@@ -246,8 +251,10 @@
|
||||||
float var11;
|
float var11;
|
||||||
float var13;
|
float var13;
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
var7 = 0.8F;
|
var7 = 0.8F;
|
||||||
var17 = var3.getSwingProgress(par1);
|
var17 = var3.getSwingProgress(par1);
|
||||||
@@ -313,8 +327,15 @@
|
@@ -313,8 +320,15 @@
|
||||||
var26.addVertexWithUV((double)(128 + var27), (double)(0 - var27), 0.0D, 1.0D, 0.0D);
|
var26.addVertexWithUV((double)(128 + var27), (double)(0 - var27), 0.0D, 1.0D, 0.0D);
|
||||||
var26.addVertexWithUV((double)(0 - var27), (double)(0 - var27), 0.0D, 0.0D, 0.0D);
|
var26.addVertexWithUV((double)(0 - var27), (double)(0 - var27), 0.0D, 0.0D, 0.0D);
|
||||||
var26.draw();
|
var26.draw();
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
else if (var14 != null)
|
else if (var14 != null)
|
||||||
@@ -414,12 +435,15 @@
|
@@ -414,12 +428,15 @@
|
||||||
if (var14.getItem().requiresMultipleRenderPasses())
|
if (var14.getItem().requiresMultipleRenderPasses())
|
||||||
{
|
{
|
||||||
this.renderItem(var3, var14, 0);
|
this.renderItem(var3, var14, 0);
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
--- ../src_base/minecraft/net/minecraft/src/Packet53BlockChange.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
|
+++ ../src_work/minecraft/net/minecraft/src/Packet53BlockChange.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
|
@@ -4,6 +4,8 @@
|
||||||
|
import java.io.DataOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
+import net.minecraft.src.forge.ForgeHooksClient;
|
||||||
|
+
|
||||||
|
public class Packet53BlockChange extends Packet
|
||||||
|
{
|
||||||
|
/** Block X position. */
|
||||||
|
@@ -34,7 +36,14 @@
|
||||||
|
this.xPosition = par1DataInputStream.readInt();
|
||||||
|
this.yPosition = par1DataInputStream.read();
|
||||||
|
this.zPosition = par1DataInputStream.readInt();
|
||||||
|
- this.type = par1DataInputStream.read();
|
||||||
|
+ if (ForgeHooksClient.enable4096)
|
||||||
|
+ {
|
||||||
|
+ this.type = par1DataInputStream.readInt();
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ this.type = par1DataInputStream.read();
|
||||||
|
+ }
|
||||||
|
this.metadata = par1DataInputStream.read();
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -46,7 +55,14 @@
|
||||||
|
par1DataOutputStream.writeInt(this.xPosition);
|
||||||
|
par1DataOutputStream.write(this.yPosition);
|
||||||
|
par1DataOutputStream.writeInt(this.zPosition);
|
||||||
|
- par1DataOutputStream.write(this.type);
|
||||||
|
+ if (ForgeHooksClient.enable4096)
|
||||||
|
+ {
|
||||||
|
+ par1DataOutputStream.writeInt(this.type);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ par1DataOutputStream.write(this.type);
|
||||||
|
+ }
|
||||||
|
par1DataOutputStream.write(this.metadata);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -63,6 +79,6 @@
|
||||||
|
*/
|
||||||
|
public int getPacketSize()
|
||||||
|
{
|
||||||
|
- return 11;
|
||||||
|
+ return ForgeHooksClient.enable4096 ? 14 : 11;
|
||||||
|
}
|
||||||
|
}
|
|
@ -21,7 +21,7 @@
|
||||||
+ {
|
+ {
|
||||||
+ ;
|
+ ;
|
||||||
+ }
|
+ }
|
||||||
+ else if (var10.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[var10.itemID].getRenderType()))
|
+ else if (var10.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.blocksList[var10.itemID].getRenderType()))
|
||||||
{
|
{
|
||||||
GL11.glRotatef(var12, 0.0F, 1.0F, 0.0F);
|
GL11.glRotatef(var12, 0.0F, 1.0F, 0.0F);
|
||||||
- this.loadTexture("/terrain.png");
|
- this.loadTexture("/terrain.png");
|
||||||
|
@ -43,30 +43,37 @@
|
||||||
var15 = var10.getItem().func_46057_a(var10.getItemDamage(), var14);
|
var15 = var10.getItem().func_46057_a(var10.getItemDamage(), var14);
|
||||||
var16 = 1.0F;
|
var16 = 1.0F;
|
||||||
|
|
||||||
@@ -120,11 +128,11 @@
|
@@ -117,15 +125,8 @@
|
||||||
|
{
|
||||||
if (var10.itemID < 256)
|
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||||
{
|
var14 = var10.getIconIndex();
|
||||||
|
-
|
||||||
|
- if (var10.itemID < 256)
|
||||||
|
- {
|
||||||
- this.loadTexture("/terrain.png");
|
- this.loadTexture("/terrain.png");
|
||||||
+ this.loadTexture(Block.blocksList[var10.itemID].getTextureFile());
|
- }
|
||||||
}
|
- else
|
||||||
else
|
- {
|
||||||
{
|
|
||||||
- this.loadTexture("/gui/items.png");
|
- this.loadTexture("/gui/items.png");
|
||||||
+ this.loadTexture(Item.itemsList[var10.itemID].getTextureFile());
|
- }
|
||||||
}
|
+
|
||||||
|
+ this.loadTexture(var10.getItem().getTextureFile());
|
||||||
|
|
||||||
if (this.field_27004_a)
|
if (this.field_27004_a)
|
||||||
@@ -189,7 +197,7 @@
|
{
|
||||||
|
@@ -187,9 +188,9 @@
|
||||||
|
float var12;
|
||||||
|
float var13;
|
||||||
|
|
||||||
if (par3 < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[par3].getRenderType()))
|
- if (par3 < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[par3].getRenderType()))
|
||||||
|
+ if (Item.itemsList[par3] instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.blocksList[par3].getRenderType()))
|
||||||
{
|
{
|
||||||
- par2RenderEngine.bindTexture(par2RenderEngine.getTexture("/terrain.png"));
|
- par2RenderEngine.bindTexture(par2RenderEngine.getTexture("/terrain.png"));
|
||||||
+ par2RenderEngine.bindTexture(par2RenderEngine.getTexture(Block.blocksList[par3].getTextureFile()));
|
+ par2RenderEngine.bindTexture(par2RenderEngine.getTexture(Block.blocksList[par3].getTextureFile()));
|
||||||
Block var15 = Block.blocksList[par3];
|
Block var15 = Block.blocksList[par3];
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glTranslatef((float)(par6 - 2), (float)(par7 + 3), -3.0F + this.zLevel);
|
GL11.glTranslatef((float)(par6 - 2), (float)(par7 + 3), -3.0F + this.zLevel);
|
||||||
@@ -221,9 +229,9 @@
|
@@ -221,9 +222,9 @@
|
||||||
if (Item.itemsList[par3].requiresMultipleRenderPasses())
|
if (Item.itemsList[par3].requiresMultipleRenderPasses())
|
||||||
{
|
{
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
|
@ -78,21 +85,23 @@
|
||||||
{
|
{
|
||||||
int var9 = Item.itemsList[par3].func_46057_a(par4, var8);
|
int var9 = Item.itemsList[par3].func_46057_a(par4, var8);
|
||||||
var10 = Item.itemsList[par3].getColorFromDamage(par4, var8);
|
var10 = Item.itemsList[par3].getColorFromDamage(par4, var8);
|
||||||
@@ -247,11 +255,11 @@
|
@@ -245,14 +246,7 @@
|
||||||
|
{
|
||||||
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
|
|
||||||
if (par3 < 256)
|
- if (par3 < 256)
|
||||||
{
|
- {
|
||||||
- par2RenderEngine.bindTexture(par2RenderEngine.getTexture("/terrain.png"));
|
- par2RenderEngine.bindTexture(par2RenderEngine.getTexture("/terrain.png"));
|
||||||
+ par2RenderEngine.bindTexture(par2RenderEngine.getTexture(Block.blocksList[par3].getTextureFile()));
|
- }
|
||||||
}
|
- else
|
||||||
else
|
- {
|
||||||
{
|
|
||||||
- par2RenderEngine.bindTexture(par2RenderEngine.getTexture("/gui/items.png"));
|
- par2RenderEngine.bindTexture(par2RenderEngine.getTexture("/gui/items.png"));
|
||||||
+ par2RenderEngine.bindTexture(par2RenderEngine.getTexture(Item.itemsList[par3].getTextureFile()));
|
- }
|
||||||
}
|
+ par2RenderEngine.bindTexture(par2RenderEngine.getTexture(Item.itemsList[par3].getTextureFile()));
|
||||||
|
|
||||||
var8 = Item.itemsList[par3].getColorFromDamage(par4, 0);
|
var8 = Item.itemsList[par3].getColorFromDamage(par4, 0);
|
||||||
@@ -279,7 +287,10 @@
|
float var14 = (float)(var8 >> 16 & 255) / 255.0F;
|
||||||
|
@@ -279,7 +273,10 @@
|
||||||
{
|
{
|
||||||
if (par3ItemStack != null)
|
if (par3ItemStack != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
--- ../src_base/minecraft/net/minecraft/src/StatList.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
|
+++ ../src_work/minecraft/net/minecraft/src/StatList.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
|
@@ -166,9 +166,9 @@
|
||||||
|
*/
|
||||||
|
private static StatBase[] initMinableStats(String par0Str, int par1)
|
||||||
|
{
|
||||||
|
- StatBase[] var2 = new StatBase[256];
|
||||||
|
+ StatBase[] var2 = new StatBase[Block.blocksList.length];
|
||||||
|
|
||||||
|
- for (int var3 = 0; var3 < 256; ++var3)
|
||||||
|
+ for (int var3 = 0; var3 < Block.blocksList.length; ++var3)
|
||||||
|
{
|
||||||
|
if (Block.blocksList[var3] != null && Block.blocksList[var3].getEnableStats())
|
||||||
|
{
|
|
@ -0,0 +1,11 @@
|
||||||
|
--- ../src_base/minecraft_server/net/minecraft/src/EntityEnderman.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
|
+++ ../src_work/minecraft_server/net/minecraft/src/EntityEnderman.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
|
||||||
|
public class EntityEnderman extends EntityMob
|
||||||
|
{
|
||||||
|
- private static boolean[] canCarryBlocks = new boolean[256];
|
||||||
|
+ private static boolean[] canCarryBlocks = new boolean[Block.blocksList.length];
|
||||||
|
|
||||||
|
/** Is the enderman attacking another entity? */
|
||||||
|
public boolean isAttacking = false;
|
|
@ -23,6 +23,15 @@
|
||||||
|
|
||||||
protected Item(int par1)
|
protected Item(int par1)
|
||||||
{
|
{
|
||||||
|
@@ -198,7 +204,7 @@
|
||||||
|
|
||||||
|
if (itemsList[256 + par1] != null)
|
||||||
|
{
|
||||||
|
- System.out.println("CONFLICT @ " + par1);
|
||||||
|
+ System.out.println("CONFLICT @ " + par1 + " item slot already occupied by " + itemsList[256 + par1] + " while adding " + this);
|
||||||
|
}
|
||||||
|
|
||||||
|
itemsList[256 + par1] = this;
|
||||||
@@ -492,6 +498,10 @@
|
@@ -492,6 +498,10 @@
|
||||||
float var18 = var15 * var16;
|
float var18 = var15 * var16;
|
||||||
float var20 = var14 * var16;
|
float var20 = var14 * var16;
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
--- ../src_base/minecraft_server/net/minecraft/src/ItemMap.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
|
+++ ../src_work/minecraft_server/net/minecraft/src/ItemMap.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
|
@@ -68,7 +68,7 @@
|
||||||
|
byte var23 = 0;
|
||||||
|
byte var24 = 0;
|
||||||
|
byte var25 = 0;
|
||||||
|
- int[] var26 = new int[256];
|
||||||
|
+ int[] var26 = new int[Block.blocksList.length];
|
||||||
|
Chunk var27 = par1World.getChunkFromBlockCoords(var21, var22);
|
||||||
|
int var28 = var21 & 15;
|
||||||
|
int var29 = var22 & 15;
|
||||||
|
@@ -158,7 +158,7 @@
|
||||||
|
var33 = 0;
|
||||||
|
var34 = 0;
|
||||||
|
|
||||||
|
- for (var35 = 0; var35 < 256; ++var35)
|
||||||
|
+ for (var35 = 0; var35 < Block.blocksList.length; ++var35)
|
||||||
|
{
|
||||||
|
if (var26[var35] > var33)
|
||||||
|
{
|
|
@ -0,0 +1,28 @@
|
||||||
|
--- ../src_base/minecraft_server/net/minecraft/src/Packet53BlockChange.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
|
+++ ../src_work/minecraft_server/net/minecraft/src/Packet53BlockChange.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
|
@@ -44,7 +44,7 @@
|
||||||
|
this.xPosition = par1DataInputStream.readInt();
|
||||||
|
this.yPosition = par1DataInputStream.read();
|
||||||
|
this.zPosition = par1DataInputStream.readInt();
|
||||||
|
- this.type = par1DataInputStream.read();
|
||||||
|
+ this.type = par1DataInputStream.readInt(); //4096
|
||||||
|
this.metadata = par1DataInputStream.read();
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@
|
||||||
|
par1DataOutputStream.writeInt(this.xPosition);
|
||||||
|
par1DataOutputStream.write(this.yPosition);
|
||||||
|
par1DataOutputStream.writeInt(this.zPosition);
|
||||||
|
- par1DataOutputStream.write(this.type);
|
||||||
|
+ par1DataOutputStream.writeInt(this.type); //4096
|
||||||
|
par1DataOutputStream.write(this.metadata);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -73,6 +73,6 @@
|
||||||
|
*/
|
||||||
|
public int getPacketSize()
|
||||||
|
{
|
||||||
|
- return 11;
|
||||||
|
+ return 14;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
--- ../src_base/minecraft_server/net/minecraft/src/StatList.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
|
+++ ../src_work/minecraft_server/net/minecraft/src/StatList.java 0000-00-00 00:00:00.000000000 -0000
|
||||||
|
@@ -166,9 +166,9 @@
|
||||||
|
*/
|
||||||
|
private static StatBase[] initMinableStats(String par0Str, int par1)
|
||||||
|
{
|
||||||
|
- StatBase[] var2 = new StatBase[256];
|
||||||
|
+ StatBase[] var2 = new StatBase[Block.blocksList.length];
|
||||||
|
|
||||||
|
- for (int var3 = 0; var3 < 256; ++var3)
|
||||||
|
+ for (int var3 = 0; var3 < Block.blocksList.length; ++var3)
|
||||||
|
{
|
||||||
|
if (Block.blocksList[var3] != null && Block.blocksList[var3].getEnableStats())
|
||||||
|
{
|
Loading…
Reference in a new issue