Skip to content

Commit

Permalink
more work on 1.7 updates still WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Dec 27, 2013
1 parent a7808cd commit 7337596
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 25 deletions.
4 changes: 2 additions & 2 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
minecraft_version=1.6.4
forge_version=9.11.1.964
minecraft_version=1.67.2
forge_version=10.12.0.968
6 changes: 3 additions & 3 deletions src/mantle/blocks/MantleBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ public MantleBlock(Material material) {

// IDebuggable support - Uses a stick for debug purposes.
@Override
public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player) {
public void func_149670_a(World world, int x, int y, int z, EntityPlayer player) {
if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER && player.getHeldItem() != null && player.getHeldItem().getItem() == Item.stick)
{
TileEntity te = world.getBlockTileEntity(x, y, z);
TileEntity te = world.func_147438_o(x, y, z);
if (te instanceof IDebuggable)
DebugHelper.handleDebugData(((IDebuggable) te).getDebugInfo(player));
}
super.onBlockClicked(world, x, y, z, player);
super.func_149670_a(world, x, y, z, player);
}

}
2 changes: 1 addition & 1 deletion src/mantle/blocks/abstracts/ExpandableInventoryLogic.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void readFromNBT (NBTTagCompound tags)
inventory.ensureCapacity(nbttaglist.tagCount() > getMaxSize() ? getMaxSize() : nbttaglist.tagCount());
for (int iter = 0; iter < nbttaglist.tagCount(); iter++)
{
NBTTagCompound tagList = (NBTTagCompound) nbttaglist.tagAt(iter);
NBTTagCompound tagList = (NBTTagCompound) nbttaglist.func_150305_b(iter);
byte slotID = tagList.getByte("Slot");
if (slotID >= 0 && slotID < inventory.size())
{
Expand Down
4 changes: 2 additions & 2 deletions src/mantle/blocks/abstracts/InventoryBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public void registerIcons (IIconRegister iconRegister)

/* IDebuggable */
@Override
public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player) {
public void func_149670_a(World world, int x, int y, int z, EntityPlayer player) {
if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER && player.getHeldItem().getItem() == Item.stick)
{
TileEntity te = world.getBlockTileEntity(x, y, z);
Expand All @@ -208,6 +208,6 @@ public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player
}
}

super.onBlockClicked(world, x, y, z, player);
super.func_149670_a(world, x, y, z, player);
}
}
30 changes: 14 additions & 16 deletions src/mantle/client/RenderItemCopy.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,14 @@ public void doRenderItem (EntityItem par1EntityItem, double par2, double par4, d
int i;

Block block = null;
if (itemstack.itemID < Block.blocksList.length)
{
block = Block.blocksList[itemstack.itemID];
}

block = Block.func_149634_a(itemstack.getItem());

if (ForgeHooksClient.renderEntityItem(par1EntityItem, itemstack, f2, f3, random, renderManager.renderEngine, renderBlocks))
{
;
}
else if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
else if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(block.getRenderType()))
{
GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);

Expand Down Expand Up @@ -142,7 +140,7 @@ else if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.r

if (this.renderWithColor)
{
i = Item.itemsList[itemstack.itemID].getColorFromItemStack(itemstack, k);
i = itemstack.getItem().getColorFromItemStack(itemstack, k);
f5 = (float) (i >> 16 & 255) / 255.0F;
f4 = (float) (i >> 8 & 255) / 255.0F;
f6 = (float) (i & 255) / 255.0F;
Expand Down Expand Up @@ -171,7 +169,7 @@ else if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.r

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;
Expand Down Expand Up @@ -347,16 +345,16 @@ public void renderItemIntoGUI (SmallFontRenderer par1FontRenderer, TextureManage

public void renderItemIntoGUI (SmallFontRenderer 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.getItem() == null ? null : par3ItemStack.getIconIndex();
float f;
int i1;
float f1;
float f2;

Block block = (k < Block.blocksList.length ? Block.blocksList[k] : null);
if (block != null && par3ItemStack.getItemSpriteNumber() == 0 && RenderBlocks.renderItemIn3d(Block.blocksList[k].getRenderType()))
Block block = Block.func_149634_a(k);
if (block != null && par3ItemStack.getItemSpriteNumber() == 0 && RenderBlocks.renderItemIn3d(block.getRenderType()))
{
par2TextureManager.bindTexture(TextureMap.locationBlocksTexture);
GL11.glPushMatrix();
Expand All @@ -366,7 +364,7 @@ public void renderItemIntoGUI (SmallFontRenderer par1FontRenderer, TextureManage
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 = par3ItemStack.getItem().getColorFromItemStack(par3ItemStack, 0);
f = (float) (i1 >> 16 & 255) / 255.0F;
f1 = (float) (i1 >> 8 & 255) / 255.0F;
f2 = (float) (i1 & 255) / 255.0F;
Expand All @@ -382,15 +380,15 @@ public void renderItemIntoGUI (SmallFontRenderer par1FontRenderer, TextureManage
this.itemRenderBlocks.useInventoryTint = true;
GL11.glPopMatrix();
}
else if (Item.itemsList[k] != null && Item.itemsList[k].requiresMultipleRenderPasses())
else if (k != null && 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;
Expand Down Expand Up @@ -421,7 +419,7 @@ else if (Item.itemsList[k] != null && Item.itemsList[k].requiresMultipleRenderPa
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;
Expand Down
2 changes: 1 addition & 1 deletion src/mantle/lib/client/MantleClientRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class MantleClientRegistry
{
public static Map<String, ItemStack> manualIcons = new HashMap<String, ItemStack>();
public static Map<String, ItemStack[]> recipeIcons = new HashMap<String, ItemStack[]>();
public static ItemStack defaultStack = new ItemStack(Item.ingotIron);
public static ItemStack defaultStack = new ItemStack(Item.func_150899_d(265));

public static void registerManualIcon (String name, ItemStack stack)
{
Expand Down

0 comments on commit 7337596

Please sign in to comment.