Skip to content

Commit

Permalink
replace left over deprecated parseMaterial calls
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Jan 2, 2025
1 parent 6be25ca commit 1103b95
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public BlockLimit() {
Map<String, Object> compatible = new TreeMap<>();
for (Map.Entry<XMaterial, Integer> entry : universal.entrySet()) {
if (entry.getKey().isSupported()) {
compatible.put(entry.getKey().parseMaterial().name(), entry.getValue());
compatible.put(entry.getKey().get().name(), entry.getValue());
}
}

Expand Down
4 changes: 2 additions & 2 deletions shared/src/main/java/me/xginko/aef/utils/ChunkUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public static boolean isEntitiesLoaded(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() != XMaterial.BEDROCK.parseMaterial()) {
if (chunk.getBlock(x, y, z).getType() != XMaterial.BEDROCK.get()) {
// prevent physics to avoid loading nearby chunks which causes infinite chunk loading loops
chunk.getBlock(x, y, z).setType(XMaterial.BEDROCK.parseMaterial(), false);
chunk.getBlock(x, y, z).setType(XMaterial.BEDROCK.get(), false);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions shared/src/main/java/me/xginko/aef/utils/EntityUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public static void disableMapPositionCursor(@NotNull ItemFrame itemFrame) {

ItemStack itemInsideFrame = itemFrame.getItem();
if (itemInsideFrame == null) return; // Shouldn't be null but just in case
if (itemInsideFrame.getType() != XMaterial.MAP.parseMaterial()
&& itemInsideFrame.getType() != XMaterial.FILLED_MAP.parseMaterial()) return;
if (itemInsideFrame.getType() != XMaterial.MAP.get()
&& itemInsideFrame.getType() != XMaterial.FILLED_MAP.get()) return;
if (!itemInsideFrame.hasItemMeta()) return;

MapMeta mapMeta = (MapMeta) itemInsideFrame.getItemMeta();
Expand Down

0 comments on commit 1103b95

Please sign in to comment.