mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: 97f920bf Fix suggest-player-names-when-null-tab-completions - Fixes #3803 166e52b5 [CI-SKIP] [Auto] Rebuild Patches 5a17ba07 Implements #3761 - Add entity liquid API (#3762) e0cae289 Fix anvils bug - Fixes #3802 4793f774 Move bedrock config under unsupported, add comments to these configs adf1de58 Allow delegation to vanilla chunk gen 40ace3f7 Allow delegation to vanilla chunk gen 178a6e50 Add PrepareResultEvent (#3776) 57697cd5 Report proxy onlinde mode to bstats as online (#3093) 6579ce05 Fix #3701 - Loottables erasing on viewing 030da7b8 [CI-SKIP] [Auto] Rebuild Patches d43def79 Incorrect spawn reason for monsters from spawner - Fixes #3708 (#3764) 97b59df9 [Auto] Updated Upstream (CraftBukkit) 0543f051 [CI-SKIP] [Auto] Rebuild Patches f3cd94c4 Remove streams from classes related to villager gossip (#3748) b49104db add EntityTargetLivingEntityEvent for new 1.16 mobs (#3782) 4faf9703 Fix /plugins list not alphabetical to players (#3790) 7e03e44e [CI-SKIP] [Auto] Rebuild Patches 8bb00272 Update itemstack legacy name and lore (#3741) 6c87b6a0 [Auto] Updated Upstream (CraftBukkit)
59 lines
3.6 KiB
Diff
59 lines
3.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Sat, 4 Jul 2020 13:23:19 -0500
|
|
Subject: [PATCH] Implement respawn anchor explosion options
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockRespawnAnchor.java b/src/main/java/net/minecraft/server/BlockRespawnAnchor.java
|
|
index 56ad9a51d1..33f4b8a290 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockRespawnAnchor.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockRespawnAnchor.java
|
|
@@ -79,10 +79,7 @@ public class BlockRespawnAnchor extends Block {
|
|
|
|
private void d(IBlockData iblockdata, World world, final BlockPosition blockposition) {
|
|
world.a(blockposition, false);
|
|
- Stream stream = EnumDirection.EnumDirectionLimit.HORIZONTAL.a();
|
|
-
|
|
- blockposition.getClass();
|
|
- boolean flag = stream.map(blockposition::shift).anyMatch((blockposition1) -> {
|
|
+ boolean flag = EnumDirection.EnumDirectionLimit.HORIZONTAL.a().map(blockposition::shift).anyMatch((blockposition1) -> { // Purpur - decompile error
|
|
return a(blockposition1, world);
|
|
});
|
|
final boolean flag1 = flag || world.getFluid(blockposition.up()).a((Tag) TagsFluid.WATER);
|
|
@@ -98,7 +95,7 @@ public class BlockRespawnAnchor extends Block {
|
|
}
|
|
};
|
|
|
|
- world.createExplosion((Entity) null, DamageSource.a(), explosiondamagecalculator, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, 5.0F, true, Explosion.Effect.DESTROY);
|
|
+ if (world.purpurConfig.respawnAnchorExplode) world.createExplosion(null, DamageSource.a(), explosiondamagecalculator, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, (float) world.purpurConfig.respawnAnchorExplosionPower, world.purpurConfig.respawnAnchorExplosionFire, world.purpurConfig.respawnAnchorExplosionEffect); // Purpur
|
|
}
|
|
|
|
public static boolean a(World world) {
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 56c4f9efd0..2f5bc77e03 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -233,6 +233,22 @@ public class PurpurWorldConfig {
|
|
lavaSpeedNotNether = getInt("blocks.lava.speed.not-nether", lavaSpeedNotNether);
|
|
}
|
|
|
|
+ public boolean respawnAnchorExplode = true;
|
|
+ public double respawnAnchorExplosionPower = 5.0D;
|
|
+ public boolean respawnAnchorExplosionFire = true;
|
|
+ public Explosion.Effect respawnAnchorExplosionEffect = Explosion.Effect.DESTROY;
|
|
+ private void respawnAnchorSettings() {
|
|
+ respawnAnchorExplode = getBoolean("blocks.respawn_anchor.explode", respawnAnchorExplode);
|
|
+ respawnAnchorExplosionPower = getDouble("blocks.respawn_anchor.explosion-power", respawnAnchorExplosionPower);
|
|
+ respawnAnchorExplosionFire = getBoolean("blocks.respawn_anchor.explosion-fire", respawnAnchorExplosionFire);
|
|
+ try {
|
|
+ respawnAnchorExplosionEffect = Explosion.Effect.valueOf(getString("blocks.respawn_anchor.explosion-effect", respawnAnchorExplosionEffect.name()));
|
|
+ } catch (IllegalArgumentException e) {
|
|
+ log(Level.SEVERE, "Unknown value for `blocks.respawn_anchor.explosion-effect`! Using default of `DESTROY`");
|
|
+ respawnAnchorExplosionEffect = Explosion.Effect.DESTROY;
|
|
+ }
|
|
+ }
|
|
+
|
|
public boolean signAllowColors = false;
|
|
public boolean signRightClickEdit = false;
|
|
private void signSettings() {
|