mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: bca97a8f7 replace spaces in world key (touches #5397) de94f6485 Refactor chat message composition (#5396) e27f334bb [CI-SKIP] Fix makemcdevsrc.sh for nms relocations (#5389) ae15e85da Updated Upstream (CraftBukkit) 26fe0ac5a Only set despawnTimer for Wandering Traders spawned by MobSpawnerTrader (#5391) b748eb7b8 Fix VanillaMobGoalTest#testBukkitMap (#5390) 18dbbb578 [Auto] Updated Upstream (CraftBukkit) fac9cc5d5 [CI-SKIP] Ignore .gitignore 087aa70e7 Deprecate ItemStack#setLore(List<String>) and ItemStack#getLore, add Component based alternatives 9889c651c apply fixup c310f0a61 Updated Upstream (Bukkit/CraftBukkit) f17560ab0 wtf is this t file -jmp 347f3a9b8 fix compile 700e9e6a5 rebase cf4dc464a Revert de5f4e469...c270abe96 6870db613 script & POM fix 743c6533c Replace ** with * (BSD/macOS) 376d7b097 Don't remove the .java fcb3fd42a Fix macOS/BSD support 8cfc05249 Link correctly ba1031ca7 Rename work dir c8d844ab7 Actually fix preloading this time e62aa5e3e Fix class preloading 1c03cf898 It's mojang math, not minecraft math 1034873df Apply fixups 39b125771 Use revision file 956150da7 Welcome to 1.16.5-R0.2 ccb217c01 Change cache keys 0d217001c more work f6d820f07 It compiles 0f78e9525 More work 1718f61bf Updated Upstream (CraftBukkit/Spigot) b28d46114 Update scripts for NMS repackaging Tuinity Changes: 9bdcb9b8e Delete work dir when running jar 6351d7ca7 Update Upstream (Paper) 932c199a6 Generate md-dev correctly bf3e73778 Make packet limiter work from IDE 1686f3861 Fix packet limiter config f40f7b425 Update README.md styling (#264) da1c3ace5 GH Actions Changes (#213) 5f325ecf1 Update Upstream (Paper) 0f83fe48d Update Upstream (Paper) Airplane Changes: f94d39947 Merge pull request #18 from notOM3GA/upstream/nms-repackage 0fc622631 Force build for Flare update 08439d6a9 Update Upstream (Tuinity)
60 lines
3.7 KiB
Diff
60 lines
3.7 KiB
Diff
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 16eac6648c7bb17fb10f5741857ac5e8283aed50..ba4377422abe55a6ce98551eb9f8633589f37f4c 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -868,6 +868,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);
|
|
@@ -878,6 +879,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);
|
|
}
|
|
|