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: b79bc31 Fix MerchantOffer BuyB Only AssertionError (#6206) d6c81c8 Don't apply cramming damage to players (#5903) 12942dc Add rate options and timings for sensors and behaviors (#6027) fc47872 Use mapped names for sensor and behavior timings/config (#6228) c75a837 Don't expose ASM in API (#6229) c225bf9 Fix book title and author being improperly serialized as components (#6190) f25facb Update email & name (DenWav) 44516b1 [ci skip] Put mappings util in a separate class to the stacktrace deobfuscator
40 lines
2.5 KiB
Diff
40 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Ben Kerllenevich <me@notom3ga.me>
|
|
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 fed64ffd7303d1273cb1f2b5343429844da37cc7..882814eeb2eb8e455fa32e255fa7318571dfd20d 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -1994,6 +1994,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);
|
|
@@ -2012,6 +2013,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;
|