mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
more fixes
This commit is contained in:
1 parent
eba66e0182
commit
fb04e8eb08
55 files changed
+1446
-1442
No files matched your search
@@ -2,6 +2,7 @@ package tconstruct.client.entity.projectile;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mantle.blocks.BlockUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
@@ -23,7 +24,6 @@ import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import tconstruct.entity.projectile.DaggerEntity;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -70,13 +70,9 @@ public class DaggerRender extends Render
|
||||
float f6;
|
||||
int i;
|
||||
|
||||
Block block = null;
|
||||
if (itemstack.itemID < Block.blocksList.length)
|
||||
{
|
||||
block = Block.blocksList[itemstack.itemID];
|
||||
}
|
||||
Block block = BlockUtils.getBlockFromItem(itemstack.getItem());
|
||||
|
||||
if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
|
||||
if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(BlockUtils.getBlockFromItem(itemstack.getItem()).getRenderType()))
|
||||
{
|
||||
GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
@@ -167,7 +163,7 @@ public class DaggerRender extends Render
|
||||
|
||||
if (this.renderWithColor)
|
||||
{
|
||||
int l = Item.itemsList[itemstack.itemID].getColorFromItemStack(itemstack, 0);
|
||||
int l = itemstack.getItem().getColorFromItemStack(itemstack, 0);
|
||||
f8 = (float) (l >> 16 & 255) / 255.0F;
|
||||
float f9 = (float) (l >> 8 & 255) / 255.0F;
|
||||
f5 = (float) (l & 255) / 255.0F;
|
||||
@@ -306,7 +302,7 @@ public class DaggerRender extends Render
|
||||
|
||||
public void renderItemIntoGUI (FontRenderer par1FontRenderer, TextureManager par2TextureManager, ItemStack par3ItemStack, int par4, int par5, boolean renderEffect)
|
||||
{
|
||||
int k = par3ItemStack.itemID;
|
||||
Item k = par3ItemStack.getItem();
|
||||
int l = par3ItemStack.getItemDamage();
|
||||
Object object = par3ItemStack.getIconIndex();
|
||||
float f;
|
||||
@@ -314,8 +310,8 @@ public class DaggerRender extends Render
|
||||
float f1;
|
||||
float f2;
|
||||
|
||||
Block block = (k < Block.blocksList.length ? Block.blocksList[k] : null);
|
||||
if (par3ItemStack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(Block.blocksList[k].getRenderType()))
|
||||
Block block = BlockUtils.getBlockFromItem(k);
|
||||
if (par3ItemStack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(BlockUtils.getBlockFromItem(k).getRenderType()))
|
||||
{
|
||||
par2TextureManager.bindTexture(TextureMap.locationBlocksTexture);
|
||||
GL11.glPushMatrix();
|
||||
@@ -325,7 +321,7 @@ public class DaggerRender extends Render
|
||||
GL11.glScalef(1.0F, 1.0F, -1.0F);
|
||||
GL11.glRotatef(210.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
||||
i1 = Item.itemsList[k].getColorFromItemStack(par3ItemStack, 0);
|
||||
i1 = k.getColorFromItemStack(par3ItemStack, 0);
|
||||
f = (float) (i1 >> 16 & 255) / 255.0F;
|
||||
f1 = (float) (i1 >> 8 & 255) / 255.0F;
|
||||
f2 = (float) (i1 & 255) / 255.0F;
|
||||
@@ -341,15 +337,15 @@ public class DaggerRender extends Render
|
||||
this.itemRenderBlocks.field_147844_c = true;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else if (Item.itemsList[k].requiresMultipleRenderPasses())
|
||||
else if (k.requiresMultipleRenderPasses())
|
||||
{
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
||||
for (int j1 = 0; j1 < Item.itemsList[k].getRenderPasses(l); ++j1)
|
||||
for (int j1 = 0; j1 < k.getRenderPasses(l); ++j1)
|
||||
{
|
||||
par2TextureManager.bindTexture(par3ItemStack.getItemSpriteNumber() == 0 ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture);
|
||||
IIcon icon = Item.itemsList[k].getIcon(par3ItemStack, j1);
|
||||
int k1 = Item.itemsList[k].getColorFromItemStack(par3ItemStack, j1);
|
||||
IIcon icon = k.getIcon(par3ItemStack, j1);
|
||||
int k1 = k.getColorFromItemStack(par3ItemStack, j1);
|
||||
f1 = (float) (k1 >> 16 & 255) / 255.0F;
|
||||
f2 = (float) (k1 >> 8 & 255) / 255.0F;
|
||||
float f3 = (float) (k1 & 255) / 255.0F;
|
||||
@@ -380,7 +376,7 @@ public class DaggerRender extends Render
|
||||
object = ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture(resourcelocation)).getAtlasSprite("missingno");
|
||||
}
|
||||
|
||||
i1 = Item.itemsList[k].getColorFromItemStack(par3ItemStack, 0);
|
||||
i1 = k.getColorFromItemStack(par3ItemStack, 0);
|
||||
f = (float) (i1 >> 16 & 255) / 255.0F;
|
||||
f1 = (float) (i1 >> 8 & 255) / 255.0F;
|
||||
f2 = (float) (i1 & 255) / 255.0F;
|
||||
|
||||
Reference in new issue
Block a user