mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 03:48:01 +01:00
updated more patches
This commit is contained in:
parent
887a776f4d
commit
66f71cd1e8
@ -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);
|
@ -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);
|
||||
+ }
|
Loading…
Reference in New Issue
Block a user