Update upstream

This commit is contained in:
tr7zw 2020-04-21 15:06:54 +02:00
parent 1c004f9466
commit cf35d69466
2 changed files with 7 additions and 7 deletions

@ -1 +1 @@
Subproject commit 54d751f5f4d80ae0b51be5a291a27b1405f8c1b7
Subproject commit 9f54095dd01d66d023ea1a6bd29dc113a8cc86d5

View File

@ -1,4 +1,4 @@
From f09779aa4ba69f98913608bb8b51e622f0a75635 Mon Sep 17 00:00:00 2001
From 61de18b3b3eb5b72aab7a5133848392fdf8686dd Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 22 Dec 2012 00:35:15 -0500
Subject: [PATCH] EMC PlayerUseItem Event
@ -23,10 +23,10 @@ index dfb9421a15..94e3a48bb2 100644
this.setSlot(EnumItemSlot.MAINHAND, itemstack);
} else {
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 35003b3eec..e142db00c4 100644
index 9fb008f64d..54ce069e50 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -414,6 +414,15 @@ public class PlayerInteractManager {
@@ -426,6 +426,15 @@ public class PlayerInteractManager {
}
public EnumInteractionResult a(EntityHuman entityhuman, World world, ItemStack itemstack, EnumHand enumhand) {
@ -42,7 +42,7 @@ index 35003b3eec..e142db00c4 100644
if (this.gamemode == EnumGamemode.SPECTATOR) {
return EnumInteractionResult.PASS;
} else if (entityhuman.getCooldownTracker().hasCooldown(itemstack.getItem())) {
@@ -421,27 +430,53 @@ public class PlayerInteractManager {
@@ -433,27 +442,53 @@ public class PlayerInteractManager {
} else {
int i = itemstack.getCount();
int j = itemstack.getDamage();
@ -102,7 +102,7 @@ index 35003b3eec..e142db00c4 100644
((EntityPlayer) entityhuman).updateInventory(entityhuman.defaultContainer);
}
@@ -455,6 +490,7 @@ public class PlayerInteractManager {
@@ -467,6 +502,7 @@ public class PlayerInteractManager {
public boolean firedInteract = false;
public EnumInteractionResult a(EntityHuman entityhuman, World world, ItemStack itemstack, EnumHand enumhand, MovingObjectPositionBlock movingobjectpositionblock) {
BlockPosition blockposition = movingobjectpositionblock.getBlockPosition();
@ -110,7 +110,7 @@ index 35003b3eec..e142db00c4 100644
IBlockData iblockdata = world.getType(blockposition);
EnumInteractionResult enuminteractionresult = EnumInteractionResult.PASS;
boolean cancelledBlock = false;
@@ -522,17 +558,45 @@ public class PlayerInteractManager {
@@ -534,17 +570,45 @@ public class PlayerInteractManager {
}
if (!itemstack.isEmpty() && enuminteractionresult != EnumInteractionResult.SUCCESS && !interactResult) { // add !interactResult SPIGOT-764