use of com.ferreusveritas.dynamictrees.api.IFutureBreakable in project DynamicTrees by DynamicTreesTeam.
the class FutureBreak method process.
public static void process(World world) {
if (!futureBreaks.isEmpty()) {
Iterator<FutureBreak> i = futureBreaks.iterator();
while (i.hasNext()) {
FutureBreak fb = i.next();
if (world == fb.world) {
// Make sure we're working in the same world
if (fb.state.getBlock() instanceof IFutureBreakable) {
if (fb.ticks-- <= 0) {
IFutureBreakable branch = (IFutureBreakable) fb.state.getBlock();
branch.futureBreak(fb.state, world, fb.pos, fb.entity);
i.remove();
}
} else {
i.remove();
}
}
}
}
}
Aggregations