mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 12:20:11 +00:00
50 lines
1.8 KiB
Diff
50 lines
1.8 KiB
Diff
--- ../src_base/minecraft/net/minecraft/src/BlockCrops.java 0000-00-00 00:00:00.000000000 -0000
|
|
+++ ../src_work/minecraft/net/minecraft/src/BlockCrops.java 0000-00-00 00:00:00.000000000 -0000
|
|
@@ -5,6 +5,7 @@
|
|
package net.minecraft.src;
|
|
|
|
import java.util.Random;
|
|
+import java.util.ArrayList;
|
|
|
|
// Referenced classes of package net.minecraft.src:
|
|
// BlockFlower, Block, World, EntityItem,
|
|
@@ -108,28 +109,22 @@
|
|
return 6;
|
|
}
|
|
|
|
- public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f, int i1)
|
|
- {
|
|
- super.dropBlockAsItemWithChance(world, i, j, k, l, f, 0);
|
|
- if(world.multiplayerWorld)
|
|
+ @Override
|
|
+ public ArrayList<ItemStack> getBlockDropped(World world, int i, int j, int k, int md, int fortune) {
|
|
+ ArrayList<ItemStack> tr = new ArrayList<ItemStack>();
|
|
+ if (md == 7)
|
|
{
|
|
- return;
|
|
+ tr.add(new ItemStack(Item.wheat));
|
|
}
|
|
- int j1 = 3 + i1;
|
|
- for(int k1 = 0; k1 < j1; k1++)
|
|
+
|
|
+ for(int n = 0; n < 3+fortune; n++)
|
|
{
|
|
- if(world.rand.nextInt(15) <= l)
|
|
+ if (world.rand.nextInt(15) <= md)
|
|
{
|
|
- float f1 = 0.7F;
|
|
- float f2 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
|
|
- float f3 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
|
|
- float f4 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
|
|
- EntityItem entityitem = new EntityItem(world, (float)i + f2, (float)j + f3, (float)k + f4, new ItemStack(Item.seeds));
|
|
- entityitem.delayBeforeCanPickup = 10;
|
|
- world.spawnEntityInWorld(entityitem);
|
|
+ tr.add(new ItemStack(Item.seeds));
|
|
}
|
|
}
|
|
-
|
|
+ return tr;
|
|
}
|
|
|
|
public int idDropped(int i, Random random, int j)
|