Added accessible instance to RenderBlocks and RenderItem for modders to use who don't wish to create there own instance. Warning: Other modders may influance the transient state of the instance, BE WEARY MODDERS.

This commit is contained in:
Lex Manos committed 2014-05-14 12:23:22 -07:00
1 parent 1c7341b982
commit 9d66c91c86
2 files changed
+32 -1

No files matched your search

@@ -107,3 +107,22 @@
boolean flag4 = p_147767_1_.func_149646_a(this.field_147845_a, p_147767_2_, p_147767_3_ + 1, p_147767_4_, 1);
boolean flag5 = p_147767_1_.func_149646_a(this.field_147845_a, p_147767_2_, p_147767_3_ - 1, p_147767_4_, 0);
double d19 = 0.01D;
@@ -8218,4 +8222,18 @@
return (IIcon)p_147758_1_;
}
+
+ /*==================================== FORGE START ===========================================*/
+ private static RenderBlocks instance;
+ /**
+ * Returns a single lazy loaded instance of RenderBlocks, for use in mods who
+ * don't care about the interaction of other objects on the current state of the RenderBlocks they are using.
+ * @return A global instance of RenderBlocks
+ */
+ public static RenderBlocks getInstance()
+ {
+ if (instance == null) instance = new RenderBlocks();
+ return instance;
+ }
+ /*==================================== FORGE END =============================================*/
}
@@ -264,7 +264,7 @@
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_TEXTURE_2D);
@@ -638,4 +718,42 @@
@@ -638,4 +718,54 @@
{
this.func_76986_a((EntityItem)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
@@ -305,5 +305,17 @@
+ {
+ return original;
+ }
+
+ private static RenderItem instance;
+ /**
+ * Returns a single lazy loaded instance of RenderItem, for use in mods who
+ * don't care about the interaction of other objects on the current state of the RenderItem they are using.
+ * @return A global instance of RenderItem
+ */
+ public static RenderItem getInstance()
+ {
+ if (instance == null) instance = new RenderItem();
+ return instance;
+ }
+ /*==================================== FORGE END =============================================*/
}