mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-29 22:23:50 +01:00
c09ee99f7e
Closes #257 Ports 2 patches from Purpur: Infinity-bow-settings & Allow-infinite-and-mending-enchantments-together Added an option for infinity with no arrows too. Option for custom locale has come! You can put a locale.json file in your server folder to change it. We've got the finest patches from Hydrinity ( Mykyta approved & allowed ) too. We have some amazing new options in yatopia.yml, we're gonna have documentation for them soon so stay tuned! Last but not least, chunk generation patches. We've tested them extensively so no weirdness happens. Thanks for using Yatopia as your production server software. Co-authored-by: Ivan Pekov <ivan@mrivanplays.com>
36 lines
2.2 KiB
Diff
36 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Bud Gidiere <sgidiere@gmail.com>
|
|
Date: Sun, 25 Oct 2020 12:24:19 -0500
|
|
Subject: [PATCH] Infinity No Arrows
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
|
index 1c46e9eaedfd8214d998845a07fd8f88eec711ae..9967d1277af9f1c3e5c320dbb97a605468e07c59 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
|
@@ -2137,7 +2137,7 @@ public abstract class EntityHuman extends EntityLiving {
|
|
}
|
|
}
|
|
|
|
- return this.abilities.canInstantlyBuild ? new ItemStack(Items.ARROW) : ItemStack.b;
|
|
+ return this.abilities.canInstantlyBuild || (world.purpurConfig.infinityWorksWithNoArrows && EnchantmentManager.getEnchantmentLevel(Enchantments.ARROW_INFINITE, itemstack) > 0) ? new ItemStack(Items.ARROW) : ItemStack.b; // Yatopia
|
|
}
|
|
}
|
|
}
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 142120d9fe4b6a621957b8e7b21dd757a8eb38a2..aed464125373eaefe61c14706b3bef046b2b691e 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -177,9 +177,11 @@ public class PurpurWorldConfig {
|
|
public boolean infinityWorksWithNormalArrows = true;
|
|
public boolean infinityWorksWithSpectralArrows = false;
|
|
public boolean infinityWorksWithTippedArrows = false;
|
|
+ public boolean infinityWorksWithNoArrows = false;
|
|
private void infinityArrowsSettings() {
|
|
infinityWorksWithNormalArrows = getBoolean("gameplay-mechanics.infinity-bow.normal-arrows", infinityWorksWithNormalArrows);
|
|
infinityWorksWithSpectralArrows = getBoolean("gameplay-mechanics.infinity-bow.spectral-arrows", infinityWorksWithSpectralArrows);
|
|
infinityWorksWithTippedArrows = getBoolean("gameplay-mechanics.infinity-bow.tipped-arrows", infinityWorksWithTippedArrows);
|
|
+ infinityWorksWithNoArrows = getBoolean("gameplay-mechanics.infinity-bow.no-arrows", infinityWorksWithNoArrows);
|
|
}
|
|
}
|