Cleaned up patches to BlockOre and BlockRedstoneOre

Fixed trailing whitespace (it bugs me too)
This commit is contained in:
OniBait 2013-10-10 17:15:38 -05:00
parent e47a6402e1
commit 79e0165362
3 changed files with 23 additions and 50 deletions

View file

@ -28,7 +28,7 @@ public class FakePlayerFactory
FakePlayer fakePlayer = new FakePlayer(world, username);
fakePlayers.put(username, fakePlayer);
}
return fakePlayers.get(username);
}
}

View file

@ -1,50 +1,27 @@
--- ../src_base/minecraft/net/minecraft/block/BlockOre.java
+++ ../src_work/minecraft/net/minecraft/block/BlockOre.java
@@ -59,34 +59,36 @@
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
@@ -60,6 +60,11 @@
{
super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7);
-
- if (this.idDropped(par5, par1World.rand, par7) != this.blockID)
+ }
+
+ @Override
+ public int getExpDrop(World world, int data, int enchantmentLevel)
+ public int getExpDrop(World par1World, int par5, int par7)
+ {
+ int j1 = 0;
+ if (this.idDropped(data, world.rand, enchantmentLevel) != this.blockID)
if (this.idDropped(par5, par1World.rand, par7) != this.blockID)
{
- int j1 = 0;
-
if (this.blockID == Block.oreCoal.blockID)
int j1 = 0;
@@ -84,9 +89,10 @@
{
- j1 = MathHelper.getRandomIntegerInRange(par1World.rand, 0, 2);
+ j1 = MathHelper.getRandomIntegerInRange(world.rand, 0, 2);
j1 = MathHelper.getRandomIntegerInRange(par1World.rand, 2, 5);
}
else if (this.blockID == Block.oreDiamond.blockID)
{
- j1 = MathHelper.getRandomIntegerInRange(par1World.rand, 3, 7);
+ j1 = MathHelper.getRandomIntegerInRange(world.rand, 3, 7);
}
else if (this.blockID == Block.oreEmerald.blockID)
{
- j1 = MathHelper.getRandomIntegerInRange(par1World.rand, 3, 7);
+ j1 = MathHelper.getRandomIntegerInRange(world.rand, 3, 7);
}
else if (this.blockID == Block.oreLapis.blockID)
{
- j1 = MathHelper.getRandomIntegerInRange(par1World.rand, 2, 5);
+ j1 = MathHelper.getRandomIntegerInRange(world.rand, 2, 5);
}
else if (this.blockID == Block.oreNetherQuartz.blockID)
{
- j1 = MathHelper.getRandomIntegerInRange(par1World.rand, 2, 5);
+ j1 = MathHelper.getRandomIntegerInRange(world.rand, 2, 5);
}
-
+ return j1;
+ }
- this.dropXpOnBlockBreak(par1World, par2, par3, par4, j1);
}
+ return j1;
- }
+ return 0;
}
/**

View file

@ -1,26 +1,22 @@
--- ../src_base/minecraft/net/minecraft/block/BlockRedstoneOre.java
+++ ../src_work/minecraft/net/minecraft/block/BlockRedstoneOre.java
@@ -115,12 +115,17 @@
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
@@ -116,11 +116,17 @@
{
super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7);
-
- if (this.idDropped(par5, par1World.rand, par7) != this.blockID)
- {
- int j1 = 1 + par1World.rand.nextInt(5);
- this.dropXpOnBlockBreak(par1World, par2, par3, par4, j1);
- }
+ }
+
+ @Override
+ public int getExpDrop(World world, int data, int enchantmentLevel)
+ public int getExpDrop(World par1World, int par5, int par7)
+ {
+ int j1 = 0;
+ if (this.idDropped(data, world.rand, enchantmentLevel) != this.blockID)
+ {
+ j1 = 1 + world.rand.nextInt(5);
if (this.idDropped(par5, par1World.rand, par7) != this.blockID)
{
int j1 = 1 + par1World.rand.nextInt(5);
- this.dropXpOnBlockBreak(par1World, par2, par3, par4, j1);
- }
+ return j1;
+ }
+ return j1;
+ return 0;
}
@SideOnly(Side.CLIENT)