Work on a seeecret project

This commit is contained in:
WayofTime 2014-04-17 07:06:28 -04:00
parent 97b90eaf63
commit 6e4de4f6e9
58 changed files with 3504 additions and 42 deletions

View file

@ -0,0 +1,41 @@
package WayofTime.alchemicalWizardry.client.book.pages;
import net.minecraft.util.ResourceLocation;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
public class PicturePage extends BookPage
{
String text;
String location;
@Override
public void readPageFromXML (Element element)
{
NodeList nodes = element.getElementsByTagName("text");
if (nodes != null)
text = nodes.item(0).getTextContent();
nodes = element.getElementsByTagName("location");
if (nodes != null)
location = nodes.item(0).getTextContent();
background = new ResourceLocation(location);
}
@Override
public void renderContentLayer (int localWidth, int localHeight)
{
manual.fonts.drawSplitString(text, localWidth + 8, localHeight, 178, 0);
}
ResourceLocation background;
public void renderBackgroundLayer (int localWidth, int localHeight)
{
manual.getMC().getTextureManager().bindTexture(background);
//manual.getMC().renderEngine.bindTexture(location);
manual.drawTexturedModalRect(localWidth, localHeight + 12, 0, 0, 170, 144);
}
}