Files
Mohammad-Ali Minaie b86dedad2f base mod created
2018-10-08 09:07:47 -04:00

20 lines
343 B
Java

package net.minecraft.util;
public abstract class LazyLoadBase<T>
{
private T value;
private boolean isLoaded;
public T getValue()
{
if (!this.isLoaded)
{
this.isLoaded = true;
this.value = (T)this.load();
}
return this.value;
}
protected abstract T load();
}