Cleaned up patches to BlockOre and BlockRedstoneOre
Fixed trailing whitespace (it bugs me too)
This commit is contained in:
parent
e47a6402e1
commit
79e0165362
3 changed files with 23 additions and 50 deletions
|
@ -1,50 +1,27 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/block/BlockOre.java
|
--- ../src_base/minecraft/net/minecraft/block/BlockOre.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/block/BlockOre.java
|
+++ ../src_work/minecraft/net/minecraft/block/BlockOre.java
|
||||||
@@ -59,34 +59,36 @@
|
@@ -60,6 +60,11 @@
|
||||||
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
|
|
||||||
{
|
{
|
||||||
super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7);
|
super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7);
|
||||||
-
|
|
||||||
- if (this.idDropped(par5, par1World.rand, par7) != this.blockID)
|
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @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(par5, par1World.rand, par7) != this.blockID)
|
||||||
+ if (this.idDropped(data, world.rand, enchantmentLevel) != this.blockID)
|
|
||||||
{
|
{
|
||||||
- int j1 = 0;
|
int j1 = 0;
|
||||||
-
|
@@ -84,9 +89,10 @@
|
||||||
if (this.blockID == Block.oreCoal.blockID)
|
|
||||||
{
|
{
|
||||||
- j1 = MathHelper.getRandomIntegerInRange(par1World.rand, 0, 2);
|
j1 = MathHelper.getRandomIntegerInRange(par1World.rand, 2, 5);
|
||||||
+ j1 = MathHelper.getRandomIntegerInRange(world.rand, 0, 2);
|
|
||||||
}
|
}
|
||||||
else if (this.blockID == Block.oreDiamond.blockID)
|
+ return j1;
|
||||||
{
|
+ }
|
||||||
- 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);
|
|
||||||
}
|
|
||||||
-
|
|
||||||
- this.dropXpOnBlockBreak(par1World, par2, par3, par4, j1);
|
- this.dropXpOnBlockBreak(par1World, par2, par3, par4, j1);
|
||||||
}
|
- }
|
||||||
+ return j1;
|
+ return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,26 +1,22 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/block/BlockRedstoneOre.java
|
--- ../src_base/minecraft/net/minecraft/block/BlockRedstoneOre.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/block/BlockRedstoneOre.java
|
+++ ../src_work/minecraft/net/minecraft/block/BlockRedstoneOre.java
|
||||||
@@ -115,12 +115,17 @@
|
@@ -116,11 +116,17 @@
|
||||||
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
|
|
||||||
{
|
{
|
||||||
super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7);
|
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
|
+ @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(par5, par1World.rand, par7) != this.blockID)
|
||||||
+ if (this.idDropped(data, world.rand, enchantmentLevel) != this.blockID)
|
{
|
||||||
+ {
|
int j1 = 1 + par1World.rand.nextInt(5);
|
||||||
+ j1 = 1 + world.rand.nextInt(5);
|
- this.dropXpOnBlockBreak(par1World, par2, par3, par4, j1);
|
||||||
|
- }
|
||||||
|
+ return j1;
|
||||||
+ }
|
+ }
|
||||||
+ return j1;
|
+ return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|
Loading…
Reference in a new issue