mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 04:09:54 +01:00
28 lines
1.2 KiB
Diff
28 lines
1.2 KiB
Diff
From 844afeb670e1b8cced149f5b343669bfef9ababc Mon Sep 17 00:00:00 2001
|
|
From: drXor <mcyoungsota@gmail.com>
|
|
Date: Thu, 17 Jul 2014 21:13:15 -0400
|
|
Subject: [PATCH] Fix for enchanting table wiping meta when placing stacked
|
|
items
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ContainerEnchantTable.java b/src/main/java/net/minecraft/server/ContainerEnchantTable.java
|
|
index 208d426..09eeb43 100644
|
|
--- a/src/main/java/net/minecraft/server/ContainerEnchantTable.java
|
|
+++ b/src/main/java/net/minecraft/server/ContainerEnchantTable.java
|
|
@@ -336,7 +336,11 @@ public class ContainerEnchantTable extends Container {
|
|
((Slot) this.c.get(0)).set(itemstack1.cloneItemStack());
|
|
itemstack1.count = 0;
|
|
} else if (itemstack1.count >= 1) {
|
|
- ((Slot) this.c.get(0)).set(new ItemStack(itemstack1.getItem(), 1, itemstack1.getData()));
|
|
+ // Spigot start
|
|
+ ItemStack clone = itemstack1.cloneItemStack();
|
|
+ clone.count = 1;
|
|
+ ((Slot) this.c.get(0)).set(clone);
|
|
+ // Spigot end
|
|
--itemstack1.count;
|
|
}
|
|
}
|
|
--
|
|
2.1.4
|
|
|