mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Updated Upstream (Pufferfish) (#1575)
Upstream has released updates that appear to apply and compile correctly Pufferfish Changes: pufferfish-gg/Pufferfish@c9f4e20 Final 1.20.4 Update pufferfish-gg/Pufferfish@1f3ad02 Final 1.20.4 update, for realzies pufferfish-gg/Pufferfish@b1ab664 Enable SIMD on java 21 pufferfish-gg/Pufferfish@0674c2b 1.21 compiles pufferfish-gg/Pufferfish@98ea973 Fix 1.21 version checkers pufferfish-gg/Pufferfish@68f859c Fix lambda/tick guard patch pufferfish-gg/Pufferfish@eaa18d5 Updated Upstream (Paper) pufferfish-gg/Pufferfish@1d72eea Updated Upstream (Paper) pufferfish-gg/Pufferfish@1d3c743 Update pufferfish version detector stuff pufferfish-gg/Pufferfish@5e30963 Fix crash bug pufferfish-gg/Pufferfish@12571eb Use mojmapped paperclip jar instead (CI only) pufferfish-gg/Pufferfish@4d16ae0 Drop a patch - moonrise includes it pufferfish-gg/Pufferfish@52c2d05 Revert "Drop a patch - moonrise includes it" pufferfish-gg/Pufferfish@bdb56f1 Fix entity interactions with fluids pufferfish-gg/Pufferfish@469e5c1 Updated Upstream (Paper) pufferfish-gg/Pufferfish@d75961f 1.21.1 Update (Updated Upstream (Paper))
This commit is contained in:
47
patches/server/0094-Infinity-bow-settings.patch
Normal file
47
patches/server/0094-Infinity-bow-settings.patch
Normal file
@@ -0,0 +1,47 @@
|
||||
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/world/item/BowItem.java b/src/main/java/net/minecraft/world/item/BowItem.java
|
||||
index 6eb5c0f23d9dc61e69ad5ad493c89602a9dcd4b5..4db2032178471860baddc6b669c9a4f8cffd084b 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/BowItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/BowItem.java
|
||||
@@ -26,6 +26,11 @@ public class BowItem extends ProjectileWeaponItem {
|
||||
public void releaseUsing(ItemStack stack, Level world, LivingEntity user, int remainingUseTicks) {
|
||||
if (user instanceof Player player) {
|
||||
ItemStack itemStack = player.getProjectile(stack);
|
||||
+ // Purpur start
|
||||
+ if (world.purpurConfig.infinityWorksWithoutArrows && itemStack.isEmpty() && net.minecraft.world.item.enchantment.EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.INFINITY, stack) > 0) {
|
||||
+ itemStack = new ItemStack(Items.ARROW);
|
||||
+ }
|
||||
+ // Purpur end
|
||||
if (!itemStack.isEmpty()) {
|
||||
int i = this.getUseDuration(stack, user) - remainingUseTicks;
|
||||
float f = getPowerForTime(i);
|
||||
@@ -82,7 +87,7 @@ public class BowItem extends ProjectileWeaponItem {
|
||||
public InteractionResultHolder<ItemStack> use(Level world, Player user, InteractionHand hand) {
|
||||
ItemStack itemStack = user.getItemInHand(hand);
|
||||
boolean bl = !user.getProjectile(itemStack).isEmpty();
|
||||
- if (!user.hasInfiniteMaterials() && !bl) {
|
||||
+ if (!user.hasInfiniteMaterials() && !bl && !(world.purpurConfig.infinityWorksWithoutArrows && net.minecraft.world.item.enchantment.EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.INFINITY, itemStack) > 0)) { // Purpur
|
||||
return InteractionResultHolder.fail(itemStack);
|
||||
} else {
|
||||
user.startUsingItem(hand);
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 8ee07ea25cbc5d59b972116c09ec57f0a679aa93..22522af6a0b0894c798399456303d951ca884fe6 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -139,6 +139,11 @@ public class PurpurWorldConfig {
|
||||
entityLifeSpan = getInt("gameplay-mechanics.entity-lifespan", entityLifeSpan);
|
||||
}
|
||||
|
||||
+ public boolean infinityWorksWithoutArrows = false;
|
||||
+ private void infinityArrowsSettings() {
|
||||
+ infinityWorksWithoutArrows = getBoolean("gameplay-mechanics.infinity-bow.works-without-arrows", infinityWorksWithoutArrows);
|
||||
+ }
|
||||
+
|
||||
public List<Item> itemImmuneToCactus = new ArrayList<>();
|
||||
public List<Item> itemImmuneToExplosion = new ArrayList<>();
|
||||
public List<Item> itemImmuneToFire = new ArrayList<>();
|
||||
Reference in New Issue
Block a user