merged with pre-1.9p5 branch, for 1.0.0 release
This commit is contained in:
parent
d2cf70f8d5
commit
96c05bbd25
83 changed files with 953 additions and 1192 deletions
|
@ -231,7 +231,7 @@ public class ForgeHooks {
|
|||
|
||||
public static final int majorVersion=1;
|
||||
public static final int minorVersion=1;
|
||||
public static final int revisionVersion=2;
|
||||
public static final int revisionVersion=3;
|
||||
static {
|
||||
System.out.printf("MinecraftForge V%d.%d.%d Initialized\n",majorVersion,minorVersion,revisionVersion);
|
||||
}
|
||||
|
|
|
@ -11,8 +11,12 @@ cmd /C decompile.bat
|
|||
pushd src >nul
|
||||
..\runtime\bin\python\python_mcp ..\forge\lfcr.py ../forge/modLoaderMP.patch ../forge/modLoaderMP.patch
|
||||
..\runtime\bin\applydiff.exe -uf -p2 -i ../forge/modLoaderMP.patch
|
||||
..\runtime\bin\python\python_mcp ..\forge\lfcr.py ../forge/mlprop.patch ../forge/mlprop.patch
|
||||
..\runtime\bin\applydiff.exe -uf -p1 -i ../forge/mlprop.patch
|
||||
rem ..\runtime\bin\python\python_mcp ..\forge\lfcr.py ../forge/mlprop.patch ../forge/mlprop.patch
|
||||
rem ..\runtime\bin\applydiff.exe -uf -p1 -i ../forge/mlprop.patch
|
||||
del minecraft\net\minecraft\src\MLProp.java
|
||||
copy ..\forge\MLProp.java minecraft\net\minecraft\src\MLProp.java
|
||||
del minecraft_server\net\minecraft\src\MLProp.java
|
||||
copy ..\forge\MLProp.java minecraft_server\net\minecraft\src\MLProp.java
|
||||
|
||||
for /f "delims=" %%a in ('dir /a -d /b /S ..\forge\patches') do (
|
||||
pushd "%%a" 2>nul
|
||||
|
|
|
@ -11,7 +11,9 @@ pushd .. > /dev/null
|
|||
pushd src > /dev/null
|
||||
find . -name *.java -exec sed -i 's/\r//g' \{\} \;
|
||||
patch -p2 -i ../forge/modLoaderMP.patch
|
||||
patch -p1 -i ../forge/mlprop.patch
|
||||
#patch -p1 -i ../forge/mlprop.patch
|
||||
cp ../forge/MLProp.java minecraft/net/minecraft/src/MLProp.java
|
||||
cp ../forge/MLProp.java minecraft_server/net/minecraft/src/MLProp.java
|
||||
for i in `find ../forge/patches/ -type f`
|
||||
do
|
||||
patch -p2 -i $i
|
||||
|
|
|
@ -64,7 +64,7 @@ cp ../lfcr.py .
|
|||
cp ../install/install.cmd .
|
||||
cp ../install/install.sh .
|
||||
cp ../modLoaderMP.patch .
|
||||
cp ../mlprop.patch .
|
||||
cp ../MLProp.java .
|
||||
cp ../install/README.txt .
|
||||
cp ../minecraftforge_credits.txt .
|
||||
cp -r ../doc .
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
@@ -151,12 +152,14 @@
|
||||
@@ -312,12 +313,14 @@
|
||||
|
||||
public float getBlockBrightness(IBlockAccess iblockaccess, int i, int j, int k)
|
||||
{
|
||||
|
@ -25,10 +25,12 @@
|
|||
}
|
||||
|
||||
public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
|
||||
@@ -278,24 +281,40 @@
|
||||
@@ -438,25 +441,41 @@
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
-
|
||||
+
|
||||
+ /* FORGE: Metadata-sensitive version.
|
||||
+ */
|
||||
+ public int quantityDropped(int i, Random random)
|
||||
|
@ -36,7 +38,7 @@
|
|||
+ return quantityDropped(random);
|
||||
+ }
|
||||
+
|
||||
public int idDropped(int i, Random random)
|
||||
public int idDropped(int i, Random random, int j)
|
||||
{
|
||||
return blockID;
|
||||
}
|
||||
|
@ -68,40 +70,38 @@
|
|||
+
|
||||
+ int q=quantityDropped(md,world.rand);
|
||||
+ for(int n=0; n<q; n++) {
|
||||
+ int id=idDropped(md, world.rand);
|
||||
+ if(id>0) {
|
||||
+ int id = idDropped(md, world.rand, 0);
|
||||
+ if(id > 0) {
|
||||
+ tr.add(new ItemStack(id,1,damageDropped(md)));
|
||||
+ }
|
||||
+ }
|
||||
+ return tr;
|
||||
}
|
||||
|
||||
public final void dropBlockAsItem(World world, int i, int j, int k, int l)
|
||||
@@ -309,20 +328,12 @@
|
||||
public final void dropBlockAsItem(World world, int i, int j, int k, int l, int i1)
|
||||
@@ -470,18 +489,13 @@
|
||||
{
|
||||
return;
|
||||
}
|
||||
- int i1 = quantityDropped(world.rand);
|
||||
- for(int j1 = 0; j1 < i1; j1++)
|
||||
- int j1 = func_40198_a(i1, world.rand);
|
||||
- for(int k1 = 0; k1 < j1; k1++)
|
||||
- {
|
||||
+ ArrayList<ItemStack> ar=getBlockDropped(world,i,j,k,l);
|
||||
+ for(ItemStack ist : ar) {
|
||||
+ ArrayList<ItemStack> ar = getBlockDropped(world,i,j,k,l);
|
||||
+ for (ItemStack ist : ar) {
|
||||
if(world.rand.nextFloat() > f)
|
||||
- {
|
||||
{
|
||||
continue;
|
||||
- }
|
||||
- int k1 = idDropped(l, world.rand);
|
||||
- if(k1 > 0)
|
||||
}
|
||||
- int l1 = idDropped(l, world.rand, i1);
|
||||
- if(l1 > 0)
|
||||
- {
|
||||
- dropBlockAsItem_do(world, i, j, k, new ItemStack(k1, 1, damageDropped(l)));
|
||||
- dropBlockAsItem_do(world, i, j, k, new ItemStack(l1, 1, damageDropped(l)));
|
||||
- }
|
||||
+ dropBlockAsItem_do(world, i, j, k, ist);
|
||||
}
|
||||
-
|
||||
}
|
||||
|
||||
protected void dropBlockAsItem_do(World world, int i, int j, int k, ItemStack itemstack)
|
||||
@@ -618,6 +629,96 @@
|
||||
}
|
||||
@@ -805,6 +819,96 @@
|
||||
return iblockaccess.isBlockNormalCube(i, j, k) ? 0.2F : 1.0F;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/BlockChest.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockChest.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -423,23 +423,23 @@
|
||||
@@ -429,23 +429,23 @@
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -8,18 +8,27 @@
|
|||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// BlockFlower, Block, World, EntityItem,
|
||||
@@ -108,27 +109,16 @@
|
||||
@@ -108,28 +109,16 @@
|
||||
return 6;
|
||||
}
|
||||
|
||||
- public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f)
|
||||
- public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f, int i1)
|
||||
- {
|
||||
- super.dropBlockAsItemWithChance(world, i, j, k, l, f);
|
||||
- super.dropBlockAsItemWithChance(world, i, j, k, l, f, 0);
|
||||
- if(world.multiplayerWorld)
|
||||
- {
|
||||
- return;
|
||||
- }
|
||||
- for(int i1 = 0; i1 < 3; i1++)
|
||||
+ public ArrayList<ItemStack> getBlockDropped(World world,
|
||||
+ int i, int j, int k, int md) {
|
||||
+ ArrayList<ItemStack> tr = new ArrayList<ItemStack>();
|
||||
+ if (md == 7) tr.add(new ItemStack(Item.wheat));
|
||||
+
|
||||
+ for(int n = 0; n < 3; n++) {
|
||||
+ if (world.rand.nextInt(15) <= md)
|
||||
+ tr.add(new ItemStack(Item.seeds));
|
||||
}
|
||||
- int j1 = 3 + i1;
|
||||
- for(int k1 = 0; k1 < j1; k1++)
|
||||
- {
|
||||
- if(world.rand.nextInt(15) <= l)
|
||||
- {
|
||||
|
@ -33,16 +42,7 @@
|
|||
- }
|
||||
- }
|
||||
-
|
||||
+ public ArrayList<ItemStack> getBlockDropped(World world,
|
||||
+ int i, int j, int k, int md) {
|
||||
+ ArrayList<ItemStack> tr=new ArrayList<ItemStack>();
|
||||
+ if(md==7) tr.add(new ItemStack(Item.wheat));
|
||||
+
|
||||
+ for(int n=0; n<3; n++) {
|
||||
+ if(world.rand.nextInt(15) <= md)
|
||||
+ tr.add(new ItemStack(Item.seeds));
|
||||
+ }
|
||||
+ return tr;
|
||||
}
|
||||
|
||||
public int idDropped(int i, Random random)
|
||||
public int idDropped(int i, Random random, int j)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
{
|
||||
world.setBlockWithNotify(i, j, k, 0);
|
||||
flag = true;
|
||||
@@ -242,7 +242,7 @@
|
||||
@@ -241,7 +241,7 @@
|
||||
return false;
|
||||
} else
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/BlockPressurePlate.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockPressurePlate.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -46,7 +46,8 @@
|
||||
@@ -48,7 +48,8 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
|
@ -10,7 +10,7 @@
|
|||
}
|
||||
|
||||
public void onBlockAdded(World world, int i, int j, int k)
|
||||
@@ -56,7 +57,8 @@
|
||||
@@ -58,7 +59,8 @@
|
||||
public void onNeighborBlockChange(World world, int i, int j, int k, int l)
|
||||
{
|
||||
boolean flag = false;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/BlockRail.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockRail.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -16,12 +16,12 @@
|
||||
@@ -18,12 +18,12 @@
|
||||
public static final boolean isRailBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
int l = world.getBlockId(i, j, k);
|
||||
|
@ -15,7 +15,7 @@
|
|||
}
|
||||
|
||||
protected BlockRail(int i, int j, boolean flag)
|
||||
@@ -97,7 +97,7 @@
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
|||
}
|
||||
|
||||
public void onBlockAdded(World world, int i, int j, int k)
|
||||
@@ -121,23 +121,23 @@
|
||||
@@ -123,23 +123,23 @@
|
||||
j1 &= 7;
|
||||
}
|
||||
boolean flag = false;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/BlockRedstoneRepeater.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockRedstoneRepeater.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -27,7 +27,7 @@
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@
|
|||
{
|
||||
return false;
|
||||
} else
|
||||
@@ -38,7 +38,7 @@
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
public boolean canBlockStay(World world, int i, int j, int k)
|
||||
{
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/BlockRedstoneWire.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockRedstoneWire.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
package net.minecraft.src;
|
||||
+import net.minecraft.src.forge.*;
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -53,7 +54,7 @@
|
||||
+import net.minecraft.src.forge.*;
|
||||
+
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// Block, Material, World, ChunkPosition,
|
||||
// Item, IBlockAccess, Direction, AxisAlignedBB
|
||||
@@ -56,7 +58,7 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
|
@ -17,14 +18,14 @@
|
|||
}
|
||||
|
||||
private void updateAndPropagateCurrentStrength(World world, int i, int j, int k)
|
||||
@@ -451,6 +452,10 @@
|
||||
@@ -454,6 +456,10 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
+ if (Block.blocksList[i1] instanceof IConnectRedstone) {
|
||||
+ IConnectRedstone icr = (IConnectRedstone) Block.blocksList[i1];
|
||||
+ IConnectRedstone icr = (IConnectRedstone)Block.blocksList[i1];
|
||||
+ return icr.canConnectRedstone(iblockaccess, i, j, k, l);
|
||||
+ }
|
||||
if(Block.blocksList[i1].canProvidePower())
|
||||
if(Block.blocksList[i1].canProvidePower() && l != -1)
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// BlockFlower, ColorizerGrass, ColorizerFoliage, IBlockAccess,
|
||||
@@ -79,13 +82,17 @@
|
||||
@@ -73,13 +76,17 @@
|
||||
|
||||
public int idDropped(int i, Random random)
|
||||
public int idDropped(int i, Random random, int j)
|
||||
{
|
||||
- if(random.nextInt(8) == 0)
|
||||
- {
|
||||
|
@ -35,4 +35,4 @@
|
|||
+ return tr;
|
||||
}
|
||||
|
||||
public void harvestBlock(World world, EntityPlayer entityplayer, int i, int j, int k, int l)
|
||||
public int func_40198_a(int i, Random random)
|
||||
|
|
|
@ -1,104 +1,107 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/BlockTorch.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockTorch.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -41,24 +41,24 @@
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
private boolean func_31032_h(World world, int i, int j, int k)
|
||||
{
|
||||
- return world.isBlockNormalCube(i, j, k) || world.getBlockId(i, j, k) == Block.fence.blockID;
|
||||
+ return world.isBlockSolidOnSide(i, j, k,1) || world.getBlockId(i, j, k) == Block.fence.blockID;
|
||||
}
|
||||
- if(world.func_41082_b(i, j, k, true))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k, 1))
|
||||
{
|
||||
return true;
|
||||
} else
|
||||
@@ -53,19 +53,19 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
- if(world.isBlockNormalCube(i - 1, j, k))
|
||||
- if(world.func_41082_b(i - 1, j, k, true))
|
||||
+ if(world.isBlockSolidOnSide(i - 1, j, k,5))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if(world.isBlockNormalCube(i + 1, j, k))
|
||||
- if(world.func_41082_b(i + 1, j, k, true))
|
||||
+ if(world.isBlockSolidOnSide(i + 1, j, k,4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if(world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k - 1,3))
|
||||
- if(world.func_41082_b(i, j, k - 1, true))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k-1,3))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if(world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k + 1,2))
|
||||
- if(world.func_41082_b(i, j, k + 1, true))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k+1,2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -72,19 +72,19 @@
|
||||
@@ -79,19 +79,19 @@
|
||||
{
|
||||
i1 = 5;
|
||||
}
|
||||
- if(l == 2 && world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if(l == 2 && world.isBlockSolidOnSide(i, j, k + 1,2))
|
||||
- if(l == 2 && world.func_41082_b(i, j, k + 1, true))
|
||||
+ if(l == 2 && world.isBlockSolidOnSide(i, j, k+1,2))
|
||||
{
|
||||
i1 = 4;
|
||||
}
|
||||
- if(l == 3 && world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if(l == 3 && world.isBlockSolidOnSide(i, j, k - 1,3))
|
||||
- if(l == 3 && world.func_41082_b(i, j, k - 1, true))
|
||||
+ if(l == 3 && world.isBlockSolidOnSide(i, j, k-1,3))
|
||||
{
|
||||
i1 = 3;
|
||||
}
|
||||
- if(l == 4 && world.isBlockNormalCube(i + 1, j, k))
|
||||
- if(l == 4 && world.func_41082_b(i + 1, j, k, true))
|
||||
+ if(l == 4 && world.isBlockSolidOnSide(i + 1, j, k,4))
|
||||
{
|
||||
i1 = 2;
|
||||
}
|
||||
- if(l == 5 && world.isBlockNormalCube(i - 1, j, k))
|
||||
- if(l == 5 && world.func_41082_b(i - 1, j, k, true))
|
||||
+ if(l == 5 && world.isBlockSolidOnSide(i - 1, j, k,5))
|
||||
{
|
||||
i1 = 1;
|
||||
}
|
||||
@@ -102,19 +102,19 @@
|
||||
@@ -109,19 +109,19 @@
|
||||
|
||||
public void onBlockAdded(World world, int i, int j, int k)
|
||||
{
|
||||
- if(world.isBlockNormalCube(i - 1, j, k))
|
||||
- if(world.func_41082_b(i - 1, j, k, true))
|
||||
+ if(world.isBlockSolidOnSide(i - 1, j, k,5))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(i, j, k, 1);
|
||||
} else
|
||||
- if(world.isBlockNormalCube(i + 1, j, k))
|
||||
- if(world.func_41082_b(i + 1, j, k, true))
|
||||
+ if(world.isBlockSolidOnSide(i + 1, j, k,4))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(i, j, k, 2);
|
||||
} else
|
||||
- if(world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k - 1,3))
|
||||
- if(world.func_41082_b(i, j, k - 1, true))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k-1,3))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(i, j, k, 3);
|
||||
} else
|
||||
- if(world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k + 1,2))
|
||||
- if(world.func_41082_b(i, j, k + 1, true))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k+1,2))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(i, j, k, 4);
|
||||
} else
|
||||
@@ -131,19 +131,19 @@
|
||||
@@ -138,19 +138,19 @@
|
||||
{
|
||||
int i1 = world.getBlockMetadata(i, j, k);
|
||||
boolean flag = false;
|
||||
- if(!world.isBlockNormalCube(i - 1, j, k) && i1 == 1)
|
||||
- if(!world.func_41082_b(i - 1, j, k, true) && i1 == 1)
|
||||
+ if(!world.isBlockSolidOnSide(i - 1, j, k,5) && i1 == 1)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if(!world.isBlockNormalCube(i + 1, j, k) && i1 == 2)
|
||||
- if(!world.func_41082_b(i + 1, j, k, true) && i1 == 2)
|
||||
+ if(!world.isBlockSolidOnSide(i + 1, j, k,4) && i1 == 2)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if(!world.isBlockNormalCube(i, j, k - 1) && i1 == 3)
|
||||
+ if(!world.isBlockSolidOnSide(i, j, k - 1,3) && i1 == 3)
|
||||
- if(!world.func_41082_b(i, j, k - 1, true) && i1 == 3)
|
||||
+ if(!world.isBlockSolidOnSide(i, j, k-1,3) && i1 == 3)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if(!world.isBlockNormalCube(i, j, k + 1) && i1 == 4)
|
||||
+ if(!world.isBlockSolidOnSide(i, j, k + 1,2) && i1 == 4)
|
||||
- if(!world.func_41082_b(i, j, k + 1, true) && i1 == 4)
|
||||
+ if(!world.isBlockSolidOnSide(i, j, k+1,2) && i1 == 4)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
|
|
@ -1,15 +1,27 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/BlockTrapDoor.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockTrapDoor.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -147,7 +147,7 @@
|
||||
@@ -11,7 +11,10 @@
|
||||
|
||||
public class BlockTrapDoor extends Block
|
||||
{
|
||||
-
|
||||
+ /* FORGE: Set this to allow trapdoors to remain free-floating
|
||||
+ */
|
||||
+ public static boolean disableValidation=false;
|
||||
+
|
||||
protected BlockTrapDoor(int i, Material material)
|
||||
{
|
||||
super(i, material);
|
||||
@@ -147,7 +150,7 @@
|
||||
{
|
||||
j1--;
|
||||
}
|
||||
- if(!world.isBlockNormalCube(j1, j, k1))
|
||||
+ if(!disableValidation && !world.isBlockSolidOnSide(j1, j, k1, (i1&3)+2))
|
||||
- if(!func_41052_f(world.getBlockId(j1, j, k1)))
|
||||
+ if(!(func_41052_f(world.getBlockId(j1, j, k1)) || world.isBlockSolidOnSide(j1, j, k1, (i1&3)+2)))
|
||||
{
|
||||
world.setBlockWithNotify(i, j, k, 0);
|
||||
dropBlockAsItem(world, i, j, k, i1);
|
||||
@@ -189,6 +189,7 @@
|
||||
dropBlockAsItem(world, i, j, k, i1, 0);
|
||||
@@ -192,6 +195,7 @@
|
||||
|
||||
public boolean canPlaceBlockOnSide(World world, int i, int j, int k, int l)
|
||||
{
|
||||
|
@ -17,20 +29,23 @@
|
|||
if(l == 0)
|
||||
{
|
||||
return false;
|
||||
@@ -213,11 +214,15 @@
|
||||
@@ -216,7 +220,7 @@
|
||||
{
|
||||
i--;
|
||||
}
|
||||
- return world.isBlockNormalCube(i, j, k);
|
||||
+ return world.isBlockSolidOnSide(i, j, k, l);
|
||||
- return func_41052_f(world.getBlockId(i, j, k));
|
||||
+ return func_41052_f(world.getBlockId(i, j, k)) || world.isBlockSolidOnSide(i, j, k, l);
|
||||
}
|
||||
|
||||
public static boolean isTrapdoorOpen(int i)
|
||||
@@ -226,6 +230,10 @@
|
||||
|
||||
private static boolean func_41052_f(int i)
|
||||
{
|
||||
return (i & 4) != 0;
|
||||
}
|
||||
+
|
||||
+ /* FORGE: Set this to allow trapdoors to remain free-floating
|
||||
+ */
|
||||
+ public static boolean disableValidation=false;
|
||||
}
|
||||
+ if (disableValidation)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
if(i <= 0)
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -1,151 +1,22 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/Chunk.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/Chunk.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
// Decompiler options: packimports(3) braces deadcode fieldsfirst
|
||||
|
||||
package net.minecraft.src;
|
||||
+import net.minecraft.src.forge.*;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.util.*;
|
||||
@@ -26,7 +27,6 @@
|
||||
hasEntities = false;
|
||||
lastSaveTime = 0L;
|
||||
field_35846_u = false;
|
||||
- world.getClass();
|
||||
entities = new List[128 / 16];
|
||||
worldObj = world;
|
||||
xPosition = i;
|
||||
@@ -44,11 +44,8 @@
|
||||
{
|
||||
this(world, i, j);
|
||||
blocks = abyte0;
|
||||
- world.getClass();
|
||||
data = new NibbleArray(abyte0.length, 7);
|
||||
- world.getClass();
|
||||
skylightMap = new NibbleArray(abyte0.length, 7);
|
||||
- world.getClass();
|
||||
blocklightMap = new NibbleArray(abyte0.length, 7);
|
||||
}
|
||||
|
||||
@@ -68,16 +65,12 @@
|
||||
|
||||
public void generateHeightMap()
|
||||
{
|
||||
- worldObj.getClass();
|
||||
int i = 128 - 1;
|
||||
for(int j = 0; j < 16; j++)
|
||||
{
|
||||
for(int k = 0; k < 16; k++)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
int l = 128 - 1;
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
for(int i1 = j << 11 | k << 7; l > 0 && Block.lightOpacity[blocks[(i1 + l) - 1] & 0xff] == 0; l--) { }
|
||||
heightMap[k << 4 | j] = (byte)l;
|
||||
if(l < i)
|
||||
@@ -94,16 +87,12 @@
|
||||
|
||||
public void generateSkylightMap()
|
||||
{
|
||||
- worldObj.getClass();
|
||||
int i = 128 - 1;
|
||||
for(int j = 0; j < 16; j++)
|
||||
{
|
||||
for(int l = 0; l < 16; l++)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
int j1 = 128 - 1;
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
int k1;
|
||||
for(k1 = j << 11 | l << 7; j1 > 0 && Block.lightOpacity[blocks[(k1 + j1) - 1] & 0xff] == 0; j1--) { }
|
||||
heightMap[l << 4 | j] = (byte)j1;
|
||||
@@ -116,7 +105,6 @@
|
||||
continue;
|
||||
}
|
||||
int l1 = 15;
|
||||
- worldObj.getClass();
|
||||
int i2 = 128 - 1;
|
||||
do
|
||||
{
|
||||
@@ -154,7 +142,6 @@
|
||||
|
||||
private void func_35839_k()
|
||||
{
|
||||
- worldObj.getClass();
|
||||
if(worldObj.doChunksNearChunkExist(xPosition * 16 + 8, 128 / 2, zPosition * 16 + 8, 16))
|
||||
{
|
||||
for(int i = 0; i < 16; i++)
|
||||
@@ -216,7 +203,6 @@
|
||||
{
|
||||
if(l > k)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
if(worldObj.doChunksNearChunkExist(i, 128 / 2, j, 16))
|
||||
{
|
||||
for(int i1 = k; i1 < l; i1++)
|
||||
@@ -237,8 +223,6 @@
|
||||
{
|
||||
i1 = j;
|
||||
}
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
for(int j1 = i << 11 | k << 7; i1 > 0 && Block.lightOpacity[blocks[(j1 + i1) - 1] & 0xff] == 0; i1--) { }
|
||||
if(i1 == l)
|
||||
{
|
||||
@@ -251,7 +235,6 @@
|
||||
lowestBlockHeight = i1;
|
||||
} else
|
||||
{
|
||||
- worldObj.getClass();
|
||||
int k1 = 128 - 1;
|
||||
for(int i2 = 0; i2 < 16; i2++)
|
||||
{
|
||||
@@ -320,8 +303,6 @@
|
||||
|
||||
public int getBlockID(int i, int j, int k)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
return blocks[i << 11 | k << 7 | j] & 0xff;
|
||||
}
|
||||
|
||||
@@ -334,8 +315,6 @@
|
||||
precipitationHeightMap[j1] = -999;
|
||||
}
|
||||
int k1 = heightMap[k << 4 | i] & 0xff;
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
int l1 = blocks[i << 11 | k << 7 | j] & 0xff;
|
||||
if(l1 == l && data.getNibble(i, j, k) == i1)
|
||||
{
|
||||
@@ -343,12 +322,18 @@
|
||||
@@ -348,6 +349,7 @@
|
||||
}
|
||||
int i2 = xPosition * 16 + i;
|
||||
int j2 = zPosition * 16 + k;
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
+
|
||||
+ if (Block.blocksList[l1] instanceof IOverrideReplace) {
|
||||
+ IOverrideReplace iovr = (IOverrideReplace) Block.blocksList[l1];
|
||||
+ if (!iovr.canReplaceBlock(worldObj, i2, j, j2, l))
|
||||
+ return iovr.getReplacedSuccess();
|
||||
+ }
|
||||
+
|
||||
blocks[i << 11 | k << 7 | j] = (byte)(byte0 & 0xff);
|
||||
- if(l1 != 0 && !worldObj.multiplayerWorld)
|
||||
- {
|
||||
- Block.blocksList[l1].onBlockRemoval(worldObj, i2, j, j2);
|
||||
+ if(l1 != 0) {
|
||||
+ if(!worldObj.multiplayerWorld)
|
||||
+ Block.blocksList[l1].onBlockRemoval(worldObj, i2, j, j2);
|
||||
+ removeChunkBlockTileEntity(i,j,k);
|
||||
}
|
||||
data.setNibble(i, j, k, i1);
|
||||
if(!worldObj.worldProvider.hasNoSky)
|
||||
@@ -380,7 +365,7 @@
|
||||
blocks[i << worldObj.field_35471_b | k << worldObj.field_35473_a | j] = (byte)(byte0 & 0xff);
|
||||
if(l1 != 0)
|
||||
{
|
||||
@@ -390,7 +392,7 @@
|
||||
TileEntity tileentity = getChunkBlockTileEntity(i, j, k);
|
||||
if(tileentity == null)
|
||||
{
|
||||
|
@ -154,7 +25,7 @@
|
|||
worldObj.setBlockTileEntity(i, j, k, tileentity);
|
||||
}
|
||||
if(tileentity != null)
|
||||
@@ -388,14 +373,6 @@
|
||||
@@ -398,14 +400,6 @@
|
||||
tileentity.func_35144_b();
|
||||
}
|
||||
}
|
||||
|
@ -169,40 +40,22 @@
|
|||
}
|
||||
isModified = true;
|
||||
return true;
|
||||
@@ -410,8 +387,6 @@
|
||||
precipitationHeightMap[i1] = -999;
|
||||
}
|
||||
int j1 = heightMap[i1] & 0xff;
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
int k1 = blocks[i << 11 | k << 7 | j] & 0xff;
|
||||
if(k1 == l)
|
||||
{
|
||||
@@ -419,12 +394,18 @@
|
||||
@@ -427,10 +421,13 @@
|
||||
}
|
||||
int l1 = xPosition * 16 + i;
|
||||
int i2 = zPosition * 16 + k;
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
+
|
||||
+ if (Block.blocksList[k1] instanceof IOverrideReplace) {
|
||||
+ IOverrideReplace iovr = (IOverrideReplace) Block.blocksList[k1];
|
||||
+ if (!iovr.canReplaceBlock(worldObj, l1, j, i2, l))
|
||||
+ return iovr.getReplacedSuccess();
|
||||
+ }
|
||||
+
|
||||
blocks[i << 11 | k << 7 | j] = (byte)(byte0 & 0xff);
|
||||
- if(k1 != 0)
|
||||
- {
|
||||
blocks[i << worldObj.field_35471_b | k << worldObj.field_35473_a | j] = (byte)(byte0 & 0xff);
|
||||
if(k1 != 0)
|
||||
{
|
||||
- Block.blocksList[k1].onBlockRemoval(worldObj, l1, j, i2);
|
||||
+ if(k1 != 0) {
|
||||
+ if(!worldObj.multiplayerWorld)
|
||||
+ if (!worldObj.multiplayerWorld)
|
||||
+ Block.blocksList[k1].onBlockRemoval(worldObj, l1, j, i2);
|
||||
+ removeChunkBlockTileEntity(i,j,k);
|
||||
+ removeChunkBlockTileEntity(i, j, k);
|
||||
}
|
||||
data.setNibble(i, j, k, 0);
|
||||
if(Block.lightOpacity[byte0 & 0xff] != 0)
|
||||
@@ -452,7 +433,7 @@
|
||||
@@ -458,7 +455,7 @@
|
||||
TileEntity tileentity = getChunkBlockTileEntity(i, j, k);
|
||||
if(tileentity == null)
|
||||
{
|
||||
|
@ -211,7 +64,7 @@
|
|||
worldObj.setBlockTileEntity(i, j, k, tileentity);
|
||||
}
|
||||
if(tileentity != null)
|
||||
@@ -460,14 +441,6 @@
|
||||
@@ -466,14 +463,6 @@
|
||||
tileentity.func_35144_b();
|
||||
}
|
||||
}
|
||||
|
@ -226,7 +79,7 @@
|
|||
}
|
||||
isModified = true;
|
||||
return true;
|
||||
@@ -594,6 +567,11 @@
|
||||
@@ -609,6 +598,11 @@
|
||||
{
|
||||
ChunkPosition chunkposition = new ChunkPosition(i, j, k);
|
||||
TileEntity tileentity = (TileEntity)chunkTileEntityMap.get(chunkposition);
|
||||
|
@ -238,7 +91,7 @@
|
|||
if(tileentity == null)
|
||||
{
|
||||
int l = getBlockID(i, j, k);
|
||||
@@ -603,18 +581,23 @@
|
||||
@@ -618,18 +612,23 @@
|
||||
}
|
||||
if(tileentity == null)
|
||||
{
|
||||
|
@ -264,12 +117,12 @@
|
|||
{
|
||||
- return tileentity;
|
||||
+ TileEntity tileentity = (TileEntity)chunkTileEntityMap.get(chunkposition);
|
||||
+ if(tileentity!=null && tileentity.isInvalid())
|
||||
+ if(tileentity != null && tileentity.isInvalid())
|
||||
+ chunkTileEntityMap.remove(chunkposition);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -626,7 +609,7 @@
|
||||
@@ -641,7 +640,7 @@
|
||||
setChunkBlockTileEntity(i, j, k, tileentity);
|
||||
if(isChunkLoaded)
|
||||
{
|
||||
|
@ -278,22 +131,22 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -643,6 +626,8 @@
|
||||
@@ -657,6 +656,8 @@
|
||||
return;
|
||||
} else
|
||||
{
|
||||
+ TileEntity old=(TileEntity)chunkTileEntityMap.get(chunkposition);
|
||||
+ if(old!=null) old.invalidate();
|
||||
+ TileEntity old = (TileEntity)chunkTileEntityMap.get(chunkposition);
|
||||
+ if (old != null) old.invalidate();
|
||||
tileentity.validate();
|
||||
chunkTileEntityMap.put(chunkposition, tileentity);
|
||||
return;
|
||||
@@ -773,12 +758,19 @@
|
||||
@@ -810,6 +811,15 @@
|
||||
public int setChunkData(byte abyte0[], int i, int j, int k, int l, int i1, int j1,
|
||||
int k1)
|
||||
{
|
||||
+ TileEntity te;
|
||||
+ Iterator iterator = chunkTileEntityMap.values().iterator();
|
||||
+ while(iterator.hasNext()) {
|
||||
+ while (iterator.hasNext()){
|
||||
+ te = (TileEntity)iterator.next();
|
||||
+ te.func_35144_b();
|
||||
+ te.getBlockMetadata();
|
||||
|
@ -303,40 +156,7 @@
|
|||
for(int l1 = i; l1 < l; l1++)
|
||||
{
|
||||
for(int l2 = k; l2 < j1; l2++)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
int l3 = l1 << 11 | l2 << 7 | j;
|
||||
int l4 = i1 - j;
|
||||
System.arraycopy(abyte0, k1, blocks, l3, l4);
|
||||
@@ -792,8 +784,6 @@
|
||||
{
|
||||
for(int i3 = k; i3 < j1; i3++)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
int i4 = (i2 << 11 | i3 << 7 | j) >> 1;
|
||||
int i5 = (i1 - j) / 2;
|
||||
System.arraycopy(abyte0, k1, data.data, i4, i5);
|
||||
@@ -806,8 +796,6 @@
|
||||
{
|
||||
for(int j3 = k; j3 < j1; j3++)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
int j4 = (j2 << 11 | j3 << 7 | j) >> 1;
|
||||
int j5 = (i1 - j) / 2;
|
||||
System.arraycopy(abyte0, k1, blocklightMap.data, j4, j5);
|
||||
@@ -820,8 +808,6 @@
|
||||
{
|
||||
for(int k3 = k; k3 < j1; k3++)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
int k4 = (k2 << 11 | k3 << 7 | j) >> 1;
|
||||
int k5 = (i1 - j) / 2;
|
||||
System.arraycopy(abyte0, k1, skylightMap.data, k4, k5);
|
||||
@@ -830,12 +816,25 @@
|
||||
@@ -859,12 +869,25 @@
|
||||
|
||||
}
|
||||
|
||||
|
@ -348,16 +168,16 @@
|
|||
+ iterator = chunkTileEntityMap.values().iterator();
|
||||
+ while(iterator.hasNext()) {
|
||||
+ te = (TileEntity)iterator.next();
|
||||
+ if( (te.xCoord&15)>=i && (te.xCoord&15)<=l &&
|
||||
+ te.yCoord>=j && te.yCoord<=i1 &&
|
||||
+ (te.zCoord&15)>=k && (te.zCoord&15)<=j1) {
|
||||
+ if ((te.xCoord & 15) >= i && (te.xCoord & 15) <= l &&
|
||||
+ (te.yCoord >= j) && (te.yCoord <= i1) &&
|
||||
+ (te.zCoord & 15) >= k && (te.zCoord & 15) <=j1) {
|
||||
+
|
||||
+ Block bl=te.getBlockType();
|
||||
+ if(bl!=null && bl.blockID==
|
||||
+ worldObj.getBlockId(te.xCoord,te.yCoord,te.zCoord) &&
|
||||
+ te.getBlockMetadata()==worldObj.getBlockMetadata(
|
||||
+ te.xCoord,te.yCoord,te.zCoord))
|
||||
+ Block bl = te.getBlockType();
|
||||
+ if (bl != null &&
|
||||
+ bl.blockID == worldObj.getBlockId(te.xCoord, te.yCoord, te.zCoord) &&
|
||||
+ te.getBlockMetadata() == worldObj.getBlockMetadata(te.xCoord, te.yCoord, te.zCoord))
|
||||
+ continue;
|
||||
+
|
||||
+ invalidList.add(te);
|
||||
+ }
|
||||
}
|
||||
|
@ -367,11 +187,3 @@
|
|||
return k1;
|
||||
}
|
||||
|
||||
@@ -880,7 +879,6 @@
|
||||
int l = precipitationHeightMap[k];
|
||||
if(l == -999)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
int i1 = 128 - 1;
|
||||
for(l = -1; i1 > 0 && l == -1;)
|
||||
{
|
||||
|
|
|
@ -8,9 +8,15 @@
|
|||
+import net.minecraft.src.forge.ITextureProvider;
|
||||
+
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// EntityFX, Entity, MathHelper, RenderEngine,
|
||||
// Tessellator, Block, EntityDiggingFX, World
|
||||
@@ -16,6 +19,7 @@
|
||||
// EntityFX, ActiveRenderInfo, Entity, RenderEngine,
|
||||
// Tessellator, MathHelper, Block, EntityDiggingFX,
|
||||
@@ -17,11 +20,13 @@
|
||||
|
||||
protected World worldObj;
|
||||
private List fxLayers[];
|
||||
+ private List effectList;
|
||||
private RenderEngine renderer;
|
||||
private Random rand;
|
||||
|
||||
public EffectRenderer(World world, RenderEngine renderengine)
|
||||
{
|
||||
|
@ -18,7 +24,7 @@
|
|||
fxLayers = new List[4];
|
||||
rand = new Random();
|
||||
if(world != null)
|
||||
@@ -55,7 +59,18 @@
|
||||
@@ -61,7 +66,18 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -38,7 +44,15 @@
|
|||
}
|
||||
|
||||
public void renderParticles(Entity entity, float f)
|
||||
@@ -101,6 +116,21 @@
|
||||
@@ -100,6 +116,7 @@
|
||||
for(int k = 0; k < fxLayers[i].size(); k++)
|
||||
{
|
||||
EntityFX entityfx = (EntityFX)fxLayers[i].get(k);
|
||||
+ if (entityfx instanceof EntityDiggingFX) continue;
|
||||
tessellator.setBrightness(entityfx.getEntityBrightnessForRender(f));
|
||||
entityfx.renderParticle(tessellator, f, f1, f5, f2, f3, f4);
|
||||
}
|
||||
@@ -107,6 +124,21 @@
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
|
@ -60,7 +74,7 @@
|
|||
}
|
||||
|
||||
public void func_1187_b(Entity entity, float f)
|
||||
@@ -132,7 +162,12 @@
|
||||
@@ -138,7 +170,12 @@
|
||||
{
|
||||
fxLayers[i].clear();
|
||||
}
|
||||
|
@ -74,7 +88,7 @@
|
|||
}
|
||||
|
||||
public void addBlockDestroyEffects(int i, int j, int k, int l, int i1)
|
||||
@@ -153,7 +188,12 @@
|
||||
@@ -159,7 +196,12 @@
|
||||
double d1 = (double)j + ((double)l1 + 0.5D) / (double)j1;
|
||||
double d2 = (double)k + ((double)i2 + 0.5D) / (double)j1;
|
||||
int j2 = rand.nextInt(6);
|
||||
|
@ -88,15 +102,14 @@
|
|||
}
|
||||
|
||||
}
|
||||
@@ -198,16 +238,48 @@
|
||||
@@ -204,11 +246,39 @@
|
||||
{
|
||||
d = (double)i + block.maxX + (double)f;
|
||||
}
|
||||
- addEffect((new EntityDiggingFX(worldObj, d, d1, d2, 0.0D, 0.0D, 0.0D, block, l, worldObj.getBlockMetadata(i, j, k))).func_4041_a(i, j, k).multiplyVelocity(0.2F).func_405_d(0.6F));
|
||||
+ EntityDiggingFX dig_effect = new EntityDiggingFX(worldObj, d, d1, d2,
|
||||
+ 0.0D, 0.0D, 0.0D, block, l, worldObj.getBlockMetadata(i, j, k));
|
||||
+ EntityDiggingFX dig_effect = new EntityDiggingFX(worldObj, d, d1, d2, 0.0D, 0.0D, 0.0D, block, l, worldObj.getBlockMetadata(i, j, k));
|
||||
+ dig_effect.func_4041_a(i, j, k);
|
||||
+ dig_effect.multiplyVelocity(0.2F);
|
||||
+ dig_effect.multiplyVelocity(0.4F);
|
||||
+ dig_effect.func_405_d(0.6F);
|
||||
+ addDigParticleEffect(dig_effect, block);
|
||||
}
|
||||
|
@ -108,12 +121,10 @@
|
|||
+
|
||||
+ public void addDigParticleEffect(EntityDiggingFX dig_effect, Block block) {
|
||||
+ boolean added = false;
|
||||
+ String comp;
|
||||
+ String comp = "/terrain.png";
|
||||
+
|
||||
+ if (block instanceof ITextureProvider) {
|
||||
+ comp = ((ITextureProvider) block).getTextureFile();
|
||||
+ } else {
|
||||
+ comp = "/terrain.png";
|
||||
+ }
|
||||
+ for (int x = 0; x < effectList.size(); x++) {
|
||||
+ BlockTextureParticles entry = (BlockTextureParticles) effectList
|
||||
|
@ -131,10 +142,4 @@
|
|||
+ }
|
||||
+ addEffect(dig_effect);
|
||||
+ }
|
||||
|
||||
protected World worldObj;
|
||||
private List fxLayers[];
|
||||
+ private List effectList;
|
||||
private RenderEngine renderer;
|
||||
private Random rand;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/EntityLiving.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/EntityLiving.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -624,7 +624,9 @@
|
||||
@@ -794,7 +794,9 @@
|
||||
int i = MathHelper.floor_double(posX);
|
||||
int j = MathHelper.floor_double(boundingBox.minY);
|
||||
int k = MathHelper.floor_double(posZ);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/EntityPigZombie.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/EntityPigZombie.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -90,7 +90,7 @@
|
||||
@@ -94,7 +94,7 @@
|
||||
return super.attackEntityFrom(damagesource, i);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
import java.util.*;
|
||||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
@@ -485,6 +489,8 @@
|
||||
@@ -548,6 +552,8 @@
|
||||
worldObj.entityJoinedWorld(entityitem);
|
||||
}
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
|||
public float getCurrentPlayerStrVsBlock(Block block)
|
||||
{
|
||||
float f = inventory.getStrVsBlock(block);
|
||||
@@ -507,6 +513,32 @@
|
||||
return f;
|
||||
@@ -576,6 +582,32 @@
|
||||
return f1;
|
||||
}
|
||||
|
||||
+ /* FORGE: Extended to allow metadata.
|
||||
|
@ -53,7 +53,7 @@
|
|||
public boolean canHarvestBlock(Block block)
|
||||
{
|
||||
return inventory.canHarvestBlock(block);
|
||||
@@ -667,6 +699,25 @@
|
||||
@@ -774,6 +806,25 @@
|
||||
|
||||
protected void damageEntity(DamageSource damagesource, int i)
|
||||
{
|
||||
|
@ -79,7 +79,7 @@
|
|||
if(!damagesource.unblockable() && func_35162_ad())
|
||||
{
|
||||
i = 1 + i >> 1;
|
||||
@@ -720,7 +771,9 @@
|
||||
@@ -825,7 +876,9 @@
|
||||
|
||||
public void destroyCurrentEquippedItem()
|
||||
{
|
||||
|
@ -89,7 +89,7 @@
|
|||
}
|
||||
|
||||
public double getYOffset()
|
||||
@@ -815,6 +868,10 @@
|
||||
@@ -957,6 +1010,10 @@
|
||||
|
||||
public EnumStatus sleepInBedAt(int i, int j, int k)
|
||||
{
|
||||
|
|
|
@ -8,29 +8,29 @@
|
|||
import java.awt.image.BufferedImage;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.util.Random;
|
||||
@@ -803,8 +804,12 @@
|
||||
{
|
||||
@@ -916,8 +917,10 @@
|
||||
EntityPlayer entityplayer = (EntityPlayer)entityliving;
|
||||
GL11.glDisable(3008 /*GL_ALPHA_TEST*/);
|
||||
+ if(!ForgeHooksClient.onBlockHighlight(renderglobal,entityplayer,
|
||||
+ mc.objectMouseOver,0,
|
||||
+ entityplayer.inventory.getCurrentItem(),f)) {
|
||||
renderglobal.drawBlockBreaking(entityplayer, mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), f);
|
||||
renderglobal.drawSelectionBox(entityplayer, mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), f);
|
||||
Profiler.endStartSection("outline");
|
||||
- renderglobal.drawBlockBreaking(entityplayer, mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), f);
|
||||
- renderglobal.drawSelectionBox(entityplayer, mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), f);
|
||||
+ if (!ForgeHooksClient.onBlockHighlight(renderglobal, entityplayer, mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), f)) {
|
||||
+ renderglobal.drawBlockBreaking(entityplayer, mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), f);
|
||||
+ renderglobal.drawSelectionBox(entityplayer, mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), f);
|
||||
+ }
|
||||
GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
|
||||
}
|
||||
}
|
||||
@@ -853,8 +858,12 @@
|
||||
{
|
||||
@@ -969,8 +972,10 @@
|
||||
EntityPlayer entityplayer1 = (EntityPlayer)entityliving;
|
||||
GL11.glDisable(3008 /*GL_ALPHA_TEST*/);
|
||||
+ if(!ForgeHooksClient.onBlockHighlight(renderglobal,entityplayer1,
|
||||
+ mc.objectMouseOver,0,
|
||||
+ entityplayer1.inventory.getCurrentItem(),f)) {
|
||||
renderglobal.drawBlockBreaking(entityplayer1, mc.objectMouseOver, 0, entityplayer1.inventory.getCurrentItem(), f);
|
||||
renderglobal.drawSelectionBox(entityplayer1, mc.objectMouseOver, 0, entityplayer1.inventory.getCurrentItem(), f);
|
||||
Profiler.endStartSection("outline");
|
||||
- renderglobal.drawBlockBreaking(entityplayer1, mc.objectMouseOver, 0, entityplayer1.inventory.getCurrentItem(), f);
|
||||
- renderglobal.drawSelectionBox(entityplayer1, mc.objectMouseOver, 0, entityplayer1.inventory.getCurrentItem(), f);
|
||||
+ if (!ForgeHooksClient.onBlockHighlight(renderglobal, entityplayer1, mc.objectMouseOver, 0, entityplayer1.inventory.getCurrentItem(), f)) {
|
||||
+ renderglobal.drawBlockBreaking(entityplayer1, mc.objectMouseOver, 0, entityplayer1.inventory.getCurrentItem(), f);
|
||||
+ renderglobal.drawSelectionBox(entityplayer1, mc.objectMouseOver, 0, entityplayer1.inventory.getCurrentItem(), f);
|
||||
+ }
|
||||
GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
|
||||
}
|
||||
renderRainSnow(f);
|
||||
Profiler.endStartSection("weather");
|
||||
|
|
|
@ -8,22 +8,19 @@
|
|||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// World, MathHelper, Block, ChunkPosition,
|
||||
@@ -66,7 +67,17 @@
|
||||
int i5 = worldObj.getBlockId(j4, k4, l4);
|
||||
if(i5 > 0)
|
||||
@@ -76,7 +77,14 @@
|
||||
int k3 = worldObj.getBlockId(l2, i3, j3);
|
||||
if(k3 > 0)
|
||||
{
|
||||
- f1 -= (Block.blocksList[i5].getExplosionResistance(exploder) + 0.3F) * f2;
|
||||
+ if (Block.blocksList[i5] instanceof ISpecialResistance) {
|
||||
+ ISpecialResistance isr = (ISpecialResistance) Block.blocksList[i5];
|
||||
+ f1 -= (isr.getSpecialExplosionResistance(
|
||||
+ worldObj, j4, k4, l4, explosionX,
|
||||
+ explosionY, explosionZ, exploder) + 0.3F)
|
||||
+ * f2;
|
||||
- f1 -= (Block.blocksList[k3].getExplosionResistance(exploder) + 0.3F) * f2;
|
||||
+ if (Block.blocksList[k3] instanceof ISpecialResistance){
|
||||
+ ISpecialResistance isr = (ISpecialResistance)Block.blocksList[k3];
|
||||
+ f1 -= (isr.getSpecialExplosionResistance(worldObj, l2, i3, j3,
|
||||
+ explosionX, explosionY, explosionZ, exploder) + 0.3F) * f2;
|
||||
+ } else {
|
||||
+ f1 -= (Block.blocksList[i5]
|
||||
+ .getExplosionResistance(exploder) + 0.3F)
|
||||
+ * f2;
|
||||
+ f1 -= (Block.blocksList[k3].getExplosionResistance(exploder) + 0.3F) * f2;
|
||||
+ }
|
||||
+
|
||||
}
|
||||
if(f1 > 0.0F)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,15 @@
|
|||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// Block, ItemStack, Item
|
||||
@@ -21,6 +22,7 @@
|
||||
@@ -15,6 +16,7 @@
|
||||
|
||||
private static final FurnaceRecipes smeltingBase = new FurnaceRecipes();
|
||||
private Map smeltingList;
|
||||
+ private Map metaSmeltingList;
|
||||
|
||||
public static final FurnaceRecipes smelting()
|
||||
{
|
||||
@@ -24,6 +26,7 @@
|
||||
private FurnaceRecipes()
|
||||
{
|
||||
smeltingList = new HashMap();
|
||||
|
@ -16,7 +24,7 @@
|
|||
addSmelting(Block.oreIron.blockID, new ItemStack(Item.ingotIron));
|
||||
addSmelting(Block.oreGold.blockID, new ItemStack(Item.ingotGold));
|
||||
addSmelting(Block.oreDiamond.blockID, new ItemStack(Item.diamond));
|
||||
@@ -40,11 +42,32 @@
|
||||
@@ -46,11 +49,32 @@
|
||||
smeltingList.put(Integer.valueOf(i), itemstack);
|
||||
}
|
||||
|
||||
|
@ -49,10 +57,3 @@
|
|||
public Map getSmeltingList()
|
||||
{
|
||||
return smeltingList;
|
||||
@@ -52,5 +75,6 @@
|
||||
|
||||
private static final FurnaceRecipes smeltingBase = new FurnaceRecipes();
|
||||
private Map smeltingList;
|
||||
+ private Map metaSmeltingList;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/Item.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/Item.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -76,6 +76,13 @@
|
||||
@@ -177,6 +177,9 @@
|
||||
private String field_39010_c;
|
||||
private String itemName;
|
||||
|
||||
+ // FORGE: To disable repair recipes.
|
||||
+ protected boolean canRepair=true;
|
||||
+
|
||||
protected Item(int i)
|
||||
{
|
||||
maxStackSize = 64;
|
||||
@@ -231,6 +234,13 @@
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
|
@ -14,3 +24,23 @@
|
|||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
|
||||
{
|
||||
return itemstack;
|
||||
@@ -278,6 +288,19 @@
|
||||
return maxDamage > 0 && !hasSubtypes;
|
||||
}
|
||||
|
||||
+ /* FORGE: Called by CraftingManager to determine if an item is repairable.
|
||||
+ */
|
||||
+ public boolean isRepairable() {
|
||||
+ return canRepair && isDamageable();
|
||||
+ }
|
||||
+
|
||||
+ /* FORGE: Call to disable repair recipes.
|
||||
+ */
|
||||
+ public Item setNoRepair() {
|
||||
+ canRepair=false;
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
public boolean hitEntity(ItemStack itemstack, EntityLiving entityliving, EntityLiving entityliving1)
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
+import net.minecraft.src.forge.MinecraftForge;
|
||||
+
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// Item, EntityPlayer, Vec3D, MathHelper,
|
||||
// World, MovingObjectPosition, EnumMovingObjectType, Material,
|
||||
@@ -60,6 +62,11 @@
|
||||
// Item, EntityPlayer, MovingObjectPosition, EnumMovingObjectType,
|
||||
// World, Material, PlayerCapabilities, ItemStack,
|
||||
@@ -50,6 +52,11 @@
|
||||
{
|
||||
return itemstack;
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/ItemDye.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/ItemDye.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
// Decompiler options: packimports(3) braces deadcode fieldsfirst
|
||||
|
||||
package net.minecraft.src;
|
||||
+import net.minecraft.src.forge.ForgeHooks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@@ -35,13 +36,18 @@
|
||||
@@ -45,13 +46,18 @@
|
||||
|
||||
public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int l)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@
|
|||
if(i1 == Block.sapling.blockID)
|
||||
{
|
||||
if(!world.multiplayerWorld)
|
||||
@@ -108,13 +114,7 @@
|
||||
@@ -118,13 +124,7 @@
|
||||
world.setBlockAndMetadataWithNotify(k1, l1, i2, Block.tallGrass.blockID, 1);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
+import net.minecraft.src.forge.MinecraftForgeClient;
|
||||
+
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
|
||||
@@ -32,18 +36,27 @@
|
||||
public void renderItem(EntityLiving entityliving, ItemStack itemstack)
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
@@ -40,18 +44,27 @@
|
||||
public void renderItem(EntityLiving entityliving, ItemStack itemstack, int i)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
- if(itemstack.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
|
||||
|
@ -39,4 +39,4 @@
|
|||
+ ForgeHooksClient.overrideTexture (Item.itemsList[itemstack.itemID]);
|
||||
}
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
int i = entityliving.getItemIcon(itemstack);
|
||||
int j = entityliving.getItemIcon(itemstack, i);
|
||||
|
|
|
@ -9,7 +9,18 @@
|
|||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// Item, EnumToolMaterial, ItemStack, Block,
|
||||
@@ -37,6 +39,14 @@
|
||||
@@ -13,8 +15,8 @@
|
||||
{
|
||||
|
||||
private Block blocksEffectiveAgainst[];
|
||||
- protected float efficiencyOnProperMaterial;
|
||||
- private int damageVsEntity;
|
||||
+ public float efficiencyOnProperMaterial;
|
||||
+ public int damageVsEntity;
|
||||
protected EnumToolMaterial toolMaterial;
|
||||
|
||||
protected ItemTool(int i, int j, EnumToolMaterial enumtoolmaterial, Block ablock[])
|
||||
@@ -42,6 +44,14 @@
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
|
@ -24,13 +35,3 @@
|
|||
public boolean hitEntity(ItemStack itemstack, EntityLiving entityliving, EntityLiving entityliving1)
|
||||
{
|
||||
itemstack.damageItem(2, entityliving1);
|
||||
@@ -60,7 +70,7 @@
|
||||
}
|
||||
|
||||
private Block blocksEffectiveAgainst[];
|
||||
- private float efficiencyOnProperMaterial;
|
||||
- private int damageVsEntity;
|
||||
+ public float efficiencyOnProperMaterial;
|
||||
+ public int damageVsEntity;
|
||||
protected EnumToolMaterial toolMaterial;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/MovingObjectPosition.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/MovingObjectPosition.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -35,4 +35,7 @@
|
||||
@@ -18,6 +18,9 @@
|
||||
public int sideHit;
|
||||
public Vec3D hitVec;
|
||||
public Entity entityHit;
|
||||
+
|
||||
+ // Added for RedPower subblocks.
|
||||
+ public int subHit=-1;
|
||||
}
|
||||
+ //Added for RedPower subblocks
|
||||
+ public int subHit = -1;
|
||||
|
||||
public MovingObjectPosition(int i, int j, int k, int l, Vec3D vec3d)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/Packet100OpenWindow.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/Packet100OpenWindow.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -25,9 +25,9 @@
|
||||
@@ -30,9 +30,9 @@
|
||||
throws IOException
|
||||
{
|
||||
windowId = datainputstream.readByte();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/Packet230ModLoader.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/Packet230ModLoader.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -68,7 +68,10 @@
|
||||
@@ -75,7 +75,10 @@
|
||||
}));
|
||||
}
|
||||
byte abyte0[] = new byte[k1];
|
||||
|
|
|
@ -1,16 +1,7 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/Packet24MobSpawn.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/Packet24MobSpawn.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -34,7 +34,7 @@
|
||||
throws IOException
|
||||
@@ -15,7 +15,7 @@
|
||||
{
|
||||
entityId = datainputstream.readInt();
|
||||
- type = datainputstream.readByte();
|
||||
+ type = datainputstream.readByte()&0xFF;
|
||||
xPosition = datainputstream.readInt();
|
||||
yPosition = datainputstream.readInt();
|
||||
zPosition = datainputstream.readInt();
|
||||
@@ -72,7 +72,7 @@
|
||||
}
|
||||
|
||||
public int entityId;
|
||||
- public byte type;
|
||||
|
@ -18,3 +9,12 @@
|
|||
public int xPosition;
|
||||
public int yPosition;
|
||||
public int zPosition;
|
||||
@@ -44,7 +44,7 @@
|
||||
throws IOException
|
||||
{
|
||||
entityId = datainputstream.readInt();
|
||||
- type = datainputstream.readByte();
|
||||
+ type = datainputstream.readByte() & 0xFF;
|
||||
xPosition = datainputstream.readInt();
|
||||
yPosition = datainputstream.readInt();
|
||||
zPosition = datainputstream.readInt();
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/PlayerController.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/PlayerController.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
// Decompiler options: packimports(3) braces deadcode fieldsfirst
|
||||
|
||||
package net.minecraft.src;
|
||||
+import net.minecraft.src.forge.*;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
@@ -36,12 +37,11 @@
|
||||
@@ -39,11 +40,10 @@
|
||||
}
|
||||
world.playAuxSFX(2001, i, j, k, block.blockID + world.getBlockMetadata(i, j, k) * 256);
|
||||
int i1 = world.getBlockMetadata(i, j, k);
|
||||
|
@ -17,16 +17,14 @@
|
|||
- {
|
||||
- block.onBlockDestroyedByPlayer(world, i, j, k, i1);
|
||||
- }
|
||||
- return flag;
|
||||
+
|
||||
+ if(block==null) return false;
|
||||
+ boolean flag = block.removeBlockByPlayer(world,mc.thePlayer,i,j,k);
|
||||
+ if(flag) block.onBlockDestroyedByPlayer(world, i, j, k, i1);
|
||||
+ return flag;
|
||||
+ boolean flag = block.removeBlockByPlayer(world, mc.thePlayer, i, j, k);
|
||||
+ if(flag)
|
||||
+ block.onBlockDestroyedByPlayer(world, i, j, k, i1);
|
||||
return flag;
|
||||
}
|
||||
|
||||
public abstract void sendBlockRemoving(int i, int j, int k, int l);
|
||||
@@ -64,6 +64,7 @@
|
||||
@@ -67,6 +67,7 @@
|
||||
if(itemstack1.stackSize == 0)
|
||||
{
|
||||
entityplayer.inventory.mainInventory[entityplayer.inventory.currentItem] = null;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
import net.minecraft.client.Minecraft;
|
||||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
@@ -91,7 +94,7 @@
|
||||
@@ -103,7 +106,7 @@
|
||||
{
|
||||
Block.blocksList[i1].onBlockClicked(mc.theWorld, i, j, k, mc.thePlayer);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
|||
{
|
||||
sendBlockRemoved(i, j, k, l);
|
||||
} else
|
||||
@@ -137,7 +140,7 @@
|
||||
@@ -149,7 +152,7 @@
|
||||
return;
|
||||
}
|
||||
Block block = Block.blocksList[i1];
|
||||
|
@ -28,7 +28,7 @@
|
|||
if(stepSoundTickCounter % 4F == 0.0F && block != null)
|
||||
{
|
||||
mc.sndManager.playSound(block.stepSound.stepSoundDir2(), (float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, (block.stepSound.getVolume() + 1.0F) / 8F, block.stepSound.getPitch() * 0.5F);
|
||||
@@ -204,6 +207,13 @@
|
||||
@@ -216,6 +219,13 @@
|
||||
{
|
||||
syncCurrentPlayItem();
|
||||
netClientHandler.addToSendQueue(new Packet15Place(i, j, k, l, entityplayer.inventory.getCurrentItem()));
|
||||
|
@ -42,7 +42,7 @@
|
|||
int i1 = world.getBlockId(i, j, k);
|
||||
if(i1 > 0 && Block.blocksList[i1].blockActivated(world, i, j, k, entityplayer))
|
||||
{
|
||||
@@ -223,7 +233,11 @@
|
||||
@@ -235,7 +245,11 @@
|
||||
return flag;
|
||||
} else
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/PlayerControllerSP.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/PlayerControllerSP.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -3,6 +3,8 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
// Decompiler options: packimports(3) braces deadcode fieldsfirst
|
||||
|
||||
package net.minecraft.src;
|
||||
+import net.minecraft.src.forge.IUseItemFirst;
|
||||
|
@ -9,7 +9,7 @@
|
|||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
@@ -42,7 +44,7 @@
|
||||
@@ -50,7 +52,7 @@
|
||||
int j1 = mc.theWorld.getBlockMetadata(i, j, k);
|
||||
boolean flag = super.sendBlockRemoved(i, j, k, l);
|
||||
ItemStack itemstack = mc.thePlayer.getCurrentEquippedItem();
|
||||
|
@ -18,7 +18,7 @@
|
|||
if(itemstack != null)
|
||||
{
|
||||
itemstack.onDestroyBlock(i1, i, j, k, mc.thePlayer);
|
||||
@@ -71,7 +73,7 @@
|
||||
@@ -79,7 +81,7 @@
|
||||
{
|
||||
Block.blocksList[i1].onBlockClicked(mc.theWorld, i, j, k, mc.thePlayer);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
|||
{
|
||||
sendBlockRemoved(i, j, k, l);
|
||||
}
|
||||
@@ -102,7 +104,7 @@
|
||||
@@ -110,7 +112,7 @@
|
||||
return;
|
||||
}
|
||||
Block block = Block.blocksList[i1];
|
||||
|
@ -36,7 +36,7 @@
|
|||
if(field_1069_h % 4F == 0.0F && block != null)
|
||||
{
|
||||
mc.sndManager.playSound(block.stepSound.stepSoundDir2(), (float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, (block.stepSound.getVolume() + 1.0F) / 8F, block.stepSound.getPitch() * 0.5F);
|
||||
@@ -165,6 +167,12 @@
|
||||
@@ -173,6 +175,12 @@
|
||||
|
||||
public boolean sendPlaceBlock(EntityPlayer entityplayer, World world, ItemStack itemstack, int i, int j, int k, int l)
|
||||
{
|
||||
|
@ -49,7 +49,7 @@
|
|||
int i1 = world.getBlockId(i, j, k);
|
||||
if(i1 > 0 && Block.blocksList[i1].blockActivated(world, i, j, k, entityplayer))
|
||||
{
|
||||
@@ -175,7 +183,11 @@
|
||||
@@ -183,7 +191,11 @@
|
||||
return false;
|
||||
} else
|
||||
{
|
||||
|
|
|
@ -1,42 +1,42 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/RenderBlocks.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/RenderBlocks.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -2980,7 +2980,7 @@
|
||||
@@ -3301,7 +3301,7 @@
|
||||
colorBlueTopRight *= f27;
|
||||
int j2 = block.getBlockTexture(blockAccess, i, j, k, 2);
|
||||
renderEastFace(block, i, j, k, j2);
|
||||
- if(cfgGrassFix && j2 == 3 && overrideBlockTexture < 0)
|
||||
+ if(Tessellator.instance.defaultTexture && cfgGrassFix && j2 == 3 && overrideBlockTexture < 0)
|
||||
{
|
||||
colorRedTopLeft *= f;
|
||||
colorRedBottomLeft *= f;
|
||||
@@ -3085,7 +3085,7 @@
|
||||
colorBlueTopRight *= f28;
|
||||
int k2 = block.getBlockTexture(blockAccess, i, j, k, 3);
|
||||
renderWestFace(block, i, j, k, block.getBlockTexture(blockAccess, i, j, k, 3));
|
||||
int k2 = block.getBlockTexture(blockAccess, i, j, k, 2);
|
||||
renderEastFace(block, i, j, k, k2);
|
||||
- if(cfgGrassFix && k2 == 3 && overrideBlockTexture < 0)
|
||||
+ if(Tessellator.instance.defaultTexture && cfgGrassFix && k2 == 3 && overrideBlockTexture < 0)
|
||||
{
|
||||
colorRedTopLeft *= f;
|
||||
colorRedBottomLeft *= f;
|
||||
@@ -3190,7 +3190,7 @@
|
||||
colorBlueTopRight *= f29;
|
||||
int l2 = block.getBlockTexture(blockAccess, i, j, k, 4);
|
||||
renderNorthFace(block, i, j, k, l2);
|
||||
@@ -3412,7 +3412,7 @@
|
||||
colorBlueTopRight *= f28;
|
||||
int l2 = block.getBlockTexture(blockAccess, i, j, k, 3);
|
||||
renderWestFace(block, i, j, k, block.getBlockTexture(blockAccess, i, j, k, 3));
|
||||
- if(cfgGrassFix && l2 == 3 && overrideBlockTexture < 0)
|
||||
+ if(Tessellator.instance.defaultTexture && cfgGrassFix && l2 == 3 && overrideBlockTexture < 0)
|
||||
{
|
||||
colorRedTopLeft *= f;
|
||||
colorRedBottomLeft *= f;
|
||||
@@ -3295,7 +3295,7 @@
|
||||
colorBlueTopRight *= f30;
|
||||
int i3 = block.getBlockTexture(blockAccess, i, j, k, 5);
|
||||
renderSouthFace(block, i, j, k, i3);
|
||||
@@ -3523,7 +3523,7 @@
|
||||
colorBlueTopRight *= f29;
|
||||
int i3 = block.getBlockTexture(blockAccess, i, j, k, 4);
|
||||
renderNorthFace(block, i, j, k, i3);
|
||||
- if(cfgGrassFix && i3 == 3 && overrideBlockTexture < 0)
|
||||
+ if(Tessellator.instance.defaultTexture && cfgGrassFix && i3 == 3 && overrideBlockTexture < 0)
|
||||
{
|
||||
colorRedTopLeft *= f;
|
||||
colorRedBottomLeft *= f;
|
||||
@@ -3388,7 +3388,7 @@
|
||||
@@ -3634,7 +3634,7 @@
|
||||
colorBlueTopRight *= f30;
|
||||
int j3 = block.getBlockTexture(blockAccess, i, j, k, 5);
|
||||
renderSouthFace(block, i, j, k, j3);
|
||||
- if(cfgGrassFix && j3 == 3 && overrideBlockTexture < 0)
|
||||
+ if(Tessellator.instance.defaultTexture && cfgGrassFix && j3 == 3 && overrideBlockTexture < 0)
|
||||
{
|
||||
colorRedTopLeft *= f;
|
||||
colorRedBottomLeft *= f;
|
||||
@@ -3727,7 +3727,7 @@
|
||||
tessellator.setColorOpaque_F(f11, f14, f17);
|
||||
int i1 = block.getBlockTexture(blockAccess, i, j, k, 2);
|
||||
renderEastFace(block, i, j, k, i1);
|
||||
|
@ -45,7 +45,7 @@
|
|||
{
|
||||
tessellator.setColorOpaque_F(f11 * f, f14 * f1, f17 * f2);
|
||||
renderEastFace(block, i, j, k, 38);
|
||||
@@ -3401,7 +3401,7 @@
|
||||
@@ -3740,7 +3740,7 @@
|
||||
tessellator.setColorOpaque_F(f11, f14, f17);
|
||||
int j1 = block.getBlockTexture(blockAccess, i, j, k, 3);
|
||||
renderWestFace(block, i, j, k, j1);
|
||||
|
@ -54,7 +54,7 @@
|
|||
{
|
||||
tessellator.setColorOpaque_F(f11 * f, f14 * f1, f17 * f2);
|
||||
renderWestFace(block, i, j, k, 38);
|
||||
@@ -3414,7 +3414,7 @@
|
||||
@@ -3753,7 +3753,7 @@
|
||||
tessellator.setColorOpaque_F(f12, f15, f18);
|
||||
int k1 = block.getBlockTexture(blockAccess, i, j, k, 4);
|
||||
renderNorthFace(block, i, j, k, k1);
|
||||
|
@ -63,7 +63,7 @@
|
|||
{
|
||||
tessellator.setColorOpaque_F(f12 * f, f15 * f1, f18 * f2);
|
||||
renderNorthFace(block, i, j, k, 38);
|
||||
@@ -3427,7 +3427,7 @@
|
||||
@@ -3766,7 +3766,7 @@
|
||||
tessellator.setColorOpaque_F(f12, f15, f18);
|
||||
int l1 = block.getBlockTexture(blockAccess, i, j, k, 5);
|
||||
renderSouthFace(block, i, j, k, l1);
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/RenderEngine.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/RenderEngine.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -128,6 +128,9 @@
|
||||
@@ -39,7 +39,7 @@
|
||||
private GameSettings options;
|
||||
public boolean clampTexture;
|
||||
public boolean blurTexture;
|
||||
- private TexturePackList texturePack;
|
||||
+ public TexturePackList texturePack;
|
||||
private BufferedImage missingTextureImage;
|
||||
|
||||
public RenderEngine(TexturePackList texturepacklist, GameSettings gamesettings)
|
||||
@@ -142,6 +142,9 @@
|
||||
}
|
||||
try
|
||||
{
|
||||
|
@ -10,12 +19,3 @@
|
|||
singleIntBuffer.clear();
|
||||
GLAllocation.generateTextureNames(singleIntBuffer);
|
||||
int i = singleIntBuffer.get(0);
|
||||
@@ -667,7 +670,7 @@
|
||||
private GameSettings options;
|
||||
public boolean clampTexture;
|
||||
public boolean blurTexture;
|
||||
- private TexturePackList texturePack;
|
||||
+ public TexturePackList texturePack;
|
||||
private BufferedImage missingTextureImage;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/RenderGlobal.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/RenderGlobal.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -1635,8 +1635,8 @@
|
||||
}
|
||||
@@ -34,8 +34,8 @@
|
||||
{
|
||||
|
||||
public List tileEntities;
|
||||
- private World worldObj;
|
||||
|
@ -11,7 +11,7 @@
|
|||
private List worldRenderersToUpdate;
|
||||
private WorldRenderer sortedWorldRenderers[];
|
||||
private WorldRenderer worldRenderers[];
|
||||
@@ -1644,8 +1644,8 @@
|
||||
@@ -43,8 +43,8 @@
|
||||
private int renderChunksTall;
|
||||
private int renderChunksDeep;
|
||||
private int glRenderListBase;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
import java.util.Random;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -47,10 +51,36 @@
|
||||
@@ -54,10 +58,36 @@
|
||||
}
|
||||
GL11.glTranslatef((float)d, (float)d1 + f2, (float)d2);
|
||||
GL11.glEnable(32826 /*GL_RESCALE_NORMAL_EXT*/);
|
||||
|
@ -49,7 +49,7 @@
|
|||
float f4 = 0.25F;
|
||||
int j = Block.blocksList[itemstack.itemID].getRenderType();
|
||||
if(j == 1 || j == 19 || j == 12 || j == 2)
|
||||
@@ -80,9 +110,11 @@
|
||||
@@ -108,9 +138,11 @@
|
||||
if(itemstack.itemID < 256)
|
||||
{
|
||||
loadTexture("/terrain.png");
|
||||
|
@ -59,9 +59,9 @@
|
|||
loadTexture("/gui/items.png");
|
||||
+ ForgeHooksClient.overrideTexture(Item.itemsList[itemstack.itemID]);
|
||||
}
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
float f5 = (float)((i % 16) * 16 + 0) / 256F;
|
||||
@@ -129,10 +161,37 @@
|
||||
if(field_27004_a)
|
||||
{
|
||||
@@ -162,10 +194,37 @@
|
||||
|
||||
public void drawItemIntoGui(FontRenderer fontrenderer, RenderEngine renderengine, int i, int j, int k, int l, int i1)
|
||||
{
|
||||
|
@ -99,8 +99,8 @@
|
|||
+ ForgeHooksClient.overrideTexture (Block.blocksList[i]);
|
||||
Block block = Block.blocksList[j1];
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(l - 2, i1 + 3, -3F);
|
||||
@@ -161,9 +220,11 @@
|
||||
GL11.glTranslatef(l - 2, i1 + 3, -3F + field_40268_b);
|
||||
@@ -215,9 +274,11 @@
|
||||
if(i < 256)
|
||||
{
|
||||
renderengine.bindTexture(renderengine.getTexture("/terrain.png"));
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import net.minecraft.client.Minecraft;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -34,7 +35,14 @@
|
||||
@@ -41,7 +42,14 @@
|
||||
if(item instanceof ItemArmor)
|
||||
{
|
||||
ItemArmor itemarmor = (ItemArmor)item;
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/SlotCrafting.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/SlotCrafting.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
// Decompiler options: packimports(3) braces deadcode fieldsfirst
|
||||
|
||||
package net.minecraft.src;
|
||||
+import net.minecraft.src.forge.ForgeHooks;
|
||||
|
||||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
@@ -60,6 +61,7 @@
|
||||
thePlayer.addStat(AchievementList.buildSword, 1);
|
||||
@@ -71,6 +72,7 @@
|
||||
thePlayer.addStat(AchievementList.bookcase, 1);
|
||||
}
|
||||
ModLoader.TakenFromCrafting(thePlayer, itemstack, craftMatrix);
|
||||
+ ForgeHooks.onTakenFromCrafting(thePlayer, itemstack, craftMatrix);
|
||||
|
|
|
@ -8,120 +8,11 @@
|
|||
import org.lwjgl.opengl.*;
|
||||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
@@ -13,8 +14,7 @@
|
||||
@@ -12,13 +13,9 @@
|
||||
|
||||
public class Tessellator
|
||||
{
|
||||
|
||||
- private Tessellator(int i)
|
||||
- {
|
||||
+ public Tessellator() {
|
||||
vertexCount = 0;
|
||||
hasColor = false;
|
||||
hasTexture = false;
|
||||
@@ -24,21 +24,10 @@
|
||||
addedVertices = 0;
|
||||
isColorDisabled = false;
|
||||
isDrawing = false;
|
||||
- useVBO = false;
|
||||
vboIndex = 0;
|
||||
- vboCount = 10;
|
||||
- bufferSize = i;
|
||||
- byteBuffer = GLAllocation.createDirectByteBuffer(i * 4);
|
||||
- intBuffer = byteBuffer.asIntBuffer();
|
||||
- floatBuffer = byteBuffer.asFloatBuffer();
|
||||
- shortBuffer = byteBuffer.asShortBuffer();
|
||||
- rawBuffer = new int[i];
|
||||
- useVBO = tryVBO && GLContext.getCapabilities().GL_ARB_vertex_buffer_object;
|
||||
- if(useVBO)
|
||||
- {
|
||||
- vertexBuffers = GLAllocation.createDirectIntBuffer(vboCount);
|
||||
- ARBVertexBufferObject.glGenBuffersARB(vertexBuffers);
|
||||
- }
|
||||
+
|
||||
+ rawBuffer=null;
|
||||
+ rawBufferSize=0;
|
||||
}
|
||||
|
||||
public void draw()
|
||||
@@ -48,12 +37,20 @@
|
||||
throw new IllegalStateException("Not tesselating!");
|
||||
}
|
||||
isDrawing = false;
|
||||
- if(vertexCount > 0)
|
||||
- {
|
||||
+ int offs=0;
|
||||
+ while(offs < vertexCount) {
|
||||
+ int vtc;
|
||||
+ if(drawMode == 7 && convertQuadsToTriangles) {
|
||||
+ vtc=Math.min(vertexCount-offs,trivertsInBuffer);
|
||||
+ } else {
|
||||
+ vtc=Math.min(vertexCount-offs,nativeBufferSize>>5);
|
||||
+ }
|
||||
+
|
||||
intBuffer.clear();
|
||||
- intBuffer.put(rawBuffer, 0, rawBufferIndex);
|
||||
+ intBuffer.put(rawBuffer, offs*8, vtc*8);
|
||||
byteBuffer.position(0);
|
||||
- byteBuffer.limit(rawBufferIndex * 4);
|
||||
+ byteBuffer.limit(vtc*32);
|
||||
+ offs+=vtc;
|
||||
if(useVBO)
|
||||
{
|
||||
vboIndex = (vboIndex + 1) % vboCount;
|
||||
@@ -121,10 +118,10 @@
|
||||
GL11.glEnableClientState(32884 /*GL_VERTEX_ARRAY_EXT*/);
|
||||
if(drawMode == 7 && convertQuadsToTriangles)
|
||||
{
|
||||
- GL11.glDrawArrays(4, 0, vertexCount);
|
||||
+ GL11.glDrawArrays(4, 0, vtc);
|
||||
} else
|
||||
{
|
||||
- GL11.glDrawArrays(drawMode, 0, vertexCount);
|
||||
+ GL11.glDrawArrays(drawMode, 0, vtc);
|
||||
}
|
||||
GL11.glDisableClientState(32884 /*GL_VERTEX_ARRAY_EXT*/);
|
||||
if(hasTexture)
|
||||
@@ -146,6 +143,10 @@
|
||||
GL11.glDisableClientState(32885 /*GL_NORMAL_ARRAY_EXT*/);
|
||||
}
|
||||
}
|
||||
+ if(rawBufferSize>0x20000 && rawBufferIndex<(rawBufferSize<<3)) {
|
||||
+ rawBufferSize=0;
|
||||
+ rawBuffer=null;
|
||||
+ }
|
||||
reset();
|
||||
}
|
||||
|
||||
@@ -265,6 +266,15 @@
|
||||
|
||||
public void addVertex(double d, double d1, double d2)
|
||||
{
|
||||
+ if(rawBufferIndex >= rawBufferSize-32) {
|
||||
+ if(rawBufferSize==0) {
|
||||
+ rawBufferSize=0x10000;
|
||||
+ rawBuffer=new int[rawBufferSize];
|
||||
+ } else {
|
||||
+ rawBufferSize*=2;
|
||||
+ rawBuffer=Arrays.copyOf(rawBuffer,rawBufferSize);
|
||||
+ }
|
||||
+ }
|
||||
addedVertices++;
|
||||
if(drawMode == 7 && convertQuadsToTriangles && addedVertices % 4 == 0)
|
||||
{
|
||||
@@ -314,11 +324,6 @@
|
||||
rawBuffer[rawBufferIndex + 2] = Float.floatToRawIntBits((float)(d2 + zOffset));
|
||||
rawBufferIndex += 8;
|
||||
vertexCount++;
|
||||
- if(vertexCount % 4 == 0 && rawBufferIndex >= bufferSize - 32)
|
||||
- {
|
||||
- draw();
|
||||
- isDrawing = true;
|
||||
- }
|
||||
}
|
||||
|
||||
public void setColorOpaque_I(int i)
|
||||
@@ -367,10 +372,7 @@
|
||||
|
||||
-
|
||||
private static boolean convertQuadsToTriangles = false;
|
||||
private static boolean tryVBO = false;
|
||||
- private ByteBuffer byteBuffer;
|
||||
|
@ -132,7 +23,7 @@
|
|||
private int rawBuffer[];
|
||||
private int vertexCount;
|
||||
private double textureU;
|
||||
@@ -384,17 +386,43 @@
|
||||
@@ -32,21 +29,47 @@
|
||||
private int rawBufferIndex;
|
||||
private int addedVertices;
|
||||
private boolean isColorDisabled;
|
||||
|
@ -153,7 +44,7 @@
|
|||
private int vboIndex;
|
||||
- private int vboCount;
|
||||
- private int bufferSize;
|
||||
|
||||
+
|
||||
+ public static boolean renderingWorldRenderer=false;
|
||||
+ public boolean defaultTexture=false;
|
||||
+ private int rawBufferSize;
|
||||
|
@ -185,4 +76,112 @@
|
|||
+ ARBVertexBufferObject.glGenBuffersARB(vertexBuffers);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- private Tessellator(int i)
|
||||
- {
|
||||
+ public Tessellator() {
|
||||
vertexCount = 0;
|
||||
hasColor = false;
|
||||
hasTexture = false;
|
||||
@@ -56,21 +79,10 @@
|
||||
addedVertices = 0;
|
||||
isColorDisabled = false;
|
||||
isDrawing = false;
|
||||
- useVBO = false;
|
||||
vboIndex = 0;
|
||||
- vboCount = 10;
|
||||
- bufferSize = i;
|
||||
- byteBuffer = GLAllocation.createDirectByteBuffer(i * 4);
|
||||
- intBuffer = byteBuffer.asIntBuffer();
|
||||
- floatBuffer = byteBuffer.asFloatBuffer();
|
||||
- shortBuffer = byteBuffer.asShortBuffer();
|
||||
- rawBuffer = new int[i];
|
||||
- useVBO = tryVBO && GLContext.getCapabilities().GL_ARB_vertex_buffer_object;
|
||||
- if(useVBO)
|
||||
- {
|
||||
- vertexBuffers = GLAllocation.createDirectIntBuffer(vboCount);
|
||||
- ARBVertexBufferObject.glGenBuffersARB(vertexBuffers);
|
||||
- }
|
||||
+
|
||||
+ rawBuffer=null;
|
||||
+ rawBufferSize=0;
|
||||
}
|
||||
|
||||
public int draw()
|
||||
@@ -80,12 +92,20 @@
|
||||
throw new IllegalStateException("Not tesselating!");
|
||||
}
|
||||
isDrawing = false;
|
||||
- if(vertexCount > 0)
|
||||
- {
|
||||
+ int offs=0;
|
||||
+ while(offs < vertexCount) {
|
||||
+ int vtc;
|
||||
+ if(drawMode == 7 && convertQuadsToTriangles) {
|
||||
+ vtc=Math.min(vertexCount-offs,trivertsInBuffer);
|
||||
+ } else {
|
||||
+ vtc=Math.min(vertexCount-offs,nativeBufferSize>>5);
|
||||
+ }
|
||||
+
|
||||
intBuffer.clear();
|
||||
- intBuffer.put(rawBuffer, 0, rawBufferIndex);
|
||||
+ intBuffer.put(rawBuffer, offs*8, vtc*8);
|
||||
byteBuffer.position(0);
|
||||
- byteBuffer.limit(rawBufferIndex * 4);
|
||||
+ byteBuffer.limit(vtc*32);
|
||||
+ offs+=vtc;
|
||||
if(useVBO)
|
||||
{
|
||||
vboIndex = (vboIndex + 1) % vboCount;
|
||||
@@ -153,10 +173,10 @@
|
||||
GL11.glEnableClientState(32884 /*GL_VERTEX_ARRAY_EXT*/);
|
||||
if(drawMode == 7 && convertQuadsToTriangles)
|
||||
{
|
||||
- GL11.glDrawArrays(4, 0, vertexCount);
|
||||
+ GL11.glDrawArrays(4, 0, vtc);
|
||||
} else
|
||||
{
|
||||
- GL11.glDrawArrays(drawMode, 0, vertexCount);
|
||||
+ GL11.glDrawArrays(drawMode, 0, vtc);
|
||||
}
|
||||
GL11.glDisableClientState(32884 /*GL_VERTEX_ARRAY_EXT*/);
|
||||
if(hasTexture)
|
||||
@@ -178,6 +198,10 @@
|
||||
GL11.glDisableClientState(32885 /*GL_NORMAL_ARRAY_EXT*/);
|
||||
}
|
||||
}
|
||||
+ if (rawBufferSize > 0x20000 && rawBufferIndex < (rawBufferSize<<3)) {
|
||||
+ rawBufferSize=0;
|
||||
+ rawBuffer=null;
|
||||
+ }
|
||||
int i = rawBufferIndex * 4;
|
||||
reset();
|
||||
return i;
|
||||
@@ -299,6 +323,15 @@
|
||||
|
||||
public void addVertex(double d, double d1, double d2)
|
||||
{
|
||||
+ if (rawBufferIndex >= rawBufferSize-32) {
|
||||
+ if (rawBufferSize == 0) {
|
||||
+ rawBufferSize = 0x10000;
|
||||
+ rawBuffer = new int[rawBufferSize];
|
||||
+ } else {
|
||||
+ rawBufferSize *= 2;
|
||||
+ rawBuffer = Arrays.copyOf(rawBuffer, rawBufferSize);
|
||||
+ }
|
||||
+ }
|
||||
addedVertices++;
|
||||
if(drawMode == 7 && convertQuadsToTriangles && addedVertices % 4 == 0)
|
||||
{
|
||||
@@ -348,11 +381,6 @@
|
||||
rawBuffer[rawBufferIndex + 2] = Float.floatToRawIntBits((float)(d2 + zOffset));
|
||||
rawBufferIndex += 8;
|
||||
vertexCount++;
|
||||
- if(vertexCount % 4 == 0 && rawBufferIndex >= bufferSize - 32)
|
||||
- {
|
||||
- draw();
|
||||
- isDrawing = true;
|
||||
- }
|
||||
}
|
||||
|
||||
public void setColorOpaque_I(int i)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/TileEntity.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/TileEntity.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -61,6 +61,13 @@
|
||||
@@ -72,6 +72,13 @@
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
+ implements IInventory, ISidedInventory
|
||||
{
|
||||
|
||||
public TileEntityFurnace()
|
||||
@@ -28,6 +29,16 @@
|
||||
private ItemStack furnaceItemStacks[];
|
||||
@@ -33,6 +34,16 @@
|
||||
return furnaceItemStacks.length;
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
|||
public ItemStack getStackInSlot(int i)
|
||||
{
|
||||
return furnaceItemStacks[i];
|
||||
@@ -196,7 +207,7 @@
|
||||
@@ -201,7 +212,7 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@
|
|||
if(itemstack == null)
|
||||
{
|
||||
return false;
|
||||
@@ -209,11 +220,9 @@
|
||||
@@ -214,11 +225,8 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -52,13 +52,12 @@
|
|||
- return true;
|
||||
- }
|
||||
- return furnaceItemStacks[2].stackSize < itemstack.getMaxStackSize();
|
||||
+ int st=furnaceItemStacks[2].stackSize+itemstack.stackSize;
|
||||
+ return (st<=getInventoryStackLimit() &&
|
||||
+ st<=itemstack.getMaxStackSize());
|
||||
+ int st = furnaceItemStacks[2].stackSize + itemstack.stackSize;
|
||||
+ return (st <= getInventoryStackLimit() && st <= itemstack.getMaxStackSize());
|
||||
}
|
||||
|
||||
public void smeltItem()
|
||||
@@ -222,14 +231,14 @@
|
||||
@@ -227,14 +235,14 @@
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -72,11 +71,11 @@
|
|||
+ if(furnaceItemStacks[2].isItemEqual(itemstack))
|
||||
{
|
||||
- furnaceItemStacks[2].stackSize++;
|
||||
+ furnaceItemStacks[2].stackSize+=itemstack.stackSize;
|
||||
+ furnaceItemStacks[2].stackSize += itemstack.stackSize;
|
||||
}
|
||||
if(furnaceItemStacks[0].getItem().hasContainerItem())
|
||||
{
|
||||
@@ -244,7 +253,7 @@
|
||||
@@ -249,7 +257,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import net.minecraft.client.Minecraft;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -38,6 +39,7 @@
|
||||
@@ -40,6 +41,7 @@
|
||||
{
|
||||
GL11.glShadeModel(7424 /*GL_FLAT*/);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
|||
tessellator.startDrawingQuads();
|
||||
tessellator.setTranslationD(((float)d - (float)tileentitypiston.xCoord) + tileentitypiston.func_31017_b(f), ((float)d1 - (float)tileentitypiston.yCoord) + tileentitypiston.func_31014_c(f), ((float)d2 - (float)tileentitypiston.zCoord) + tileentitypiston.func_31013_d(f));
|
||||
tessellator.setColorOpaque(1, 1, 1);
|
||||
@@ -58,6 +60,7 @@
|
||||
@@ -60,6 +62,7 @@
|
||||
}
|
||||
tessellator.setTranslationD(0.0D, 0.0D, 0.0D);
|
||||
tessellator.draw();
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/World.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/World.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -336,7 +336,10 @@
|
||||
@@ -51,7 +51,7 @@
|
||||
public int lightningFlash;
|
||||
public boolean editingBlocks;
|
||||
private long lockTimestamp;
|
||||
- protected int autosavePeriod;
|
||||
+ public int autosavePeriod;
|
||||
public int difficultySetting;
|
||||
public Random rand;
|
||||
public boolean isNewWorld;
|
||||
@@ -406,7 +406,10 @@
|
||||
|
||||
public boolean isAirBlock(int i, int j, int k)
|
||||
{
|
||||
|
@ -12,7 +21,7 @@
|
|||
}
|
||||
|
||||
public boolean blockExists(int i, int j, int k)
|
||||
@@ -1476,7 +1479,7 @@
|
||||
@@ -1576,7 +1579,7 @@
|
||||
Chunk chunk = getChunkFromChunkCoords(tileentity.xCoord >> 4, tileentity.zCoord >> 4);
|
||||
if(chunk != null)
|
||||
{
|
||||
|
@ -21,7 +30,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -1503,16 +1506,16 @@
|
||||
@@ -1604,16 +1607,16 @@
|
||||
{
|
||||
loadedTileEntityList.add(tileentity1);
|
||||
}
|
||||
|
@ -41,7 +50,7 @@
|
|||
} while(true);
|
||||
addedTileEntityList.clear();
|
||||
}
|
||||
@@ -1520,13 +1523,19 @@
|
||||
@@ -1623,13 +1626,17 @@
|
||||
|
||||
public void addTileEntity(Collection collection)
|
||||
{
|
||||
|
@ -52,23 +61,21 @@
|
|||
- {
|
||||
- loadedTileEntityList.addAll(collection);
|
||||
- }
|
||||
+ List dest=scanningTileEntities ? addedTileEntityList :
|
||||
+ loadedTileEntityList;
|
||||
+ List dest=scanningTileEntities ? addedTileEntityList : loadedTileEntityList;
|
||||
+ for(Object ob : collection) {
|
||||
+ TileEntity te=(TileEntity)ob;
|
||||
+ TileEntity te = (TileEntity)ob;
|
||||
+ if(te.canUpdate()) dest.add(te);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* FORGE: Used as a bugfix */
|
||||
+ public void addTileEntity(TileEntity te) {
|
||||
+ List dest=scanningTileEntities ? addedTileEntityList :
|
||||
+ loadedTileEntityList;
|
||||
+ List dest=scanningTileEntities ? addedTileEntityList : loadedTileEntityList;
|
||||
+ if(te.canUpdate()) dest.add(te);
|
||||
}
|
||||
|
||||
public void updateEntity(Entity entity)
|
||||
@@ -1684,7 +1693,10 @@
|
||||
@@ -1789,7 +1796,10 @@
|
||||
if(j2 == Block.fire.blockID || j2 == Block.lavaMoving.blockID || j2 == Block.lavaStill.blockID)
|
||||
{
|
||||
return true;
|
||||
|
@ -80,7 +87,7 @@
|
|||
}
|
||||
|
||||
}
|
||||
@@ -1917,44 +1929,23 @@
|
||||
@@ -2044,46 +2054,22 @@
|
||||
|
||||
public void setBlockTileEntity(int i, int j, int k, TileEntity tileentity)
|
||||
{
|
||||
|
@ -104,8 +111,7 @@
|
|||
- }
|
||||
+ if(tileentity==null || tileentity.isInvalid())
|
||||
+ return;
|
||||
+ List dest=scanningTileEntities ? addedTileEntityList :
|
||||
+ loadedTileEntityList;
|
||||
+ List dest=scanningTileEntities ? addedTileEntityList : loadedTileEntityList;
|
||||
+ if(tileentity.canUpdate()) dest.add(tileentity);
|
||||
+ Chunk chunk = getChunkFromChunkCoords(i >> 4, k >> 4);
|
||||
+ if(chunk != null) {
|
||||
|
@ -119,10 +125,12 @@
|
|||
- if(tileentity != null && scanningTileEntities)
|
||||
- {
|
||||
- tileentity.invalidate();
|
||||
- addedTileEntityList.remove(tileentity);
|
||||
- } else
|
||||
- {
|
||||
- if(tileentity != null)
|
||||
- {
|
||||
- addedTileEntityList.remove(tileentity);
|
||||
- loadedTileEntityList.remove(tileentity);
|
||||
- }
|
||||
- Chunk chunk = getChunkFromChunkCoords(i >> 4, k >> 4);
|
||||
|
@ -138,7 +146,7 @@
|
|||
}
|
||||
|
||||
public void func_35455_a(TileEntity tileentity)
|
||||
@@ -1977,13 +1968,18 @@
|
||||
@@ -2106,13 +2092,18 @@
|
||||
public boolean isBlockNormalCube(int i, int j, int k)
|
||||
{
|
||||
Block block = Block.blocksList[getBlockId(i, j, k)];
|
||||
|
@ -163,30 +171,21 @@
|
|||
+ return block.isBlockSolidOnSide(this,i,j,k,side);
|
||||
}
|
||||
|
||||
public void saveWorldIndirectly(IProgressUpdate iprogressupdate)
|
||||
@@ -2308,7 +2304,7 @@
|
||||
public boolean func_41082_b(int i, int j, int k, boolean flag)
|
||||
@@ -2531,7 +2522,7 @@
|
||||
|
||||
private int computeBlockLightValue(int i, int j, int k, int l, int i1, int j1)
|
||||
{
|
||||
- int k1 = Block.lightValue[i1];
|
||||
+ int k1=(i1==0)?0:Block.blocksList[i1].getLightValue(this,j,k,l);
|
||||
+ int k1 = (i1==0) ? 0 : Block.blocksList[i1].getLightValue(this,j,k,l);
|
||||
int l1 = getSavedLightValue(EnumSkyBlock.Block, j - 1, k, l) - j1;
|
||||
int i2 = getSavedLightValue(EnumSkyBlock.Block, j + 1, k, l) - j1;
|
||||
int j2 = getSavedLightValue(EnumSkyBlock.Block, j, k - 1, l) - j1;
|
||||
@@ -2679,6 +2675,7 @@
|
||||
@@ -2940,6 +2931,7 @@
|
||||
{
|
||||
block = null;
|
||||
}
|
||||
+ if(block!=null && block.isBlockReplaceable(this,j,k,l)) block=null;
|
||||
+ if (block != null && block.isBlockReplaceable(this,j,k,l)) block = null;
|
||||
return i > 0 && block == null && block1.canPlaceBlockOnSide(this, j, k, l, i1);
|
||||
}
|
||||
|
||||
@@ -3193,7 +3190,7 @@
|
||||
public int lightningFlash;
|
||||
public boolean editingBlocks;
|
||||
private long lockTimestamp;
|
||||
- protected int autosavePeriod;
|
||||
+ public int autosavePeriod;
|
||||
public int difficultySetting;
|
||||
public Random rand;
|
||||
public boolean isNewWorld;
|
||||
|
|
|
@ -9,7 +9,15 @@
|
|||
import java.util.*;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -125,8 +127,9 @@
|
||||
@@ -18,7 +20,6 @@
|
||||
|
||||
public World worldObj;
|
||||
private int glRenderList;
|
||||
- private static Tessellator tessellator;
|
||||
public static int chunksUpdated = 0;
|
||||
public int posX;
|
||||
public int posY;
|
||||
@@ -160,8 +161,9 @@
|
||||
GL11.glTranslatef((float)(-sizeDepth) / 2.0F, (float)(-sizeHeight) / 2.0F, (float)(-sizeDepth) / 2.0F);
|
||||
GL11.glScalef(f, f, f);
|
||||
GL11.glTranslatef((float)sizeDepth / 2.0F, (float)sizeHeight / 2.0F, (float)sizeDepth / 2.0F);
|
||||
|
@ -21,7 +29,7 @@
|
|||
}
|
||||
if(i2 == 0 && Block.isBlockContainer[i3])
|
||||
{
|
||||
@@ -142,15 +145,13 @@
|
||||
@@ -177,15 +179,13 @@
|
||||
{
|
||||
flag1 = true;
|
||||
}
|
||||
|
@ -34,7 +42,7 @@
|
|||
- {
|
||||
- flag1 |= renderblocks.renderBlockByRenderType(block, l2, j2, k2);
|
||||
- }
|
||||
+ if(j3>i2) flag=true;
|
||||
+ if (j3 > i2) flag = true;
|
||||
+ if(!ForgeHooksClient.canRenderInPass(block,i2))
|
||||
+ continue;
|
||||
+
|
||||
|
@ -44,13 +52,13 @@
|
|||
}
|
||||
|
||||
}
|
||||
@@ -159,10 +160,11 @@
|
||||
@@ -194,10 +194,11 @@
|
||||
|
||||
if(flag2)
|
||||
{
|
||||
- tessellator.draw();
|
||||
- bytesDrawn += tessellator.draw();
|
||||
+ ForgeHooksClient.afterRenderPass(i2);
|
||||
+ Tessellator.instance.draw();
|
||||
+ bytesDrawn += Tessellator.instance.draw();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEndList();
|
||||
- tessellator.setTranslationD(0.0D, 0.0D, 0.0D);
|
||||
|
@ -58,17 +66,9 @@
|
|||
} else
|
||||
{
|
||||
flag1 = false;
|
||||
@@ -255,7 +257,6 @@
|
||||
|
||||
public World worldObj;
|
||||
private int glRenderList;
|
||||
- private static Tessellator tessellator;
|
||||
public static int chunksUpdated = 0;
|
||||
public int posX;
|
||||
public int posY;
|
||||
@@ -286,8 +287,4 @@
|
||||
public List tileEntityRenderers;
|
||||
private List tileEntities;
|
||||
@@ -288,8 +289,4 @@
|
||||
needsUpdate = true;
|
||||
}
|
||||
|
||||
- static
|
||||
- {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/Block.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/Block.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
// Decompiler options: packimports(3) braces deadcode fieldsfirst
|
||||
|
||||
package net.minecraft.src;
|
||||
+import net.minecraft.src.forge.ForgeHooks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
@@ -218,24 +219,40 @@
|
||||
@@ -384,26 +385,41 @@
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -19,11 +19,11 @@
|
|||
+ return quantityDropped(random);
|
||||
+ }
|
||||
+
|
||||
public int idDropped(int i, Random random)
|
||||
public int idDropped(int i, Random random, int j)
|
||||
{
|
||||
return blockID;
|
||||
}
|
||||
|
||||
-
|
||||
+ /* FORGE: This function isnt called by Minecraft anymore. Use
|
||||
+ * blockStrength(EntityPlayer,int) instead.
|
||||
+ */
|
||||
|
@ -40,51 +40,52 @@
|
|||
- {
|
||||
- return entityplayer.getCurrentPlayerStrVsBlock(this) / blockHardness / 30F;
|
||||
- }
|
||||
+ return blockStrength(entityplayer,0);
|
||||
+ }
|
||||
+ return blockStrength(entityplayer);
|
||||
}
|
||||
-
|
||||
+
|
||||
+ /* FORGE: This function returns the complete list of drops for a block.
|
||||
+ */
|
||||
+ public ArrayList<ItemStack> getBlockDropped(World world,
|
||||
+ int i, int j, int k, int md) {
|
||||
+ ArrayList<ItemStack> tr=new ArrayList<ItemStack>();
|
||||
+ ArrayList<ItemStack> tr = new ArrayList<ItemStack>();
|
||||
+
|
||||
+ int q=quantityDropped(md,world.rand);
|
||||
+ for(int n=0; n<q; n++) {
|
||||
+ int id=idDropped(md, world.rand);
|
||||
+ if(id>0) {
|
||||
+ tr.add(new ItemStack(id,1,damageDropped(md)));
|
||||
+ int q = quantityDropped(md, world.rand);
|
||||
+ for(int n = 0; n < q; n++) {
|
||||
+ int id = idDropped(md, world.rand, 0);
|
||||
+ if (id > 0) {
|
||||
+ tr.add(new ItemStack(id, 1, damageDropped(md)));
|
||||
+ }
|
||||
+ }
|
||||
+ return tr;
|
||||
}
|
||||
|
||||
public final void dropBlockAsItem(World world, int i, int j, int k, int l)
|
||||
@@ -249,20 +266,12 @@
|
||||
+ }
|
||||
+
|
||||
public final void dropBlockAsItem(World world, int i, int j, int k, int l, int i1)
|
||||
{
|
||||
dropBlockAsItemWithChance(world, i, j, k, l, 1.0F, i1);
|
||||
@@ -415,18 +431,14 @@
|
||||
{
|
||||
return;
|
||||
}
|
||||
- int i1 = quantityDropped(world.rand);
|
||||
- for(int j1 = 0; j1 < i1; j1++)
|
||||
- {
|
||||
+ ArrayList<ItemStack> ar=getBlockDropped(world,i,j,k,l);
|
||||
+ for(ItemStack ist : ar) {
|
||||
- int j1 = func_40162_a(i1, world.rand);
|
||||
- for(int k1 = 0; k1 < j1; k1++)
|
||||
+ ArrayList<ItemStack> ar = getBlockDropped(world,i,j,k,l);
|
||||
+ for (ItemStack ist : ar)
|
||||
{
|
||||
if(world.rand.nextFloat() > f)
|
||||
- {
|
||||
{
|
||||
continue;
|
||||
- }
|
||||
- int k1 = idDropped(l, world.rand);
|
||||
- if(k1 > 0)
|
||||
}
|
||||
- int l1 = idDropped(l, world.rand, i1);
|
||||
- if(l1 > 0)
|
||||
- {
|
||||
- dropBlockAsItem_do(world, i, j, k, new ItemStack(k1, 1, damageDropped(l)));
|
||||
- dropBlockAsItem_do(world, i, j, k, new ItemStack(l1, 1, damageDropped(l)));
|
||||
- }
|
||||
+ dropBlockAsItem_do(world, i, j, k, ist);
|
||||
}
|
||||
-
|
||||
}
|
||||
|
||||
protected void dropBlockAsItem_do(World world, int i, int j, int k, ItemStack itemstack)
|
||||
@@ -529,6 +538,96 @@
|
||||
}
|
||||
@@ -725,6 +737,96 @@
|
||||
return blockMaterial.getMaterialMobility();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/BlockChest.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockChest.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -328,23 +328,23 @@
|
||||
@@ -339,23 +339,23 @@
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -8,18 +8,27 @@
|
|||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// BlockFlower, Block, World, EntityItem,
|
||||
@@ -103,27 +104,16 @@
|
||||
return blockIndexInTexture + j;
|
||||
@@ -108,28 +109,16 @@
|
||||
return 6;
|
||||
}
|
||||
|
||||
- public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f)
|
||||
- public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f, int i1)
|
||||
- {
|
||||
- super.dropBlockAsItemWithChance(world, i, j, k, l, f);
|
||||
- super.dropBlockAsItemWithChance(world, i, j, k, l, f, 0);
|
||||
- if(world.singleplayerWorld)
|
||||
- {
|
||||
- return;
|
||||
- }
|
||||
- for(int i1 = 0; i1 < 3; i1++)
|
||||
+ public ArrayList<ItemStack> getBlockDropped(World world,
|
||||
+ int i, int j, int k, int md) {
|
||||
+ ArrayList<ItemStack> tr = new ArrayList<ItemStack>();
|
||||
+ if (md == 7) tr.add(new ItemStack(Item.wheat));
|
||||
+
|
||||
+ for(int n = 0; n < 3; n++) {
|
||||
+ if (world.rand.nextInt(15) <= md)
|
||||
+ tr.add(new ItemStack(Item.seeds));
|
||||
}
|
||||
- int j1 = 3 + i1;
|
||||
- for(int k1 = 0; k1 < j1; k1++)
|
||||
- {
|
||||
- if(world.rand.nextInt(15) <= l)
|
||||
- {
|
||||
|
@ -33,16 +42,7 @@
|
|||
- }
|
||||
- }
|
||||
-
|
||||
+ public ArrayList<ItemStack> getBlockDropped(World world,
|
||||
+ int i, int j, int k, int md) {
|
||||
+ ArrayList<ItemStack> tr=new ArrayList<ItemStack>();
|
||||
+ if(md==7) tr.add(new ItemStack(Item.wheat));
|
||||
+
|
||||
+ for(int n=0; n<3; n++) {
|
||||
+ if(world.rand.nextInt(15) <= md)
|
||||
+ tr.add(new ItemStack(Item.seeds));
|
||||
+ }
|
||||
+ return tr;
|
||||
}
|
||||
|
||||
public int idDropped(int i, Random random)
|
||||
public int idDropped(int i, Random random, int j)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/BlockDoor.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockDoor.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -100,7 +100,7 @@
|
||||
@@ -105,7 +105,7 @@
|
||||
{
|
||||
if(blockMaterial == Material.iron)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@
|
|||
}
|
||||
int l = world.getBlockMetadata(i, j, k);
|
||||
if((l & 8) != 0)
|
||||
@@ -167,7 +167,7 @@
|
||||
@@ -172,7 +172,7 @@
|
||||
world.setBlockWithNotify(i, j, k, 0);
|
||||
flag = true;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
|||
{
|
||||
world.setBlockWithNotify(i, j, k, 0);
|
||||
flag = true;
|
||||
@@ -231,7 +231,7 @@
|
||||
@@ -235,7 +235,7 @@
|
||||
return false;
|
||||
} else
|
||||
{
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
@@ -52,37 +57,37 @@
|
||||
@@ -57,37 +62,37 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
|
@ -58,7 +58,7 @@
|
|||
{
|
||||
i1 = 5;
|
||||
}
|
||||
@@ -93,19 +98,19 @@
|
||||
@@ -98,19 +103,19 @@
|
||||
{
|
||||
int i1 = world.getBlockMetadata(i, j, k);
|
||||
boolean flag = false;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/BlockLever.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockLever.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -35,44 +35,44 @@
|
||||
@@ -40,44 +40,44 @@
|
||||
|
||||
public boolean canPlaceBlockOnSide(World world, int i, int j, int k, int l)
|
||||
{
|
||||
|
@ -55,7 +55,7 @@
|
|||
}
|
||||
|
||||
public void onBlockPlaced(World world, int i, int j, int k, int l)
|
||||
@@ -81,23 +81,23 @@
|
||||
@@ -86,23 +86,23 @@
|
||||
int j1 = i1 & 8;
|
||||
i1 &= 7;
|
||||
i1 = -1;
|
||||
|
@ -84,7 +84,7 @@
|
|||
{
|
||||
i1 = 1;
|
||||
}
|
||||
@@ -119,27 +119,27 @@
|
||||
@@ -124,27 +124,27 @@
|
||||
{
|
||||
int i1 = world.getBlockMetadata(i, j, k) & 7;
|
||||
boolean flag = false;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/BlockPressurePlate.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockPressurePlate.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -46,7 +46,8 @@
|
||||
@@ -48,7 +48,8 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
|
@ -10,7 +10,7 @@
|
|||
}
|
||||
|
||||
public void onBlockAdded(World world, int i, int j, int k)
|
||||
@@ -56,7 +57,8 @@
|
||||
@@ -58,7 +59,8 @@
|
||||
public void onNeighborBlockChange(World world, int i, int j, int k, int l)
|
||||
{
|
||||
boolean flag = false;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/BlockRail.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockRail.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -16,12 +16,12 @@
|
||||
@@ -18,12 +18,12 @@
|
||||
public static final boolean isRailBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
int l = world.getBlockId(i, j, k);
|
||||
|
@ -15,7 +15,7 @@
|
|||
}
|
||||
|
||||
protected BlockRail(int i, int j, boolean flag)
|
||||
@@ -92,7 +92,7 @@
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
|||
}
|
||||
|
||||
public void onBlockAdded(World world, int i, int j, int k)
|
||||
@@ -116,23 +116,23 @@
|
||||
@@ -123,23 +123,23 @@
|
||||
j1 &= 7;
|
||||
}
|
||||
boolean flag = false;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/BlockRedstoneRepeater.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockRedstoneRepeater.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -27,7 +27,7 @@
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@
|
|||
{
|
||||
return false;
|
||||
} else
|
||||
@@ -38,7 +38,7 @@
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
public boolean canBlockStay(World world, int i, int j, int k)
|
||||
{
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/BlockRedstoneWire.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockRedstoneWire.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
// Decompiler options: packimports(3) braces deadcode fieldsfirst
|
||||
|
||||
package net.minecraft.src;
|
||||
+import net.minecraft.src.forge.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -43,7 +44,7 @@
|
||||
@@ -51,7 +52,7 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@
|
|||
}
|
||||
|
||||
private void updateAndPropagateCurrentStrength(World world, int i, int j, int k)
|
||||
@@ -413,6 +414,10 @@
|
||||
@@ -421,6 +422,10 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -25,6 +25,6 @@
|
|||
+ IConnectRedstone icr=(IConnectRedstone)Block.blocksList[i1];
|
||||
+ return icr.canConnectRedstone(iblockaccess,i,j,k,l);
|
||||
+ }
|
||||
if(Block.blocksList[i1].canProvidePower())
|
||||
if(Block.blocksList[i1].canProvidePower() && l != -1)
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// BlockFlower, Item, World, EntityPlayer,
|
||||
@@ -41,13 +44,17 @@
|
||||
|
||||
public int idDropped(int i, Random random)
|
||||
public int idDropped(int i, Random random, int j)
|
||||
{
|
||||
- if(random.nextInt(8) == 0)
|
||||
- {
|
||||
|
@ -34,4 +34,4 @@
|
|||
+ return tr;
|
||||
}
|
||||
|
||||
public void harvestBlock(World world, EntityPlayer entityplayer, int i, int j, int k, int l)
|
||||
public int func_40162_a(int i, Random random)
|
||||
|
|
|
@ -1,104 +1,107 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/BlockTorch.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockTorch.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -36,24 +36,24 @@
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
private boolean canPlaceTorchOn(World world, int i, int j, int k)
|
||||
{
|
||||
- return world.isBlockNormalCube(i, j, k) || world.getBlockId(i, j, k) == Block.fence.blockID;
|
||||
+ return world.isBlockSolidOnSide(i, j, k,1) || world.getBlockId(i, j, k) == Block.fence.blockID;
|
||||
}
|
||||
- if(world.func_41047_b(i, j, k, true))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k, 1))
|
||||
{
|
||||
return true;
|
||||
} else
|
||||
@@ -53,19 +53,19 @@
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||
{
|
||||
- if(world.isBlockNormalCube(i - 1, j, k))
|
||||
- if(world.func_41047_b(i - 1, j, k, true))
|
||||
+ if(world.isBlockSolidOnSide(i - 1, j, k,5))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if(world.isBlockNormalCube(i + 1, j, k))
|
||||
- if(world.func_41047_b(i + 1, j, k, true))
|
||||
+ if(world.isBlockSolidOnSide(i + 1, j, k,4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if(world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k - 1,3))
|
||||
- if(world.func_41047_b(i, j, k - 1, true))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k-1,3))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- if(world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k + 1,2))
|
||||
- if(world.func_41047_b(i, j, k + 1, true))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k+1,2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -67,19 +67,19 @@
|
||||
@@ -79,19 +79,19 @@
|
||||
{
|
||||
i1 = 5;
|
||||
}
|
||||
- if(l == 2 && world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if(l == 2 && world.isBlockSolidOnSide(i, j, k + 1,2))
|
||||
- if(l == 2 && world.func_41047_b(i, j, k + 1, true))
|
||||
+ if(l == 2 && world.isBlockSolidOnSide(i, j, k+1,2))
|
||||
{
|
||||
i1 = 4;
|
||||
}
|
||||
- if(l == 3 && world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if(l == 3 && world.isBlockSolidOnSide(i, j, k - 1,3))
|
||||
- if(l == 3 && world.func_41047_b(i, j, k - 1, true))
|
||||
+ if(l == 3 && world.isBlockSolidOnSide(i, j, k-1,3))
|
||||
{
|
||||
i1 = 3;
|
||||
}
|
||||
- if(l == 4 && world.isBlockNormalCube(i + 1, j, k))
|
||||
- if(l == 4 && world.func_41047_b(i + 1, j, k, true))
|
||||
+ if(l == 4 && world.isBlockSolidOnSide(i + 1, j, k,4))
|
||||
{
|
||||
i1 = 2;
|
||||
}
|
||||
- if(l == 5 && world.isBlockNormalCube(i - 1, j, k))
|
||||
- if(l == 5 && world.func_41047_b(i - 1, j, k, true))
|
||||
+ if(l == 5 && world.isBlockSolidOnSide(i - 1, j, k,5))
|
||||
{
|
||||
i1 = 1;
|
||||
}
|
||||
@@ -97,19 +97,19 @@
|
||||
@@ -109,19 +109,19 @@
|
||||
|
||||
public void onBlockAdded(World world, int i, int j, int k)
|
||||
{
|
||||
- if(world.isBlockNormalCube(i - 1, j, k))
|
||||
- if(world.func_41047_b(i - 1, j, k, true))
|
||||
+ if(world.isBlockSolidOnSide(i - 1, j, k,5))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(i, j, k, 1);
|
||||
} else
|
||||
- if(world.isBlockNormalCube(i + 1, j, k))
|
||||
- if(world.func_41047_b(i + 1, j, k, true))
|
||||
+ if(world.isBlockSolidOnSide(i + 1, j, k,4))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(i, j, k, 2);
|
||||
} else
|
||||
- if(world.isBlockNormalCube(i, j, k - 1))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k - 1,3))
|
||||
- if(world.func_41047_b(i, j, k - 1, true))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k-1,3))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(i, j, k, 3);
|
||||
} else
|
||||
- if(world.isBlockNormalCube(i, j, k + 1))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k + 1,2))
|
||||
- if(world.func_41047_b(i, j, k + 1, true))
|
||||
+ if(world.isBlockSolidOnSide(i, j, k+1,2))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(i, j, k, 4);
|
||||
} else
|
||||
@@ -126,19 +126,19 @@
|
||||
@@ -138,19 +138,19 @@
|
||||
{
|
||||
int i1 = world.getBlockMetadata(i, j, k);
|
||||
boolean flag = false;
|
||||
- if(!world.isBlockNormalCube(i - 1, j, k) && i1 == 1)
|
||||
- if(!world.func_41047_b(i - 1, j, k, true) && i1 == 1)
|
||||
+ if(!world.isBlockSolidOnSide(i - 1, j, k,5) && i1 == 1)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if(!world.isBlockNormalCube(i + 1, j, k) && i1 == 2)
|
||||
- if(!world.func_41047_b(i + 1, j, k, true) && i1 == 2)
|
||||
+ if(!world.isBlockSolidOnSide(i + 1, j, k,4) && i1 == 2)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if(!world.isBlockNormalCube(i, j, k - 1) && i1 == 3)
|
||||
+ if(!world.isBlockSolidOnSide(i, j, k - 1,3) && i1 == 3)
|
||||
- if(!world.func_41047_b(i, j, k - 1, true) && i1 == 3)
|
||||
+ if(!world.isBlockSolidOnSide(i, j, k-1,3) && i1 == 3)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
- if(!world.isBlockNormalCube(i, j, k + 1) && i1 == 4)
|
||||
+ if(!world.isBlockSolidOnSide(i, j, k + 1,2) && i1 == 4)
|
||||
- if(!world.func_41047_b(i, j, k + 1, true) && i1 == 4)
|
||||
+ if(!world.isBlockSolidOnSide(i, j, k+1,2) && i1 == 4)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
|
|
@ -1,15 +1,27 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/BlockTrapDoor.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockTrapDoor.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -130,7 +130,7 @@
|
||||
@@ -11,7 +11,10 @@
|
||||
|
||||
public class BlockTrapDoor extends Block
|
||||
{
|
||||
-
|
||||
+ /* FORGE: Set this to allow trapdoors to remain free-floating
|
||||
+ */
|
||||
+ public static boolean disableValidation=false;
|
||||
+
|
||||
protected BlockTrapDoor(int i, Material material)
|
||||
{
|
||||
super(i, material);
|
||||
@@ -141,7 +144,7 @@
|
||||
{
|
||||
j1--;
|
||||
}
|
||||
- if(!world.isBlockNormalCube(j1, j, k1))
|
||||
+ if(!disableValidation && !world.isBlockSolidOnSide(j1, j, k1, (i1&3)+2))
|
||||
- if(!func_41006_g(world.getBlockId(j1, j, k1)))
|
||||
+ if(!(func_41006_g(world.getBlockId(j1, j, k1)) || world.isBlockSolidOnSide(j1, j, k1, (i1&3)+2)))
|
||||
{
|
||||
world.setBlockWithNotify(i, j, k, 0);
|
||||
dropBlockAsItem(world, i, j, k, i1);
|
||||
@@ -172,6 +172,7 @@
|
||||
dropBlockAsItem(world, i, j, k, i1, 0);
|
||||
@@ -186,6 +189,7 @@
|
||||
|
||||
public boolean canPlaceBlockOnSide(World world, int i, int j, int k, int l)
|
||||
{
|
||||
|
@ -17,20 +29,12 @@
|
|||
if(l == 0)
|
||||
{
|
||||
return false;
|
||||
@@ -196,11 +197,15 @@
|
||||
@@ -210,7 +214,7 @@
|
||||
{
|
||||
i--;
|
||||
}
|
||||
- return world.isBlockNormalCube(i, j, k);
|
||||
+ return world.isBlockSolidOnSide(i, j, k, l);
|
||||
- return func_41006_g(world.getBlockId(i, j, k));
|
||||
+ return func_41006_g(world.getBlockId(i, j, k)) || world.isBlockSolidOnSide(i, j, k, l);
|
||||
}
|
||||
|
||||
public static boolean isTrapdoorOpen(int i)
|
||||
{
|
||||
return (i & 4) != 0;
|
||||
}
|
||||
+
|
||||
+ /* FORGE: Set this to allow trapdoors to remain free-floating
|
||||
+ */
|
||||
+ public static boolean disableValidation=false;
|
||||
}
|
||||
|
|
|
@ -1,113 +1,22 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/Chunk.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/Chunk.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
// Decompiler options: packimports(3) braces deadcode fieldsfirst
|
||||
|
||||
package net.minecraft.src;
|
||||
+import net.minecraft.src.forge.*;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.util.*;
|
||||
@@ -68,16 +69,12 @@
|
||||
|
||||
public void generateSkylightMap()
|
||||
{
|
||||
- worldObj.getClass();
|
||||
int i = 128 - 1;
|
||||
for(int j = 0; j < 16; j++)
|
||||
{
|
||||
for(int l = 0; l < 16; l++)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
int j1 = 128 - 1;
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
int k1;
|
||||
for(k1 = j << 11 | l << 7; j1 > 0 && Block.lightOpacity[blocks[(k1 + j1) - 1] & 0xff] == 0; j1--) { }
|
||||
heightMap[l << 4 | j] = (byte)j1;
|
||||
@@ -90,7 +87,6 @@
|
||||
continue;
|
||||
}
|
||||
int l1 = 15;
|
||||
- worldObj.getClass();
|
||||
int i2 = 128 - 1;
|
||||
do
|
||||
{
|
||||
@@ -128,7 +124,6 @@
|
||||
|
||||
private void func_35633_i()
|
||||
{
|
||||
- worldObj.getClass();
|
||||
if(worldObj.doChunksNearChunkExist(xPosition * 16 + 8, 128 / 2, zPosition * 16 + 8, 16))
|
||||
{
|
||||
for(int i = 0; i < 16; i++)
|
||||
@@ -190,7 +185,6 @@
|
||||
{
|
||||
if(l > k)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
if(worldObj.doChunksNearChunkExist(i, 128 / 2, j, 16))
|
||||
{
|
||||
for(int i1 = k; i1 < l; i1++)
|
||||
@@ -211,8 +205,6 @@
|
||||
{
|
||||
i1 = j;
|
||||
}
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
for(int j1 = i << 11 | k << 7; i1 > 0 && Block.lightOpacity[blocks[(j1 + i1) - 1] & 0xff] == 0; i1--) { }
|
||||
if(i1 == l)
|
||||
{
|
||||
@@ -225,7 +217,6 @@
|
||||
lowestBlockHeight = i1;
|
||||
} else
|
||||
{
|
||||
- worldObj.getClass();
|
||||
int k1 = 128 - 1;
|
||||
for(int i2 = 0; i2 < 16; i2++)
|
||||
{
|
||||
@@ -294,8 +285,6 @@
|
||||
|
||||
public int getBlockID(int i, int j, int k)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
return blocks[i << 11 | k << 7 | j] & 0xff;
|
||||
}
|
||||
|
||||
@@ -308,8 +297,6 @@
|
||||
field_35637_c[j1] = -999;
|
||||
}
|
||||
int k1 = heightMap[k << 4 | i] & 0xff;
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
int l1 = blocks[i << 11 | k << 7 | j] & 0xff;
|
||||
if(l1 == l && data.getNibble(i, j, k) == i1)
|
||||
{
|
||||
@@ -317,12 +304,17 @@
|
||||
@@ -325,6 +326,7 @@
|
||||
}
|
||||
int i2 = xPosition * 16 + i;
|
||||
int j2 = zPosition * 16 + k;
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
+ if (Block.blocksList[l1] instanceof IOverrideReplace) {
|
||||
+ IOverrideReplace iovr = (IOverrideReplace) Block.blocksList[l1];
|
||||
+ if (!iovr.canReplaceBlock(worldObj, i2, j, j2, l))
|
||||
+ return iovr.getReplacedSuccess();
|
||||
+ }
|
||||
+
|
||||
blocks[i << 11 | k << 7 | j] = (byte)(byte0 & 0xff);
|
||||
- if(l1 != 0 && !worldObj.singleplayerWorld)
|
||||
- {
|
||||
- Block.blocksList[l1].onBlockRemoval(worldObj, i2, j, j2);
|
||||
+ if(l1 != 0) {
|
||||
+ if(!worldObj.singleplayerWorld)
|
||||
+ Block.blocksList[l1].onBlockRemoval(worldObj, i2, j, j2);
|
||||
+ removeChunkBlockTileEntity(i,j,k);
|
||||
}
|
||||
data.setNibble(i, j, k, i1);
|
||||
if(!worldObj.worldProvider.hasNoSky)
|
||||
@@ -354,7 +346,7 @@
|
||||
blocks[i << worldObj.field_35250_b | k << worldObj.worldYBits | j] = (byte)(byte0 & 0xff);
|
||||
if(l1 != 0)
|
||||
{
|
||||
@@ -367,7 +369,7 @@
|
||||
TileEntity tileentity = getChunkBlockTileEntity(i, j, k);
|
||||
if(tileentity == null)
|
||||
{
|
||||
|
@ -116,7 +25,7 @@
|
|||
worldObj.setBlockTileEntity(i, j, k, tileentity);
|
||||
}
|
||||
if(tileentity != null)
|
||||
@@ -362,14 +354,6 @@
|
||||
@@ -375,14 +377,6 @@
|
||||
tileentity.func_35164_g();
|
||||
}
|
||||
}
|
||||
|
@ -131,40 +40,22 @@
|
|||
}
|
||||
isModified = true;
|
||||
return true;
|
||||
@@ -384,8 +368,6 @@
|
||||
field_35637_c[i1] = -999;
|
||||
}
|
||||
int j1 = heightMap[i1] & 0xff;
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
int k1 = blocks[i << 11 | k << 7 | j] & 0xff;
|
||||
if(k1 == l)
|
||||
{
|
||||
@@ -393,12 +375,18 @@
|
||||
@@ -404,10 +398,13 @@
|
||||
}
|
||||
int l1 = xPosition * 16 + i;
|
||||
int i2 = zPosition * 16 + k;
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
+
|
||||
+ if (Block.blocksList[k1] instanceof IOverrideReplace) {
|
||||
+ IOverrideReplace iovr = (IOverrideReplace) Block.blocksList[k1];
|
||||
+ if (!iovr.canReplaceBlock(worldObj, l1, j, i2, l))
|
||||
+ return iovr.getReplacedSuccess();
|
||||
+ }
|
||||
+
|
||||
blocks[i << 11 | k << 7 | j] = (byte)(byte0 & 0xff);
|
||||
- if(k1 != 0)
|
||||
- {
|
||||
blocks[i << worldObj.field_35250_b | k << worldObj.worldYBits | j] = (byte)(byte0 & 0xff);
|
||||
if(k1 != 0)
|
||||
{
|
||||
- Block.blocksList[k1].onBlockRemoval(worldObj, l1, j, i2);
|
||||
+ if(k1 != 0) {
|
||||
+ if(!worldObj.singleplayerWorld)
|
||||
+ if (!worldObj.singleplayerWorld)
|
||||
+ Block.blocksList[k1].onBlockRemoval(worldObj, l1, j, i2);
|
||||
+ removeChunkBlockTileEntity(i,j,k);
|
||||
+ worldObj.removeBlockTileEntity(l1, j, i2);
|
||||
}
|
||||
data.setNibble(i, j, k, 0);
|
||||
if(Block.lightOpacity[byte0 & 0xff] != 0)
|
||||
@@ -426,7 +414,7 @@
|
||||
@@ -435,7 +432,7 @@
|
||||
TileEntity tileentity = getChunkBlockTileEntity(i, j, k);
|
||||
if(tileentity == null)
|
||||
{
|
||||
|
@ -173,7 +64,7 @@
|
|||
worldObj.setBlockTileEntity(i, j, k, tileentity);
|
||||
}
|
||||
if(tileentity != null)
|
||||
@@ -434,14 +422,6 @@
|
||||
@@ -443,14 +440,6 @@
|
||||
tileentity.func_35164_g();
|
||||
}
|
||||
}
|
||||
|
@ -188,7 +79,7 @@
|
|||
}
|
||||
isModified = true;
|
||||
return true;
|
||||
@@ -568,6 +548,11 @@
|
||||
@@ -586,6 +575,11 @@
|
||||
{
|
||||
ChunkPosition chunkposition = new ChunkPosition(i, j, k);
|
||||
TileEntity tileentity = (TileEntity)chunkTileEntityMap.get(chunkposition);
|
||||
|
@ -200,7 +91,7 @@
|
|||
if(tileentity == null)
|
||||
{
|
||||
int l = getBlockID(i, j, k);
|
||||
@@ -577,18 +562,23 @@
|
||||
@@ -595,18 +589,23 @@
|
||||
}
|
||||
if(tileentity == null)
|
||||
{
|
||||
|
@ -231,7 +122,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -600,7 +590,7 @@
|
||||
@@ -618,7 +617,7 @@
|
||||
setChunkBlockTileEntity(i, j, k, tileentity);
|
||||
if(isChunkLoaded)
|
||||
{
|
||||
|
@ -240,7 +131,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -617,6 +607,8 @@
|
||||
@@ -634,6 +633,8 @@
|
||||
return;
|
||||
} else
|
||||
{
|
||||
|
@ -249,47 +140,3 @@
|
|||
tileentity.validate();
|
||||
chunkTileEntityMap.put(chunkposition, tileentity);
|
||||
return;
|
||||
@@ -766,8 +758,6 @@
|
||||
{
|
||||
for(int k3 = k; k3 < j1; k3++)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
int k4 = k2 << 11 | k3 << 7 | j;
|
||||
int k5 = i1 - j;
|
||||
System.arraycopy(blocks, k4, abyte0, k1, k5);
|
||||
@@ -780,8 +770,6 @@
|
||||
{
|
||||
for(int l3 = k; l3 < j1; l3++)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
int l4 = (l2 << 11 | l3 << 7 | j) >> 1;
|
||||
int l5 = (i1 - j) / 2;
|
||||
System.arraycopy(data.data, l4, abyte0, k1, l5);
|
||||
@@ -794,8 +782,6 @@
|
||||
{
|
||||
for(int i4 = k; i4 < j1; i4++)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
int i5 = (i3 << 11 | i4 << 7 | j) >> 1;
|
||||
int i6 = (i1 - j) / 2;
|
||||
System.arraycopy(blocklightMap.data, i5, abyte0, k1, i6);
|
||||
@@ -808,8 +794,6 @@
|
||||
{
|
||||
for(int j4 = k; j4 < j1; j4++)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
- worldObj.getClass();
|
||||
int j5 = (j3 << 11 | j4 << 7 | j) >> 1;
|
||||
int j6 = (i1 - j) / 2;
|
||||
System.arraycopy(skylightMap.data, j5, abyte0, k1, j6);
|
||||
@@ -857,7 +841,6 @@
|
||||
int l = field_35637_c[k];
|
||||
if(l == -999)
|
||||
{
|
||||
- worldObj.getClass();
|
||||
int i1 = 128 - 1;
|
||||
for(l = -1; i1 > 0 && l == -1;)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/EntityLiving.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/EntityLiving.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -600,7 +600,9 @@
|
||||
@@ -771,7 +771,9 @@
|
||||
int i = MathHelper.floor_double(posX);
|
||||
int j = MathHelper.floor_double(boundingBox.minY);
|
||||
int k = MathHelper.floor_double(posZ);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/EntityPigZombie.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/EntityPigZombie.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -90,7 +90,7 @@
|
||||
@@ -94,7 +94,7 @@
|
||||
return super.attackEntityFrom(damagesource, i);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
// Referenced classes of package net.minecraft.src:
|
||||
// EntityLiving, InventoryPlayer, FoodStats, PlayerCapabilities,
|
||||
// ContainerPlayer, World, ChunkCoordinates, DataWatcher,
|
||||
@@ -433,6 +437,8 @@
|
||||
@@ -493,6 +497,8 @@
|
||||
worldObj.entityJoinedWorld(entityitem);
|
||||
}
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
|||
public float getCurrentPlayerStrVsBlock(Block block)
|
||||
{
|
||||
float f = inventory.getStrVsBlock(block);
|
||||
@@ -455,6 +461,32 @@
|
||||
return f;
|
||||
@@ -521,6 +527,32 @@
|
||||
return f1;
|
||||
}
|
||||
|
||||
+ /* FORGE: Extended to allow metadata.
|
||||
|
@ -41,11 +41,11 @@
|
|||
+ }
|
||||
+ if(func_35184_a(Potion.digSpeed))
|
||||
+ {
|
||||
+ f *= 1.0F + (float)(func_35187_b(Potion.digSpeed).func_35652_c() + 1) * 0.2F;
|
||||
+ f *= 1.0F + (float)(func_35187_b(Potion.digSpeed).getAmplifier() + 1) * 0.2F;
|
||||
+ }
|
||||
+ if(func_35184_a(Potion.digSlowdown))
|
||||
+ {
|
||||
+ f *= 1.0F - (float)(func_35187_b(Potion.digSlowdown).func_35652_c() + 1) * 0.2F;
|
||||
+ f *= 1.0F - (float)(func_35187_b(Potion.digSlowdown).getAmplifier() + 1) * 0.2F;
|
||||
+ }
|
||||
+ return f;
|
||||
+ }
|
||||
|
@ -53,10 +53,12 @@
|
|||
public boolean canHarvestBlock(Block block)
|
||||
{
|
||||
return inventory.canHarvestBlock(block);
|
||||
@@ -615,6 +647,25 @@
|
||||
@@ -718,7 +750,26 @@
|
||||
}
|
||||
|
||||
protected void damageEntity(DamageSource damagesource, int i)
|
||||
{
|
||||
- {
|
||||
+ {
|
||||
+ boolean doRegularComputation = true;
|
||||
+ int initialDamage = i;
|
||||
+
|
||||
|
@ -76,10 +78,10 @@
|
|||
+ return;
|
||||
+ }
|
||||
+
|
||||
if(!damagesource.func_35083_b() && func_35180_G())
|
||||
if(!damagesource.unblockable() && func_35180_G())
|
||||
{
|
||||
i = 1 + i >> 1;
|
||||
@@ -668,7 +719,9 @@
|
||||
@@ -770,7 +821,9 @@
|
||||
|
||||
public void destroyCurrentEquippedItem()
|
||||
{
|
||||
|
@ -89,7 +91,7 @@
|
|||
}
|
||||
|
||||
public double getYOffset()
|
||||
@@ -757,6 +810,10 @@
|
||||
@@ -896,6 +949,10 @@
|
||||
|
||||
public EnumStatus sleepInBedAt(int i, int j, int k)
|
||||
{
|
||||
|
|
|
@ -1,28 +1,26 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/Explosion.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/Explosion.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
// Decompiler options: packimports(3) braces deadcode fieldsfirst
|
||||
|
||||
package net.minecraft.src;
|
||||
+import net.minecraft.src.forge.ISpecialResistance;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -66,7 +67,16 @@
|
||||
int i5 = worldObj.getBlockId(j4, k4, l4);
|
||||
if(i5 > 0)
|
||||
@@ -76,7 +77,14 @@
|
||||
int k3 = worldObj.getBlockId(l2, i3, j3);
|
||||
if(k3 > 0)
|
||||
{
|
||||
- f1 -= (Block.blocksList[i5].getExplosionResistance(exploder) + 0.3F) * f2;
|
||||
+ if(Block.blocksList[i5] instanceof ISpecialResistance) {
|
||||
+ ISpecialResistance isr=(ISpecialResistance)
|
||||
+ Block.blocksList[i5];
|
||||
+ f1-=(isr.getSpecialExplosionResistance(
|
||||
+ worldObj,j4,k4,l4,
|
||||
+ explosionX,explosionY,explosionZ,
|
||||
+ exploder) + 0.3F) * f2;
|
||||
- f1 -= (Block.blocksList[k3].getExplosionResistance(exploder) + 0.3F) * f2;
|
||||
+ if (Block.blocksList[k3] instanceof ISpecialResistance){
|
||||
+ ISpecialResistance isr = (ISpecialResistance)Block.blocksList[k3];
|
||||
+ f1 -= (isr.getSpecialExplosionResistance(worldObj, l2, i3, j3,
|
||||
+ explosionX, explosionY, explosionZ, exploder) + 0.3F) * f2;
|
||||
+ } else {
|
||||
+ f1 -= (Block.blocksList[i5].getExplosionResistance(exploder) + 0.3F) * f2;
|
||||
+ f1 -= (Block.blocksList[k3].getExplosionResistance(exploder) + 0.3F) * f2;
|
||||
+ }
|
||||
+
|
||||
}
|
||||
if(f1 > 0.0F)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,15 @@
|
|||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// Block, ItemStack, Item
|
||||
@@ -21,6 +22,7 @@
|
||||
@@ -15,6 +16,7 @@
|
||||
|
||||
private static final FurnaceRecipes smeltingBase = new FurnaceRecipes();
|
||||
private Map smeltingList;
|
||||
+ private Map metaSmeltingList;
|
||||
|
||||
public static final FurnaceRecipes smelting()
|
||||
{
|
||||
@@ -24,6 +26,7 @@
|
||||
private FurnaceRecipes()
|
||||
{
|
||||
smeltingList = new HashMap();
|
||||
|
@ -16,7 +24,7 @@
|
|||
addSmelting(Block.oreIron.blockID, new ItemStack(Item.ingotIron));
|
||||
addSmelting(Block.oreGold.blockID, new ItemStack(Item.ingotGold));
|
||||
addSmelting(Block.oreDiamond.blockID, new ItemStack(Item.diamond));
|
||||
@@ -40,11 +42,32 @@
|
||||
@@ -46,11 +49,32 @@
|
||||
smeltingList.put(Integer.valueOf(i), itemstack);
|
||||
}
|
||||
|
||||
|
@ -49,10 +57,3 @@
|
|||
public Map getSmeltingList()
|
||||
{
|
||||
return smeltingList;
|
||||
@@ -52,5 +75,6 @@
|
||||
|
||||
private static final FurnaceRecipes smeltingBase = new FurnaceRecipes();
|
||||
private Map smeltingList;
|
||||
+ private Map metaSmeltingList;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/Item.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/Item.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -66,6 +66,13 @@
|
||||
@@ -175,6 +175,9 @@
|
||||
private String field_39006_bR;
|
||||
private String itemName;
|
||||
|
||||
+ // FORGE: To disable repair recipes.
|
||||
+ protected boolean canRepair=true;
|
||||
+
|
||||
protected Item(int i)
|
||||
{
|
||||
maxStackSize = 64;
|
||||
@@ -219,6 +222,13 @@
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
|
@ -14,3 +24,23 @@
|
|||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
|
||||
{
|
||||
return itemstack;
|
||||
@@ -266,6 +276,19 @@
|
||||
return maxDamage > 0 && !hasSubtypes;
|
||||
}
|
||||
|
||||
+ /* FORGE: Called by CraftingManager to determine if an item is repairable.
|
||||
+ */
|
||||
+ public boolean isRepairable() {
|
||||
+ return canRepair && isDamageable();
|
||||
+ }
|
||||
+
|
||||
+ /* FORGE: Call to disable repair recipes.
|
||||
+ */
|
||||
+ public Item setNoRepair() {
|
||||
+ canRepair=false;
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
public boolean hitEntity(ItemStack itemstack, EntityLiving entityliving, EntityLiving entityliving1)
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
+import net.minecraft.src.forge.MinecraftForge;
|
||||
+
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// Item, EntityPlayer, Vec3D, MathHelper,
|
||||
// World, MovingObjectPosition, EnumMovingObjectType, Material,
|
||||
@@ -56,6 +58,12 @@
|
||||
// Item, EntityPlayer, MovingObjectPosition, EnumMovingObjectType,
|
||||
// World, Material, PlayerCapabilities, ItemStack,
|
||||
@@ -46,6 +48,12 @@
|
||||
}
|
||||
if(isFull == 0)
|
||||
{
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/ItemDye.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/ItemDye.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
// Decompiler options: packimports(3) braces deadcode fieldsfirst
|
||||
|
||||
package net.minecraft.src;
|
||||
+import net.minecraft.src.forge.ForgeHooks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@@ -29,13 +30,18 @@
|
||||
@@ -39,13 +40,18 @@
|
||||
|
||||
public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int l)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@
|
|||
if(i1 == Block.sapling.blockID)
|
||||
{
|
||||
if(!world.singleplayerWorld)
|
||||
@@ -102,13 +108,7 @@
|
||||
@@ -112,13 +118,7 @@
|
||||
world.setBlockAndMetadataWithNotify(k1, l1, i2, Block.tallGrass.blockID, 1);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/ItemInWorldManager.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/ItemInWorldManager.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -3,7 +3,8 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
// Decompiler options: packimports(3) braces deadcode fieldsfirst
|
||||
|
||||
package net.minecraft.src;
|
||||
-
|
||||
|
@ -10,7 +10,7 @@
|
|||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// EntityPlayer, PlayerCapabilities, World, Block,
|
||||
@@ -66,7 +67,8 @@
|
||||
@@ -81,7 +82,8 @@
|
||||
if(j != 0)
|
||||
{
|
||||
Block block = Block.blocksList[j];
|
||||
|
@ -20,7 +20,7 @@
|
|||
if(f >= 1.0F)
|
||||
{
|
||||
field_22050_k = false;
|
||||
@@ -93,7 +95,7 @@
|
||||
@@ -108,7 +110,7 @@
|
||||
{
|
||||
Block.blocksList[i1].onBlockClicked(thisWorld, i, j, k, thisPlayer);
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
|||
{
|
||||
blockHarvessted(i, j, k);
|
||||
} else
|
||||
@@ -113,7 +115,7 @@
|
||||
@@ -128,7 +130,7 @@
|
||||
if(i1 != 0)
|
||||
{
|
||||
Block block = Block.blocksList[i1];
|
||||
|
@ -38,7 +38,7 @@
|
|||
if(f >= 0.7F)
|
||||
{
|
||||
blockHarvessted(i, j, k);
|
||||
@@ -135,11 +137,10 @@
|
||||
@@ -150,11 +152,10 @@
|
||||
{
|
||||
Block block = Block.blocksList[thisWorld.getBlockId(i, j, k)];
|
||||
int l = thisWorld.getBlockMetadata(i, j, k);
|
||||
|
@ -54,16 +54,16 @@
|
|||
return flag;
|
||||
}
|
||||
|
||||
@@ -164,7 +165,7 @@
|
||||
thisPlayer.destroyCurrentEquippedItem();
|
||||
}
|
||||
}
|
||||
- if(flag && thisPlayer.canHarvestBlock(Block.blocksList[l]))
|
||||
+ if(flag && Block.blocksList[l].canHarvestBlock(thisPlayer,i1))
|
||||
@@ -170,7 +171,7 @@
|
||||
} else
|
||||
{
|
||||
Block.blocksList[l].harvestBlock(thisWorld, thisPlayer, i, j, k, i1);
|
||||
}
|
||||
@@ -188,6 +189,7 @@
|
||||
ItemStack itemstack = thisPlayer.getCurrentEquippedItem();
|
||||
- boolean flag1 = thisPlayer.canHarvestBlock(Block.blocksList[l]);
|
||||
+ boolean flag1 = Block.blocksList[l].canHarvestBlock(thisPlayer, i1);
|
||||
if(itemstack != null)
|
||||
{
|
||||
itemstack.onDestroyBlock(l, i, j, k, thisPlayer);
|
||||
@@ -204,6 +205,7 @@
|
||||
if(itemstack1.stackSize == 0)
|
||||
{
|
||||
entityplayer.inventory.mainInventory[entityplayer.inventory.currentItem] = null;
|
||||
|
@ -71,7 +71,7 @@
|
|||
}
|
||||
return true;
|
||||
} else
|
||||
@@ -198,6 +200,11 @@
|
||||
@@ -214,6 +216,11 @@
|
||||
|
||||
public boolean activeBlockOrUseItem(EntityPlayer entityplayer, World world, ItemStack itemstack, int i, int j, int k, int l)
|
||||
{
|
||||
|
@ -83,7 +83,7 @@
|
|||
int i1 = world.getBlockId(i, j, k);
|
||||
if(i1 > 0 && Block.blocksList[i1].blockActivated(world, i, j, k, entityplayer))
|
||||
{
|
||||
@@ -217,7 +224,11 @@
|
||||
@@ -233,7 +240,11 @@
|
||||
return flag;
|
||||
} else
|
||||
{
|
||||
|
|
|
@ -9,7 +9,18 @@
|
|||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// Item, EnumToolMaterial, ItemStack, Block,
|
||||
@@ -37,6 +39,14 @@
|
||||
@@ -13,8 +15,8 @@
|
||||
{
|
||||
|
||||
private Block blocksEffectiveAgainst[];
|
||||
- protected float efficiencyOnProperMaterial;
|
||||
- private int damageVsEntity;
|
||||
+ public float efficiencyOnProperMaterial;
|
||||
+ public int damageVsEntity;
|
||||
protected EnumToolMaterial toolMaterial;
|
||||
|
||||
protected ItemTool(int i, int j, EnumToolMaterial enumtoolmaterial, Block ablock[])
|
||||
@@ -42,6 +44,14 @@
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
|
@ -24,13 +35,3 @@
|
|||
public boolean hitEntity(ItemStack itemstack, EntityLiving entityliving, EntityLiving entityliving1)
|
||||
{
|
||||
itemstack.damageItem(2, entityliving1);
|
||||
@@ -55,7 +65,7 @@
|
||||
}
|
||||
|
||||
private Block blocksEffectiveAgainst[];
|
||||
- private float efficiencyOnProperMaterial;
|
||||
- private int damageVsEntity;
|
||||
+ public float efficiencyOnProperMaterial;
|
||||
+ public int damageVsEntity;
|
||||
protected EnumToolMaterial toolMaterial;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/MovingObjectPosition.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/MovingObjectPosition.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -35,4 +35,7 @@
|
||||
@@ -18,6 +18,9 @@
|
||||
public int sideHit;
|
||||
public Vec3D hitVec;
|
||||
public Entity entityHit;
|
||||
+
|
||||
+ // Added for RedPower subblocks.
|
||||
+ public int subHit=-1;
|
||||
}
|
||||
+ //Added for RedPower SubBlocks.
|
||||
+ public int subHit = -1;
|
||||
|
||||
public MovingObjectPosition(int i, int j, int k, int l, Vec3D vec3d)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/Packet100OpenWindow.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/Packet100OpenWindow.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -33,9 +33,9 @@
|
||||
@@ -38,9 +38,9 @@
|
||||
throws IOException
|
||||
{
|
||||
windowId = datainputstream.readByte();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/Packet230ModLoader.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/Packet230ModLoader.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -71,7 +71,10 @@
|
||||
@@ -79,7 +79,10 @@
|
||||
}));
|
||||
}
|
||||
byte abyte0[] = new byte[k1];
|
||||
|
|
|
@ -1,16 +1,7 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/Packet24MobSpawn.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/Packet24MobSpawn.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -34,7 +34,7 @@
|
||||
throws IOException
|
||||
@@ -15,7 +15,7 @@
|
||||
{
|
||||
entityId = datainputstream.readInt();
|
||||
- type = datainputstream.readByte();
|
||||
+ type = datainputstream.readByte()&0xFF;
|
||||
xPosition = datainputstream.readInt();
|
||||
yPosition = datainputstream.readInt();
|
||||
zPosition = datainputstream.readInt();
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
|
||||
public int entityId;
|
||||
- public byte type;
|
||||
|
@ -18,3 +9,12 @@
|
|||
public int xPosition;
|
||||
public int yPosition;
|
||||
public int zPosition;
|
||||
@@ -44,7 +44,7 @@
|
||||
throws IOException
|
||||
{
|
||||
entityId = datainputstream.readInt();
|
||||
- type = datainputstream.readByte();
|
||||
+ type = datainputstream.readByte() & 0xFF;
|
||||
xPosition = datainputstream.readInt();
|
||||
yPosition = datainputstream.readInt();
|
||||
zPosition = datainputstream.readInt();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/PlayerInstance.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/PlayerInstance.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -168,12 +168,11 @@
|
||||
@@ -183,12 +183,11 @@
|
||||
sendPacketToPlayersInInstance(new Packet52MultiBlockChange(chunkX, chunkZ, blocksToUpdate, numBlocksToUpdate, worldserver));
|
||||
for(int k = 0; k < numBlocksToUpdate; k++)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/SlotCrafting.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/SlotCrafting.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -3,7 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
// Decompiler options: packimports(3) braces deadcode fieldsfirst
|
||||
|
||||
package net.minecraft.src;
|
||||
-
|
||||
|
@ -9,8 +9,8 @@
|
|||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// Slot, EntityPlayer, ItemStack, Block,
|
||||
@@ -60,6 +60,7 @@
|
||||
thePlayer.addStat(AchievementList.buildSword, 1);
|
||||
@@ -71,6 +71,7 @@
|
||||
thePlayer.addStat(AchievementList.bookcase, 1);
|
||||
}
|
||||
ModLoader.TakenFromCrafting(thePlayer, itemstack);
|
||||
+ ForgeHooks.onTakenFromCrafting(thePlayer, itemstack, craftMatrix);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/TileEntity.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/TileEntity.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -61,6 +61,13 @@
|
||||
@@ -72,6 +72,13 @@
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
+ implements IInventory, ISidedInventory
|
||||
{
|
||||
|
||||
public TileEntityFurnace()
|
||||
@@ -28,6 +29,16 @@
|
||||
private ItemStack furnaceItemStacks[];
|
||||
@@ -33,6 +34,16 @@
|
||||
return furnaceItemStacks.length;
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
|||
public ItemStack getStackInSlot(int i)
|
||||
{
|
||||
return furnaceItemStacks[i];
|
||||
@@ -176,7 +187,7 @@
|
||||
@@ -181,7 +192,7 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@
|
|||
if(itemstack == null)
|
||||
{
|
||||
return false;
|
||||
@@ -189,13 +200,9 @@
|
||||
@@ -194,13 +205,9 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -60,7 +60,7 @@
|
|||
}
|
||||
|
||||
public void smeltItem()
|
||||
@@ -204,23 +211,29 @@
|
||||
@@ -209,23 +216,29 @@
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/World.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/World.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -183,7 +183,11 @@
|
||||
@@ -51,7 +51,7 @@
|
||||
public int lightningFlash;
|
||||
public boolean editingBlocks;
|
||||
private long lockTimestamp;
|
||||
- protected int autosavePeriod;
|
||||
+ public int autosavePeriod;
|
||||
public int difficultySetting;
|
||||
public Random rand;
|
||||
public boolean isNewWorld;
|
||||
@@ -244,7 +244,11 @@
|
||||
|
||||
public boolean isAirBlock(int i, int j, int k)
|
||||
{
|
||||
|
@ -13,7 +22,7 @@
|
|||
}
|
||||
|
||||
public boolean blockExists(int i, int j, int k)
|
||||
@@ -1124,7 +1128,7 @@
|
||||
@@ -1207,7 +1211,7 @@
|
||||
Chunk chunk = getChunkFromChunkCoords(tileentity.xCoord >> 4, tileentity.zCoord >> 4);
|
||||
if(chunk != null)
|
||||
{
|
||||
|
@ -22,7 +31,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -1151,15 +1155,15 @@
|
||||
@@ -1235,15 +1239,15 @@
|
||||
{
|
||||
loadedTileEntityList.add(tileentity1);
|
||||
}
|
||||
|
@ -40,7 +49,7 @@
|
|||
}
|
||||
} while(true);
|
||||
addedTileEntityList.clear();
|
||||
@@ -1168,13 +1172,19 @@
|
||||
@@ -1254,13 +1258,19 @@
|
||||
|
||||
public void addTileEntity(Collection collection)
|
||||
{
|
||||
|
@ -67,7 +76,7 @@
|
|||
}
|
||||
|
||||
public void updateEntity(Entity entity)
|
||||
@@ -1372,6 +1382,9 @@
|
||||
@@ -1460,6 +1470,9 @@
|
||||
if(j2 == Block.fire.blockID || j2 == Block.lavaMoving.blockID || j2 == Block.lavaStill.blockID)
|
||||
{
|
||||
return true;
|
||||
|
@ -77,7 +86,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -1590,44 +1603,23 @@
|
||||
@@ -1700,46 +1713,22 @@
|
||||
|
||||
public void setBlockTileEntity(int i, int j, int k, TileEntity tileentity)
|
||||
{
|
||||
|
@ -101,8 +110,7 @@
|
|||
- }
|
||||
+ if(tileentity==null || tileentity.isInvalid())
|
||||
+ return;
|
||||
+ List dest=scanningTileEntities ? addedTileEntityList :
|
||||
+ loadedTileEntityList;
|
||||
+ List dest=scanningTileEntities ? addedTileEntityList : loadedTileEntityList;
|
||||
+ if(tileentity.canUpdate()) dest.add(tileentity);
|
||||
+ Chunk chunk = getChunkFromChunkCoords(i >> 4, k >> 4);
|
||||
+ if(chunk != null) {
|
||||
|
@ -116,10 +124,12 @@
|
|||
- if(tileentity != null && scanningTileEntities)
|
||||
- {
|
||||
- tileentity.invalidate();
|
||||
- addedTileEntityList.remove(tileentity);
|
||||
- } else
|
||||
- {
|
||||
- if(tileentity != null)
|
||||
- {
|
||||
- addedTileEntityList.remove(tileentity);
|
||||
- loadedTileEntityList.remove(tileentity);
|
||||
- }
|
||||
- Chunk chunk = getChunkFromChunkCoords(i >> 4, k >> 4);
|
||||
|
@ -135,7 +145,7 @@
|
|||
}
|
||||
|
||||
public void func_35239_a(TileEntity tileentity)
|
||||
@@ -1650,13 +1642,18 @@
|
||||
@@ -1762,13 +1751,18 @@
|
||||
public boolean isBlockNormalCube(int i, int j, int k)
|
||||
{
|
||||
Block block = Block.blocksList[getBlockId(i, j, k)];
|
||||
|
@ -160,8 +170,8 @@
|
|||
+ return block.isBlockSolidOnSide(this,i,j,k,side);
|
||||
}
|
||||
|
||||
public void calculateInitialSkylight()
|
||||
@@ -1976,7 +1973,7 @@
|
||||
public boolean func_41047_b(int i, int j, int k, boolean flag)
|
||||
@@ -2179,7 +2173,7 @@
|
||||
|
||||
private int func_35241_e(int i, int j, int k, int l, int i1, int j1)
|
||||
{
|
||||
|
@ -170,7 +180,7 @@
|
|||
int l1 = getSavedLightValue(EnumSkyBlock.Block, j - 1, k, l) - j1;
|
||||
int i2 = getSavedLightValue(EnumSkyBlock.Block, j + 1, k, l) - j1;
|
||||
int j2 = getSavedLightValue(EnumSkyBlock.Block, j, k - 1, l) - j1;
|
||||
@@ -2315,6 +2312,7 @@
|
||||
@@ -2556,6 +2550,7 @@
|
||||
{
|
||||
block = null;
|
||||
}
|
||||
|
@ -178,12 +188,3 @@
|
|||
return i > 0 && block == null && block1.canPlaceBlockOnSide(this, j, k, l, i1);
|
||||
}
|
||||
|
||||
@@ -2759,7 +2757,7 @@
|
||||
public int field_27080_i;
|
||||
public boolean editingBlocks;
|
||||
private long lockTimestamp;
|
||||
- protected int autosavePeriod;
|
||||
+ public int autosavePeriod;
|
||||
public int difficultySetting;
|
||||
public Random rand;
|
||||
public boolean isNewWorld;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/WorldServer.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/WorldServer.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -54,15 +54,20 @@
|
||||
@@ -63,15 +63,20 @@
|
||||
public List getTileEntityList(int i, int j, int k, int l, int i1, int j1)
|
||||
{
|
||||
ArrayList arraylist = new ArrayList();
|
||||
|
|
|
@ -10,9 +10,13 @@ pushd .. >nul
|
|||
pushd src >nul
|
||||
..\runtime\bin\python\python_mcp ..\forge\lfcr.py ..\forge\modLoaderMP.patch ..\forge\modLoaderMP-win.patch
|
||||
..\runtime\bin\applydiff.exe -uf -p2 < ..\forge\modLoaderMP-win.patch
|
||||
..\runtime\bin\python\python_mcp ..\forge\lfcr.py ..\forge\mlprop.patch ..\forge\mlprop-win.patch
|
||||
..\runtime\bin\applydiff.exe -uf -p1 < ..\forge\mlprop-win.patch
|
||||
del ..\forge\mlprop-win.patch ..\forge\modLoaderMP-win.patch >nul 1>nul
|
||||
rem ..\runtime\bin\python\python_mcp ..\forge\lfcr.py ..\forge\mlprop.patch ..\forge\mlprop-win.patch
|
||||
rem ..\runtime\bin\applydiff.exe -uf -p1 < ..\forge\mlprop-win.patch
|
||||
rem del ..\forge\mlprop-win.patch ..\forge\modLoaderMP-win.patch >nul 1>nul
|
||||
del minecraft\net\minecraft\src\MLProp.java
|
||||
copy ..\forge\MLProp.java minecraft\net\minecraft\src\MLProp.java
|
||||
del minecraft_server\net\minecraft\src\MLProp.java
|
||||
copy ..\forge\MLProp.java minecraft_server\net\minecraft\src\MLProp.java
|
||||
popd >nul
|
||||
|
||||
cmd /C updatemd5.bat
|
||||
|
|
|
@ -25,7 +25,6 @@ if [ ! -d src_base ] ; then
|
|||
|
||||
find . -name *.java -exec sed -i 's/\r//g' \{\} \;
|
||||
patch -p2 -i ../forge/modLoaderMP.patch
|
||||
patch -p1 -i ../forge/mlprop.patch
|
||||
|
||||
popd > /dev/null
|
||||
|
||||
|
|
Loading…
Reference in a new issue