updated more patches

This commit is contained in:
Jake Potrebic 2021-11-24 09:37:07 -08:00
parent 887a776f4d
commit 66f71cd1e8
17 changed files with 9 additions and 25 deletions

View File

@ -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);

View File

@ -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);
+ }