mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 01:17:42 +01:00
apply the rest of the unapplied patches
This commit is contained in:
35
patches/server/0090-Infinity-bow-settings.patch
Normal file
35
patches/server/0090-Infinity-bow-settings.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
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/ProjectileWeaponItem.java b/src/main/java/net/minecraft/world/item/ProjectileWeaponItem.java
|
||||
index 32dd0b13a0819f597d8a93c6bc3a155781067544..7ae7626c82969ea5a6fc5aa4a0c7ec43cea73adb 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ProjectileWeaponItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ProjectileWeaponItem.java
|
||||
@@ -153,7 +153,7 @@ public abstract class ProjectileWeaponItem extends Item {
|
||||
int i;
|
||||
label28:
|
||||
{
|
||||
- if (!multishot && !shooter.hasInfiniteMaterials()) {
|
||||
+ if (!multishot && !shooter.hasInfiniteMaterials() && !shooter.level().purpurConfig.infinityWorksWithoutArrows) {
|
||||
Level world = shooter.level();
|
||||
|
||||
if (world instanceof ServerLevel) {
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 658978a0087c15a54259143704ee608d88807250..6a391de29ec045b34cfe456b5fbf03612b22d21b 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -136,6 +136,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