mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 9a129fa99 Add #getEligibleHumans to SkeletonHorseTrapEvent b5e23c7a6 Fix merging spawning values a932e8ad7 Turn off spigot verbose world by default 8ced89f65 Fix Delegation to vanilla chunk gen
48 lines
2.9 KiB
Diff
48 lines
2.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Sun, 4 Oct 2020 19:08:53 -0500
|
|
Subject: [PATCH] Infinity bow settings
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ItemBow.java b/src/main/java/net/minecraft/server/ItemBow.java
|
|
index dd6a93dc78..8241f3dafa 100644
|
|
--- a/src/main/java/net/minecraft/server/ItemBow.java
|
|
+++ b/src/main/java/net/minecraft/server/ItemBow.java
|
|
@@ -24,7 +24,7 @@ public class ItemBow extends ItemProjectileWeapon implements ItemVanishable {
|
|
float f = a(j);
|
|
|
|
if ((double) f >= 0.1D) {
|
|
- boolean flag1 = flag && itemstack1.getItem() == Items.ARROW;
|
|
+ boolean flag1 = flag && ((itemstack1.getItem() == Items.ARROW && world.purpurConfig.infinityWorksWithNormalArrows) || (itemstack1.getItem() == Items.TIPPED_ARROW && world.purpurConfig.infinityWorksWithTippedArrows) || (itemstack1.getItem() == Items.SPECTRAL_ARROW && world.purpurConfig.infinityWorksWithSpectralArrows)); // Purpur
|
|
|
|
if (!world.isClientSide) {
|
|
ItemArrow itemarrow = (ItemArrow) ((ItemArrow) (itemstack1.getItem() instanceof ItemArrow ? itemstack1.getItem() : Items.ARROW));
|
|
@@ -85,6 +85,7 @@ public class ItemBow extends ItemProjectileWeapon implements ItemVanishable {
|
|
entityhuman.inventory.f(itemstack1);
|
|
}
|
|
}
|
|
+ else if (!entityhuman.abilities.canInstantlyBuild) ((org.bukkit.entity.Player) entityhuman.getBukkitEntity()).updateInventory(); // Purpur
|
|
|
|
entityhuman.b(StatisticList.ITEM_USED.b(this));
|
|
}
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index c40c65ce7a..f0ecfd4e32 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -147,6 +147,15 @@ public class PurpurWorldConfig {
|
|
idleTimeoutUpdateTabList = getBoolean("gameplay-mechanics.player.idle-timeout.update-tab-list", idleTimeoutUpdateTabList);
|
|
}
|
|
|
|
+ public boolean infinityWorksWithNormalArrows = true;
|
|
+ public boolean infinityWorksWithSpectralArrows = false;
|
|
+ public boolean infinityWorksWithTippedArrows = 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);
|
|
+ }
|
|
+
|
|
public int dragonFireballDespawnRate = -1;
|
|
public int eggDespawnRate = -1;
|
|
public int enderPearlDespawnRate = -1;
|