mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 12dec20 Bump paerweight to 1.1.7 e33ed89 Get short commit ref using a more proper method 7d6147d Remove now unneeded patch due to paperweight 1.1.7 e72fa41 Update task dependency for includeMappings so the new task isn't skipped 0ad5526 Trim whitspace off of git hash (oops) Tuinity Changes: e878ba9 Update paper 2bd2849 Bring back fix codec spam patch
36 lines
1.9 KiB
Diff
36 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <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/world/entity/projectile/Snowball.java b/src/main/java/net/minecraft/world/entity/projectile/Snowball.java
|
|
index ed2f039c4042861bcfa2e41d8281eefd37daa9fa..d5d84893c77b4e60a19032d765d76bfd24cbbb2b 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/projectile/Snowball.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/Snowball.java
|
|
@@ -54,7 +54,7 @@ public class Snowball extends ThrowableItemProjectile {
|
|
protected void onHitEntity(EntityHitResult entityHitResult) {
|
|
super.onHitEntity(entityHitResult);
|
|
Entity entity = entityHitResult.getEntity();
|
|
- int i = entity instanceof Blaze ? 3 : 0;
|
|
+ int i = entity.level.purpurConfig.snowballDamage >= 0 ? entity.level.purpurConfig.snowballDamage : entity instanceof Blaze ? 3 : 0; // Purpur
|
|
entity.hurt(DamageSource.thrown(this, this.getOwner()), (float)i);
|
|
}
|
|
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 147681048f24ea75ba7ddb0a019a83703a191e74..aaca5c8007ce8a33ecec0b9ff057c59a4c2778a3 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -277,6 +277,11 @@ public class PurpurWorldConfig {
|
|
totemOfUndyingWorksInInventory = getBoolean("gameplay-mechanics.player.totem-of-undying-works-in-inventory", totemOfUndyingWorksInInventory);
|
|
}
|
|
|
|
+ public int snowballDamage = -1;
|
|
+ private void snowballSettings() {
|
|
+ snowballDamage = getInt("gameplay-mechanics.projectile-damage.snowball", snowballDamage);
|
|
+ }
|
|
+
|
|
public int dragonFireballDespawnRate = -1;
|
|
public int eggDespawnRate = -1;
|
|
public int enderPearlDespawnRate = -1;
|