mirror of
https://github.com/songoda/UltimateTimber.git
synced 2025-01-25 08:51:21 +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:
|
variables:
|
||||||
name: "UltimateTimber"
|
name: "UltimateTimber"
|
||||||
path: "/builds/$CI_PROJECT_PATH"
|
path: "/builds/$CI_PROJECT_PATH"
|
||||||
version: "1.0.10"
|
version: "1.0.11"
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
package com.songoda.ultimatetimber.treefall;
|
package com.songoda.ultimatetimber.treefall;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
@ -23,14 +21,8 @@ class NoAnimationTreeDestroyer {
|
|||||||
leavesType = Material.RED_MUSHROOM_BLOCK;
|
leavesType = Material.RED_MUSHROOM_BLOCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// DEBUG ---- REMOVE
|
|
||||||
Set<Block> uniqueBlocks = new HashSet<>();
|
|
||||||
|
|
||||||
// Drop loot and plant a new sapling
|
// Drop loot and plant a new sapling
|
||||||
for (Block block : blocks) {
|
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);
|
TreeLoot.dropTreeLoot(block.getBlockData(), block.getLocation().clone().add(0.5, 0.5, 0.5), hasBonusLoot, hasSilkTouch);
|
||||||
|
|
||||||
if (leavesType != null) {
|
if (leavesType != null) {
|
||||||
@ -39,9 +31,6 @@ class NoAnimationTreeDestroyer {
|
|||||||
TreeReplant.replaceOriginalBlock(block);
|
TreeReplant.replaceOriginalBlock(block);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// DEBUG ---- REMOVE
|
|
||||||
Bukkit.broadcastMessage(uniqueBlocks.size() + "");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ItemStack getItem(Material material) {
|
static ItemStack getItem(Material material) {
|
||||||
|
@ -97,10 +97,11 @@ public class TreeFallAnimation implements Listener, Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void unregisterTreeFallAnimation() {
|
private void unregisterTreeFallAnimation() {
|
||||||
if (this.fallingBlocks.isEmpty())
|
if (this.fallingBlocks.isEmpty()) {
|
||||||
treeFallAnimationInstances.remove(this);
|
treeFallAnimationInstances.remove(this);
|
||||||
Bukkit.getScheduler().cancelTask(this.fallingBlockTaskId);
|
Bukkit.getScheduler().cancelTask(this.fallingBlockTaskId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This is used to detect after the falling tree blocks have hit the ground
|
This is used to detect after the falling tree blocks have hit the ground
|
||||||
|
Loading…
Reference in New Issue
Block a user