From 66f71cd1e8e73f3882fabe13bd8559088ec9e525 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Wed, 24 Nov 2021 09:37:07 -0800 Subject: [PATCH] updated more patches --- ...et-Material-from-Boats-and-Minecarts.patch | 0 .../Add-PlayerFlowerPotManipulateEvent.patch | 0 .../api/Add-TargetHitEvent-API.patch | 0 .../api/Added-PlayerTradeEvent.patch | 0 .../api/Additional-Block-Material-API-s.patch | 0 .../api/Zombie-API-breaking-doors.patch | 0 ...erTradeEvent-and-PlayerPurchaseEvent.patch | 0 .../Additional-Block-Material-API-s.patch | 0 ...mob-spawner-spawn-egg-transformation.patch | 0 .../server/Cache-burn-durations.patch | 0 ...Fix-Not-a-string-Map-Conversion-spam.patch | 0 .../server/Fix-harming-potion-dupe.patch | 0 ...-event-not-being-called-in-adventure.patch | 2 +- ...-get-Material-from-Boats-and-Minecar.patch | 32 +++++-------------- ...ement-PlayerFlowerPotManipulateEvent.patch | 0 .../server/Implement-TargetHitEvent.patch | 0 .../server/Zombie-API-breaking-doors.patch | 0 17 files changed, 9 insertions(+), 25 deletions(-) rename patches/{unapplied => }/api/Add-API-to-get-Material-from-Boats-and-Minecarts.patch (100%) rename patches/{unapplied => }/api/Add-PlayerFlowerPotManipulateEvent.patch (100%) rename patches/{unapplied => }/api/Add-TargetHitEvent-API.patch (100%) rename patches/{unapplied => }/api/Added-PlayerTradeEvent.patch (100%) rename patches/{unapplied => }/api/Additional-Block-Material-API-s.patch (100%) rename patches/{unapplied => }/api/Zombie-API-breaking-doors.patch (100%) rename patches/{unapplied => }/server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch (100%) rename patches/{unapplied => }/server/Additional-Block-Material-API-s.patch (100%) rename patches/{unapplied => }/server/Allow-disabling-mob-spawner-spawn-egg-transformation.patch (100%) rename patches/{unapplied => }/server/Cache-burn-durations.patch (100%) rename patches/{unapplied => }/server/Fix-Not-a-string-Map-Conversion-spam.patch (100%) rename patches/{unapplied => }/server/Fix-harming-potion-dupe.patch (100%) rename patches/{unapplied => }/server/Fix-interact-event-not-being-called-in-adventure.patch (94%) rename patches/{unapplied => }/server/Implement-API-to-get-Material-from-Boats-and-Minecar.patch (72%) rename patches/{unapplied => }/server/Implement-PlayerFlowerPotManipulateEvent.patch (100%) rename patches/{unapplied => }/server/Implement-TargetHitEvent.patch (100%) rename patches/{unapplied => }/server/Zombie-API-breaking-doors.patch (100%) diff --git a/patches/unapplied/api/Add-API-to-get-Material-from-Boats-and-Minecarts.patch b/patches/api/Add-API-to-get-Material-from-Boats-and-Minecarts.patch similarity index 100% rename from patches/unapplied/api/Add-API-to-get-Material-from-Boats-and-Minecarts.patch rename to patches/api/Add-API-to-get-Material-from-Boats-and-Minecarts.patch diff --git a/patches/unapplied/api/Add-PlayerFlowerPotManipulateEvent.patch b/patches/api/Add-PlayerFlowerPotManipulateEvent.patch similarity index 100% rename from patches/unapplied/api/Add-PlayerFlowerPotManipulateEvent.patch rename to patches/api/Add-PlayerFlowerPotManipulateEvent.patch diff --git a/patches/unapplied/api/Add-TargetHitEvent-API.patch b/patches/api/Add-TargetHitEvent-API.patch similarity index 100% rename from patches/unapplied/api/Add-TargetHitEvent-API.patch rename to patches/api/Add-TargetHitEvent-API.patch diff --git a/patches/unapplied/api/Added-PlayerTradeEvent.patch b/patches/api/Added-PlayerTradeEvent.patch similarity index 100% rename from patches/unapplied/api/Added-PlayerTradeEvent.patch rename to patches/api/Added-PlayerTradeEvent.patch diff --git a/patches/unapplied/api/Additional-Block-Material-API-s.patch b/patches/api/Additional-Block-Material-API-s.patch similarity index 100% rename from patches/unapplied/api/Additional-Block-Material-API-s.patch rename to patches/api/Additional-Block-Material-API-s.patch diff --git a/patches/unapplied/api/Zombie-API-breaking-doors.patch b/patches/api/Zombie-API-breaking-doors.patch similarity index 100% rename from patches/unapplied/api/Zombie-API-breaking-doors.patch rename to patches/api/Zombie-API-breaking-doors.patch diff --git a/patches/unapplied/server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch b/patches/server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch rename to patches/server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch diff --git a/patches/unapplied/server/Additional-Block-Material-API-s.patch b/patches/server/Additional-Block-Material-API-s.patch similarity index 100% rename from patches/unapplied/server/Additional-Block-Material-API-s.patch rename to patches/server/Additional-Block-Material-API-s.patch diff --git a/patches/unapplied/server/Allow-disabling-mob-spawner-spawn-egg-transformation.patch b/patches/server/Allow-disabling-mob-spawner-spawn-egg-transformation.patch similarity index 100% rename from patches/unapplied/server/Allow-disabling-mob-spawner-spawn-egg-transformation.patch rename to patches/server/Allow-disabling-mob-spawner-spawn-egg-transformation.patch diff --git a/patches/unapplied/server/Cache-burn-durations.patch b/patches/server/Cache-burn-durations.patch similarity index 100% rename from patches/unapplied/server/Cache-burn-durations.patch rename to patches/server/Cache-burn-durations.patch diff --git a/patches/unapplied/server/Fix-Not-a-string-Map-Conversion-spam.patch b/patches/server/Fix-Not-a-string-Map-Conversion-spam.patch similarity index 100% rename from patches/unapplied/server/Fix-Not-a-string-Map-Conversion-spam.patch rename to patches/server/Fix-Not-a-string-Map-Conversion-spam.patch diff --git a/patches/unapplied/server/Fix-harming-potion-dupe.patch b/patches/server/Fix-harming-potion-dupe.patch similarity index 100% rename from patches/unapplied/server/Fix-harming-potion-dupe.patch rename to patches/server/Fix-harming-potion-dupe.patch diff --git a/patches/unapplied/server/Fix-interact-event-not-being-called-in-adventure.patch b/patches/server/Fix-interact-event-not-being-called-in-adventure.patch similarity index 94% rename from patches/unapplied/server/Fix-interact-event-not-being-called-in-adventure.patch rename to patches/server/Fix-interact-event-not-being-called-in-adventure.patch index 2dfb556a32..52b63ef50b 100644 --- a/patches/unapplied/server/Fix-interact-event-not-being-called-in-adventure.patch +++ b/patches/server/Fix-interact-event-not-being-called-in-adventure.patch @@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser MutableComponent ichatmutablecomponent = (new TranslatableComponent("build.tooHigh", new Object[]{i - 1})).withStyle(ChatFormatting.RED); - this.player.sendMessage((Component) ichatmutablecomponent, ChatType.GAME_INFO, Util.NIL_UUID); + this.player.sendMessage(ichatmutablecomponent, ChatType.GAME_INFO, Util.NIL_UUID); - } else if (enuminteractionresult.shouldSwing()) { + } else if (enuminteractionresult.shouldSwing() && !this.player.gameMode.interactResult) { this.player.swing(enumhand, true); diff --git a/patches/unapplied/server/Implement-API-to-get-Material-from-Boats-and-Minecar.patch b/patches/server/Implement-API-to-get-Material-from-Boats-and-Minecar.patch similarity index 72% rename from patches/unapplied/server/Implement-API-to-get-Material-from-Boats-and-Minecar.patch rename to patches/server/Implement-API-to-get-Material-from-Boats-and-Minecar.patch index 03b3e06098..e988854507 100644 --- a/patches/unapplied/server/Implement-API-to-get-Material-from-Boats-and-Minecar.patch +++ b/patches/server/Implement-API-to-get-Material-from-Boats-and-Minecar.patch @@ -44,30 +44,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start + @Override + public Material getMinecartMaterial() { -+ net.minecraft.world.item.Item minecartItem; -+ switch (getHandle().getMinecartType()) { -+ case CHEST: -+ minecartItem = Items.CHEST_MINECART; -+ break; -+ case FURNACE: -+ minecartItem = Items.FURNACE_MINECART; -+ break; -+ case TNT: -+ minecartItem = Items.TNT_MINECART; -+ break; -+ case HOPPER: -+ minecartItem = Items.HOPPER_MINECART; -+ break; -+ case COMMAND_BLOCK: -+ minecartItem = Items.COMMAND_BLOCK_MINECART; -+ break; -+ case RIDEABLE: -+ case SPAWNER: -+ minecartItem = Items.MINECART; -+ break; -+ default: -+ throw new IllegalStateException("Unexpected value: " + getHandle().getMinecartType()); -+ } ++ net.minecraft.world.item.Item minecartItem = switch (getHandle().getMinecartType()) { ++ case CHEST -> Items.CHEST_MINECART; ++ case FURNACE -> Items.FURNACE_MINECART; ++ case TNT -> Items.TNT_MINECART; ++ case HOPPER -> Items.HOPPER_MINECART; ++ case COMMAND_BLOCK -> Items.COMMAND_BLOCK_MINECART; ++ case RIDEABLE, SPAWNER -> Items.MINECART; ++ }; + + return CraftMagicNumbers.getMaterial(minecartItem); + } diff --git a/patches/unapplied/server/Implement-PlayerFlowerPotManipulateEvent.patch b/patches/server/Implement-PlayerFlowerPotManipulateEvent.patch similarity index 100% rename from patches/unapplied/server/Implement-PlayerFlowerPotManipulateEvent.patch rename to patches/server/Implement-PlayerFlowerPotManipulateEvent.patch diff --git a/patches/unapplied/server/Implement-TargetHitEvent.patch b/patches/server/Implement-TargetHitEvent.patch similarity index 100% rename from patches/unapplied/server/Implement-TargetHitEvent.patch rename to patches/server/Implement-TargetHitEvent.patch diff --git a/patches/unapplied/server/Zombie-API-breaking-doors.patch b/patches/server/Zombie-API-breaking-doors.patch similarity index 100% rename from patches/unapplied/server/Zombie-API-breaking-doors.patch rename to patches/server/Zombie-API-breaking-doors.patch