Yatopia/patches/server/0058-Infinity-No-Arrows.patch

37 lines
2.2 KiB
Diff
Raw Normal View History

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
Updated Upstream and Sidestream(s) (Tuinity/EMC/Origami/Purpur/AirplaneLite) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Tuinity Changes: 3e77330 Updated Upstream (Paper) EMC Changes: e45a78e4 Update the API as well - setTargetRange to Double where null is default FOLLOW_RANGE 9fc6891d Default target range to the follow range a1e2e2a3 Fix an issue with players in vehicles in vehicles desyncing b6e2f202 Add a Dead vehicle reason to VehicleExitEvent 72b0da43 Use the correct entity local variable ad32d0d6 Fix bug with entity passengers not executing entity tasks 194aaafb Updated Paper cb3a7bb7 Always convert Lore/Name of an item to ensure consistency 6c63538d Revert "Updated Paper" 8837d5a9 Limit fortress spawns to the nether 005cdda9 Updated Paper 1476d693 Fix Lore comparisons to use legacy format 588f30f9 Quick fix the rcon log issue for now 475e626a Fix World Meta loading 3ad5f8a7 Remove RCON Thread Logs 7f3c4a25 Fix dismounting from vehicle when teleporting cross dimension 595bd307 Prevent NPE for PathfinderGoalMeleeAttack 0a64d9e9 Fix EntityDismountEvent reason c25ef322 Updated Paper Origami Changes: 36c0e05 Fix wrong circular dependency error if plugin depends on own provides 655fa5f Add option to disable legacy plugin support Purpur Changes: 79d304f Updated Upstream (Paper) bef678f [ci-skip] Simpler method of merging metadata files 3b18ff8 Updated Upstream (Paper) 25c7772 Apply the AppendingTransformer for `META-INF/services/java.sql.Driver` faf0db9 Bump config version to 10 3d1926e More base attribute stuff 43d6dab Updated Upstream (Paper) 2fd92fe [ci-skip] Setup repo for api publishing 26b0736 Updated Upstream (Paper) e704540 [ci-skip] Fix the remaining javadoc warnings a541703 [ci-skip] Fix import mc-dev task 64f5f9d Fix dependency relocations d7f1884 [ci-skip] Skip compiling tests as well as running them when using the `-Pfast` flag 3e08321 [ci-skip] Fix javadoc warnings (missing @param and @return) 1bfe697 [ci-skip] Remove paper's unsafe util 63b647c [ci-skip] Make it easier to fork Purpur using our scripts c453170 Fix relocations 7e331c2 Fix #118 Phantom fire time not working 844337c Fix lag from villager lobotomize check 2ec0dba Updated Upstream (Paper) 69c6484 Build using Toothpick scripts (#122) AirplaneLite Changes: ff087b7 Changes from Purpur 7263c2f Fix maven subproject URL 819c731 Switch to Purpur's Toothpick
2020-12-22 15:01:31 +01:00
index 0046dedd5e5f503ee680b89ec7e3dca681c26686..4412d465afcab66a1922217c931e73dcf559631c 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
Updated Upstream and Sidestream(s) (Tuinity/EMC/Origami/Purpur/AirplaneLite) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Tuinity Changes: 3e77330 Updated Upstream (Paper) EMC Changes: e45a78e4 Update the API as well - setTargetRange to Double where null is default FOLLOW_RANGE 9fc6891d Default target range to the follow range a1e2e2a3 Fix an issue with players in vehicles in vehicles desyncing b6e2f202 Add a Dead vehicle reason to VehicleExitEvent 72b0da43 Use the correct entity local variable ad32d0d6 Fix bug with entity passengers not executing entity tasks 194aaafb Updated Paper cb3a7bb7 Always convert Lore/Name of an item to ensure consistency 6c63538d Revert "Updated Paper" 8837d5a9 Limit fortress spawns to the nether 005cdda9 Updated Paper 1476d693 Fix Lore comparisons to use legacy format 588f30f9 Quick fix the rcon log issue for now 475e626a Fix World Meta loading 3ad5f8a7 Remove RCON Thread Logs 7f3c4a25 Fix dismounting from vehicle when teleporting cross dimension 595bd307 Prevent NPE for PathfinderGoalMeleeAttack 0a64d9e9 Fix EntityDismountEvent reason c25ef322 Updated Paper Origami Changes: 36c0e05 Fix wrong circular dependency error if plugin depends on own provides 655fa5f Add option to disable legacy plugin support Purpur Changes: 79d304f Updated Upstream (Paper) bef678f [ci-skip] Simpler method of merging metadata files 3b18ff8 Updated Upstream (Paper) 25c7772 Apply the AppendingTransformer for `META-INF/services/java.sql.Driver` faf0db9 Bump config version to 10 3d1926e More base attribute stuff 43d6dab Updated Upstream (Paper) 2fd92fe [ci-skip] Setup repo for api publishing 26b0736 Updated Upstream (Paper) e704540 [ci-skip] Fix the remaining javadoc warnings a541703 [ci-skip] Fix import mc-dev task 64f5f9d Fix dependency relocations d7f1884 [ci-skip] Skip compiling tests as well as running them when using the `-Pfast` flag 3e08321 [ci-skip] Fix javadoc warnings (missing @param and @return) 1bfe697 [ci-skip] Remove paper's unsafe util 63b647c [ci-skip] Make it easier to fork Purpur using our scripts c453170 Fix relocations 7e331c2 Fix #118 Phantom fire time not working 844337c Fix lag from villager lobotomize check 2ec0dba Updated Upstream (Paper) 69c6484 Build using Toothpick scripts (#122) AirplaneLite Changes: ff087b7 Changes from Purpur 7263c2f Fix maven subproject URL 819c731 Switch to Purpur's Toothpick
2020-12-22 15:01:31 +01:00
@@ -2144,7 +2144,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 5f0491a7cd6bb7e94cc5652be24d9bc111bb8035..66d3b52837b0512b7277c4d1732105ec407bdfa8 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
Updated Upstream and Sidestream(s) (Tuinity/Akarin/EMC/Purpur) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Tuinity Changes: fea2c2b Updated Upstream (Paper) 490c26a Merge branch 'master' of https://github.com/Spottedleaf/Tuinity into ver/1.16.4 8056d13 Setup bstats page 44f5e54 Updated Upstream (Paper) Akarin Changes: b53f48a Update Jenkinsfile 1e9cf1a Update SUPPORT.md b9255e8 kinda useless when we have jenkins f6e4782 Update Jenkinsfile 5ecf3fe Update Jenkinsfile cbd236b Updated JenkinsFile 0d2ff08 Removed Gradle 2dab0a4 Removed gradle EMC Changes: 90b678ea Updated Paper ce669f9f Clear bukkit chunk tempmeta on reload a524531d Improve vehicle/passenger teleporting patch 42b3f944 Update README.md (#8) 3e1aa746 Add sender uuid to chat messages a27a3a8f Updated Paper Purpur Changes: 7174d63 PaperPR - Projectile load/save limit per chunk 61d72c7 Add boat fall damage config 7403d46 Fix patch number 40d8df2 Add configurable entity left handedness chance 93e08ee Fix patch header and comments from last commit :3 ed192b6 Add Origami's patch to fix ProtocolLib on Java 15 7eb96ff Left handed API 3224b2b Better name for an OBFHELPER 9ec6496 Missed an OBFHELPER 7f93289 Add demo command 3b68476 Fix build a5fc52c Updated Upstream (Paper) 67ebb28 Optimize EntityMoveEvent detection 585fad0 Add RidableMoveEvent c835ce8 PaperPR - Expose world spawn angle 6a209ef Zombie break door minimum difficulty option 8c4de5c Updated Upstream (Paper & Tuinity)
2020-12-01 08:42:51 +01:00
@@ -176,10 +176,12 @@ 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);
}
public boolean signAllowColors = false;