mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2025-01-23 16:41:48 +01:00
Update upstream
This commit is contained in:
parent
1c004f9466
commit
cf35d69466
2
Tuinity
2
Tuinity
@ -1 +1 @@
|
|||||||
Subproject commit 54d751f5f4d80ae0b51be5a291a27b1405f8c1b7
|
Subproject commit 9f54095dd01d66d023ea1a6bd29dc113a8cc86d5
|
@ -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>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 22 Dec 2012 00:35:15 -0500
|
Date: Sat, 22 Dec 2012 00:35:15 -0500
|
||||||
Subject: [PATCH] EMC PlayerUseItem Event
|
Subject: [PATCH] EMC PlayerUseItem Event
|
||||||
@ -23,10 +23,10 @@ index dfb9421a15..94e3a48bb2 100644
|
|||||||
this.setSlot(EnumItemSlot.MAINHAND, itemstack);
|
this.setSlot(EnumItemSlot.MAINHAND, itemstack);
|
||||||
} else {
|
} else {
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
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
|
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||||
+++ b/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) {
|
public EnumInteractionResult a(EntityHuman entityhuman, World world, ItemStack itemstack, EnumHand enumhand) {
|
||||||
@ -42,7 +42,7 @@ index 35003b3eec..e142db00c4 100644
|
|||||||
if (this.gamemode == EnumGamemode.SPECTATOR) {
|
if (this.gamemode == EnumGamemode.SPECTATOR) {
|
||||||
return EnumInteractionResult.PASS;
|
return EnumInteractionResult.PASS;
|
||||||
} else if (entityhuman.getCooldownTracker().hasCooldown(itemstack.getItem())) {
|
} else if (entityhuman.getCooldownTracker().hasCooldown(itemstack.getItem())) {
|
||||||
@@ -421,27 +430,53 @@ public class PlayerInteractManager {
|
@@ -433,27 +442,53 @@ public class PlayerInteractManager {
|
||||||
} else {
|
} else {
|
||||||
int i = itemstack.getCount();
|
int i = itemstack.getCount();
|
||||||
int j = itemstack.getDamage();
|
int j = itemstack.getDamage();
|
||||||
@ -102,7 +102,7 @@ index 35003b3eec..e142db00c4 100644
|
|||||||
((EntityPlayer) entityhuman).updateInventory(entityhuman.defaultContainer);
|
((EntityPlayer) entityhuman).updateInventory(entityhuman.defaultContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -455,6 +490,7 @@ public class PlayerInteractManager {
|
@@ -467,6 +502,7 @@ public class PlayerInteractManager {
|
||||||
public boolean firedInteract = false;
|
public boolean firedInteract = false;
|
||||||
public EnumInteractionResult a(EntityHuman entityhuman, World world, ItemStack itemstack, EnumHand enumhand, MovingObjectPositionBlock movingobjectpositionblock) {
|
public EnumInteractionResult a(EntityHuman entityhuman, World world, ItemStack itemstack, EnumHand enumhand, MovingObjectPositionBlock movingobjectpositionblock) {
|
||||||
BlockPosition blockposition = movingobjectpositionblock.getBlockPosition();
|
BlockPosition blockposition = movingobjectpositionblock.getBlockPosition();
|
||||||
@ -110,7 +110,7 @@ index 35003b3eec..e142db00c4 100644
|
|||||||
IBlockData iblockdata = world.getType(blockposition);
|
IBlockData iblockdata = world.getType(blockposition);
|
||||||
EnumInteractionResult enuminteractionresult = EnumInteractionResult.PASS;
|
EnumInteractionResult enuminteractionresult = EnumInteractionResult.PASS;
|
||||||
boolean cancelledBlock = false;
|
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
|
if (!itemstack.isEmpty() && enuminteractionresult != EnumInteractionResult.SUCCESS && !interactResult) { // add !interactResult SPIGOT-764
|
||||||
|
Loading…
Reference in New Issue
Block a user