summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockCauldron.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-11-17 12:41:03 +1100
committermd_5 <git@md-5.net>2016-11-17 12:41:03 +1100
commitc25ddf063a808e3adb749e22017661f403c5fb7e (patch)
treeb2efcff512be12fd3e38cf8c36386148ce6ab4ae /nms-patches/BlockCauldron.patch
parent51263e97187a84338f89698eef187284055a682a (diff)
downloadcraftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.gz
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.lz
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.xz
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.zip
Update to Minecraft 1.11
Diffstat (limited to 'nms-patches/BlockCauldron.patch')
-rw-r--r--nms-patches/BlockCauldron.patch65
1 files changed, 48 insertions, 17 deletions
diff --git a/nms-patches/BlockCauldron.patch b/nms-patches/BlockCauldron.patch
index 08b09fac..a21ef981 100644
--- a/nms-patches/BlockCauldron.patch
+++ b/nms-patches/BlockCauldron.patch
@@ -23,7 +23,7 @@
}
}
-@@ -58,17 +64,26 @@
+@@ -60,18 +66,27 @@
if (item == Items.WATER_BUCKET) {
if (i < 3 && !world.isClientSide) {
@@ -39,6 +39,7 @@
- this.a(world, blockposition, iblockdata, 3);
+ // this.a(world, blockposition, iblockdata, 3);
+ // CraftBukkit end
+ world.a((EntityHuman) null, blockposition, SoundEffects.N, SoundCategory.BLOCKS, 1.0F, 1.0F);
}
return true;
@@ -49,19 +50,19 @@
+ return true;
+ }
if (!entityhuman.abilities.canInstantlyBuild) {
- --itemstack.count;
- if (itemstack.count == 0) {
-@@ -79,7 +94,8 @@
+ itemstack.subtract(1);
+ if (itemstack.isEmpty()) {
+@@ -82,7 +97,8 @@
}
entityhuman.b(StatisticList.L);
- this.a(world, blockposition, iblockdata, 0);
+ // this.a(world, blockposition, iblockdata, 0);
+ // CraftBukkit end
+ world.a((EntityHuman) null, blockposition, SoundEffects.P, SoundCategory.BLOCKS, 1.0F, 1.0F);
}
- return true;
-@@ -88,6 +104,10 @@
+@@ -92,6 +108,10 @@
if (item == Items.GLASS_BOTTLE) {
if (i > 0 && !world.isClientSide) {
@@ -72,17 +73,36 @@
if (!entityhuman.abilities.canInstantlyBuild) {
itemstack1 = PotionUtil.a(new ItemStack(Items.POTION), Potions.b);
entityhuman.b(StatisticList.L);
-@@ -100,7 +120,8 @@
- }
+@@ -106,12 +126,17 @@
}
+ world.a((EntityHuman) null, blockposition, SoundEffects.K, SoundCategory.BLOCKS, 1.0F, 1.0F);
- this.a(world, blockposition, iblockdata, i - 1);
+ // this.a(world, blockposition, iblockdata, i - 1);
+ // CraftBukkit end
}
return true;
-@@ -109,8 +130,13 @@
+ } else if (item == Items.POTION && PotionUtil.d(itemstack) == Potions.b) {
+ if (i < 3 && !world.isClientSide) {
++ // CraftBukkit start
++ if (!this.changeLevel(world, blockposition, iblockdata, i + 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY)) {
++ return true;
++ }
+ if (!entityhuman.abilities.canInstantlyBuild) {
+ itemstack1 = new ItemStack(Items.GLASS_BOTTLE);
+ entityhuman.b(StatisticList.L);
+@@ -122,7 +147,8 @@
+ }
+
+ world.a((EntityHuman) null, blockposition, SoundEffects.J, SoundCategory.BLOCKS, 1.0F, 1.0F);
+- this.a(world, blockposition, iblockdata, i + 1);
++ // this.a(world, blockposition, iblockdata, i + 1);
++ // CraftBukkit end
+ }
+
+ return true;
+@@ -131,8 +157,13 @@
ItemArmor itemarmor = (ItemArmor) item;
if (itemarmor.d() == ItemArmor.EnumArmorMaterial.LEATHER && itemarmor.e_(itemstack) && !world.isClientSide) {
@@ -90,23 +110,34 @@
+ if (!this.changeLevel(world, blockposition, iblockdata, i - 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.ARMOR_WASH)) {
+ return true;
+ }
- itemarmor.c(itemstack);
+ itemarmor.d(itemstack);
- this.a(world, blockposition, iblockdata, i - 1);
+ // this.a(world, blockposition, iblockdata, i - 1);
+ // CraftBukkit end
entityhuman.b(StatisticList.M);
return true;
}
-@@ -135,7 +161,7 @@
- }
+@@ -140,13 +171,18 @@
+ if (i > 0 && item instanceof ItemBanner) {
+ if (TileEntityBanner.b(itemstack) > 0 && !world.isClientSide) {
++ // CraftBukkit start
++ if (!this.changeLevel(world, blockposition, iblockdata, i - 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.BANNER_WASH)) {
++ return true;
++ }
+ itemstack1 = itemstack.cloneItemStack();
+ itemstack1.setCount(1);
+ TileEntityBanner.c(itemstack1);
+ entityhuman.b(StatisticList.N);
if (!entityhuman.abilities.canInstantlyBuild) {
+ itemstack.subtract(1);
- this.a(world, blockposition, iblockdata, i - 1);
-+ this.changeLevel(world, blockposition, iblockdata, i - 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.BANNER_WASH); // CraftBukkit
++ // this.a(world, blockposition, iblockdata, i - 1);
++ // CraftBukkit end
}
- }
-@@ -148,9 +174,25 @@
+ if (itemstack.isEmpty()) {
+@@ -167,9 +203,25 @@
}
}
@@ -133,12 +164,12 @@
}
public void h(World world, BlockPosition blockposition) {
-@@ -161,7 +203,7 @@
+@@ -180,7 +232,7 @@
IBlockData iblockdata = world.getType(blockposition);
if (((Integer) iblockdata.get(BlockCauldron.LEVEL)).intValue() < 3) {
- world.setTypeAndData(blockposition, iblockdata.a((IBlockState) BlockCauldron.LEVEL), 2);
-+ a(world, blockposition, iblockdata.a((IBlockState) BlockCauldron.LEVEL), 2); // CraftBukkit
++ this.a(world, blockposition, iblockdata.a((IBlockState) BlockCauldron.LEVEL), 2); // CraftBukkit
}
}