mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Fix object registry
This commit is contained in:
parent
488c609109
commit
d4c1e62c72
@ -97,7 +97,8 @@ public class IrisData {
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
|
||||
e.printStackTrace();
|
||||
Iris.error("Failed to create loader! " + registrant.getCanonicalName());
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -74,6 +74,21 @@ public class IrisObject extends IrisRegistrant {
|
||||
private transient IrisLock lock = new IrisLock("Preloadcache");
|
||||
private transient AtomicCache<AxisAlignedBB> aabb = new AtomicCache<>();
|
||||
|
||||
|
||||
|
||||
public IrisObject(int w, int h, int d) {
|
||||
blocks = new KMap<>();
|
||||
states = new KMap<>();
|
||||
this.w = w;
|
||||
this.h = h;
|
||||
this.d = d;
|
||||
center = new BlockVector(w / 2, h / 2, d / 2);
|
||||
}
|
||||
|
||||
public IrisObject() {
|
||||
this(0,0,0);
|
||||
}
|
||||
|
||||
public AxisAlignedBB getAABB() {
|
||||
return aabb.aquire(() -> getAABBFor(new BlockVector(w, h, d)));
|
||||
}
|
||||
@ -214,15 +229,6 @@ public class IrisObject extends IrisRegistrant {
|
||||
return o;
|
||||
}
|
||||
|
||||
public IrisObject(int w, int h, int d) {
|
||||
blocks = new KMap<>();
|
||||
states = new KMap<>();
|
||||
this.w = w;
|
||||
this.h = h;
|
||||
this.d = d;
|
||||
center = new BlockVector(w / 2, h / 2, d / 2);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"resource", "RedundantSuppression"})
|
||||
public static BlockVector sampleSize(File file) throws IOException {
|
||||
FileInputStream in = new FileInputStream(file);
|
||||
|
Loading…
x
Reference in New Issue
Block a user