parent
49c9a1a42e
commit
3e1fa6f937
|
@ -48,7 +48,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<version>3.3.0-SNAPSHOT</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>shaded</id>
|
||||
|
@ -94,12 +94,17 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>apache.snapshots</id>
|
||||
<url>https://repository.apache.org/snapshots/</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.16.2</version>
|
||||
<version>1.17</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.songoda.ultimatetimber.manager;
|
||||
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.core.compatibility.ServerVersion;
|
||||
import com.songoda.ultimatetimber.UltimateTimber;
|
||||
import com.songoda.ultimatetimber.animation.TreeAnimation;
|
||||
import com.songoda.ultimatetimber.animation.TreeAnimationCrumble;
|
||||
|
@ -58,12 +59,14 @@ public class TreeAnimationManager extends Manager implements Listener, Runnable
|
|||
Set<ITreeBlock<FallingBlock>> groundedBlocks = new HashSet<>();
|
||||
for (ITreeBlock<FallingBlock> fallingTreeBlock : treeAnimation.getFallingTreeBlocks().getAllTreeBlocks()) {
|
||||
FallingBlock fallingBlock = fallingTreeBlock.getBlock();
|
||||
if (fallingBlock.isDead())
|
||||
if (fallingBlock.isDead() || ServerVersion.isServerVersionAtLeast(ServerVersion.V1_17) && fallingBlock.isOnGround())
|
||||
groundedBlocks.add(fallingTreeBlock);
|
||||
}
|
||||
|
||||
for (ITreeBlock<FallingBlock> fallingBlock : groundedBlocks) {
|
||||
this.runFallingBlockImpact(treeAnimation, fallingBlock);
|
||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_17))
|
||||
fallingBlock.getBlock().remove();
|
||||
treeAnimation.getFallingTreeBlocks().remove(fallingBlock);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue