mirror of
https://github.com/songoda/UltimateTimber.git
synced 2025-01-09 17:27:58 +01:00
Bump version to 1.0.11, minor fix
This commit is contained in:
parent
00b1bfc82a
commit
a766b780cb
@ -4,7 +4,7 @@ stages:
|
||||
variables:
|
||||
name: "UltimateTimber"
|
||||
path: "/builds/$CI_PROJECT_PATH"
|
||||
version: "1.0.10"
|
||||
version: "1.0.11"
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
@ -1,10 +1,8 @@
|
||||
package com.songoda.ultimatetimber.treefall;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@ -22,15 +20,9 @@ class NoAnimationTreeDestroyer {
|
||||
} else if (!blocks.stream().filter(b -> b.getType() == Material.RED_MUSHROOM_BLOCK).collect(Collectors.toList()).isEmpty()) {
|
||||
leavesType = Material.RED_MUSHROOM_BLOCK;
|
||||
}
|
||||
|
||||
// DEBUG ---- REMOVE
|
||||
Set<Block> uniqueBlocks = new HashSet<>();
|
||||
|
||||
// Drop loot and plant a new sapling
|
||||
for (Block block : blocks) {
|
||||
if (!uniqueBlocks.contains(block) && block.getType().name().contains("LOG"))
|
||||
uniqueBlocks.add(block);
|
||||
|
||||
TreeLoot.dropTreeLoot(block.getBlockData(), block.getLocation().clone().add(0.5, 0.5, 0.5), hasBonusLoot, hasSilkTouch);
|
||||
|
||||
if (leavesType != null) {
|
||||
@ -39,9 +31,6 @@ class NoAnimationTreeDestroyer {
|
||||
TreeReplant.replaceOriginalBlock(block);
|
||||
}
|
||||
}
|
||||
|
||||
// DEBUG ---- REMOVE
|
||||
Bukkit.broadcastMessage(uniqueBlocks.size() + "");
|
||||
}
|
||||
|
||||
static ItemStack getItem(Material material) {
|
||||
|
@ -97,9 +97,10 @@ public class TreeFallAnimation implements Listener, Runnable {
|
||||
}
|
||||
|
||||
private void unregisterTreeFallAnimation() {
|
||||
if (this.fallingBlocks.isEmpty())
|
||||
if (this.fallingBlocks.isEmpty()) {
|
||||
treeFallAnimationInstances.remove(this);
|
||||
Bukkit.getScheduler().cancelTask(this.fallingBlockTaskId);
|
||||
Bukkit.getScheduler().cancelTask(this.fallingBlockTaskId);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user