Update to Minecraft 1.19

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-06-08 02:00:00 +10:00
parent 91d9aa9a89
commit 25f3b50f6b
332 changed files with 3628 additions and 2559 deletions

View File

@@ -20,16 +20,20 @@
}
if (!this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
@@ -119,7 +123,7 @@
@@ -119,7 +123,11 @@
BlockPosition blockposition1 = new BlockPosition(i, j, k);
if (this.level.getBlockState(blockposition1).isAir() && iblockdata.canSurvive(this.level, blockposition1)) {
- this.level.setBlockAndUpdate(blockposition1, iblockdata);
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this.level, blockposition1, iblockdata, this); // CraftBukkit
+ // CraftBukkit start
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this.level, blockposition1, iblockdata, this)) {
+ continue;
+ }
+ // CraftBukkit end
this.level.gameEvent(GameEvent.BLOCK_PLACE, blockposition1, GameEvent.a.of(this, iblockdata));
}
}
}
@@ -150,6 +154,11 @@
@@ -151,6 +159,11 @@
ItemStack itemstack = entityhuman.getItemInHand(enumhand);
if (itemstack.is(Items.SHEARS) && this.readyForShearing()) {
@@ -39,9 +43,9 @@
+ }
+ // CraftBukkit end
this.shear(SoundCategory.PLAYERS);
this.gameEvent(GameEvent.SHEAR, (Entity) entityhuman);
this.gameEvent(GameEvent.SHEAR, entityhuman);
if (!this.level.isClientSide) {
@@ -169,7 +178,9 @@
@@ -170,7 +183,9 @@
this.level.playSound((EntityHuman) null, (Entity) this, SoundEffects.SNOW_GOLEM_SHEAR, soundcategory, 1.0F, 1.0F);
if (!this.level.isClientSide()) {
this.setPumpkin(false);