diff --git a/forge/patches/minecraft/net/minecraft/src/EffectRenderer.java.patch b/forge/patches/minecraft/net/minecraft/src/EffectRenderer.java.patch index d02350e5e..39852bbad 100644 --- a/forge/patches/minecraft/net/minecraft/src/EffectRenderer.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/EffectRenderer.java.patch @@ -100,45 +100,45 @@ { 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).func_407_b(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)); -+ dig_effect.func_4041_a(i, j, k); -+ dig_effect.func_407_b(0.2F); -+ dig_effect.func_405_d(0.6F); -+ addDigParticleEffect(dig_effect, block); +- 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)); ++ dig_effect.func_4041_a(i, j, k); ++ dig_effect.multiplyVelocity(0.2F); ++ dig_effect.func_405_d(0.6F); ++ addDigParticleEffect(dig_effect, block); } public String getStatistics() { return (new StringBuilder()).append("").append(fxLayers[0].size() + fxLayers[1].size() + fxLayers[2].size()).toString(); } -+ ++ + public void addDigParticleEffect(EntityDiggingFX dig_effect, Block block) { -+ boolean added = false; -+ String comp; -+ -+ if (block instanceof ITextureProvider) { -+ comp = ((ITextureProvider) block).getTextureFile(); -+ } else { -+ comp = "/terrain.png"; -+ } -+ for (int x = 0; x < effectList.size(); x++) { -+ BlockTextureParticles entry = (BlockTextureParticles) effectList -+ .get(x); -+ if (entry.texture.equals(comp)) { -+ entry.effects.add(dig_effect); -+ added = true; -+ } -+ } -+ if (!added) { -+ BlockTextureParticles entry = new BlockTextureParticles(); -+ entry.texture = comp; -+ entry.effects.add(dig_effect); -+ effectList.add(entry); -+ } -+ addEffect(dig_effect); -+ } ++ boolean added = false; ++ String comp; ++ ++ if (block instanceof ITextureProvider) { ++ comp = ((ITextureProvider) block).getTextureFile(); ++ } else { ++ comp = "/terrain.png"; ++ } ++ for (int x = 0; x < effectList.size(); x++) { ++ BlockTextureParticles entry = (BlockTextureParticles) effectList ++ .get(x); ++ if (entry.texture.equals(comp)) { ++ entry.effects.add(dig_effect); ++ added = true; ++ } ++ } ++ if (!added) { ++ BlockTextureParticles entry = new BlockTextureParticles(); ++ entry.texture = comp; ++ entry.effects.add(dig_effect); ++ effectList.add(entry); ++ } ++ addEffect(dig_effect); ++ } protected World worldObj; private List fxLayers[]; diff --git a/forge/patches/minecraft/net/minecraft/src/ItemBlock.java.patch b/forge/patches/minecraft/net/minecraft/src/ItemBlock.java.patch deleted file mode 100644 index f9cf25b4d..000000000 --- a/forge/patches/minecraft/net/minecraft/src/ItemBlock.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src_base/minecraft/net/minecraft/src/ItemBlock.java 0000-00-00 00:00:00.000000000 -0000 -+++ ../src_work/minecraft/net/minecraft/src/ItemBlock.java 0000-00-00 00:00:00.000000000 -0000 -@@ -62,7 +62,7 @@ - { - return false; - } -- if(!entityplayer.func_35190_e(i, j, k)) -+ if(entityplayer!=null && !entityplayer.func_35190_e(i, j, k)) - { - return false; - } diff --git a/forge/patches/minecraft/net/minecraft/src/ItemFlintAndSteel.java.patch b/forge/patches/minecraft/net/minecraft/src/ItemFlintAndSteel.java.patch deleted file mode 100644 index 41c66ac63..000000000 --- a/forge/patches/minecraft/net/minecraft/src/ItemFlintAndSteel.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src_base/minecraft/net/minecraft/src/ItemFlintAndSteel.java 0000-00-00 00:00:00.000000000 -0000 -+++ ../src_work/minecraft/net/minecraft/src/ItemFlintAndSteel.java 0000-00-00 00:00:00.000000000 -0000 -@@ -46,7 +46,7 @@ - { - i++; - } -- if(!entityplayer.func_35190_e(i, j, k)) -+ if(entityplayer!=null && !entityplayer.func_35190_e(i, j, k)) - { - return false; - } diff --git a/forge/patches/minecraft/net/minecraft/src/ItemHoe.java.patch b/forge/patches/minecraft/net/minecraft/src/ItemHoe.java.patch deleted file mode 100644 index a82f7de40..000000000 --- a/forge/patches/minecraft/net/minecraft/src/ItemHoe.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src_base/minecraft/net/minecraft/src/ItemHoe.java 0000-00-00 00:00:00.000000000 -0000 -+++ ../src_work/minecraft/net/minecraft/src/ItemHoe.java 0000-00-00 00:00:00.000000000 -0000 -@@ -21,7 +21,7 @@ - - public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int l) - { -- if(!entityplayer.func_35190_e(i, j, k)) -+ if(entityplayer!=null && !entityplayer.func_35190_e(i, j, k)) - { - return false; - } diff --git a/forge/patches/minecraft/net/minecraft/src/ItemRedstone.java.patch b/forge/patches/minecraft/net/minecraft/src/ItemRedstone.java.patch deleted file mode 100644 index d22e6a1b4..000000000 --- a/forge/patches/minecraft/net/minecraft/src/ItemRedstone.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src_base/minecraft/net/minecraft/src/ItemRedstone.java 0000-00-00 00:00:00.000000000 -0000 -+++ ../src_work/minecraft/net/minecraft/src/ItemRedstone.java 0000-00-00 00:00:00.000000000 -0000 -@@ -50,7 +50,7 @@ - return false; - } - } -- if(!entityplayer.func_35190_e(i, j, k)) -+ if(entityplayer!=null && !entityplayer.func_35190_e(i, j, k)) - { - return false; - } diff --git a/forge/patches/minecraft/net/minecraft/src/ItemReed.java.patch b/forge/patches/minecraft/net/minecraft/src/ItemReed.java.patch deleted file mode 100644 index 15778ccf7..000000000 --- a/forge/patches/minecraft/net/minecraft/src/ItemReed.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src_base/minecraft/net/minecraft/src/ItemReed.java 0000-00-00 00:00:00.000000000 -0000 -+++ ../src_work/minecraft/net/minecraft/src/ItemReed.java 0000-00-00 00:00:00.000000000 -0000 -@@ -52,7 +52,7 @@ - i++; - } - } -- if(!entityplayer.func_35190_e(i, j, k)) -+ if(entityplayer!=null && !entityplayer.func_35190_e(i, j, k)) - { - return false; - } diff --git a/forge/patches/minecraft/net/minecraft/src/ItemSeeds.java.patch b/forge/patches/minecraft/net/minecraft/src/ItemSeeds.java.patch deleted file mode 100644 index 9e754e858..000000000 --- a/forge/patches/minecraft/net/minecraft/src/ItemSeeds.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src_base/minecraft/net/minecraft/src/ItemSeeds.java 0000-00-00 00:00:00.000000000 -0000 -+++ ../src_work/minecraft/net/minecraft/src/ItemSeeds.java 0000-00-00 00:00:00.000000000 -0000 -@@ -24,7 +24,7 @@ - { - return false; - } -- if(!entityplayer.func_35190_e(i, j, k) || !entityplayer.func_35190_e(i, j + 1, k)) -+ if(entityplayer!=null && (!entityplayer.func_35190_e(i, j, k) || !entityplayer.func_35190_e(i, j + 1, k))) - { - return false; - } diff --git a/forge/patches/minecraft_server/net/minecraft/src/ItemBlock.java.patch b/forge/patches/minecraft_server/net/minecraft/src/ItemBlock.java.patch deleted file mode 100644 index 794422dc0..000000000 --- a/forge/patches/minecraft_server/net/minecraft/src/ItemBlock.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src_base/minecraft_server/net/minecraft/src/ItemBlock.java 0000-00-00 00:00:00.000000000 -0000 -+++ ../src_work/minecraft_server/net/minecraft/src/ItemBlock.java 0000-00-00 00:00:00.000000000 -0000 -@@ -62,7 +62,7 @@ - { - return false; - } -- if(!entityplayer.func_35200_c(i, j, k)) -+ if(entityplayer!=null && !entityplayer.func_35200_c(i, j, k)) - { - return false; - } diff --git a/forge/patches/minecraft_server/net/minecraft/src/ItemFlintAndSteel.java.patch b/forge/patches/minecraft_server/net/minecraft/src/ItemFlintAndSteel.java.patch deleted file mode 100644 index 167cde231..000000000 --- a/forge/patches/minecraft_server/net/minecraft/src/ItemFlintAndSteel.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src_base/minecraft_server/net/minecraft/src/ItemFlintAndSteel.java 0000-00-00 00:00:00.000000000 -0000 -+++ ../src_work/minecraft_server/net/minecraft/src/ItemFlintAndSteel.java 0000-00-00 00:00:00.000000000 -0000 -@@ -46,7 +46,7 @@ - { - i++; - } -- if(!entityplayer.func_35200_c(i, j, k)) -+ if(entityplayer!=null && !entityplayer.func_35200_c(i, j, k)) - { - return false; - } diff --git a/forge/patches/minecraft_server/net/minecraft/src/ItemHoe.java.patch b/forge/patches/minecraft_server/net/minecraft/src/ItemHoe.java.patch deleted file mode 100644 index 4596ad1a1..000000000 --- a/forge/patches/minecraft_server/net/minecraft/src/ItemHoe.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src_base/minecraft_server/net/minecraft/src/ItemHoe.java 0000-00-00 00:00:00.000000000 -0000 -+++ ../src_work/minecraft_server/net/minecraft/src/ItemHoe.java 0000-00-00 00:00:00.000000000 -0000 -@@ -21,7 +21,7 @@ - - public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int l) - { -- if(!entityplayer.func_35200_c(i, j, k)) -+ if(entityplayer!=null && !entityplayer.func_35200_c(i, j, k)) - { - return false; - } diff --git a/forge/patches/minecraft_server/net/minecraft/src/ItemRedstone.java.patch b/forge/patches/minecraft_server/net/minecraft/src/ItemRedstone.java.patch deleted file mode 100644 index c7e7bd08e..000000000 --- a/forge/patches/minecraft_server/net/minecraft/src/ItemRedstone.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src_base/minecraft_server/net/minecraft/src/ItemRedstone.java 0000-00-00 00:00:00.000000000 -0000 -+++ ../src_work/minecraft_server/net/minecraft/src/ItemRedstone.java 0000-00-00 00:00:00.000000000 -0000 -@@ -50,7 +50,7 @@ - return false; - } - } -- if(!entityplayer.func_35200_c(i, j, k)) -+ if(entityplayer!=null && !entityplayer.func_35200_c(i, j, k)) - { - return false; - } diff --git a/forge/patches/minecraft_server/net/minecraft/src/ItemReed.java.patch b/forge/patches/minecraft_server/net/minecraft/src/ItemReed.java.patch deleted file mode 100644 index ad19a4c59..000000000 --- a/forge/patches/minecraft_server/net/minecraft/src/ItemReed.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src_base/minecraft_server/net/minecraft/src/ItemReed.java 0000-00-00 00:00:00.000000000 -0000 -+++ ../src_work/minecraft_server/net/minecraft/src/ItemReed.java 0000-00-00 00:00:00.000000000 -0000 -@@ -52,7 +52,7 @@ - i++; - } - } -- if(!entityplayer.func_35200_c(i, j, k)) -+ if(entityplayer!=null && !entityplayer.func_35200_c(i, j, k)) - { - return false; - } diff --git a/forge/patches/minecraft_server/net/minecraft/src/ItemSeeds.java.patch b/forge/patches/minecraft_server/net/minecraft/src/ItemSeeds.java.patch deleted file mode 100644 index e5170c75a..000000000 --- a/forge/patches/minecraft_server/net/minecraft/src/ItemSeeds.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../src_base/minecraft_server/net/minecraft/src/ItemSeeds.java 0000-00-00 00:00:00.000000000 -0000 -+++ ../src_work/minecraft_server/net/minecraft/src/ItemSeeds.java 0000-00-00 00:00:00.000000000 -0000 -@@ -24,7 +24,7 @@ - { - return false; - } -- if(!entityplayer.func_35200_c(i, j, k) || !entityplayer.func_35200_c(i, j + 1, k)) -+ if(entityplayer!=null && (!entityplayer.func_35200_c(i, j, k) || !entityplayer.func_35200_c(i, j + 1, k))) - { - return false; - }