mirror of
https://github.com/GTNewHorizons/Tainted-Magic.git
synced 2026-11-21 04:22:21 +00:00
Cleanup
This commit is contained in:
1 parent
cbb61ebcbe
commit
82de9e1aa0
74 files changed
+3485
-3415
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 player, ItemStack stack, float partialTicks, float fract);
|
||||
}
|
||||
@@ -5,5 +5,5 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IRenderInventoryItem
|
||||
{
|
||||
abstract void render (EntityPlayer p, ItemStack s, float partialTicks);
|
||||
abstract void render (EntityPlayer player, ItemStack stack, float partialTicks);
|
||||
}
|
||||
+16
-16
@@ -6,32 +6,32 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import taintedmagic.common.items.ItemVoidsentBlood;
|
||||
import taintedmagic.common.items.ItemVoidBlood;
|
||||
|
||||
/**
|
||||
* Custom recipe for aplpying Voidsent Blood to Cult Attire
|
||||
* Custom recipe for aplpying Voidsent Blood to armour.
|
||||
*/
|
||||
public class RecipeVoidsentBlood implements IRecipe
|
||||
public class RecipeVoidBlood implements IRecipe
|
||||
{
|
||||
@Override
|
||||
public boolean matches (InventoryCrafting inv, World w)
|
||||
public boolean matches (InventoryCrafting inv, World world)
|
||||
{
|
||||
boolean foundBlood = false;
|
||||
boolean foundArmor = false;
|
||||
boolean foundArmour = false;
|
||||
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack s = inv.getStackInSlot(i);
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
|
||||
if (s != null)
|
||||
if (stack != null)
|
||||
{
|
||||
if (s.getItem() instanceof ItemVoidsentBlood && !foundBlood) foundBlood = true;
|
||||
else if (s.getItem() instanceof ItemArmor && !foundArmor) foundArmor = true;
|
||||
if (stack.getItem() instanceof ItemVoidBlood && !foundBlood) foundBlood = true;
|
||||
else if (stack.getItem() instanceof ItemArmor && !foundArmour) foundArmour = true;
|
||||
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
return foundBlood && foundArmor;
|
||||
return foundBlood && foundArmour;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -43,13 +43,13 @@ public class RecipeVoidsentBlood implements IRecipe
|
||||
|
||||
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 (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 ItemVoidBlood)
|
||||
blood = inv.getStackInSlot(i);
|
||||
}
|
||||
if (armor != null && blood != null && (armor.getTagCompound() == null || (armor.getTagCompound() != null && !armor
|
||||
.getTagCompound().getBoolean("voidtouched"))))
|
||||
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());
|
||||
Reference in new issue
Block a user