diff options
author | Nassim Jahnke <[email protected]> | 2024-07-12 09:24:37 +0200 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2024-07-12 09:24:50 +0200 |
commit | 2773dc484735a8ba9cd83354c76e733454f332d5 (patch) | |
tree | 26b8914f6832c53e130c656fe209f625857ece7e /patches | |
parent | c6e9579688e3d6fe93f80ba888f087996ede68cf (diff) | |
download | Paper-2773dc484735a8ba9cd83354c76e733454f332d5.tar.gz Paper-2773dc484735a8ba9cd83354c76e733454f332d5.zip |
Add light block to indestructible block list
Diffstat (limited to 'patches')
-rw-r--r-- | patches/server/0957-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/patches/server/0957-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/patches/server/0957-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch index 8caee3a137..586f341b5f 100644 --- a/patches/server/0957-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch +++ b/patches/server/0957-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch @@ -40,15 +40,17 @@ index 81bdb6e64e04641f741c2c3350236685b097ec7a..c6c9400fa155831ab11d0f059971d012 if (blockstate == null) { blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags); diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index bf52c36f31992a01a7403d8c85151327c9e944c4..45704653310efe9cb755a644674b54b8722c2c84 100644 +index bf52c36f31992a01a7403d8c85151327c9e944c4..d775ab8b0d37797f29e650842191d40691fb7afc 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java -@@ -89,6 +89,19 @@ public class Block extends BlockBehaviour implements ItemLike { +@@ -89,6 +89,20 @@ public class Block extends BlockBehaviour implements ItemLike { protected final StateDefinition<Block, BlockState> stateDefinition; private BlockState defaultBlockState; // Paper start + public final boolean isDestroyable() { + return io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowPermanentBlockBreakExploits || ++ this != Blocks.BARRIER && ++ this != Blocks.LIGHT && + this != Blocks.BEDROCK && + this != Blocks.END_PORTAL_FRAME && + this != Blocks.END_PORTAL && @@ -56,7 +58,6 @@ index bf52c36f31992a01a7403d8c85151327c9e944c4..45704653310efe9cb755a644674b54b8 + this != Blocks.COMMAND_BLOCK && + this != Blocks.REPEATING_COMMAND_BLOCK && + this != Blocks.CHAIN_COMMAND_BLOCK && -+ this != Blocks.BARRIER && + this != Blocks.STRUCTURE_BLOCK && + this != Blocks.JIGSAW; + } |