mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-20 07:57:34 +01:00
cab333b217
Don't send requests of every player was found in the global api cache SpigotMC/Spigot@841270ff1e Correctly set the response code for the cached lookups and return the ... SpigotMC/Spigot@f170b7899c Don't try and re-set the global api cache on reload SpigotMC/Spigot@b410a00a66 Use a compile time sneaky throw hack. SpigotMC/Spigot@508462b96b Fix a missed rename in WorldGenGroundBush SpigotMC/Spigot@0614d8fae9
36 lines
1.6 KiB
Diff
36 lines
1.6 KiB
Diff
From 4ba768774a4de3edd890f0f358adf4c513d559a7 Mon Sep 17 00:00:00 2001
|
|
From: BlackHole <black-hole@live.com>
|
|
Date: Tue, 16 Jul 2013 22:34:50 +0200
|
|
Subject: [PATCH] Call EntityChangeBlockEvent for Fire Arrows hitting TNT
|
|
|
|
Adds BUKKIT-4355
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java
|
|
index 8cc7d5e..35bf1a3 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockTNT.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
|
|
@@ -54,7 +54,7 @@ public class BlockTNT extends Block {
|
|
|
|
public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman, int l, float f, float f1, float f2) {
|
|
if (entityhuman.bF() != null && entityhuman.bF().getItem() == Items.FLINT_AND_STEEL) {
|
|
- this.a(world, i, j, k, 1, entityhuman);
|
|
+ this.a(world, i, j, k, 1, (EntityLiving) entityhuman); // Spigot - Fix decompile error!
|
|
world.setAir(i, j, k);
|
|
entityhuman.bF().damage(1, entityhuman);
|
|
return true;
|
|
@@ -68,6 +68,11 @@ public class BlockTNT extends Block {
|
|
EntityArrow entityarrow = (EntityArrow) entity;
|
|
|
|
if (entityarrow.isBurning()) {
|
|
+ // CraftBukkit start
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entityarrow, i, j, k, Blocks.AIR, 0).isCancelled()) {
|
|
+ return;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
this.a(world, i, j, k, 1, entityarrow.shooter instanceof EntityLiving ? (EntityLiving) entityarrow.shooter : null);
|
|
world.setAir(i, j, k);
|
|
}
|
|
--
|
|
1.9.1
|
|
|