Files
Purpur/patches/server/0186-Config-for-wither-explosion-radius.patch
William Blake Galbreath 8bd08ceeea Updated Upstream (Paper & Airplane)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
06db5d08b0 Updated Upstream (Bukkit/CraftBukkit) (#6589)
810d200bb4 Improve interact distance check (#6591)

Airplane Changes:
8207533bdf Upstream
2021-09-12 22:24:02 -05:00

40 lines
2.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ben Kerllenevich <ben@omega24.dev>
Date: Thu, 29 Apr 2021 14:39:07 -0400
Subject: [PATCH] Config for wither explosion radius
diff --git a/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java b/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java
index 430aa10101d9f21561155941ff24441fd0c4103a..de91f0dd7f9a62e5a96b4cc3e4f505ecdcfccd92 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java
@@ -97,7 +97,7 @@ public class WitherSkull extends AbstractHurtingProjectile {
// CraftBukkit start
// this.level.createExplosion(this, this.locX(), this.locY(), this.locZ(), 1.0F, false, explosion_effect);
- ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 1.0F, false);
+ ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), this.level.purpurConfig.witherExplosionRadius, false); // Purpur
this.level.getCraftServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) {
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index af8eb10a60362e1baff88d6b02a04feab106a7dd..e5ad248b66f68f34996d3dac01e76951578add46 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -2015,6 +2015,7 @@ public class PurpurWorldConfig {
public int witherHealthRegenDelay = 20;
public boolean witherBypassMobGriefing = false;
public boolean witherCanRideVehicles = false;
+ public float witherExplosionRadius = 1.0F;
private void witherSettings() {
witherRidable = getBoolean("mobs.wither.ridable", witherRidable);
witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater);
@@ -2033,6 +2034,7 @@ public class PurpurWorldConfig {
witherHealthRegenDelay = getInt("mobs.wither.health-regen-delay", witherHealthRegenDelay);
witherBypassMobGriefing = getBoolean("mobs.wither.bypass-mob-griefing", witherBypassMobGriefing);
witherCanRideVehicles = getBoolean("mobs.wither.can-ride-vehicles", witherCanRideVehicles);
+ witherExplosionRadius = (float) getDouble("mobs.wither.explosion-radius", witherExplosionRadius);
}
public boolean witherSkeletonRidable = false;