mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-11 02:02:04 -07:00
Implemented addRecipe method in CraftServer and associated recipe classes.
This commit is contained in:
committed by
EvilSeph
parent
017b15c3a6
commit
5a5ce79035
@@ -823,8 +823,13 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
||||
public void a(Packet102WindowClick packet102windowclick) {
|
||||
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);
|
||||
|
||||
if (ItemStack.equals(packet102windowclick.e, itemstack)) {
|
||||
// CraftBukkit start
|
||||
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.h = true;
|
||||
this.player.activeContainer.a();
|
||||
|
Reference in New Issue
Block a user