forked from LeavesMC/Leaves
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Spigot EndPlatform destroy (LeavesMC#313)
- Loading branch information
1 parent
202c986
commit e199edf
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: violetc <58360096+s-yh-china@users.noreply.github.com> | ||
Date: Fri, 16 Aug 2024 02:02:06 +0800 | ||
Subject: [PATCH] Fix Spigot EndPlatform destroy | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java b/src/main/java/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java | ||
index 0bc659a8427b89b5e3211220c55b52eec6a20494..3746721baa1897111c2d30c9e0f388dddca099da 100644 | ||
--- a/src/main/java/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java | ||
+++ b/src/main/java/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java | ||
@@ -44,7 +44,13 @@ public class EndPlatformFeature extends Feature<NoneFeatureConfiguration> { | ||
// CraftBukkit start | ||
if (!blockList.getBlockState(blockposition_mutableblockposition1).is(block)) { | ||
if (flag) { | ||
- blockList.destroyBlock(blockposition_mutableblockposition1, true, (Entity) null); | ||
+ // Leaves start - spigot! | ||
+ if (!org.leavesmc.leaves.LeavesConfig.spigotEndPlatformDestroy) { | ||
+ blockList.destroyBlock(blockposition_mutableblockposition1, true, (Entity) null); | ||
+ } else { | ||
+ worldaccess.destroyBlock(blockposition_mutableblockposition1, true, (Entity) null); | ||
+ } | ||
+ // Leaves end - spigot! | ||
} | ||
|
||
blockList.setBlock(blockposition_mutableblockposition1, block.defaultBlockState(), 3); |