mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
we can ride mobs again!
This commit is contained in:
39
patches/server/0155-Config-for-wither-explosion-radius.patch
Normal file
39
patches/server/0155-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 80b86d5dd68c3d288a1a61ea8aa1cba9d899aa1c..f92e7624f774f883fac7bb51c2e46fdc7c16aea6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java
|
||||
@@ -95,7 +95,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 6e401b55e16cebf56156bf88ecd8d97045721efd..e178d0a4ac56d861198d38e3c3c70eef7828c404 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -1838,6 +1838,7 @@ public class PurpurWorldConfig {
|
||||
public boolean witherBypassMobGriefing = false;
|
||||
public boolean witherTakeDamageFromWater = false;
|
||||
public boolean witherCanRideVehicles = false;
|
||||
+ public float witherExplosionRadius = 1.0F;
|
||||
private void witherSettings() {
|
||||
if (PurpurConfig.version < 8) {
|
||||
double oldValue = getDouble("mobs.wither.max-health", witherMaxHealth);
|
||||
@@ -1854,6 +1855,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 double witherSkeletonMaxHealth = 20.0D;
|
||||
Reference in New Issue
Block a user