Skip to content

Commit

Permalink
Change default radius value for serialized explosion events
Browse files Browse the repository at this point in the history
  • Loading branch information
ArkoSammy12 committed Jul 29, 2024
1 parent e5666f8 commit 0655f03
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public record DefaultSerializedExplosion(
Codec.list(DefaultSerializedAffectedBlock.CODEC).fieldOf("affected_blocks").forGetter(SerializedExplosionEvent::getSerializedAffectedBlocks),
Codec.LONG.fieldOf("heal_timer").forGetter(SerializedExplosionEvent::getHealTimer),
Codec.INT.fieldOf("block_counter").forGetter(serializedExplosionEvent -> serializedExplosionEvent.getCustomData("blockCounter", Integer.class).orElse(0)),
Codec.INT.fieldOf("radius").forGetter(serializedExplosionEvent -> serializedExplosionEvent.getCustomData("radius", Integer.class).orElse(30)),
Codec.INT.fieldOf("radius").forGetter(serializedExplosionEvent -> serializedExplosionEvent.getCustomData("radius", Integer.class).orElse(3)),
BlockPos.CODEC.fieldOf("center").forGetter(serializedExplosionEvent -> serializedExplosionEvent.getCustomData("center", BlockPos.class).orElse(ExplosionUtils.calculateCenter(serializedExplosionEvent.getSerializedAffectedBlocks().stream().map(SerializedAffectedBlock::getBlockPos).toList())))
).apply(instance, DefaultSerializedExplosion::new));

Expand Down

0 comments on commit 0655f03

Please sign in to comment.