diff options
author | md_5 <git@md-5.net> | 2016-06-30 15:39:58 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-06-30 15:39:58 +1000 |
commit | 121dfc098a882c8fb157e8232001ce19c9846ccf (patch) | |
tree | b0db941adc0269b556164459ec89a650a664d65d /nms-patches/ItemStack.patch | |
parent | 6b843d995ffa4b1d5e50124bb67ea58289598596 (diff) | |
download | craftbukkit-121dfc098a882c8fb157e8232001ce19c9846ccf.tar craftbukkit-121dfc098a882c8fb157e8232001ce19c9846ccf.tar.gz craftbukkit-121dfc098a882c8fb157e8232001ce19c9846ccf.tar.lz craftbukkit-121dfc098a882c8fb157e8232001ce19c9846ccf.tar.xz craftbukkit-121dfc098a882c8fb157e8232001ce19c9846ccf.zip |
SPIGOT-1288: Sounds played for cancelled BlockPlaceEvent
Diffstat (limited to 'nms-patches/ItemStack.patch')
-rw-r--r-- | nms-patches/ItemStack.patch | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/nms-patches/ItemStack.patch b/nms-patches/ItemStack.patch index 4101e906..e6cb7f25 100644 --- a/nms-patches/ItemStack.patch +++ b/nms-patches/ItemStack.patch @@ -44,7 +44,7 @@ } -@@ -81,11 +104,131 @@ +@@ -81,11 +104,137 @@ } public EnumInteractionResult placeItem(EntityHuman entityhuman, World world, BlockPosition blockposition, EnumHand enumhand, EnumDirection enumdirection, float f, float f1, float f2) { @@ -168,6 +168,12 @@ + } + } + ++ // SPIGOT-1288 - play sound stripped from ItemBlock ++ if (this.getItem() instanceof ItemBlock) { ++ SoundEffectType soundeffecttype = ((ItemBlock) this.getItem()).d().w(); // PAIL: rename ++ world.a(entityhuman, blockposition, soundeffecttype.e(), SoundCategory.BLOCKS, (soundeffecttype.a() + 1.0F) / 2.0F, soundeffecttype.b() * 0.8F); ++ } ++ + entityhuman.b(StatisticList.b(this.item)); + } } @@ -177,7 +183,7 @@ return enuminteractionresult; } -@@ -110,7 +253,7 @@ +@@ -110,7 +259,7 @@ nbttagcompound.setByte("Count", (byte) this.count); nbttagcompound.setShort("Damage", (short) this.damage); if (this.tag != null) { @@ -186,7 +192,7 @@ } return nbttagcompound; -@@ -119,13 +262,18 @@ +@@ -119,13 +268,18 @@ public void c(NBTTagCompound nbttagcompound) { this.item = Item.d(nbttagcompound.getString("id")); this.count = nbttagcompound.getByte("Count"); @@ -206,7 +212,7 @@ if (this.item != null) { this.item.a(this.tag); } -@@ -162,11 +310,30 @@ +@@ -162,11 +316,30 @@ } public void setData(int i) { @@ -239,7 +245,7 @@ } public int j() { -@@ -214,6 +381,12 @@ +@@ -214,6 +387,12 @@ this.count = 0; } @@ -252,7 +258,7 @@ this.damage = 0; } -@@ -514,6 +687,7 @@ +@@ -514,6 +693,7 @@ @Deprecated public void setItem(Item item) { this.item = item; |