mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 02:17:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: cc001a73b Climbing should not bypass cramming gamerule b9930b39d Add legacy plugin count to metrics 4729e6b90 Add more lightning API 5e220bcb5 [ci skip] add stale bot configuration 2a44498a5 Add PlayerItemCooldownEvent fd33bcee1 Add LivingEntity#clearActiveItem a99e0ca05 Fix Player spawnParticle x/y/z precision loss
This commit is contained in:
35
patches/server/0145-Add-configurable-snowball-damage.patch
Normal file
35
patches/server/0145-Add-configurable-snowball-damage.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 24 Nov 2020 05:32:02 -0600
|
||||
Subject: [PATCH] Add configurable snowball damage
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySnowball.java b/src/main/java/net/minecraft/server/EntitySnowball.java
|
||||
index 34a5f481e6..d7bab4446a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySnowball.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySnowball.java
|
||||
@@ -29,7 +29,7 @@ public class EntitySnowball extends EntityProjectileThrowable {
|
||||
protected void a(MovingObjectPositionEntity movingobjectpositionentity) {
|
||||
super.a(movingobjectpositionentity);
|
||||
Entity entity = movingobjectpositionentity.getEntity();
|
||||
- int i = entity instanceof EntityBlaze ? 3 : 0;
|
||||
+ int i = entity.world.purpurConfig.snowballDamage >= 0 ? entity.world.purpurConfig.snowballDamage : entity instanceof EntityBlaze ? 3 : 0; // Purpur
|
||||
|
||||
entity.damageEntity(DamageSource.projectile(this, this.getShooter()), (float) i);
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 830e030657..2c26c4c476 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -196,6 +196,11 @@ public class PurpurWorldConfig {
|
||||
witherSkullDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.wither_skull", witherSkullDespawnRate);
|
||||
}
|
||||
|
||||
+ public int snowballDamage = -1;
|
||||
+ private void snowballSettings() {
|
||||
+ snowballDamage = getInt("gameplay-mechanics.projectile-damage.snowball", snowballDamage);
|
||||
+ }
|
||||
+
|
||||
public boolean useBetterMending = false;
|
||||
public boolean boatEjectPlayersOnLand = false;
|
||||
public boolean disableDropsOnCrammingDeath = false;
|
||||
Reference in New Issue
Block a user