mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +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
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||||
MutableComponent ichatmutablecomponent = (new TranslatableComponent("build.tooHigh", new Object[]{i - 1})).withStyle(ChatFormatting.RED);
|
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()) {
|
||||||
+ } else if (enuminteractionresult.shouldSwing() && !this.player.gameMode.interactResult) {
|
+ } else if (enuminteractionresult.shouldSwing() && !this.player.gameMode.interactResult) {
|
||||||
this.player.swing(enumhand, true);
|
this.player.swing(enumhand, true);
|
@ -44,30 +44,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public Material getMinecartMaterial() {
|
+ public Material getMinecartMaterial() {
|
||||||
+ net.minecraft.world.item.Item minecartItem;
|
+ net.minecraft.world.item.Item minecartItem = switch (getHandle().getMinecartType()) {
|
||||||
+ switch (getHandle().getMinecartType()) {
|
+ case CHEST -> Items.CHEST_MINECART;
|
||||||
+ case CHEST:
|
+ case FURNACE -> Items.FURNACE_MINECART;
|
||||||
+ minecartItem = Items.CHEST_MINECART;
|
+ case TNT -> Items.TNT_MINECART;
|
||||||
+ break;
|
+ case HOPPER -> Items.HOPPER_MINECART;
|
||||||
+ case FURNACE:
|
+ case COMMAND_BLOCK -> Items.COMMAND_BLOCK_MINECART;
|
||||||
+ minecartItem = Items.FURNACE_MINECART;
|
+ case RIDEABLE, SPAWNER -> Items.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());
|
|
||||||
+ }
|
|
||||||
+
|
+
|
||||||
+ return CraftMagicNumbers.getMaterial(minecartItem);
|
+ return CraftMagicNumbers.getMaterial(minecartItem);
|
||||||
+ }
|
+ }
|
Loading…
Reference in New Issue
Block a user