aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/client/renderer
diff options
context:
space:
mode:
authorAlkalus <Draknyte1@hotmail.com>2020-05-04 01:32:46 +0100
committerAlkalus <Draknyte1@hotmail.com>2020-05-04 01:32:46 +0100
commit2b7ae2001ed8f49d2de8f88ef306426af60c279b (patch)
tree954737087b6adcbb4b3b8f4f7d3464d2e0212b6f /src/Java/gtPlusPlus/core/client/renderer
parent3159aef00e7babcf8c5e1d574a738b6d2cac9e42 (diff)
downloadGT5-Unofficial-2b7ae2001ed8f49d2de8f88ef306426af60c279b.tar.gz
GT5-Unofficial-2b7ae2001ed8f49d2de8f88ef306426af60c279b.tar.bz2
GT5-Unofficial-2b7ae2001ed8f49d2de8f88ef306426af60c279b.zip
$ Fixed handling of Giant Eggs.
$ Fixed obscure crash caused by Dingos. $ Fixed handling of Spawn Eggs and entities registered to the global list. $ Potentially fixed NEI not working correctly for GT++ recipe maps.
Diffstat (limited to 'src/Java/gtPlusPlus/core/client/renderer')
-rw-r--r--src/Java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java b/src/Java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java
new file mode 100644
index 0000000000..b4f64f9b35
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java
@@ -0,0 +1,46 @@
+package gtPlusPlus.core.client.renderer.tabula;
+
+import cpw.mods.fml.client.registry.RenderingRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.client.model.tabula.ModelTabulaBase;
+import gtPlusPlus.core.lib.CORE;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+
+@SideOnly(Side.CLIENT)
+public class RenderTabulaBase extends TileEntitySpecialRenderer {
+
+ private final ModelTabulaBase mModel;
+ private final ResourceLocation mTexture;
+ private final Class mTileClass;
+
+ public final int mRenderID;
+ public final RenderTabulaBase mInstance;
+
+ public RenderTabulaBase(ModelTabulaBase aModel, String aTexturePath, Class aTileClass) {
+ mModel = aModel;
+ mTexture = new ResourceLocation(CORE.MODID, aTexturePath);
+ mTileClass = aTileClass;
+ this.mRenderID = RenderingRegistry.getNextAvailableRenderId();
+ mInstance = this;
+ }
+
+ public void renderTileEntityAt(Object aTile, double p_147500_2_, double p_147500_4_, double p_147500_6_, float p_147500_8_) {
+ if (mTileClass.isInstance(aTile)) {
+ //Logger.INFO("Rendering EggBox");
+ this.bindTexture(mTexture);
+ mModel.renderAll();
+ }
+ }
+
+ public void renderTileEntityAt(TileEntity aTile, double p_147500_2_, double p_147500_4_, double p_147500_6_, float p_147500_8_) {
+ if (mTileClass != null && aTile != null) {
+ if (mTileClass.isInstance(aTile)) {
+ this.renderTileEntityAt((Object) aTile, p_147500_2_, p_147500_4_, p_147500_6_, p_147500_8_);
+ }
+ }
+ }
+} \ No newline at end of file