mirror of
https://github.com/songoda/UltimateTimber.git
synced 2024-11-04 17:50:15 +01:00
Fixed tree setting issues. Improved the tree audio experience
This commit is contained in:
parent
d00668bfbb
commit
120cb29c3b
@ -123,13 +123,17 @@ public class CurrentAdapter implements VersionAdapter {
|
||||
@Override
|
||||
public void playFallingSound(ITreeBlock treeBlock) {
|
||||
Location location = treeBlock.getLocation();
|
||||
location.getWorld().playSound(location, Sound.BLOCK_CHEST_OPEN, 3F, 0.1F);
|
||||
location.getWorld().playSound(location, Sound.BLOCK_CHEST_OPEN, 2F, 0.1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playLandingSound(ITreeBlock treeBlock) {
|
||||
Location location = treeBlock.getLocation();
|
||||
location.getWorld().playSound(location, Sound.BLOCK_WOOD_FALL, 3F, 0.1F);
|
||||
if (treeBlock.getTreeBlockType().equals(TreeBlockType.LOG)) {
|
||||
location.getWorld().playSound(location, Sound.BLOCK_WOOD_FALL, 2F, 0.1F);
|
||||
} else {
|
||||
location.getWorld().playSound(location, Sound.BLOCK_GRASS_BREAK, 0.5F, 0.75F);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,10 +4,7 @@ import com.songoda.ultimatetimber.UltimateTimber;
|
||||
import com.songoda.ultimatetimber.adapter.VersionAdapter;
|
||||
import com.songoda.ultimatetimber.manager.ConfigurationManager;
|
||||
import com.songoda.ultimatetimber.manager.TreeDefinitionManager;
|
||||
import com.songoda.ultimatetimber.tree.DetectedTree;
|
||||
import com.songoda.ultimatetimber.tree.ITreeBlock;
|
||||
import com.songoda.ultimatetimber.tree.TreeBlockSet;
|
||||
import com.songoda.ultimatetimber.tree.TreeDefinition;
|
||||
import com.songoda.ultimatetimber.tree.*;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -30,9 +27,6 @@ public class TreeAnimationDisintegrate extends TreeAnimation {
|
||||
boolean useCustomSound = ConfigurationManager.Setting.USE_CUSTOM_SOUNDS.getBoolean();
|
||||
boolean useCustomParticles = ConfigurationManager.Setting.USE_CUSTOM_PARTICLES.getBoolean();
|
||||
|
||||
if (useCustomSound)
|
||||
versionAdapter.playFallingSound(this.detectedTree.getDetectedTreeBlocks().getInitialLogBlock());
|
||||
|
||||
List<ITreeBlock<Block>> orderedLogBlocks = new ArrayList<>(this.detectedTree.getDetectedTreeBlocks().getLogBlocks());
|
||||
orderedLogBlocks.sort(Comparator.comparingInt(x -> x.getLocation().getBlockY()));
|
||||
|
||||
|
@ -16,8 +16,8 @@ disabled-worlds:
|
||||
- disabled_world_name
|
||||
|
||||
# The max number of logs that can be broken at one time
|
||||
# Default: 120
|
||||
max-logs-per-chop: 120
|
||||
# Default: 150
|
||||
max-logs-per-chop: 150
|
||||
|
||||
# The minimum number of leaves required for something to be considered a tree
|
||||
# Default: 5
|
||||
@ -202,10 +202,10 @@ trees:
|
||||
- JUNGLE_WOOD
|
||||
- STRIPPED_JUNGLE_WOOD
|
||||
leaves:
|
||||
- SPRUCE_LEAVES
|
||||
sapling: SPRUCE_SAPLING
|
||||
- JUNGLE_LEAVES
|
||||
sapling: JUNGLE_SAPLING
|
||||
plantable-soil: []
|
||||
max-leaf-distance-from-log: 5
|
||||
max-leaf-distance-from-log: 6
|
||||
search-for-leaves-diagonally: false
|
||||
drop-original-log: true
|
||||
drop-original-leaf: false
|
||||
|
@ -17,8 +17,8 @@ disabled-worlds:
|
||||
- disabled_world_name
|
||||
|
||||
# The max number of logs that can be broken at one time
|
||||
# Default: 120
|
||||
max-logs-per-chop: 120
|
||||
# Default: 150
|
||||
max-logs-per-chop: 150
|
||||
|
||||
# The minimum number of leaves required for something to be considered a tree
|
||||
# Default: 5
|
||||
@ -217,7 +217,7 @@ trees:
|
||||
- LEAVES:15
|
||||
sapling: SAPLING:3
|
||||
plantable-soil: []
|
||||
max-leaf-distance-from-log: 5
|
||||
max-leaf-distance-from-log: 6
|
||||
search-for-leaves-diagonally: false
|
||||
drop-original-log: true
|
||||
drop-original-leaf: false
|
||||
|
Loading…
Reference in New Issue
Block a user