mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 02:35:49 +01:00
SPIGOT-6596: Remove redundant code
By: md_5 <git@md-5.net>
This commit is contained in:
parent
bfa7716ca1
commit
5e5d47856a
1 changed files with 15 additions and 7 deletions
|
@ -22,7 +22,15 @@
|
|||
|
||||
public ContainerAnvil(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, ContainerAccess.NULL);
|
||||
@@ -107,7 +115,7 @@
|
||||
@@ -85,7 +93,6 @@
|
||||
if (iblockdata1 == null) {
|
||||
world.a(blockposition, false);
|
||||
world.triggerEffect(1029, blockposition, 0);
|
||||
- entityhuman.getInventory().f(itemstack);
|
||||
} else {
|
||||
world.setTypeAndData(blockposition, iblockdata1, 2);
|
||||
world.triggerEffect(1030, blockposition, 0);
|
||||
@@ -107,7 +114,7 @@
|
||||
byte b1 = 0;
|
||||
|
||||
if (itemstack.isEmpty()) {
|
||||
|
@ -31,7 +39,7 @@
|
|||
this.cost.set(0);
|
||||
} else {
|
||||
ItemStack itemstack1 = itemstack.cloneItemStack();
|
||||
@@ -125,7 +133,7 @@
|
||||
@@ -125,7 +132,7 @@
|
||||
if (itemstack1.f() && itemstack1.getItem().a(itemstack, itemstack2)) {
|
||||
k = Math.min(itemstack1.getDamage(), itemstack1.i() / 4);
|
||||
if (k <= 0) {
|
||||
|
@ -40,7 +48,7 @@
|
|||
this.cost.set(0);
|
||||
return;
|
||||
}
|
||||
@@ -140,7 +148,7 @@
|
||||
@@ -140,7 +147,7 @@
|
||||
this.repairItemCountCost = i1;
|
||||
} else {
|
||||
if (!flag && (!itemstack1.a(itemstack2.getItem()) || !itemstack1.f())) {
|
||||
|
@ -49,7 +57,7 @@
|
|||
this.cost.set(0);
|
||||
return;
|
||||
}
|
||||
@@ -230,7 +238,7 @@
|
||||
@@ -230,7 +237,7 @@
|
||||
}
|
||||
|
||||
if (flag2 && !flag1) {
|
||||
|
@ -58,7 +66,7 @@
|
|||
this.cost.set(0);
|
||||
return;
|
||||
}
|
||||
@@ -254,11 +262,11 @@
|
||||
@@ -254,11 +261,11 @@
|
||||
itemstack1 = ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
|
@ -73,7 +81,7 @@
|
|||
itemstack1 = ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@@ -277,7 +285,7 @@
|
||||
@@ -277,7 +284,7 @@
|
||||
EnchantmentManager.a(map, itemstack1);
|
||||
}
|
||||
|
||||
|
@ -82,7 +90,7 @@
|
|||
this.d();
|
||||
}
|
||||
}
|
||||
@@ -304,4 +312,18 @@
|
||||
@@ -304,4 +311,18 @@
|
||||
public int j() {
|
||||
return this.cost.get();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue