Skip to content

Commit

Permalink
use XMaterial in util
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Aug 12, 2024
1 parent 358c9a8 commit baf766d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shared/src/main/java/me/xginko/aef/utils/ChunkUtil.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package me.xginko.aef.utils;

import com.cryptomorin.xseries.XMaterial;
import org.bukkit.Chunk;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.util.NumberConversions;

public class ChunkUtil {
Expand Down Expand Up @@ -37,9 +37,9 @@ public static long getInhabitedTime(Chunk chunk) {
public static void createBedrockLayer(Chunk chunk, int y) {
for (int x = 0; x < 16; x++) {
for (int z = 0; z < 16; z++) {
if (chunk.getBlock(x, y, z).getType() != Material.BEDROCK) {
if (chunk.getBlock(x, y, z).getType() != XMaterial.BEDROCK.parseMaterial()) {
// prevent physics to avoid loading nearby chunks which causes infinite chunk loading loops
chunk.getBlock(x, y, z).setType(Material.BEDROCK, false);
chunk.getBlock(x, y, z).setType(XMaterial.BEDROCK.parseMaterial(), false);
}
}
}
Expand Down

0 comments on commit baf766d

Please sign in to comment.