@SubscribeEvent
public void onDetonate(ExplosionEvent.Detonate event) {
World world = event.world;
if (world.isRemote) {
return;
}
ProtectedBlocks protectedBlocks = ProtectedBlocks.getProtectedBlocks(world);
if (!protectedBlocks.hasProtections()) {
return;
}
List<ChunkPosition> affectedBlocks = event.getAffectedBlocks();
int i = 0;
while (i < affectedBlocks.size()) {
ChunkPosition block = affectedBlocks.get(i);
if (protectedBlocks.isProtected(world, block.chunkPosX, block.chunkPosY, block.chunkPosZ)) {
affectedBlocks.remove(i);
} else {
i++;
}
}
}
ForgeEventHandlers.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:notenoughwands
作者:
评论列表
文章目录