mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-27 15:23:06 +00:00
Attempt to fix repository
This commit is contained in:
1 parent
e242207d50
commit
1aac4686db
932 files changed
+39272
-11544
No files matched your search
@@ -2,6 +2,7 @@ package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
@@ -9,30 +10,42 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.event.SacrificeKnifeUsedEvent;
|
||||
import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler;
|
||||
import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SacrificialDagger extends Item
|
||||
{
|
||||
public SacrificialDagger()
|
||||
{
|
||||
super();
|
||||
setMaxStackSize(1);
|
||||
this.maxStackSize = 1;
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
setFull3D();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
if (AlchemicalWizardry.wimpySettings)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem");
|
||||
} else
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SacrificialDagger");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
@@ -72,7 +85,7 @@ public class SacrificialDagger extends Item
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack stack)
|
||||
{
|
||||
return EnumAction.BOW;
|
||||
return EnumAction.bow;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -119,7 +132,7 @@ public class SacrificialDagger extends Item
|
||||
|
||||
for (int l = 0; l < 8; ++l)
|
||||
{
|
||||
world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3);
|
||||
world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3);
|
||||
}
|
||||
|
||||
if (!world.isRemote && SpellHelper.isFakePlayer(world, player))
|
||||
@@ -145,8 +158,10 @@ public class SacrificialDagger extends Item
|
||||
|
||||
public void findAndFillAltar(World world, EntityPlayer player, int amount)
|
||||
{
|
||||
BlockPos pos = player.getPosition();
|
||||
IBloodAltar altarEntity = getAltar(world, pos);
|
||||
int posX = (int) Math.round(player.posX - 0.5f);
|
||||
int posY = (int) player.posY;
|
||||
int posZ = (int) Math.round(player.posZ - 0.5f);
|
||||
IBloodAltar altarEntity = getAltar(world, posX, posY, posZ);
|
||||
|
||||
if (altarEntity == null)
|
||||
{
|
||||
@@ -157,7 +172,7 @@ public class SacrificialDagger extends Item
|
||||
altarEntity.startCycle();
|
||||
}
|
||||
|
||||
public IBloodAltar getAltar(World world, BlockPos pos)
|
||||
public IBloodAltar getAltar(World world, int x, int y, int z)
|
||||
{
|
||||
TileEntity tileEntity;
|
||||
|
||||
@@ -167,8 +182,7 @@ public class SacrificialDagger extends Item
|
||||
{
|
||||
for (int k = -2; k <= 1; k++)
|
||||
{
|
||||
BlockPos newPos = pos.add(i, j, k);
|
||||
tileEntity = world.getTileEntity(newPos);
|
||||
tileEntity = world.getTileEntity(i + x, k + y, j + z);
|
||||
|
||||
if(tileEntity instanceof IBloodAltar)
|
||||
{
|
||||
@@ -226,8 +240,8 @@ public class SacrificialDagger extends Item
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean hasEffect(ItemStack stack)
|
||||
public boolean hasEffect(ItemStack stack, int pass)
|
||||
{
|
||||
return this.canUseForSacrifice(stack) || super.hasEffect(stack);
|
||||
return this.canUseForSacrifice(stack) || super.hasEffect(stack, pass);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user