mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Add configurable snowball damage
This commit is contained in:
committed by
granny
parent
4346cee03f
commit
54b81f2b74
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/entity/projectile/Snowball.java
|
||||
+++ b/net/minecraft/world/entity/projectile/Snowball.java
|
||||
@@ -52,7 +_,7 @@
|
||||
protected void onHitEntity(EntityHitResult result) {
|
||||
super.onHitEntity(result);
|
||||
Entity entity = result.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 - Add configurable snowball damage
|
||||
entity.hurt(this.damageSources().thrown(this, this.getOwner()), i);
|
||||
}
|
||||
|
||||
@@ -330,6 +330,11 @@ public class PurpurWorldConfig {
|
||||
});
|
||||
}
|
||||
|
||||
public int snowballDamage = -1;
|
||||
private void snowballSettings() {
|
||||
snowballDamage = getInt("gameplay-mechanics.projectile-damage.snowball", snowballDamage);
|
||||
}
|
||||
|
||||
public boolean anvilAllowColors = false;
|
||||
public boolean anvilColorsUseMiniMessage;
|
||||
private void anvilSettings() {
|
||||
|
||||
Reference in New Issue
Block a user