Skip to content

Commit

Permalink
Add light block to indestructible block list
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytv committed Jul 12, 2024
1 parent c6e9579 commit 2773dc4
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,24 @@ 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 &&
+ this != Blocks.END_GATEWAY &&
+ this != Blocks.COMMAND_BLOCK &&
+ this != Blocks.REPEATING_COMMAND_BLOCK &&
+ this != Blocks.CHAIN_COMMAND_BLOCK &&
+ this != Blocks.BARRIER &&
+ this != Blocks.STRUCTURE_BLOCK &&
+ this != Blocks.JIGSAW;
+ }
Expand Down

0 comments on commit 2773dc4

Please sign in to comment.