Skip to content

Commit

Permalink
0 compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Dec 30, 2013
1 parent ef73612 commit f5cca31
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 18 deletions.
6 changes: 5 additions & 1 deletion src/mantle/blocks/abstracts/ExpandableInventoryLogic.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public ItemStack decrStackSize (int slot, int quantity)
@Override
public boolean isUseableByPlayer (EntityPlayer entityplayer)
{
if (this.getBlockTileEntity(field_145851_c, field_145848_d, field_145849_e) != this)
if (getWorld().func_147438_o(field_145851_c, field_145848_d, field_145849_e) != this)
return false;

else
Expand Down Expand Up @@ -214,5 +214,9 @@ public boolean isItemValidForSlot (int slot, ItemStack itemstack)
}
return false;
}
public World getWorld()
{
return this.func_145831_w();
}

}
4 changes: 2 additions & 2 deletions src/mantle/blocks/abstracts/InventoryBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ public int func_149660_a (World world, int x, int y, int z, int side, float hitX
this.side = side;
return meta;
}

//TODO onBlockPlacedBy
@Override
public void onBlockPlacedBy (World world, int x, int y, int z, EntityLivingBase entityliving, ItemStack stack)
public void func_149689_a (World world, int x, int y, int z, EntityLivingBase entityliving, ItemStack stack)
{
TileEntity logic = world.func_147438_o(x, y, z);
if (logic instanceof IFacingLogic)
Expand Down
8 changes: 6 additions & 2 deletions src/mantle/blocks/abstracts/InventoryLogic.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ public ItemStack decrStackSize (int slot, int quantity)
@Override
public boolean isUseableByPlayer (EntityPlayer entityplayer)
{
if (this.getBlockTileEntity(field_145851_c, field_145848_d, field_145849_e) != this)
//getBlockTileEntity
if (getWorld().func_147438_o(field_145851_c, field_145848_d, field_145849_e) != this)
return false;

else
Expand Down Expand Up @@ -226,7 +227,10 @@ public void removeBlock ()
{

}

public World getWorld()
{
return this.func_145831_w();
}
/* IDebuggable */
@Override
public DebugData getDebugInfo(EntityPlayer player) {
Expand Down
5 changes: 3 additions & 2 deletions src/mantle/blocks/abstracts/MultiServantLogic.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void notifyMasterOfChange ()
{
if (hasValidMaster())
{
IMasterLogic logic = (IMasterLogic) getWorld().getBlockTileEntity(master.x, master.y, master.z);
IMasterLogic logic = (IMasterLogic) getWorld().func_147438_o(master.x, master.y, master.z);
logic.notifyChange(this, field_145851_c, field_145848_d, field_145849_e);
}
}
Expand Down Expand Up @@ -161,7 +161,8 @@ public Packet func_145844_m ()
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
readCustomNBT(packet.func_148857_g());
this.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e);
//TODO markblockforRenderUpdate() ???
getWorld().func_147471_g(field_145851_c, field_145848_d, field_145849_e);
}

/* IDebuggable */
Expand Down
16 changes: 10 additions & 6 deletions src/mantle/client/RenderItemCopy.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void doRenderItem (EntityItem par1EntityItem, double par2, double par4, d
{
;
}
else if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(block.func_149645_b()))
else if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.func_147739_a(block.func_149645_b()))
{
GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);

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

f5 = 1.0F;
this.itemRenderBlocks.renderBlockAsItem(block, itemstack.getItemDamage(), f5);
//TODO renderBlockAsItem
this.itemRenderBlocks.func_147800_a(block, itemstack.getItemDamage(), f5);
GL11.glPopMatrix();
}
}
Expand Down Expand Up @@ -354,7 +355,8 @@ public void renderItemIntoGUI (SmallFontRenderer par1FontRenderer, TextureManage
float f2;

Block block = Block.func_149634_a(k);
if (block != null && par3ItemStack.getItemSpriteNumber() == 0 && RenderBlocks.renderItemIn3d(block.func_149645_b()))
//TODO renderItemIn3d
if (block != null && par3ItemStack.getItemSpriteNumber() == 0 && RenderBlocks.func_147739_a(block.func_149645_b()))
{
par2TextureManager.bindTexture(TextureMap.locationBlocksTexture);
GL11.glPushMatrix();
Expand All @@ -375,9 +377,11 @@ public void renderItemIntoGUI (SmallFontRenderer par1FontRenderer, TextureManage
}

GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
this.itemRenderBlocks.useInventoryTint = this.renderWithColor;
this.itemRenderBlocks.renderBlockAsItem(block, l, 1.0F);
this.itemRenderBlocks.useInventoryTint = true;
//TODO FIX THESE
//this.itemRenderBlocks.useInventoryTint = this.renderWithColor;
this.itemRenderBlocks.func_147800_a(block, l, 1.0F);
//TODO FIX THESE
//this.itemRenderBlocks.useInventoryTint = true;
GL11.glPopMatrix();
}
else if (k != null && k.requiresMultipleRenderPasses())
Expand Down
13 changes: 8 additions & 5 deletions src/mantle/client/gui/GuiManual.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,20 @@ public void initGui ()
maxPages = manual.getElementsByTagName("page").getLength();
updateText();
int xPos = (this.field_146294_l) / 2; //TODO Width?
this.buttonList.add(this.buttonNextPage = new TurnPageButton(1, xPos + bookImageWidth - 50, 180, true));
this.buttonList.add(this.buttonPreviousPage = new TurnPageButton(2, xPos - bookImageWidth + 24, 180, false));
//TODO buttonList
this.field_146292_n.add(this.buttonNextPage = new TurnPageButton(1, xPos + bookImageWidth - 50, 180, true));
this.field_146292_n.add(this.buttonPreviousPage = new TurnPageButton(2, xPos - bookImageWidth + 24, 180, false));
}

protected void actionPerformed (GuiButton button)
{
if (button.enabled)
//TODO ENABLED???
if (button.field_146124_l)
{
if (button.id == 1)
//TODO ID????
if (button.field_146129_i == 1)
currentPage += 2;
if (button.id == 2)
if (button.field_146129_i == 2)
currentPage -= 2;

updateText();
Expand Down

0 comments on commit f5cca31

Please sign in to comment.