Skip to content

Commit

Permalink
Fix missed per world phase tracker change
Browse files Browse the repository at this point in the history
This was missed during the CompositeEvent related
changes
  • Loading branch information
aromaa committed Feb 2, 2025
1 parent c28f273 commit 44122fc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ public boolean destroyBlock(final BlockPos pos, final boolean doDrops, @Nullable
return null;
}
final var instance = PhaseTracker.getWorldInstance(this);
if (instance.getSidedThread() != PhaseTracker.getServerInstanceExplicitly().getSidedThread() && instance != PhaseTracker.getServerInstanceExplicitly()) {
if (!instance.onSidedThread()) {
throw new UnsupportedOperationException("Cannot perform a tracked Block Change on a ServerWorld while not on the main thread!");
}
return instance;
Expand Down Expand Up @@ -689,7 +689,7 @@ public boolean destroyBlock(final BlockPos pos, final boolean doDrops, @Nullable
* <ul>
* <li>This world instance is managed and verified by Sponge</li>
* <li>This world must {@link LevelBridge#bridge$isFake()} return {@code false}</li>
* <li>The {@link PhaseTracker#getServerInstanceExplicitly}'s {@link PhaseTracker#getSidedThread()} must be {@code ==} {@link Thread#currentThread()}</li
* <li>The {@link PhaseTracker#getWorldInstance}'s {@link PhaseTracker#onSidedThread()} ()} must be {@code true}</li
* <li>The current {@link IPhaseState} must be allowing to record transactions with an applicable {@link org.spongepowered.common.event.tracking.context.transaction.TransactionalCaptureSupplier}</li>
* </ul>
* After which, we may be able to appropriately associate the {@link net.minecraft.world.level.block.entity.BlockEntity}
Expand Down

0 comments on commit 44122fc

Please sign in to comment.