Skip to content

Commit

Permalink
Fix issue under 1.14/1.15
Browse files Browse the repository at this point in the history
  • Loading branch information
Phoenix616 committed Feb 2, 2020
1 parent 3be99a4 commit 7159a0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -42,7 +42,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.13.2-R0.1-SNAPSHOT</version>
<version>1.15.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Expand Up @@ -20,9 +20,10 @@

import com.sk89q.worldedit.math.BlockVector3;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.data.BlockData;
import org.bukkit.block.data.type.Sign;
import org.bukkit.block.data.type.WallSign;
import org.bukkit.generator.ChunkGenerator;

import java.util.Random;
Expand Down Expand Up @@ -68,7 +69,7 @@ public ChunkData generateChunkData(World world, Random random, int x, int z, Bio
for (int chunkY = 0; chunkY < schematic.getHeight(); chunkY++) {
BlockData block = schematic.getBlock(schemX, chunkY, schemZ);
data.setBlock(chunkX, chunkY, chunkZ, block);
if (sign == null && (block.getMaterial() == Material.SIGN || block.getMaterial() == Material.WALL_SIGN)) {
if (sign == null && (block instanceof Sign || block instanceof WallSign)) {
sign = BlockVector3.at(x * 16 + chunkX, chunkY, z * 16 + chunkZ);
}
}
Expand Down

0 comments on commit 7159a0d

Please sign in to comment.