mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 01:39:52 +03:00
19 lines
1019 B
Diff
19 lines
1019 B
Diff
--- ../src-base/minecraft/net/minecraft/item/ItemFlintAndSteel.java
|
|
+++ ../src-work/minecraft/net/minecraft/item/ItemFlintAndSteel.java
|
|
@@ -34,8 +34,14 @@
|
|
}
|
|
else
|
|
{
|
|
- if (worldIn.getBlockState(pos).getMaterial() == Material.AIR)
|
|
+ if (worldIn.isAirBlock(pos))
|
|
{
|
|
+ // CraftBukkit start - Store the clicked block
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(worldIn, pos.getX(), pos.getY(), pos.getZ(), org.bukkit.event.block.BlockIgniteEvent.IgniteCause.FLINT_AND_STEEL, player).isCancelled()) {
|
|
+ itemstack.damageItem(1, player);
|
|
+ return EnumActionResult.PASS;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
worldIn.playSound(player, pos, SoundEvents.ITEM_FLINTANDSTEEL_USE, SoundCategory.BLOCKS, 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
|
|
worldIn.setBlockState(pos, Blocks.FIRE.getDefaultState(), 11);
|
|
}
|