This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Copyright (C) 2020 Jacob Scott <jascottytechie@gmail.com> | |
* | |
* Description: THEOS Disk Image File Extraction | |
* | |
* This program is free software: you can redistribute it and/or modify it under | |
* the terms of the GNU General Public License as published by the Free Software | |
* Foundation, either version 3 of the License, or (at your option) any later | |
* version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) | |
public void onBlockExplode(final EntityExplodeEvent e) { | |
e.setCancelled(true); | |
final HashSet<BlockState> toRestoreStates = new HashSet(); | |
final HashSet<FallingBlock> generatedBlocks = new HashSet(); | |
for (final Block explodedBlock : e.blockList()) { | |
final BlockState state = explodedBlock.getState(); | |
toRestoreStates.add(state); |