mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Add back Pufferfish patches
This commit is contained in:
39
patches/server/0162-Config-for-wither-explosion-radius.patch
Normal file
39
patches/server/0162-Config-for-wither-explosion-radius.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
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 9665095240a370983878350aed41badacfb6f261..623b90b263257dd633af330a63e4bb9d4d507493 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java
|
||||
@@ -94,7 +94,7 @@ public class WitherSkull extends AbstractHurtingProjectile {
|
||||
if (!this.level.isClientSide) {
|
||||
// CraftBukkit start
|
||||
// this.level.explode(this, this.getX(), this.getY(), this.getZ(), 1.0F, false, World.a.MOB);
|
||||
- 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/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 43489708ce0e21ea10abfb9e7f2cb92d18fa21f4..5c02af6ff74909bfa41323857080d3c0d1443f17 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -2266,6 +2266,7 @@ public class PurpurWorldConfig {
|
||||
public boolean witherBypassMobGriefing = false;
|
||||
public boolean witherTakeDamageFromWater = 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);
|
||||
@@ -2286,6 +2287,7 @@ public class PurpurWorldConfig {
|
||||
witherBypassMobGriefing = getBoolean("mobs.wither.bypass-mob-griefing", witherBypassMobGriefing);
|
||||
witherTakeDamageFromWater = getBoolean("mobs.wither.takes-damage-from-water", witherTakeDamageFromWater);
|
||||
witherCanRideVehicles = getBoolean("mobs.wither.can-ride-vehicles", witherCanRideVehicles);
|
||||
+ witherExplosionRadius = (float) getDouble("mobs.wither.explosion-radius", witherExplosionRadius);
|
||||
}
|
||||
|
||||
public boolean witherSkeletonRidable = false;
|
||||
Reference in New Issue
Block a user