Skip to content

Commit 04e5742

Browse files
committed
Merge remote-tracking branch 'origin/api-12' into api-13
2 parents 8ef8673 + 2b5559f commit 04e5742

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/main/java/org/spongepowered/api/world/BlockChangeFlag.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
package org.spongepowered.api.world;
2626

2727
import org.spongepowered.api.block.BlockTypes;
28+
import org.spongepowered.api.block.entity.BlockEntity;
2829

2930
/**
3031
* A flag of sorts that determines whether a block change will perform various
@@ -133,6 +134,17 @@ public interface BlockChangeFlag {
133134
*/
134135
boolean ignoreRender();
135136

137+
/**
138+
* Gets whatever this block change is going to perform natural
139+
* block destruction logic, which can potentially cause other
140+
* side effects like block drops from a {@link BlockEntity}.
141+
* The behaviors are dependent on the block in particular.
142+
*
143+
* @return True if the block change should perform
144+
* natural block destruction logic.
145+
*/
146+
boolean performBlockDestruction();
147+
136148
/**
137149
* Gets the equivalent {@link BlockChangeFlag} of this flag with all
138150
* other flags while having the desired {@code updateNeighbors}
@@ -185,6 +197,16 @@ public interface BlockChangeFlag {
185197

186198
BlockChangeFlag withForcedReRender(boolean forcedReRender);
187199

200+
/**
201+
* Gets the equivalent {@link BlockChangeFlag} of this flag with all
202+
* other flags while having the desired {@code performBlockDestruction}
203+
* as defined by the parameter.
204+
*
205+
* @param performBlockDestruction Whether to perform block destruction
206+
* @return The relative flag with the desired perform destruction
207+
*/
208+
BlockChangeFlag withPerformBlockDestruction(boolean performBlockDestruction);
209+
188210
/**
189211
* Gets the inverted {@link BlockChangeFlag} of this flag.
190212
* Normally, this may cancel out certain interactions, such

0 commit comments

Comments
 (0)