Skip to content

Commit

Permalink
Fix folia support
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauriichan committed Nov 18, 2024
1 parent f27a0f7 commit e530b52
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 20 deletions.
30 changes: 23 additions & 7 deletions dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.syntaxphoenix.spigot</groupId>
<artifactId>smoothtimber-legacy</artifactId>
<name>SmoothTimber</name>
<version>1.27.0</version>
<version>1.27.1</version>
<build>
<resources>
<resource>
Expand Down Expand Up @@ -59,6 +59,14 @@
<pattern>net.coreprotect.v2</pattern>
<shadedPattern>net.coreprotect</shadedPattern>
</relocation>
<relocation>
<pattern>lands.v1</pattern>
<shadedPattern>me.angeschossen.lands</shadedPattern>
</relocation>
<relocation>
<pattern>lands.v2</pattern>
<shadedPattern>me.angeschossen.lands</shadedPattern>
</relocation>
<relocation>
<pattern>mcmmo.v1.com</pattern>
<shadedPattern>com</shadedPattern>
Expand Down Expand Up @@ -156,12 +164,6 @@
<version>2.10.9</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.angeschossen</groupId>
<artifactId>LandsAPI</artifactId>
<version>4.10.18</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.TechFortress</groupId>
<artifactId>GriefPrevention</artifactId>
Expand Down Expand Up @@ -242,6 +244,20 @@
<version>2.28.0.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>lands</groupId>
<artifactId>lands1</artifactId>
<version>1</version>
<scope>system</scope>
<systemPath>${project.basedir}/libraries/LandsAPI.repackaged.jar</systemPath>
</dependency>
<dependency>
<groupId>lands</groupId>
<artifactId>lands2</artifactId>
<version>1</version>
<scope>system</scope>
<systemPath>${project.basedir}/libraries/lands-api-7.0.2.repackaged.jar</systemPath>
</dependency>
<dependency>
<groupId>net.coreprotect</groupId>
<artifactId>CoreProtect6</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.syntaxphoenix.spigot</groupId>
<artifactId>smoothtimber-legacy</artifactId>
<version>1.27.1</version>
<version>1.27.2</version>
<name>SmoothTimber</name>
<packaging>jar</packaging>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void onBlockBreak(final BlockBreakEvent event) {
return;
}
final VersionChanger change = PluginUtils.CHANGER;
if (!change.isWoodBlock(Locator.getBlockState(event.getBlock()))) {
if (!change.isWoodBlock(event.getBlock().getState())) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import java.util.function.Function;

import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.block.BlockState;

import com.syntaxphoenix.spigot.smoothtimber.config.config.CutterConfig;
Expand Down Expand Up @@ -60,16 +59,6 @@ public static BlockState getBlockState(final Location location) {
return BLOCK_DETECTOR.apply(location);
}

public static BlockState getBlockState(final Block block) {
Platform platform = Platform.getPlatform();
if (platform.isRegional()) {
ObjectTask<BlockState> task = new ObjectTask<>(() -> block.getState());
Platform.getPlatform().regionalTask(block.getLocation(), task);
return task.get();
}
return block.getState();
}

public static void locateWood(final Location breakPoint, final List<Location> output, final int limit) {
int roots = CutterConfig.ROOT_DEPTH;
final int radius = CutterConfig.CHECK_RADIUS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"1.21.0",
"1.21.1",
"1.21.2",
"1.21.3",
})
public final class v1_20xChanger implements VersionChanger {

Expand Down

0 comments on commit e530b52

Please sign in to comment.