sanity check on tessellator in lux capacitor & some tidying
This commit is contained in:
parent
8f4397576f
commit
79f4f0e8fc
3 changed files with 13 additions and 11 deletions
|
@ -1,11 +1,13 @@
|
||||||
package net.machinemuse.powersuits.client.render.block;
|
package net.machinemuse.powersuits.client.render.block;
|
||||||
|
|
||||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||||
|
import net.machinemuse.general.MuseLogger;
|
||||||
import net.machinemuse.powersuits.block.TileEntityLuxCapacitor;
|
import net.machinemuse.powersuits.block.TileEntityLuxCapacitor;
|
||||||
import net.machinemuse.powersuits.common.Config;
|
import net.machinemuse.powersuits.common.Config;
|
||||||
import net.machinemuse.utils.render.MuseRenderer;
|
import net.machinemuse.utils.render.MuseRenderer;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.renderer.RenderBlocks;
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
@ -73,10 +75,14 @@ public class RenderLuxCapacitorTESR extends TileEntitySpecialRenderer implements
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (!Tessellator.instance.isDrawing) {
|
||||||
getFrameModel().renderAll();
|
getFrameModel().renderAll();
|
||||||
MuseRenderer.glowOn();
|
MuseRenderer.glowOn();
|
||||||
getLightModel().renderAll();
|
getLightModel().renderAll();
|
||||||
MuseRenderer.glowOff();
|
MuseRenderer.glowOff();
|
||||||
|
} else {
|
||||||
|
MuseLogger.logError("Error: tessellator not flushed properly when MPS got ahold of it!");
|
||||||
|
}
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,9 @@ class ArmorModel(par1: Float, par2: Float, par3: Int, par4: Int) extends ModelPl
|
||||||
try {
|
try {
|
||||||
val entLive: EntityLiving = entity.asInstanceOf[EntityLiving]
|
val entLive: EntityLiving = entity.asInstanceOf[EntityLiving]
|
||||||
val stack: ItemStack = entLive.getCurrentItemOrArmor(0)
|
val stack: ItemStack = entLive.getCurrentItemOrArmor(0)
|
||||||
this.heldItemRight = if ((stack != null)) 1 else 0
|
this.heldItemRight = if (stack != null) 1 else 0
|
||||||
this.isSneak = entLive.isSneaking
|
this.isSneak = entLive.isSneaking
|
||||||
this.aimedBow = (entLive.asInstanceOf[EntityPlayer]).getItemInUse != null
|
this.aimedBow = entLive.asInstanceOf[EntityPlayer].getItemInUse != null
|
||||||
} catch {
|
} catch {
|
||||||
case _: Exception =>
|
case _: Exception =>
|
||||||
}
|
}
|
||||||
|
@ -68,8 +68,4 @@ class ArmorModel(par1: Float, par2: Float, par3: Int, par4: Int) extends ModelPl
|
||||||
}
|
}
|
||||||
glPopMatrix()
|
glPopMatrix()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def renderParts(transform: MorphTarget, model: WavefrontObject, colour: Colour, glow: Boolean, parts: Array[String]) {
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -56,7 +56,7 @@ class ModelSpec(val model: WavefrontObject,
|
||||||
val filename: String
|
val filename: String
|
||||||
) extends MuseRegistry[ModelPartSpec] {
|
) extends MuseRegistry[ModelPartSpec] {
|
||||||
def applyOffsetAndRotation = {
|
def applyOffsetAndRotation = {
|
||||||
|
// TODO: Implement
|
||||||
}
|
}
|
||||||
|
|
||||||
def getOwnName = {
|
def getOwnName = {
|
||||||
|
|
Loading…
Reference in a new issue