Fixed the funky item rendering for fast graphics when viewing the altar and chemistry sets.

This commit is contained in:
WayofTime 2015-04-10 17:15:06 -04:00
parent 80fab2df12
commit 275d26be20
2 changed files with 9 additions and 4 deletions

View file

@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.renderer.block;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable;
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
import cpw.mods.fml.client.FMLClientHandler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
@ -13,6 +14,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
public class RenderWritingTable extends TileEntitySpecialRenderer
@ -57,7 +59,7 @@ public class RenderWritingTable extends TileEntitySpecialRenderer
if (tileAltar.getStackInSlot(i) != null)
{
float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(i));
float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL);
float rotationAngle = Minecraft.getMinecraft().gameSettings.fancyGraphics ? (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL) : 0;
EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj());
ghostEntityItem.hoverStart = 0.0F;
ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(i));

View file

@ -1,7 +1,6 @@
package WayofTime.alchemicalWizardry.common.renderer.block;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar;
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
@ -10,8 +9,12 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar;
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
public class TEAltarRenderer extends TileEntitySpecialRenderer
{
private ModelBloodAltar modelBloodAltar = new ModelBloodAltar();
@ -44,7 +47,7 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer
if (tileAltar.getStackInSlot(0) != null)
{
float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0));
float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL);
float rotationAngle = Minecraft.getMinecraft().gameSettings.fancyGraphics ? (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL) : 0;
EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj());
ghostEntityItem.hoverStart = 0.0F;
ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0));