mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Update for 1.4_00_01 -- if you bypassed Bukkit, you will most likely break.
This commit is contained in:
@@ -9,11 +9,11 @@ import org.bukkit.event.block.BlockPlaceEvent;
|
||||
|
||||
public class ItemSeeds extends Item {
|
||||
|
||||
private int a;
|
||||
private int id;
|
||||
|
||||
public ItemSeeds(int i, int j) {
|
||||
super(i);
|
||||
this.a = j;
|
||||
this.id = j;
|
||||
}
|
||||
|
||||
public boolean a(ItemStack itemstack, EntityHuman entityhuman, World world, int i, int j, int k, int l) {
|
||||
@@ -23,12 +23,12 @@ public class ItemSeeds extends Item {
|
||||
int i1 = world.getTypeId(i, j, k);
|
||||
|
||||
if (i1 == Block.SOIL.id && world.isEmpty(i, j + 1, k)) {
|
||||
BlockState blockState = CraftBlockState.getBlockState( world, i, j + 1, k); // CraftBukkit
|
||||
BlockState blockState = CraftBlockState.getBlockState(world, i, j + 1, k); // CraftBukkit
|
||||
|
||||
world.e(i, j + 1, k, this.a);
|
||||
world.setTypeId(i, j + 1, k, this.id);
|
||||
|
||||
// CraftBukkit start - seeds
|
||||
BlockPlaceEvent event = CraftEventFactory.callBlockPlaceEvent(world, entityhuman, blockState, i, j, k, this.a);
|
||||
BlockPlaceEvent event = CraftEventFactory.callBlockPlaceEvent(world, entityhuman, blockState, i, j, k, this.id);
|
||||
if (event.isCancelled() || !event.canBuild()) {
|
||||
event.getBlockPlaced().setTypeId(0);
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user