Compare commits

...
8 Commits
Author SHA1 Message Date
Space Toad 9ca1255fc4 tagged 1.3.2 2012-01-29 13:28:11 +00:00
Space Toad e3b3920661 bumbed version number 2012-01-29 13:27:26 +00:00
LexManos 61dc035977 Potions are not armor. 2012-01-28 07:34:39 +00:00
LexManos 7a6193e8f5 Reorganized SpecialArmor code to work properly. 2012-01-28 07:09:55 +00:00
LexManos 92b2a3666e Some typo fixes 2012-01-28 06:16:58 +00:00
LexManos c6121b5676 Updated for MCP Mappings 2012-01-25 13:08:09 +00:00
LexManos 08195cfc03 Streamlined the Setup, Build and Package scripts:
On windows they no longer need the user to press enter every step
Moved version info out to version.txt, This will only effect the svn. If you update the version do it in version.txt not in ForgeHooks.java.
Introduced the build number into the version string.
Cleaned up some extra echos in scripts.
2012-01-25 07:00:31 +00:00
LexManos fa564fb3c5 Reach and Rail bugfix 2012-01-23 20:44:10 +00:00
30 changed files with 612 additions and 556 deletions

No files matched your search

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