Skip to content

Commit

Permalink
Merge branch 'ver/1.21' into ver/1.21.1
Browse files Browse the repository at this point in the history
  • Loading branch information
granny committed Aug 10, 2024
2 parents afabbc9 + 75e81d8 commit 699448c
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 8 deletions.
56 changes: 52 additions & 4 deletions patches/api/0014-Anvil-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,88 @@ Subject: [PATCH] Anvil API


diff --git a/src/main/java/org/bukkit/inventory/AnvilInventory.java b/src/main/java/org/bukkit/inventory/AnvilInventory.java
index f1f97a85ec713c05c882d7588f4a3e4a017f4795..468d8b336c8060da346e2dfe60900868148376f6 100644
index f1f97a85ec713c05c882d7588f4a3e4a017f4795..813f6cd253322538bdf96eb323dd23a7809a1c1e 100644
--- a/src/main/java/org/bukkit/inventory/AnvilInventory.java
+++ b/src/main/java/org/bukkit/inventory/AnvilInventory.java
@@ -138,4 +138,14 @@ public interface AnvilInventory extends Inventory {
@@ -138,4 +138,42 @@ public interface AnvilInventory extends Inventory {
setItem(2, result);
}
// Paper end
+
+ // Purpur start
+ /**
+ * Gets if the player viewing the anvil inventory can bypass experience cost
+ *
+ * @return whether the player viewing the anvil inventory can bypass the experience cost
+ * @deprecated use {@link AnvilView#canBypassCost()}.
+ */
+ @Deprecated(forRemoval = true, since = "1.21")
+ boolean canBypassCost();
+
+ /**
+ * Set if the player viewing the anvil inventory can bypass the experience cost
+ *
+ * @param bypassCost whether the player viewing the anvil inventory can bypass the experience cost
+ * @deprecated use {@link AnvilView#setBypassCost(boolean)}.
+ */
+ @Deprecated(forRemoval = true, since = "1.21")
+ void setBypassCost(boolean bypassCost);
+
+ /**
+ * Gets if the player viewing the anvil inventory can do unsafe enchants
+ *
+ * @return whether the player viewing the anvil inventory can do unsafe enchants
+ * @deprecated use {@link AnvilView#canDoUnsafeEnchants()}.
+ */
+ @Deprecated(forRemoval = true, since = "1.21")
+ boolean canDoUnsafeEnchants();
+
+ /**
+ * Set if the player viewing the anvil inventory can do unsafe enchants
+ *
+ * @param canDoUnsafeEnchants whether the player viewing the anvil inventory can do unsafe enchants
+ * @deprecated use {@link AnvilView#setDoUnsafeEnchants(boolean)}.
+ */
+ @Deprecated(forRemoval = true, since = "1.21")
+ void setDoUnsafeEnchants(boolean canDoUnsafeEnchants);
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/inventory/view/AnvilView.java b/src/main/java/org/bukkit/inventory/view/AnvilView.java
index 0344b3db789baf1da0b59f2d2cd66154b69b38a9..c824a94f81925abc91eff7424c8021da10980bad 100644
index 0344b3db789baf1da0b59f2d2cd66154b69b38a9..4b130327c84b05938d21d563f78361f9483a6a4e 100644
--- a/src/main/java/org/bukkit/inventory/view/AnvilView.java
+++ b/src/main/java/org/bukkit/inventory/view/AnvilView.java
@@ -59,4 +59,14 @@ public interface AnvilView extends InventoryView {
@@ -59,4 +59,34 @@ public interface AnvilView extends InventoryView {
* @param levels the levels to set
*/
void setMaximumRepairCost(int levels);
+
+ // Purpur start
+ /**
+ * Gets if the player viewing the anvil inventory can bypass experience cost
+ *
+ * @return whether the player viewing the anvil inventory can bypass the experience cost
+ */
+ boolean canBypassCost();
+
+ /**
+ * Set if the player viewing the anvil inventory can bypass the experience cost
+ *
+ * @param bypassCost whether the player viewing the anvil inventory can bypass the experience cost
+ */
+ void setBypassCost(boolean bypassCost);
+
+ /**
+ * Gets if the player viewing the anvil inventory can do unsafe enchants
+ *
+ * @return whether the player viewing the anvil inventory can do unsafe enchants
+ */
+ boolean canDoUnsafeEnchants();
+
+ /**
+ * Set if the player viewing the anvil inventory can do unsafe enchants
+ *
+ * @param canDoUnsafeEnchants whether the player viewing the anvil inventory can do unsafe enchants
+ */
+ void setDoUnsafeEnchants(boolean canDoUnsafeEnchants);
+ // Purpur end
}
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0007-Ridables.patch
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ index 09fdea983772612ef3fff6b2da3cf469a34e4ec0..aa76a24421cdb3908a3544d92eb3d1e3
protected ParticleOptions getInkParticle() {
return ParticleTypes.GLOW_SQUID_INK;
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index fe435d4a387bb28be6831cec0c8bb0a7c8b603a4..a387268659a17a4508359f2a69d50593cefd4629 100644
index ccd9dff20a60f019e0c320acfb526b8bf3e5f806..b32460d324d93fed734be5d92baf0359ad5b0a80 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -237,9 +237,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
Expand Down Expand Up @@ -5117,7 +5117,7 @@ index cd789c235acf740ec29c30b180e7fbe1a140caa9..edaaaf0ecc412504b32fe7481f95e594
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 157a0eb8194c8fb6da4d0322b40c805918867e7f..ab87de7af1a06a82a451c853bc2900933257129c 100644
index 8dd85b9ca3b3e3429de4d0ec0654982589c6e93e..8c1fdda7c30c12bc5262d373474deb6930e811e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -601,6 +601,15 @@ public class CraftEventFactory {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Crying obsidian valid for portal frames


diff --git a/src/main/java/net/minecraft/world/level/portal/PortalShape.java b/src/main/java/net/minecraft/world/level/portal/PortalShape.java
index b2561207336336de92bf2cc609e4f1b1106cc5d5..d2969aa7c14f6ec6bc29958140402e4d5d9485ef 100644
index 86d95edc7dd1e42b4b38eba1177cd508e72e4fc4..6c07fc507df6070854f5950a8616d2949c040656 100644
--- a/src/main/java/net/minecraft/world/level/portal/PortalShape.java
+++ b/src/main/java/net/minecraft/world/level/portal/PortalShape.java
@@ -31,7 +31,7 @@ public class PortalShape {
Expand Down
2 changes: 1 addition & 1 deletion patches/server/0241-Stonecutter-damage.patch
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ index 31ae0f466ae522d767907ec5066b26695f327b96..f26383cf896785333dbd6f86348d5a5f
} else if (blockState.is(Blocks.HONEY_BLOCK)) {
return PathType.STICKY_HONEY;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index ab87de7af1a06a82a451c853bc2900933257129c..41214395c076338a4df9258fdc12b6de02bf71d9 100644
index 8c1fdda7c30c12bc5262d373474deb6930e811e8..198a86fc9b8c4dba8c8de27bccc4de65690b84de 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1140,7 +1140,7 @@ public class CraftEventFactory {
Expand Down

0 comments on commit 699448c

Please sign in to comment.