mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-10 09:02:09 -07:00
Update to Minecraft 1.13-pre7
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
--- a/net/minecraft/server/BlockCauldron.java
|
||||
+++ b/net/minecraft/server/BlockCauldron.java
|
||||
@@ -3,6 +3,7 @@
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import javax.annotation.Nullable;
|
||||
+import org.bukkit.event.block.CauldronLevelChangeEvent; // CraftBukkit
|
||||
@@ -1,5 +1,7 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
+import org.bukkit.event.block.CauldronLevelChangeEvent; // CraftBukkit
|
||||
+
|
||||
public class BlockCauldron extends Block {
|
||||
|
||||
@@ -43,8 +44,13 @@
|
||||
public static final BlockStateInteger LEVEL = BlockProperties.ae;
|
||||
@@ -32,8 +34,13 @@
|
||||
float f = (float) blockposition.getY() + (6.0F + (float) (3 * i)) / 16.0F;
|
||||
|
||||
if (!world.isClientSide && entity.isBurning() && i > 0 && entity.getBoundingBox().b <= (double) f) {
|
||||
@@ -23,7 +23,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -60,18 +66,27 @@
|
||||
@@ -49,18 +56,27 @@
|
||||
|
||||
if (item == Items.WATER_BUCKET) {
|
||||
if (i < 3 && !world.isClientSide) {
|
||||
@@ -35,11 +35,11 @@
|
||||
entityhuman.a(enumhand, new ItemStack(Items.BUCKET));
|
||||
}
|
||||
|
||||
entityhuman.b(StatisticList.I);
|
||||
entityhuman.a(StatisticList.FILL_CAULDRON);
|
||||
- this.a(world, blockposition, iblockdata, 3);
|
||||
+ // this.a(world, blockposition, iblockdata, 3);
|
||||
+ // CraftBukkit end
|
||||
world.a((EntityHuman) null, blockposition, SoundEffects.Q, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
world.a((EntityHuman) null, blockposition, SoundEffects.ITEM_BUCKET_EMPTY, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -52,17 +52,17 @@
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
itemstack.subtract(1);
|
||||
if (itemstack.isEmpty()) {
|
||||
@@ -82,7 +97,8 @@
|
||||
@@ -71,7 +87,8 @@
|
||||
}
|
||||
|
||||
entityhuman.b(StatisticList.J);
|
||||
entityhuman.a(StatisticList.USE_CAULDRON);
|
||||
- this.a(world, blockposition, iblockdata, 0);
|
||||
+ // this.a(world, blockposition, iblockdata, 0);
|
||||
+ // CraftBukkit end
|
||||
world.a((EntityHuman) null, blockposition, SoundEffects.S, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
world.a((EntityHuman) null, blockposition, SoundEffects.ITEM_BUCKET_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
@@ -92,6 +108,10 @@
|
||||
@@ -81,6 +98,10 @@
|
||||
|
||||
if (item == Items.GLASS_BOTTLE) {
|
||||
if (i > 0 && !world.isClientSide) {
|
||||
@@ -72,11 +72,11 @@
|
||||
+ }
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
itemstack1 = PotionUtil.a(new ItemStack(Items.POTION), Potions.b);
|
||||
entityhuman.b(StatisticList.J);
|
||||
@@ -106,12 +126,17 @@
|
||||
entityhuman.a(StatisticList.USE_CAULDRON);
|
||||
@@ -95,12 +116,17 @@
|
||||
}
|
||||
|
||||
world.a((EntityHuman) null, blockposition, SoundEffects.N, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
world.a((EntityHuman) null, blockposition, SoundEffects.ITEM_BOTTLE_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
- this.a(world, blockposition, iblockdata, i - 1);
|
||||
+ // this.a(world, blockposition, iblockdata, i - 1);
|
||||
+ // CraftBukkit end
|
||||
@@ -91,44 +91,44 @@
|
||||
+ }
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
itemstack1 = new ItemStack(Items.GLASS_BOTTLE);
|
||||
entityhuman.b(StatisticList.J);
|
||||
@@ -122,7 +147,8 @@
|
||||
entityhuman.a(StatisticList.USE_CAULDRON);
|
||||
@@ -111,7 +137,8 @@
|
||||
}
|
||||
|
||||
world.a((EntityHuman) null, blockposition, SoundEffects.M, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
world.a((EntityHuman) null, blockposition, SoundEffects.ITEM_BOTTLE_EMPTY, 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;
|
||||
@@ -120,8 +147,13 @@
|
||||
ItemArmorColorable itemarmorcolorable = (ItemArmorColorable) item;
|
||||
|
||||
if (itemarmor.d() == ItemArmor.EnumArmorMaterial.LEATHER && itemarmor.e_(itemstack) && !world.isClientSide) {
|
||||
if (itemarmorcolorable.e(itemstack) && !world.isClientSide) {
|
||||
+ // CraftBukkit start
|
||||
+ if (!this.changeLevel(world, blockposition, iblockdata, i - 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.ARMOR_WASH)) {
|
||||
+ return true;
|
||||
+ }
|
||||
itemarmor.d(itemstack);
|
||||
itemarmorcolorable.g(itemstack);
|
||||
- this.a(world, blockposition, iblockdata, i - 1);
|
||||
+ // this.a(world, blockposition, iblockdata, i - 1);
|
||||
+ // CraftBukkit end
|
||||
entityhuman.b(StatisticList.K);
|
||||
entityhuman.a(StatisticList.CLEAN_ARMOR);
|
||||
return true;
|
||||
}
|
||||
@@ -140,13 +171,18 @@
|
||||
@@ -129,13 +161,18 @@
|
||||
|
||||
if (i > 0 && item instanceof ItemBanner) {
|
||||
if (TileEntityBanner.b(itemstack) > 0 && !world.isClientSide) {
|
||||
if (TileEntityBanner.a(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.L);
|
||||
TileEntityBanner.b(itemstack1);
|
||||
entityhuman.a(StatisticList.CLEAN_BANNER);
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
itemstack.subtract(1);
|
||||
- this.a(world, blockposition, iblockdata, i - 1);
|
||||
@@ -137,13 +137,13 @@
|
||||
}
|
||||
|
||||
if (itemstack.isEmpty()) {
|
||||
@@ -167,9 +203,25 @@
|
||||
@@ -171,9 +208,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, int i) {
|
||||
- world.setTypeAndData(blockposition, iblockdata.set(BlockCauldron.LEVEL, Integer.valueOf(MathHelper.clamp(i, 0, 3))), 2);
|
||||
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCauldron.LEVEL, Integer.valueOf(MathHelper.clamp(i, 0, 3))), 2);
|
||||
+ this.changeLevel(world, blockposition, iblockdata, i, null, CauldronLevelChangeEvent.ChangeReason.UNKNOWN);
|
||||
+ }
|
||||
+
|
||||
@@ -157,19 +157,19 @@
|
||||
+ if (event.isCancelled()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ world.setTypeAndData(blockposition, iblockdata.set(BlockCauldron.LEVEL, event.getNewLevel()), 2);
|
||||
+ world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCauldron.LEVEL, event.getNewLevel()), 2);
|
||||
world.updateAdjacentComparators(blockposition, this);
|
||||
+ return true;
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
public void h(World world, BlockPosition blockposition) {
|
||||
@@ -180,7 +232,7 @@
|
||||
public void c(World world, BlockPosition blockposition) {
|
||||
@@ -184,7 +237,7 @@
|
||||
IBlockData iblockdata = world.getType(blockposition);
|
||||
|
||||
if (((Integer) iblockdata.get(BlockCauldron.LEVEL)).intValue() < 3) {
|
||||
- world.setTypeAndData(blockposition, iblockdata.a((IBlockState) BlockCauldron.LEVEL), 2);
|
||||
+ this.a(world, blockposition, iblockdata.a((IBlockState) BlockCauldron.LEVEL), 2); // CraftBukkit
|
||||
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.a((IBlockState) BlockCauldron.LEVEL), 2);
|
||||
+ this.a(world, blockposition, (IBlockData) iblockdata.a((IBlockState) BlockCauldron.LEVEL), 2); // CraftBukkit
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user