mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-07 00:06:10 +00:00
Cleanup
This commit is contained in:
@@ -45,49 +45,35 @@ public class AtomicCache<T> {
|
||||
public void reset() {
|
||||
t.set(null);
|
||||
|
||||
if(nullSupport)
|
||||
{
|
||||
if (nullSupport) {
|
||||
set.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
public T aquire(Supplier<T> t) {
|
||||
if(this.t.get() != null)
|
||||
{
|
||||
if (this.t.get() != null) {
|
||||
return this.t.get();
|
||||
}
|
||||
|
||||
else if(nullSupport && set.get())
|
||||
{
|
||||
} else if (nullSupport && set.get()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
lock.lock();
|
||||
|
||||
if(this.t.get() != null)
|
||||
{
|
||||
if (this.t.get() != null) {
|
||||
lock.unlock();
|
||||
return this.t.get();
|
||||
}
|
||||
|
||||
else if(nullSupport && set.get())
|
||||
{
|
||||
} else if (nullSupport && set.get()) {
|
||||
lock.unlock();
|
||||
return null;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
try {
|
||||
this.t.set(t.get());
|
||||
|
||||
if(nullSupport)
|
||||
{
|
||||
if (nullSupport) {
|
||||
set.set(true);
|
||||
}
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
} catch (Throwable e) {
|
||||
Iris.error("Atomic cache failure!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -92,8 +92,7 @@ public class MCATerrainChunk implements TerrainChunk {
|
||||
return;
|
||||
}
|
||||
|
||||
if(blockData == null)
|
||||
{
|
||||
if (blockData == null) {
|
||||
Iris.error("NULL BD");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user