mirror of
https://github.com/GTNewHorizons/Tainted-Magic.git
synced 2026-11-21 04:22:21 +00:00
Content update (continued)
This commit is contained in:
1 parent
9028d32b6e
commit
29eee40824
92 files changed
+3233
-2211
No files matched your search
@@ -6,5 +6,5 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IHeldItemHUD
|
||||
{
|
||||
abstract void renderHUD (ScaledResolution res, EntityPlayer p, ItemStack s, float partialTicks, float fract);
|
||||
abstract void renderHUD (ScaledResolution res, EntityPlayer p, ItemStack s, float partialTicks, float fract);
|
||||
}
|
||||
@@ -13,57 +13,60 @@ import taintedmagic.common.items.ItemVoidsentBlood;
|
||||
*/
|
||||
public class RecipeVoidsentBlood implements IRecipe
|
||||
{
|
||||
@Override
|
||||
public boolean matches (InventoryCrafting inv, World w)
|
||||
{
|
||||
boolean foundBlood = false;
|
||||
boolean foundArmor = false;
|
||||
@Override
|
||||
public boolean matches (InventoryCrafting inv, World w)
|
||||
{
|
||||
boolean foundBlood = false;
|
||||
boolean foundArmor = false;
|
||||
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack s = inv.getStackInSlot(i);
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack s = inv.getStackInSlot(i);
|
||||
|
||||
if (s != null)
|
||||
{
|
||||
if (s.getItem() instanceof ItemVoidsentBlood && !foundBlood) foundBlood = true;
|
||||
else if (s.getItem() instanceof ItemArmor && !foundArmor) foundArmor = true;
|
||||
if (s != null)
|
||||
{
|
||||
if (s.getItem() instanceof ItemVoidsentBlood && !foundBlood) foundBlood = true;
|
||||
else if (s.getItem() instanceof ItemArmor && !foundArmor) foundArmor = true;
|
||||
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
return foundBlood && foundArmor;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
return foundBlood && foundArmor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getCraftingResult (InventoryCrafting inv)
|
||||
{
|
||||
ItemStack copy = null;
|
||||
ItemStack armor = null;
|
||||
ItemStack blood = null;
|
||||
@Override
|
||||
public ItemStack getCraftingResult (InventoryCrafting inv)
|
||||
{
|
||||
ItemStack copy = null;
|
||||
ItemStack armor = null;
|
||||
ItemStack blood = null;
|
||||
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
{
|
||||
if (inv.getStackInSlot(i) != null && inv.getStackInSlot(i).getItem() instanceof ItemArmor) armor = inv.getStackInSlot(i);
|
||||
else if (inv.getStackInSlot(i) != null && inv.getStackInSlot(i).getItem() instanceof ItemVoidsentBlood) blood = inv.getStackInSlot(i);
|
||||
}
|
||||
if (armor != null && blood != null && (armor.getTagCompound() == null || (armor.getTagCompound() != null && !armor.getTagCompound().getBoolean("voidtouched"))))
|
||||
{
|
||||
copy = armor.copy();
|
||||
if (copy.getTagCompound() == null) copy.setTagCompound(new NBTTagCompound());
|
||||
if (copy.getTagCompound() != null) copy.getTagCompound().setBoolean("voidtouched", true);
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
{
|
||||
if (inv.getStackInSlot(i) != null && inv.getStackInSlot(i).getItem() instanceof ItemArmor) armor = inv
|
||||
.getStackInSlot(i);
|
||||
else if (inv.getStackInSlot(i) != null && inv.getStackInSlot(i).getItem() instanceof ItemVoidsentBlood) blood = inv
|
||||
.getStackInSlot(i);
|
||||
}
|
||||
if (armor != null && blood != null && (armor.getTagCompound() == null || (armor.getTagCompound() != null && !armor
|
||||
.getTagCompound().getBoolean("voidtouched"))))
|
||||
{
|
||||
copy = armor.copy();
|
||||
if (copy.getTagCompound() == null) copy.setTagCompound(new NBTTagCompound());
|
||||
if (copy.getTagCompound() != null) copy.getTagCompound().setBoolean("voidtouched", true);
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRecipeSize ()
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
@Override
|
||||
public int getRecipeSize ()
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getRecipeOutput ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public ItemStack getRecipeOutput ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user