9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-27 11:09:06 +00:00

Fixed Rarity map, Fixed missing blocks

This commit is contained in:
Brian Fopiano
2021-12-25 18:40:25 -08:00
parent 24408e53a3
commit 8bbf98979e
2 changed files with 51 additions and 60 deletions

View File

@@ -46,7 +46,6 @@ import static org.bukkit.Material.*;
public class B {
private static final Material AIR_MATERIAL = Material.AIR;
private static final ReentrantLock createLock = new ReentrantLock();
private static final BlockData AIR = AIR_MATERIAL.createBlockData();
private static final IntSet foliageCache = buildFoliageCache();
private static final IntSet deepslateCache = buildDeepslateCache();
@@ -441,31 +440,8 @@ public class B {
return AIR;
}
private static BlockData createBlockData(String s) {
BlockData be = null;
try {
be = Bukkit.createBlockData(s);
} catch (Throwable e) {
}
if (be == null) {
try {
createLock.lock();
be = Bukkit.createBlockData(s);
createLock.unlock();
if (be != null) {
Iris.info("We have fixed: " + s);
}
return be;
} catch (Throwable ee) {
}
Iris.error("Oh no... " + s);
}
return be;
private static synchronized BlockData createBlockData(String s) {
return Bukkit.createBlockData(s);
}
private static BlockData parseBlockData(String ix) {