mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
remove LivingEntity#safeFallDistance API
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Tue, 13 Oct 2020 20:04:33 -0500
|
||||
Subject: [PATCH] Allow infinite and mending enchantments together
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java b/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java
|
||||
index 81cc05c929d612898609965d82454b89cd18f9f5..fa73c3d4b58ad8379963a9866d8f09e1d6abd663 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java
|
||||
@@ -7,6 +7,6 @@ public class ArrowInfiniteEnchantment extends Enchantment {
|
||||
|
||||
@Override
|
||||
public boolean checkCompatibility(Enchantment other) {
|
||||
- return !(other instanceof MendingEnchantment) && super.checkCompatibility(other);
|
||||
+ return !(other instanceof MendingEnchantment) && super.checkCompatibility(other) || other instanceof MendingEnchantment && org.purpurmc.purpur.PurpurConfig.allowInfinityMending; // Purpur
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 0f67955a289d904ea72f7c24d097f2f1c5a4a8f2..8f98f665ec20c2df23a6f8bd891c502aba9a6ada 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -246,6 +246,16 @@ public class PurpurConfig {
|
||||
cryingObsidianValidForPortalFrame = getBoolean("settings.blocks.crying_obsidian.valid-for-portal-frame", cryingObsidianValidForPortalFrame);
|
||||
}
|
||||
|
||||
+ public static boolean allowInfinityMending = false;
|
||||
+ private static void enchantmentSettings() {
|
||||
+ if (version < 5) {
|
||||
+ boolean oldValue = getBoolean("settings.enchantment.allow-infinite-and-mending-together", false);
|
||||
+ set("settings.enchantment.allow-infinity-and-mending-together", oldValue);
|
||||
+ set("settings.enchantment.allow-infinite-and-mending-together", null);
|
||||
+ }
|
||||
+ allowInfinityMending = getBoolean("settings.enchantment.allow-infinity-and-mending-together", allowInfinityMending);
|
||||
+ }
|
||||
+
|
||||
public static boolean endermanShortHeight = false;
|
||||
private static void entitySettings() {
|
||||
endermanShortHeight = getBoolean("settings.entity.enderman.short-height", endermanShortHeight);
|
||||
Reference in New Issue
Block a user