Merge branch 'development'
This commit is contained in:
commit
b600ca6bac
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>UltimateTimber</artifactId>
|
||||
<version>2.2.3</version>
|
||||
<version>2.2.4</version>
|
||||
<relativePath>../../</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>UltimateTimber</artifactId>
|
||||
<version>2.2.3</version>
|
||||
<version>2.2.4</version>
|
||||
<relativePath>../../</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -483,4 +483,11 @@ required-axe:
|
|||
- 'DURABILITY:3'
|
||||
- 'DIG_SPEED:5'
|
||||
# NBT to identify the axe by.
|
||||
nbt: 'ultimatetimber_axe'
|
||||
nbt: 'ultimatetimber_axe'
|
||||
|
||||
# If a tree lands on these blocks they will be destroyed.
|
||||
fragile-blocks:
|
||||
- GLASS
|
||||
- ICE
|
||||
- PACKED_ICE
|
||||
- BLUE_ICE
|
|
@ -46,7 +46,8 @@ public class ConfigurationManager extends Manager {
|
|||
HOOKS_APPLY_EXTRA_DROPS(SettingType.BOOLEAN),
|
||||
HOOKS_REQUIRE_ABILITY_ACTIVE(SettingType.BOOLEAN),
|
||||
TREE_ANIMATION_TYPE(SettingType.STRING),
|
||||
SCATTER_TREE_BLOCKS_ON_GROUND(SettingType.BOOLEAN);
|
||||
SCATTER_TREE_BLOCKS_ON_GROUND(SettingType.BOOLEAN),
|
||||
FRAGILE_BLOCKS(SettingType.STRING_LIST);
|
||||
|
||||
private SettingType settingType;
|
||||
private Object value = null;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.songoda.ultimatetimber.manager;
|
||||
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.ultimatetimber.UltimateTimber;
|
||||
import com.songoda.ultimatetimber.animation.TreeAnimation;
|
||||
import com.songoda.ultimatetimber.animation.TreeAnimationCrumble;
|
||||
|
@ -155,6 +156,12 @@ public class TreeAnimationManager extends Manager implements Listener, Runnable
|
|||
if (useCustomSound)
|
||||
SoundUtils.playLandingSound(treeBlock);
|
||||
|
||||
Block block = treeBlock.getLocation().subtract(0, 1, 0).getBlock();
|
||||
if (ConfigurationManager.Setting.FRAGILE_BLOCKS.getStringList().contains(block.getType().toString())) {
|
||||
block.getWorld().dropItemNaturally(block.getLocation(), CompatibleMaterial.getMaterial(block).getItem());
|
||||
block.breakNaturally();
|
||||
}
|
||||
|
||||
treeDefinitionManager.dropTreeLoot(treeDefinition, treeBlock, treeAnimation.getPlayer(), treeAnimation.hasSilkTouch(), false);
|
||||
this.plugin.getSaplingManager().replantSaplingWithChance(treeDefinition, treeBlock);
|
||||
treeAnimation.getFallingTreeBlocks().remove(treeBlock);
|
||||
|
|
Loading…
Reference in New Issue