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 f21b019e7074b637d2a4f8cc47749023751d2221..fdb30742017253789472896247c07f5ce530d10c 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -1996,6 +1996,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);
@@ -2014,6 +2015,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;
