Skip to content

Commit

Permalink
Small tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ArkoSammy12 committed Aug 18, 2024
1 parent c1e8d2d commit 2c1fb17
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,7 @@ private void setThreadLocals(boolean particles, CallbackInfo ci) {
private void emitExplosionContext(boolean particles, CallbackInfo ci) {
ExplosionUtils.DROP_BLOCK_ITEMS.set(true);
ExplosionUtils.DROP_CONTAINER_INVENTORY_ITEMS.set(true);
if (world.isClient()) {
this.vanillaAffectedPositions.clear();
this.affectedStatesAndBlockEntities.clear();
this.indirectlyAffectedPositions.clear();
return;
}
if (!this.creeperhealing$shouldHeal()) {
if (world.isClient() || !this.creeperhealing$shouldHeal()) {
this.vanillaAffectedPositions.clear();
this.affectedStatesAndBlockEntities.clear();
this.indirectlyAffectedPositions.clear();
Expand All @@ -154,8 +148,12 @@ private void emitExplosionContext(boolean particles, CallbackInfo ci) {
}
List<BlockPos> filteredAffectedPositions = new ArrayList<>();
for (BlockPos pos : this.vanillaAffectedPositions) {
Pair<BlockState, BlockEntity> pair = this.affectedStatesAndBlockEntities.get(pos);
if (pair == null) {
continue;
}
BlockState state = pair.getLeft();
// Hardcoded exception, place before all other logic
BlockState state = this.affectedStatesAndBlockEntities.get(pos).getLeft();
if (ExcludedBlocks.isExcluded(state)) {
continue;
}
Expand Down

0 comments on commit 2c1fb17

Please sign in to comment.