Compare commits

..
1 Commits
Author SHA1 Message Date
Space Toad 7305783e14 tagged 1.3.1 2012-01-22 01:28:49 +00:00
30 changed files with 556 additions and 612 deletions

No files matched your search

+5 -9
View File
@@ -1,15 +1,11 @@
@cd ..
cd ..
@rmdir /S /Q src
@mkdir src
rmdir /S /Q src
mkdir src
xcopy /Y /E src_work\* src\
xcopy /Y /E forge\forge_client\src\net\* src\minecraft\net
xcopy /Y /E forge\forge_common\net\* src\minecraft\net
xcopy /Y /E forge\forge_common\net\* src\minecraft_server\net
@cd forge
@cmd /C inject_version.bat ../src/minecraft/net/minecraft/src/forge/ForgeHooks.java
@cmd /C inject_version.bat ../src/minecraft_server/net/minecraft/src/forge/ForgeHooks.java
@cd ..
@echo | call recompile.bat
cmd /C recompile.bat
-5
View File
@@ -10,11 +10,6 @@ cp -a forge/forge_client/src/net/* src_forge/minecraft/net/
cp -a forge/forge_common/net/* src_forge/minecraft/net/
cp -a forge/forge_common/net/* src_forge/minecraft_server/net/
cd forge
./inject_version.sh ../src_forge/minecraft/net/minecraft/src/forge/ForgeHooks.java
./inject_version.sh ../src_forge/minecraft_server/net/minecraft/src/forge/ForgeHooks.java
cd ..
cp -a src_forge src
./recompile.sh
+197 -197
View File
File diff suppressed because it is too large. Load diff
+210 -210
View File
File diff suppressed because it is too large. Load diff
@@ -300,13 +300,12 @@ public class ForgeHooks {
}
public static final int majorVersion=0;
public static final int minorVersion=0;
public static final int revisionVersion=0;
public static final int buildVersion=0;
public static final int majorVersion=1;
public static final int minorVersion=3;
public static final int revisionVersion=1;
static {
System.out.printf("MinecraftForge v%d.%d.%d.%d Initialized\n", majorVersion, minorVersion, revisionVersion, buildVersion);
ModLoader.getLogger().info(String.format("MinecraftForge v%d.%d.%d.%d Initialized\n", majorVersion, minorVersion, revisionVersion, buildVersion));
System.out.printf("MinecraftForge V%d.%d.%d Initialized\n", majorVersion, minorVersion, revisionVersion);
ModLoader.getLogger().info(String.format("MinecraftForge V%d.%d.%d Initialized\n", majorVersion, minorVersion, revisionVersion));
}
static boolean toolInit=false;
-20
View File
@@ -1,20 +0,0 @@
@echo off
setlocal enableextensions enabledelayedexpansion
FOR /F "tokens=1-4" %%A IN (version.txt) DO (
set major=%%A
set minor=%%B
set revision=%%C
set build=%%D
)
set file=%*
echo Injecting Revision !major!.!minor!.!revision!.!build! %file%
set PATH=.\bin;%PATH%
sed s/majorVersion=0/majorVersion=!major!/ <!file! | ^
sed s/minorVersion=0/minorVersion=!minor!/ | ^
sed s/revisionVersion=0/revisionVersion=!revision!/ | ^
sed s/buildVersion=0/buildVersion=!build!/ | ^
tr -d '\r' >!file!.tmp
mv "!file!.tmp" "!file!"
-14
View File
@@ -1,14 +0,0 @@
#!/bin/bash
target=$1
read major minor rev build <version.txt
echo Injecting Revision $major.$minor.$rev.$build $target
sed s/majorVersion=0/majorVersion=$major/ <$target | \
sed s/minorVersion=0/minorVersion=$minor/ | \
sed s/revisionVersion=0/revisionVersion=$rev/ | \
sed s/buildVersion=0/buildVersion=$build/ | \
tr -d '\r' > $target.tmp
mv $target.tmp $target
+3 -3
View File
@@ -3,7 +3,7 @@ echo off
echo MinecraftForge Windows Setup Program
echo:
@set PATH=%PATH%;%SystemDir%\system32;%SystemRoot%\System32
set PATH=%PATH%;%SystemDir%\system32;%SystemRoot%\System32
pushd .. >nul
@@ -11,8 +11,8 @@ xcopy /Y /E /I forge\conf\* conf
if exist runtime\bin\fernflower.jar move runtime\bin\fernflower.jar runtime\bin\fernflower.jar-backup
echo | call cleanup.bat
echo | call decompile.bat
cmd /C cleanup.bat
cmd /C decompile.bat
if exist runtime\bin\fernflower.jar-backup move runtime\bin\fernflower.jar-backup runtime\bin\fernflower.jar
+6 -12
View File
@@ -1,11 +1,10 @@
read major minor revision build <version.txt
version=$major.$minor.$revision.$build
version=$1
build_dir=`pwd`
dir=`pwd`/../forge-$version
function remove_svn () {
(
cd "$1"
cd $1
if [ -d .svn ]; then
rm -rf .svn
@@ -25,7 +24,7 @@ function package_all () {
cp $build_dir/minecraftforge_credits.txt .
zip -r "$dir/minecraftforge$qual-$version.zip" \
zip -r $dir/minecraftforge$qual-$version.zip \
minecraftforge_credits.txt \
*.class \
forge
@@ -35,8 +34,8 @@ cd ../reobf
remove_svn .
rm -rf "$dir"
mkdir "$dir"
rm -rf $dir
mkdir $dir
cd minecraft
package_all "-client"
@@ -72,11 +71,6 @@ cp ../install/README.txt .
cp ../minecraftforge_credits.txt .
cp -r ../doc .
cd ..
sh inject_version.sh forge/src/minecraft/net/minecraft/src/forge/ForgeHooks.java
sh inject_version.sh forge/src/minecraft_server/net/minecraft/src/forge/ForgeHooks.java
cd forge
cd src
remove_svn .
cd ../patches
@@ -87,5 +81,5 @@ cd ..
cd ..
zip -r "$dir/minecraftforge-src-$version.zip" forge
zip -r $dir/minecraftforge-src-$version.zip forge
rm -rf forge
@@ -14,8 +14,8 @@
{
j1--;
}
- if (!isValidSupportBlock(world.getBlockId(j1, j, k1)))
+ if (!(isValidSupportBlock(world.getBlockId(j1, j, k1)) || 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, 0);
@@ -34,14 +34,14 @@
{
i--;
}
- return isValidSupportBlock(world.getBlockId(i, j, k));
+ return isValidSupportBlock(world.getBlockId(i, j, k)) || 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)
@@ -215,6 +222,11 @@
private static boolean isValidSupportBlock(int i)
private static boolean func_41052_f(int i)
{
+ if (disableValidation)
+ {
@@ -2,7 +2,7 @@
+++ ../src_work/minecraft/net/minecraft/src/Entity.java 0000-00-00 00:00:00.000000000 -0000
@@ -70,6 +70,9 @@
public int serverPosZ;
public boolean ignoreFrustrumCheck;
public boolean ignoreFrustumCheck;
public boolean isAirBorne;
+
+ //Forge: Used to store custom data for each entity.
@@ -28,11 +28,11 @@
{
{
{
@@ -76,16 +81,35 @@
@@ -76,16 +81,36 @@
}
}
};
- private int turnProgress;
- private int minecartPosRotationIncrements;
- private double minecartX;
- private double minecartY;
- private double minecartZ;
@@ -42,7 +42,7 @@
- private double velocityY;
- private double velocityZ;
-
+ protected int turnProgress;
+ protected int minecartPosRotationIncrements;
+ protected double minecartX;
+ protected double minecartY;
+ protected double minecartZ;
@@ -51,8 +51,9 @@
+ protected double velocityX;
+ protected double velocityY;
+ protected double velocityZ;
+
+ /*Forge: Minecart Compatibility Layer Integration. */
+
+ /*Forge: Minecart Compatibility Layer Integration.
+ */
+ public static float defaultMaxSpeedRail = 0.4f;
+ public static float defaultMaxSpeedGround = 0.4f;
+ public static float defaultMaxSpeedAirLateral = 0.4f;
@@ -61,7 +62,7 @@
+ protected boolean canUseRail = true;
+ protected boolean canBePushed = true;
+ private static IMinecartCollisionHandler collisionHandler = null;
+
+
+ /*
+ * Instance versions of the above physics properties
+ */
@@ -69,12 +70,12 @@
+ protected float maxSpeedGround;
+ protected float maxSpeedAirLateral;
+ protected float maxSpeedAirVertical;
+ protected double dragAir;
+ protected double dragAir;
+
public EntityMinecart(World world)
{
super(world);
@@ -95,6 +119,18 @@
@@ -95,6 +120,18 @@
preventEntitySpawning = true;
setSize(0.98F, 0.7F);
yOffset = height / 2.0F;
@@ -93,7 +94,7 @@
}
protected boolean canTriggerWalking()
@@ -112,17 +148,27 @@
@@ -112,17 +149,27 @@
public AxisAlignedBB getCollisionBox(Entity entity)
{
@@ -122,7 +123,7 @@
}
public EntityMinecart(World world, double d, double d1, double d2,
@@ -161,49 +207,8 @@
@@ -161,49 +208,8 @@
riddenByEntity.mountEntity(this);
}
setEntityDead();
@@ -174,7 +175,7 @@
}
return true;
}
@@ -268,7 +273,7 @@
@@ -268,7 +274,7 @@
{
func_41024_b(func_41025_i() - 1);
}
@@ -183,7 +184,7 @@
{
worldObj.spawnParticle("largesmoke", posX, posY + 0.80000000000000004D, posZ, 0.0D, 0.0D, 0.0D);
}
@@ -309,22 +314,18 @@
@@ -309,22 +315,18 @@
double d2 = 0.40000000000000002D;
double d4 = 0.0078125D;
int l = worldObj.getBlockId(i, j, k);
@@ -209,7 +210,7 @@
if (i1 >= 2 && i1 <= 5)
{
posY = j + 1;
@@ -358,7 +359,7 @@
@@ -358,7 +360,7 @@
double d13 = Math.sqrt(motionX * motionX + motionZ * motionZ);
motionX = (d13 * d9) / d11;
motionZ = (d13 * d10) / d11;
@@ -218,7 +219,7 @@
{
double d16 = Math.sqrt(motionX * motionX + motionZ * motionZ);
if (d16 < 0.029999999999999999D)
@@ -401,30 +402,9 @@
@@ -401,30 +403,9 @@
posX = d18 + d9 * d17;
posZ = d19 + d10 * d17;
setPosition(posX, posY + (double)yOffset, posZ);
@@ -252,7 +253,7 @@
if (ai[0][1] != 0 && MathHelper.floor_double(posX) - i == ai[0][0] && MathHelper.floor_double(posZ) - k == ai[0][2])
{
setPosition(posX, posY + (double)ai[0][1], posZ);
@@ -433,39 +413,9 @@
@@ -433,39 +414,9 @@
{
setPosition(posX, posY + (double)ai[1][1], posZ);
}
@@ -295,7 +296,7 @@
Vec3D vec3d1 = func_514_g(posX, posY, posZ);
if (vec3d1 != null && vec3d != null)
{
@@ -486,26 +436,14 @@
@@ -486,26 +437,14 @@
motionX = d15 * (double)(k1 - i);
motionZ = d15 * (double)(l1 - k);
}
@@ -328,7 +329,7 @@
{
double d31 = Math.sqrt(motionX * motionX + motionZ * motionZ);
if (d31 > 0.01D)
@@ -540,35 +478,7 @@
@@ -540,35 +479,7 @@
}
else
{
@@ -365,7 +366,7 @@
}
rotationPitch = 0.0F;
double d6 = prevPosX - posX;
@@ -590,7 +500,20 @@
@@ -590,7 +501,20 @@
field_856_i = !field_856_i;
}
setRotation(rotationYaw, rotationPitch);
@@ -387,7 +388,7 @@
if (list != null && list.size() > 0)
{
for (int j1 = 0; j1 < list.size(); j1++)
@@ -610,15 +533,8 @@
@@ -610,15 +534,8 @@
}
riddenByEntity = null;
}
@@ -405,7 +406,7 @@
}
public Vec3D func_515_a(double d, double d1, double d2, double d3)
@@ -633,11 +549,7 @@
@@ -633,11 +550,7 @@
int l = worldObj.getBlockId(i, j, k);
if (BlockRail.isRailBlock(l))
{
@@ -418,7 +419,7 @@
d1 = j;
if (i1 >= 2 && i1 <= 5)
{
@@ -679,12 +591,8 @@
@@ -679,12 +592,8 @@
int l = worldObj.getBlockId(i, j, k);
if (BlockRail.isRailBlock(l))
{
@@ -432,7 +433,7 @@
if (i1 >= 2 && i1 <= 5)
{
d1 = j + 1;
@@ -739,13 +647,13 @@
@@ -739,13 +648,13 @@
protected void writeEntityToNBT(NBTTagCompound nbttagcompound)
{
nbttagcompound.setInteger("Type", minecartType);
@@ -449,7 +450,7 @@
{
NBTTagList nbttaglist = new NBTTagList();
for (int i = 0; i < cargoItems.length; i++)
@@ -766,13 +674,13 @@
@@ -766,13 +675,13 @@
protected void readEntityFromNBT(NBTTagCompound nbttagcompound)
{
minecartType = nbttagcompound.getInteger("Type");
@@ -466,7 +467,7 @@
{
NBTTagList nbttaglist = nbttagcompound.getTagList("Items");
cargoItems = new ItemStack[getSizeInventory()];
@@ -795,6 +703,12 @@
@@ -795,6 +704,12 @@
public void applyEntityCollision(Entity entity)
{
@@ -479,7 +480,7 @@
if (worldObj.isRemote)
{
return;
@@ -803,7 +717,7 @@
@@ -803,7 +718,7 @@
{
return;
}
@@ -488,7 +489,7 @@
{
entity.mountEntity(this);
}
@@ -841,7 +755,7 @@
@@ -841,7 +756,7 @@
}
double d7 = entity.motionX + motionX;
double d8 = entity.motionZ + motionZ;
@@ -497,7 +498,7 @@
{
motionX *= 0.20000000298023224D;
motionZ *= 0.20000000298023224D;
@@ -849,7 +763,7 @@
@@ -849,7 +764,7 @@
entity.motionX *= 0.94999998807907104D;
entity.motionZ *= 0.94999998807907104D;
}
@@ -506,7 +507,7 @@
{
entity.motionX *= 0.20000000298023224D;
entity.motionZ *= 0.20000000298023224D;
@@ -879,7 +793,7 @@
@@ -879,7 +794,7 @@
public int getSizeInventory()
{
@@ -515,7 +516,7 @@
}
public ItemStack getStackInSlot(int i)
@@ -935,7 +849,11 @@
@@ -935,7 +850,11 @@
public boolean interact(EntityPlayer entityplayer)
{
@@ -528,7 +529,7 @@
{
if (riddenByEntity != null && (riddenByEntity instanceof EntityPlayer) && riddenByEntity != entityplayer)
{
@@ -946,14 +864,14 @@
@@ -946,14 +865,14 @@
entityplayer.mountEntity(this);
}
}
@@ -545,7 +546,7 @@
{
ItemStack itemstack = entityplayer.inventory.getCurrentItem();
if (itemstack != null && itemstack.itemID == Item.coal.shiftedIndex)
@@ -1000,7 +918,7 @@
@@ -1000,7 +919,7 @@
return entityplayer.getDistanceSqToEntity(this) <= 64D;
}
@@ -554,7 +555,7 @@
{
return (dataWatcher.getWatchableObjectByte(16) & 1) != 0;
}
@@ -1054,4 +972,382 @@
@@ -1054,4 +973,382 @@
{
return dataWatcher.getWatchableObjectInt(18);
}
@@ -93,34 +93,35 @@
public boolean canHarvestBlock(Block block)
{
return inventory.canHarvestBlock(block);
@@ -768,7 +824,25 @@
{
i = 1 + i >> 1;
}
- i = applyArmorCalculations(damagesource, i);
+
+ boolean doRegularComputation = true;
@@ -764,6 +820,27 @@
protected void damageEntity(DamageSource damagesource, int i)
{
+ boolean doRegularComputation = true;
+ int initialDamage = i;
+
+ for (ItemStack stack : inventory.armorInventory)
+ {
+ if (stack != null && stack.getItem() instanceof ISpecialArmor)
+ {
+ ISpecialArmor armor = (ISpecialArmor)stack.getItem();
+ ISpecialArmor armor = (ISpecialArmor) stack.getItem();
+
+ ArmorProperties props = armor.getProperties(this, initialDamage, i);
+ i = i - props.damageRemove;
+ doRegularComputation = doRegularComputation && props.allowRegularComputation;
+ }
+ }
+
+ if (doRegularComputation)
+ if (!doRegularComputation)
+ {
+ i = applyArmorCalculations(damagesource, i);
+ super.damageEntity(damagesource, i);
+ return;
+ }
i = applyPotionDamageCalculations(damagesource, i);
addExhaustion(damagesource.getHungerDamage());
health -= i;
@@ -815,7 +889,9 @@
+
if (!damagesource.isUnblockable() && isBlocking())
{
i = 1 + i >> 1;
@@ -815,7 +892,9 @@
public void destroyCurrentEquippedItem()
{
@@ -130,7 +131,7 @@
}
public double getYOffset()
@@ -947,6 +1023,11 @@
@@ -947,6 +1026,11 @@
public EnumStatus sleepInBedAt(int i, int j, int k)
{
@@ -9,7 +9,7 @@
import java.util.Random;
@@ -157,6 +158,9 @@
private String potionEffect;
private String potionModifier;
private String itemName;
+ // FORGE: To disable repair recipes.
@@ -46,7 +46,7 @@
+ curBlockDamageMP += block.blockStrength(mc.theWorld, mc.thePlayer, i, j, k);
if (stepSoundTickCounter % 4F == 0.0F && block != null)
{
mc.sndManager.playSound(block.stepSound.getStepSound(), (float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, (block.stepSound.getVolume() + 1.0F) / 8F, block.stepSound.getPitch() * 0.5F);
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);
@@ -207,6 +214,16 @@
{
syncCurrentPlayItem();
@@ -44,7 +44,7 @@
+ curBlockDamage += block.blockStrength(mc.theWorld, mc.thePlayer, i, j, k);
if (blockDestroySoundCounter % 4F == 0.0F && block != null)
{
mc.sndManager.playSound(block.stepSound.getStepSound(), (float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, (block.stepSound.getVolume() + 1.0F) / 8F, block.stepSound.getPitch() * 0.5F);
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 +171,14 @@
public boolean onPlayerRightClick(EntityPlayer entityplayer, World world, ItemStack itemstack, int i, int j, int k, int l)
@@ -5,7 +5,7 @@
}
}
- return !(Block.blocksList[i] instanceof BlockContainer);
+ return !(Block.blocksList[i] != null && Block.blocksList[i].hasTileEntity(world.getBlockMetadata(j, k, l)));
+ return !(Block.blocksList[i] != null && Block.blocksList[i].hasTileEntity(world.getBlockMetadata(j, l, l)));
}
private static boolean canExtend(World world, int i, int j, int k, int l)
@@ -50,12 +50,7 @@
}
public void onBlockAdded(World world, int i, int j, int k)
@@ -119,23 +132,23 @@
j1 &= 7;
}
boolean flag = false;
- if (!world.isBlockNormalCube(i, j - 1, k))
+ if (!world.isBlockSolidOnSide(i, j - 1, k, 1))
@@ -123,19 +136,19 @@
{
flag = true;
}
@@ -14,8 +14,8 @@
{
j1--;
}
- if (!isValidSupportBlock(world.getBlockId(j1, j, k1)))
+ if (!(isValidSupportBlock(world.getBlockId(j1, j, k1)) || 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, 0);
@@ -34,8 +34,8 @@
{
i--;
}
- return isValidSupportBlock(world.getBlockId(i, j, k));
+ return isValidSupportBlock(world.getBlockId(i, j, k)) || 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)
@@ -39,11 +39,10 @@
isModified = true;
return true;
}
@@ -391,7 +383,11 @@
blocks[i << worldObj.xShift | k << worldObj.heightShift | j] = (byte)(byte0 & 0xff);
@@ -392,6 +384,11 @@
if (k1 != 0)
{
- Block.blocksList[k1].onBlockRemoval(worldObj, l1, j, i2);
Block.blocksList[k1].onBlockRemoval(worldObj, l1, j, i2);
+ if (!worldObj.isRemote)
+ {
+ Block.blocksList[k1].onBlockRemoval(worldObj, l1, j, i2);
@@ -52,7 +51,7 @@
}
data.setNibble(i, j, k, 0);
if (Block.lightOpacity[byte0 & 0xff] != 0)
@@ -414,28 +410,22 @@
@@ -414,28 +411,22 @@
{
Block.blocksList[l].onBlockAdded(worldObj, l1, j, i2);
}
@@ -85,7 +84,7 @@
isModified = true;
return true;
}
@@ -455,7 +445,7 @@
@@ -455,7 +446,7 @@
}
data.setNibble(i, j, k, l);
int j1 = getBlockID(i, j, k);
@@ -94,7 +93,7 @@
{
TileEntity tileentity = getChunkBlockTileEntity(i, j, k);
if (tileentity != null)
@@ -572,29 +562,27 @@
@@ -572,29 +563,27 @@
{
ChunkPosition chunkposition = new ChunkPosition(i, j, k);
TileEntity tileentity = (TileEntity)chunkTileEntityMap.get(chunkposition);
@@ -133,7 +132,7 @@
}
public void addTileEntity(TileEntity tileentity)
@@ -605,7 +593,7 @@
@@ -605,7 +594,7 @@
setChunkBlockTileEntity(i, j, k, tileentity);
if (isChunkLoaded)
{
@@ -142,7 +141,7 @@
}
}
@@ -616,12 +604,18 @@
@@ -616,12 +605,18 @@
tileentity.xCoord = xPosition * 16 + i;
tileentity.yCoord = j;
tileentity.zCoord = zPosition * 16 + k;
@@ -162,7 +161,7 @@
tileentity.validate();
chunkTileEntityMap.put(chunkposition, tileentity);
return;
@@ -903,4 +897,18 @@
@@ -903,4 +898,18 @@
{
return new ChunkCoordIntPair(xPosition, zPosition);
}
@@ -28,7 +28,7 @@
{
{
{
@@ -76,12 +81,35 @@
@@ -76,13 +81,36 @@
}
}
};
@@ -36,25 +36,27 @@
- private double minecartX;
- private double minecartY;
- private double minecartZ;
- private double minecartYaw;
- private double field_9159_ar;
- private double minecartPitch;
-
+ protected int turnProgress;
+ protected double minecartX;
+ protected double minecartY;
+ protected double minecartZ;
+ protected double minecartYaw;
+ protected double field_9159_ar;
+ protected double minecartPitch;
+
+ /*Forge: Minecart Compatibility Layer Integration. */
+ /*Forge: Minecart Compatibility Layer Integration.
+ */
+ protected double velocityX;
+ protected double velocityY;
+ protected double velocityZ;
+ protected double velocityZ;
+ public static float defaultMaxSpeedRail = 0.4f;
+ public static float defaultMaxSpeedGround = 0.4f;
+ public static float defaultMaxSpeedAirLateral = 0.4f;
+ public static float defaultMaxSpeedAirVertical = -1f;
+ public static double defaultDragAir = 0.94999998807907104D;
+ protected boolean canUseRail = true;
+ protected boolean canUseRail = true;
+ protected boolean canBePushed = true;
+ private static IMinecartCollisionHandler collisionHandler = null;
+
@@ -65,11 +67,11 @@
+ protected float maxSpeedGround;
+ protected float maxSpeedAirLateral;
+ protected float maxSpeedAirVertical;
+ protected double dragAir;
+
+ protected double dragAir;
+
public EntityMinecart(World world)
{
super(world);
@@ -92,6 +120,18 @@
preventEntitySpawning = true;
setSize(0.98F, 0.7F);
@@ -19,18 +19,15 @@
if (itemInUseCount <= 25 && itemInUseCount % 4 == 0)
{
func_35208_b(itemstack, 5);
@@ -274,6 +279,10 @@
@@ -274,6 +279,7 @@
protected void closeScreen()
protected void usePersonalCraftingInventory()
{
+ if (craftingInventory != null)
+ {
+ craftingInventory.onCraftGuiClosed(this);
+ }
craftingInventory = inventorySlots;
+ currentCraftingInventory.onCraftGuiClosed(this);
currentCraftingInventory = personalCraftingInventory;
}
@@ -433,7 +442,16 @@
@@ -433,7 +439,16 @@
public void dropCurrentItem()
{
@@ -48,7 +45,7 @@
}
public void dropPlayerItem(ItemStack itemstack)
@@ -480,6 +498,8 @@
@@ -480,6 +495,8 @@
worldObj.spawnEntityInWorld(entityitem);
}
@@ -57,7 +54,7 @@
public float getCurrentPlayerStrVsBlock(Block block)
{
float f = inventory.getStrVsBlock(block);
@@ -508,6 +528,45 @@
@@ -508,6 +525,45 @@
return f1;
}
@@ -103,12 +100,10 @@
public boolean canHarvestBlock(Block block)
{
return inventory.canHarvestBlock(block);
@@ -711,7 +770,25 @@
{
i = 1 + i >> 1;
}
- i = applyArmorCalculations(damagesource, i);
+
@@ -707,6 +763,26 @@
protected void damageEntity(DamageSource damagesource, int i)
{
+ boolean doRegularComputation = true;
+ int initialDamage = i;
+
@@ -116,21 +111,23 @@
+ {
+ if (stack != null && stack.getItem() instanceof ISpecialArmor)
+ {
+ ISpecialArmor armor = (ISpecialArmor)stack.getItem();
+ ISpecialArmor armor = (ISpecialArmor) stack.getItem();
+ ArmorProperties props = armor.getProperties(this, initialDamage, i);
+ i = i - props.damageRemove;
+ doRegularComputation = doRegularComputation && props.allowRegularComputation;
+ }
+ }
+
+ if (doRegularComputation)
+ if (!doRegularComputation)
+ {
+ i = applyArmorCalculations(damagesource, i);
+ super.damageEntity(damagesource, i);
+ return;
+ }
i = applyPotionDamageCalculations(damagesource, i);
addExhaustion(damagesource.getHungerDamage());
health -= i;
@@ -758,7 +835,9 @@
+
if (!damagesource.isUnblockable() && isBlocking())
{
i = 1 + i >> 1;
@@ -758,7 +834,9 @@
public void destroyCurrentEquippedItem()
{
@@ -140,7 +137,7 @@
}
public double getYOffset()
@@ -884,6 +963,11 @@
@@ -884,6 +962,11 @@
public EnumStatus sleepInBedAt(int i, int j, int k)
{
@@ -6,45 +6,45 @@
getNextWidowId();
+ closeCraftingGui();
playerNetServerHandler.sendPacket(new Packet100OpenWindow(currentWindowId, 1, "Crafting", 9));
craftingInventory = new ContainerWorkbench(inventory, worldObj, i, j, k);
craftingInventory.windowId = currentWindowId;
currentCraftingInventory = new ContainerWorkbench(inventory, worldObj, i, j, k);
currentCraftingInventory.windowId = currentWindowId;
@@ -414,6 +415,7 @@
public void displayGUIEnchantment(int i, int j, int k)
{
getNextWidowId();
+ closeCraftingGui();
playerNetServerHandler.sendPacket(new Packet100OpenWindow(currentWindowId, 4, "Enchanting", 9));
craftingInventory = new ContainerEnchantment(inventory, worldObj, i, j, k);
craftingInventory.windowId = currentWindowId;
currentCraftingInventory = new ContainerEnchantment(inventory, worldObj, i, j, k);
currentCraftingInventory.windowId = currentWindowId;
@@ -423,6 +425,7 @@
public void displayGUIChest(IInventory iinventory)
{
getNextWidowId();
+ closeCraftingGui();
playerNetServerHandler.sendPacket(new Packet100OpenWindow(currentWindowId, 0, iinventory.getInvName(), iinventory.getSizeInventory()));
craftingInventory = new ContainerChest(inventory, iinventory);
craftingInventory.windowId = currentWindowId;
currentCraftingInventory = new ContainerChest(inventory, iinventory);
currentCraftingInventory.windowId = currentWindowId;
@@ -432,6 +435,7 @@
public void displayGUIFurnace(TileEntityFurnace tileentityfurnace)
{
getNextWidowId();
+ closeCraftingGui();
playerNetServerHandler.sendPacket(new Packet100OpenWindow(currentWindowId, 2, tileentityfurnace.getInvName(), tileentityfurnace.getSizeInventory()));
craftingInventory = new ContainerFurnace(inventory, tileentityfurnace);
craftingInventory.windowId = currentWindowId;
currentCraftingInventory = new ContainerFurnace(inventory, tileentityfurnace);
currentCraftingInventory.windowId = currentWindowId;
@@ -441,6 +445,7 @@
public void displayGUIDispenser(TileEntityDispenser tileentitydispenser)
{
getNextWidowId();
+ closeCraftingGui();
playerNetServerHandler.sendPacket(new Packet100OpenWindow(currentWindowId, 3, tileentitydispenser.getInvName(), tileentitydispenser.getSizeInventory()));
craftingInventory = new ContainerDispenser(inventory, tileentitydispenser);
craftingInventory.windowId = currentWindowId;
currentCraftingInventory = new ContainerDispenser(inventory, tileentitydispenser);
currentCraftingInventory.windowId = currentWindowId;
@@ -450,6 +455,7 @@
public void displayGUIBrewingStand(TileEntityBrewingStand tileentitybrewingstand)
{
getNextWidowId();
+ closeCraftingGui();
playerNetServerHandler.sendPacket(new Packet100OpenWindow(currentWindowId, 5, tileentitybrewingstand.getInvName(), tileentitybrewingstand.getSizeInventory()));
craftingInventory = new ContainerBrewingStand(inventory, tileentitybrewingstand);
craftingInventory.windowId = currentWindowId;
currentCraftingInventory = new ContainerBrewingStand(inventory, tileentitybrewingstand);
currentCraftingInventory.windowId = currentWindowId;
@@ -9,7 +9,7 @@
public class Item
@@ -156,6 +157,9 @@
private String potionEffect;
private String potionInfo;
private String itemName;
+ // FORGE: To disable repair recipes.
@@ -7,7 +7,7 @@
+
public class ItemInWorldManager
{
+ private double blockReachDistance = 5.0d;
+ private double blockReachDistance;
public World thisWorld;
public EntityPlayer thisPlayer;
private int gameType;
@@ -1,10 +1,10 @@
--- ../src_base/minecraft_server/net/minecraft/src/ModLoader.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft_server/net/minecraft/src/ModLoader.java 0000-00-00 00:00:00.000000000 -0000
@@ -1325,6 +1325,7 @@
@@ -1317,6 +1317,7 @@
{
method_getNextWindowId.invoke(entityplayermp, new Object[0]);
int j = field_currentWindowId.getInt(entityplayermp);
+ entityplayermp.closeCraftingGui();
entityplayermp.playerNetServerHandler.sendPacket(new Packet100OpenWindow(j, i, iinventory.getInvName(), iinventory.getSizeInventory()));
entityplayermp.craftingInventory = container;
entityplayermp.craftingInventory.windowId = j;
entityplayermp.currentCraftingInventory = container;
entityplayermp.currentCraftingInventory.windowId = j;
@@ -178,7 +178,7 @@
@@ -3028,4 +3029,38 @@
{
return getChunkProvider().findClosestStructure(this, s, i, j, k);
return getChunkProvider().func_40182_a(this, s, i, j, k);
}
+
+ /**
+6 -6
View File
@@ -1,13 +1,13 @@
@cmd /C build.bat
cmd /C build.bat
@cd ..
cd ..
@echo | cmd /C reobfuscate.bat
cmd /C reobfuscate.bat
@set PATH=E:\cygwin\bin;%PATH%
set PATH=E:\cygwin\bin;%PATH%
@cd forge
cd forge
@sh package.sh
sh package.sh 1.3.1
pause
+2 -2
View File
@@ -5,7 +5,7 @@ pushd .. >nul
rmdir /S /Q src_base
rmdir /S /Q src_work
@echo | cmd /C decompile.bat
cmd /C decompile.bat
pushd src >nul
del minecraft\net\minecraft\src\MLProp.java
@@ -17,7 +17,7 @@ pushd .. >nul
del ..\forge\modLoaderMP-win.patch
popd >nul
@echo | cmd /C updatemd5.bat
cmd /C updatemd5.bat
mkdir src_base
mkdir src_work
-1
View File
@@ -1 +0,0 @@
1 3 2 0