Updated MCP mapping, backed out a useless patch.

This commit is contained in:
Eloraam 2011-10-31 19:24:45 +00:00
parent 384da1b222
commit 8acaaa0e53
13 changed files with 32 additions and 164 deletions

View file

@ -100,13 +100,13 @@
{
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()
@ -115,30 +115,30 @@
}
+
+ public void addDigParticleEffect(EntityDiggingFX dig_effect, Block block) {
+ boolean added = false;
+ String comp;
+ 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);
+ }
+ 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[];

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}