Working on The Architect book - working out well~

This commit is contained in:
WayofTime 2015-02-16 07:26:03 -05:00
parent 1c806c4328
commit f87da36775
13 changed files with 499 additions and 298 deletions

View file

@ -20,6 +20,7 @@ import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import WayofTime.alchemicalWizardry.ModItems;
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe;
import WayofTime.alchemicalWizardry.book.classes.guide.GuiEntry;
@ -63,7 +64,11 @@ public class EntryCraftingRecipe implements IEntry{
ItemStack s = null;
if(rec.getInput()[i] instanceof ItemStack){
s = (ItemStack)rec.getInput()[i];
}else if(rec.getInput()[i] instanceof Integer)
{
s = AltarRecipeRegistry.orbMap.get((Integer)rec.getInput()[i]);
}else if(rec.getInput()[i] instanceof Object){
System.out.println(rec.getInput()[i].getClass());
s = new ItemStack(ModItems.masterBloodOrb);
}else{
s = ((ArrayList<ItemStack>)rec.getInput()[i]).get(0);

View file

@ -0,0 +1,52 @@
package WayofTime.alchemicalWizardry.book.entries;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import WayofTime.alchemicalWizardry.book.classes.guide.GuiEntry;
public class EntryItemCustomText extends EntryItemText implements IEntryCustomText
{
public EntryItemCustomText(ItemStack stack)
{
super(stack);
}
public EntryItemCustomText(ItemStack stack, String title)
{
super(stack, title);
}
public String str = "";
@Override
public String getText()
{
return str;
}
@Override
public void setText(String str)
{
this.str = str;
}
@Override
public void drawText(GuiEntry entry, int width, int height, int left, int top, EntityPlayer player, String key, int page, int mX, int mY)
{
int x, y;
if(this.entryName == null)
this.entryName = key;
String s = this.str;
x = left + width / 2 - 58;
y = (top + 15);
Minecraft.getMinecraft().fontRenderer.setUnicodeFlag(true);
Minecraft.getMinecraft().fontRenderer.drawSplitString(s, x, y, 110, 0);
Minecraft.getMinecraft().fontRenderer.setUnicodeFlag(false);
}
}