mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: 840e72091 [CI-SKIP] [Auto] Rebuild Patches a33232d4a Add beacon activation and deactivation events (#5121) bc7ea673a Add internal channel initialization listeners (#5557) b28ad17ac Check for world change in MoveEvent API methods 3095c7592 [Auto] Updated Upstream (CraftBukkit) f56989c97 Add RespawnFlags to PlayerRespawnEvent (#5533) 7579c2667 Add more API to PlayerMoveEvent (#5553)
This commit is contained in:
59
patches/server/0171-Add-ghast-allow-griefing-option.patch
Normal file
59
patches/server/0171-Add-ghast-allow-griefing-option.patch
Normal file
@@ -0,0 +1,59 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 13 Feb 2021 14:02:43 -0600
|
||||
Subject: [PATCH] Add ghast allow-griefing option
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityGhast.java b/src/main/java/net/minecraft/world/entity/monster/EntityGhast.java
|
||||
index 5c39a9aec865d25a9aa5edcfd3a0fd6d1166cbd1..4bc8b6ec44a03390ced313e84b03ab6662a3c0a2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/EntityGhast.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityGhast.java
|
||||
@@ -230,6 +230,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
|
||||
}
|
||||
|
||||
EntityLargeFireball entitylargefireball = new EntityLargeFireball(world, this.ghast, d2, d3, d4);
|
||||
+ entitylargefireball.canCauseGrief = world.purpurConfig.ghastAllowGriefing; // Purpur
|
||||
|
||||
// CraftBukkit - set bukkitYield when setting explosionpower
|
||||
entitylargefireball.bukkitYield = entitylargefireball.yield = this.ghast.getPower();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityLargeFireball.java b/src/main/java/net/minecraft/world/entity/projectile/EntityLargeFireball.java
|
||||
index 61f06eacb4ea4ef869b60c9014cc23b25583eead..627915ee205fdcc93c5424ad7d7ea05783bc07ad 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/EntityLargeFireball.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/EntityLargeFireball.java
|
||||
@@ -16,6 +16,7 @@ import org.bukkit.event.entity.ExplosionPrimeEvent; // CraftBukkit
|
||||
public class EntityLargeFireball extends EntityFireballFireball {
|
||||
|
||||
public int yield = 1;
|
||||
+ public boolean canCauseGrief = true; // Purpur
|
||||
|
||||
public EntityLargeFireball(EntityTypes<? extends EntityLargeFireball> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -31,7 +32,7 @@ public class EntityLargeFireball extends EntityFireballFireball {
|
||||
protected void a(MovingObjectPosition movingobjectposition) {
|
||||
super.a(movingobjectposition);
|
||||
if (!this.world.isClientSide) {
|
||||
- boolean flag = this.world.purpurConfig.fireballsBypassMobGriefing || this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING); // Purpur
|
||||
+ boolean flag = isIncendiary = canCauseGrief && (this.world.purpurConfig.fireballsBypassMobGriefing || this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)); // Purpur
|
||||
|
||||
// CraftBukkit start - fire ExplosionPrimeEvent
|
||||
ExplosionPrimeEvent event = new ExplosionPrimeEvent((org.bukkit.entity.Explosive) this.getBukkitEntity());
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index d98671c6db4d86a9324f120c68e610364337bee6..fa3c9dbcdea3701cdecd2e4324690528af47247f 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -914,6 +914,7 @@ public class PurpurWorldConfig {
|
||||
public boolean ghastRidable = false;
|
||||
public boolean ghastRidableInWater = false;
|
||||
public double ghastMaxY = 256D;
|
||||
+ public boolean ghastAllowGriefing = true;
|
||||
public double ghastMaxHealth = 10.0D;
|
||||
private void ghastSettings() {
|
||||
ghastRidable = getBoolean("mobs.ghast.ridable", ghastRidable);
|
||||
@@ -924,6 +925,7 @@ public class PurpurWorldConfig {
|
||||
set("mobs.ghast.attributes.max-health", null);
|
||||
set("mobs.ghast.attributes.max_health", oldValue);
|
||||
}
|
||||
+ ghastAllowGriefing = getBoolean("mobs.ghast.allow-griefing", ghastAllowGriefing);
|
||||
ghastMaxHealth = getDouble("mobs.ghast.attributes.max_health", ghastMaxHealth);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user