Update to Minecraft 1.19.4

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2023-03-15 03:30:00 +11:00
parent 90a887a912
commit 40076782ed
227 changed files with 2788 additions and 1621 deletions

View File

@@ -10,11 +10,11 @@
+
public class ContainerAnvil extends ContainerAnvilAbstract {
private static final Logger LOGGER = LogUtils.getLogger();
@@ -32,6 +36,11 @@
private static final int COST_REPAIR_SACRIFICE = 2;
private static final int COST_INCOMPATIBLE_PENALTY = 1;
private static final int COST_RENAME = 1;
public static final int INPUT_SLOT = 0;
@@ -39,6 +43,11 @@
private static final int ADDITIONAL_SLOT_X_PLACEMENT = 76;
private static final int RESULT_SLOT_X_PLACEMENT = 134;
private static final int SLOT_Y_PLACEMENT = 47;
+ // CraftBukkit start
+ public static final int DEFAULT_DENIED_COST = -1;
+ public int maximumRepairCost = 40;
@@ -23,7 +23,7 @@
public ContainerAnvil(int i, PlayerInventory playerinventory) {
this(i, playerinventory, ContainerAccess.NULL);
@@ -50,7 +59,7 @@
@@ -66,7 +75,7 @@
@Override
protected boolean mayPickup(EntityHuman entityhuman, boolean flag) {
@@ -32,7 +32,7 @@
}
@Override
@@ -73,7 +82,7 @@
@@ -89,7 +98,7 @@
this.inputSlots.setItem(1, ItemStack.EMPTY);
}
@@ -41,7 +41,7 @@
this.access.execute((world, blockposition) -> {
IBlockData iblockdata = world.getBlockState(blockposition);
@@ -104,8 +113,8 @@
@@ -120,8 +129,8 @@
byte b1 = 0;
if (itemstack.isEmpty()) {
@@ -52,7 +52,7 @@
} else {
ItemStack itemstack1 = itemstack.copy();
ItemStack itemstack2 = this.inputSlots.getItem(1);
@@ -122,8 +131,8 @@
@@ -138,8 +147,8 @@
if (itemstack1.isDamageableItem() && itemstack1.getItem().isValidRepairItem(itemstack, itemstack2)) {
k = Math.min(itemstack1.getDamageValue(), itemstack1.getMaxDamage() / 4);
if (k <= 0) {
@@ -63,7 +63,7 @@
return;
}
@@ -137,8 +146,8 @@
@@ -153,8 +162,8 @@
this.repairItemCountCost = i1;
} else {
if (!flag && (!itemstack1.is(itemstack2.getItem()) || !itemstack1.isDamageableItem())) {
@@ -74,7 +74,7 @@
return;
}
@@ -227,8 +236,8 @@
@@ -243,8 +252,8 @@
}
if (flag2 && !flag1) {
@@ -85,7 +85,7 @@
return;
}
}
@@ -251,11 +260,11 @@
@@ -267,11 +276,11 @@
itemstack1 = ItemStack.EMPTY;
}
@@ -100,7 +100,7 @@
itemstack1 = ItemStack.EMPTY;
}
@@ -274,7 +283,8 @@
@@ -290,7 +299,8 @@
EnchantmentManager.setEnchantments(map, itemstack1);
}
@@ -110,7 +110,7 @@
this.broadcastChanges();
}
}
@@ -301,4 +311,18 @@
@@ -317,4 +327,18 @@
public int getCost() {
return this.cost.get();
}