diff --git a/patches/minecraft/net/minecraft/server/level/ServerPlayerGameMode.java.patch b/patches/minecraft/net/minecraft/server/level/ServerPlayerGameMode.java.patch index 9d2ffcc4..58efb63d 100644 --- a/patches/minecraft/net/minecraft/server/level/ServerPlayerGameMode.java.patch +++ b/patches/minecraft/net/minecraft/server/level/ServerPlayerGameMode.java.patch @@ -143,7 +143,7 @@ } } -@@ -217,45 +_,154 @@ +@@ -217,45 +_,153 @@ if (this.destroyBlock(p_9287_)) { this.player.connection.send(new ClientboundBlockBreakAckPacket(p_9287_, this.level.getBlockState(p_9287_), p_9288_, true, p_9289_)); } else { @@ -282,7 +282,6 @@ + ItemStack itemstack = this.player.getItemBySlot(net.minecraft.world.entity.EquipmentSlot.MAINHAND); + + this.level.getCraftServer().getPluginManager().callEvent(event); -+ + if (event.isCancelled()) { + if (isSwordNoBreak) { + return java.util.Optional.empty(); diff --git a/patches/minecraft/net/minecraft/world/inventory/AbstractContainerMenu.java.patch b/patches/minecraft/net/minecraft/world/inventory/AbstractContainerMenu.java.patch index a8f6da5a..f2e844a8 100644 --- a/patches/minecraft/net/minecraft/world/inventory/AbstractContainerMenu.java.patch +++ b/patches/minecraft/net/minecraft/world/inventory/AbstractContainerMenu.java.patch @@ -34,7 +34,7 @@ + + private net.minecraft.network.chat.Component title; + -+ public final net.minecraft.network.chat.Component getTitle() { ++ public net.minecraft.network.chat.Component getTitle() { // Remove final + return this.title == null ? net.minecraft.network.chat.TextComponent.EMPTY : this.title; //Magma - allow null titles + } +