|
25 | 25 | package org.spongepowered.api.world; |
26 | 26 |
|
27 | 27 | import org.spongepowered.api.block.BlockTypes; |
| 28 | +import org.spongepowered.api.block.entity.BlockEntity; |
28 | 29 |
|
29 | 30 | /** |
30 | 31 | * A flag of sorts that determines whether a block change will perform various |
@@ -133,6 +134,17 @@ public interface BlockChangeFlag { |
133 | 134 | */ |
134 | 135 | boolean ignoreRender(); |
135 | 136 |
|
| 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 | + |
136 | 148 | /** |
137 | 149 | * Gets the equivalent {@link BlockChangeFlag} of this flag with all |
138 | 150 | * other flags while having the desired {@code updateNeighbors} |
@@ -185,6 +197,16 @@ public interface BlockChangeFlag { |
185 | 197 |
|
186 | 198 | BlockChangeFlag withForcedReRender(boolean forcedReRender); |
187 | 199 |
|
| 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 | + |
188 | 210 | /** |
189 | 211 | * Gets the inverted {@link BlockChangeFlag} of this flag. |
190 | 212 | * Normally, this may cancel out certain interactions, such |
|
0 commit comments