mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 21:47:55 +01:00
Fixed crafting 'lag' introduced by additions to the Crafting API.
This commit is contained in:
parent
93708cb748
commit
41a2bc9690
@ -830,13 +830,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
|||||||
public void a(Packet102WindowClick packet102windowclick) {
|
public void a(Packet102WindowClick packet102windowclick) {
|
||||||
if (this.player.activeContainer.f == packet102windowclick.a && this.player.activeContainer.c(this.player)) {
|
if (this.player.activeContainer.f == packet102windowclick.a && this.player.activeContainer.c(this.player)) {
|
||||||
ItemStack itemstack = this.player.activeContainer.a(packet102windowclick.b, packet102windowclick.c, packet102windowclick.f, this.player);
|
ItemStack itemstack = this.player.activeContainer.a(packet102windowclick.b, packet102windowclick.c, packet102windowclick.f, this.player);
|
||||||
// CraftBukkit start
|
if (ItemStack.equals(packet102windowclick.e, itemstack)) {
|
||||||
boolean clickSuccessful = ItemStack.equals(packet102windowclick.e, itemstack);
|
|
||||||
if ((this.player.activeContainer instanceof ContainerWorkbench || this.player.activeContainer instanceof ContainerPlayer) && packet102windowclick.b == 0) {
|
|
||||||
clickSuccessful = false;
|
|
||||||
}
|
|
||||||
// CraftBukkit end
|
|
||||||
if (clickSuccessful) { // CraftBukkit - extracted to local variable
|
|
||||||
this.player.netServerHandler.sendPacket(new Packet106Transaction(packet102windowclick.a, packet102windowclick.d, true));
|
this.player.netServerHandler.sendPacket(new Packet106Transaction(packet102windowclick.a, packet102windowclick.d, true));
|
||||||
this.player.h = true;
|
this.player.h = true;
|
||||||
this.player.activeContainer.a();
|
this.player.activeContainer.a();
|
||||||
|
Loading…
Reference in New Issue
Block a user