コード例 #1
0
    @SuppressWarnings({"unchecked"})
    @Override
    public void syncDataToForge(org.spongepowered.api.event.Event spongeEvent) {
      super.syncDataToForge(spongeEvent);

      ExplosionEvent.Detonate event = (ExplosionEvent.Detonate) spongeEvent;
      List<BlockPos> affectedBlocks = this.explosion.func_180343_e();
      affectedBlocks.clear();

      for (BlockTransaction blockTransaction : event.getTransactions()) {
        if (blockTransaction.isValid()) {
          affectedBlocks.add(
              VecHelper.toBlockPos(blockTransaction.getFinalReplacement().getPosition()));
        }
      }
    }
コード例 #2
0
 public BlockList blockList() {
   return new BlockList(event.getTransactions());
 }