mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 04:05:50 -07:00
Update for 1.4_00_01 -- if you bypassed Bukkit, you will most likely break.
This commit is contained in:
@@ -24,13 +24,13 @@ public class ItemHoe extends Item {
|
||||
} else {
|
||||
Block block = Block.SOIL;
|
||||
|
||||
world.a((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), block.stepSound.c(), (block.stepSound.a() + 1.0F) / 2.0F, block.stepSound.b() * 0.8F);
|
||||
world.makeSound((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), block.stepSound.getName(), (block.stepSound.getVolume1() + 1.0F) / 2.0F, block.stepSound.getVolume2() * 0.8F);
|
||||
if (world.isStatic) {
|
||||
return true;
|
||||
} else {
|
||||
BlockState blockState = CraftBlockState.getBlockState(world, i, j, k); // CraftBukkit
|
||||
|
||||
world.e(i, j, k, block.id);
|
||||
world.setTypeId(i, j, k, block.id);
|
||||
|
||||
// CraftBukkit start - Hoes - blockface -1 for 'SELF'
|
||||
BlockPlaceEvent event = CraftEventFactory.callBlockPlaceEvent(world, entityhuman, blockState, i, j, k, block);
|
||||
@@ -40,19 +40,19 @@ public class ItemHoe extends Item {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
itemstack.a(1, entityhuman);
|
||||
if (world.k.nextInt(8) == 0 && i1 == Block.GRASS.id) {
|
||||
itemstack.damage(1, entityhuman);
|
||||
if (world.random.nextInt(8) == 0 && i1 == Block.GRASS.id) {
|
||||
byte b0 = 1;
|
||||
|
||||
for (int j1 = 0; j1 < b0; ++j1) {
|
||||
float f = 0.7F;
|
||||
float f1 = world.k.nextFloat() * f + (1.0F - f) * 0.5F;
|
||||
float f1 = world.random.nextFloat() * f + (1.0F - f) * 0.5F;
|
||||
float f2 = 1.2F;
|
||||
float f3 = world.k.nextFloat() * f + (1.0F - f) * 0.5F;
|
||||
float f3 = world.random.nextFloat() * f + (1.0F - f) * 0.5F;
|
||||
EntityItem entityitem = new EntityItem(world, (double) ((float) i + f1), (double) ((float) j + f2), (double) ((float) k + f3), new ItemStack(Item.SEEDS));
|
||||
|
||||
entityitem.c = 10;
|
||||
world.a((Entity) entityitem);
|
||||
entityitem.pickupDelay = 10;
|
||||
world.addEntity(entityitem);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user