mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 19:07:44 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@cc0f25cb Apply more feature patches PaperMC/Paper@e7b684ed fix PaperMC/Paper@71ccae07 Revert "move block data/state impl" PaperMC/Paper@7612b5d0 Add identifier comparator for Plugin tickets PaperMC/Paper@35b466e3 Add support for getting data components from entities PaperMC/Paper@9f50f858 patch PaperMC/Paper@42623c4b no patch
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
@@ -458,6 +_,7 @@
|
||||
// revert back all captured blocks
|
||||
for (org.bukkit.block.BlockState blockstate : blocks) {
|
||||
((org.bukkit.craftbukkit.block.state.CraftBlockState) blockstate).revertPlace();
|
||||
((org.bukkit.craftbukkit.block.CraftBlockState) blockstate).revertPlace();
|
||||
+ ((org.bukkit.craftbukkit.block.CraftBlock) blockstate.getBlock()).getNMS().getBlock().forgetPlacer(); // Purpur - Store placer on Block when placed
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
public int getDamageValue() {
|
||||
return Mth.clamp(this.getOrDefault(DataComponents.DAMAGE, 0), 0, this.getMaxDamage());
|
||||
}
|
||||
@@ -1274,6 +_,12 @@
|
||||
@@ -1280,6 +_,12 @@
|
||||
public boolean isEnchanted() {
|
||||
return !this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY).isEmpty();
|
||||
}
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
@@ -36,6 +_,7 @@
|
||||
// CraftBukkit start
|
||||
@javax.annotation.Nullable
|
||||
private java.util.List<ItemStack> itemStacks;
|
||||
private java.util.Set<ItemStack> itemStacks; // Paper - Improve exact choice recipe ingredients
|
||||
+ public Predicate<org.bukkit.inventory.ItemStack> predicate; // Purpur - Add predicate to recipe's ExactChoice ingredient
|
||||
|
||||
public boolean isExact() {
|
||||
return this.itemStacks != null;
|
||||
@@ -89,6 +_,11 @@
|
||||
|
||||
return false;
|
||||
@@ -88,6 +_,11 @@
|
||||
return this.itemStacks.contains(stack); // Paper - Improve exact choice recipe ingredients (hashing FTW!)
|
||||
}
|
||||
// CraftBukkit end
|
||||
+ // Purpur start - Add predicate to recipe's ExactChoice ingredient
|
||||
+ if (predicate != null) {
|
||||
+ return predicate.test(stack.asBukkitCopy());
|
||||
+ }
|
||||
+ // Purpur end - Add predicate to recipe's ExactChoice ingredient
|
||||
// CraftBukkit end
|
||||
return stack.is(this.values);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user