General toying with the enchantments for the Omega armour, tweaked the ritual diviner's functionality, fixed teleposers not teleposing players in certain circumstances.
This commit is contained in:
parent
bab6e576d2
commit
ab0c49f8c7
35 changed files with 360 additions and 69 deletions
|
@ -7,8 +7,8 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class CreativeDagger extends Item
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ public class CreativeDagger extends Item
|
|||
int posX = (int) Math.round(player.posX - 0.5f);
|
||||
int posY = (int) player.posY;
|
||||
int posZ = (int) Math.round(player.posZ - 0.5f);
|
||||
TEAltar altarEntity = getAltar(world, posX, posY, posZ);
|
||||
IBloodAltar altarEntity = getAltar(world, posX, posY, posZ);
|
||||
|
||||
if (altarEntity == null)
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ public class CreativeDagger extends Item
|
|||
altarEntity.startCycle();
|
||||
}
|
||||
|
||||
public TEAltar getAltar(World world, int x, int y, int z)
|
||||
public IBloodAltar getAltar(World world, int x, int y, int z)
|
||||
{
|
||||
TileEntity tileEntity = null;
|
||||
|
||||
|
@ -103,3 +103,4 @@ public class CreativeDagger extends Item
|
|||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner
|
|||
setEnergyUsed(100);
|
||||
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.maxMetaData = 4;
|
||||
this.hasSubtypes = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -87,6 +88,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner
|
|||
int fireStones = 0;
|
||||
int earthStones = 0;
|
||||
int duskStones = 0;
|
||||
int dawnStones = 0;
|
||||
|
||||
for (RitualComponent rc : ritualList)
|
||||
{
|
||||
|
@ -115,6 +117,10 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner
|
|||
case RitualComponent.DUSK:
|
||||
duskStones++;
|
||||
break;
|
||||
|
||||
case RitualComponent.DAWN:
|
||||
dawnStones++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -124,6 +130,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner
|
|||
par3List.add(EnumChatFormatting.RED + StatCollector.translateToLocal("tooltip.ritualdiviner.firestones") + " " + fireStones);
|
||||
par3List.add(EnumChatFormatting.DARK_GREEN + StatCollector.translateToLocal("tooltip.ritualdiviner.earthstones") + " " + earthStones);
|
||||
par3List.add(EnumChatFormatting.BOLD + StatCollector.translateToLocal("tooltip.ritualdiviner.duskstones") + " " + duskStones);
|
||||
par3List.add(EnumChatFormatting.GOLD + StatCollector.translateToLocal("tooltip.ritualdiviner.dawnstones") + " " + dawnStones);
|
||||
}
|
||||
}else
|
||||
{
|
||||
|
@ -283,16 +290,16 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner
|
|||
{
|
||||
rotateRituals(player.worldObj, player, stack, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!player.worldObj.isRemote)
|
||||
{
|
||||
int direction = this.getDirection(stack) - 1;
|
||||
if (direction == 0) direction = 4;
|
||||
this.setDirection(stack, direction);
|
||||
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip.ritualdiviner.ritualtunedto") + " " + this.getNameForDirection(direction)));
|
||||
}
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// if (!player.worldObj.isRemote)
|
||||
// {
|
||||
// int direction = this.getDirection(stack) - 1;
|
||||
// if (direction == 0) direction = 4;
|
||||
// this.setDirection(stack, direction);
|
||||
// player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("tooltip.ritualdiviner.ritualtunedto") + " " + this.getNameForDirection(direction)));
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -338,23 +345,13 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner
|
|||
@Override
|
||||
public int getMaxRuneDisplacement(ItemStack par1ItemStack) //0 indicates the starting 4 runes, 1 indicates it can use Dusk runes
|
||||
{
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
return par1ItemStack.getTagCompound().getInteger("maxRuneDisplacement");
|
||||
return par1ItemStack.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMaxRuneDisplacement(ItemStack par1ItemStack, int displacement)
|
||||
{
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
par1ItemStack.getTagCompound().setInteger("maxRuneDisplacement", displacement);
|
||||
par1ItemStack.setItemDamage(displacement);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -100,7 +100,7 @@ public abstract class OmegaArmour extends BoundArmour
|
|||
player.inventory.armorInventory[3-this.armorType] = stack;
|
||||
}
|
||||
|
||||
public ItemStack getSubstituteStack(ItemStack boundStack, int stability, int affinity, Random rand)
|
||||
public ItemStack getSubstituteStack(ItemStack boundStack, int stability, int affinity, int enchantability, Random rand)
|
||||
{
|
||||
ItemStack omegaStack = new ItemStack(this);
|
||||
if(boundStack != null && boundStack.hasTagCompound())
|
||||
|
@ -110,13 +110,17 @@ public abstract class OmegaArmour extends BoundArmour
|
|||
}
|
||||
this.setContainedArmourStack(omegaStack, boundStack);
|
||||
SoulNetworkHandler.checkAndSetItemOwner(omegaStack, SoulNetworkHandler.getOwnerName(boundStack));
|
||||
this.setItemEnchantability(omegaStack, 50);
|
||||
this.setItemEnchantability(omegaStack, 70);
|
||||
|
||||
List enchantList = new ArrayList();
|
||||
|
||||
for(int i=0; i<10; i++)
|
||||
for(int i=0; i<100; i++)
|
||||
{
|
||||
enchantList.addAll(EnchantmentHelper.buildEnchantmentList(rand, omegaStack, 30));
|
||||
List lst = EnchantmentHelper.buildEnchantmentList(rand, omegaStack, 30);
|
||||
if(lst != null)
|
||||
{
|
||||
enchantList.addAll(lst);
|
||||
}
|
||||
}
|
||||
|
||||
Map<Enchantment, Map<Integer, Integer>> map = new HashMap();
|
||||
|
|
|
@ -3,10 +3,13 @@ package WayofTime.alchemicalWizardry.common.items.armour;
|
|||
import java.util.UUID;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaEarth;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
|
@ -17,6 +20,11 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class OmegaArmourEarth extends OmegaArmour
|
||||
{
|
||||
private static IIcon helmetIcon;
|
||||
private static IIcon plateIcon;
|
||||
private static IIcon leggingsIcon;
|
||||
private static IIcon bootsIcon;
|
||||
|
||||
public OmegaArmourEarth(int armorType)
|
||||
{
|
||||
super(armorType);
|
||||
|
@ -42,6 +50,44 @@ public class OmegaArmourEarth extends OmegaArmour
|
|||
return new ModelOmegaEarth(0.5f, false, false, true, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem");
|
||||
this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaHelmet_earth");
|
||||
this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaPlate_earth");
|
||||
this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaLeggings_earth");
|
||||
this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaBoots_earth");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1)
|
||||
{
|
||||
if (this.equals(ModItems.boundHelmetEarth))
|
||||
{
|
||||
return this.helmetIcon;
|
||||
}
|
||||
|
||||
if (this.equals(ModItems.boundPlateEarth))
|
||||
{
|
||||
return this.plateIcon;
|
||||
}
|
||||
|
||||
if (this.equals(ModItems.boundLeggingsEarth))
|
||||
{
|
||||
return this.leggingsIcon;
|
||||
}
|
||||
|
||||
if (this.equals(ModItems.boundBootsEarth))
|
||||
{
|
||||
return this.bootsIcon;
|
||||
}
|
||||
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Multimap getItemAttributeModifiers()
|
||||
{
|
||||
|
|
|
@ -1,14 +1,22 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.armour;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaFire;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class OmegaArmourFire extends OmegaArmour
|
||||
{
|
||||
private static IIcon helmetIcon;
|
||||
private static IIcon plateIcon;
|
||||
private static IIcon leggingsIcon;
|
||||
private static IIcon bootsIcon;
|
||||
|
||||
public OmegaArmourFire(int armorType)
|
||||
{
|
||||
super(armorType);
|
||||
|
@ -35,6 +43,44 @@ public class OmegaArmourFire extends OmegaArmour
|
|||
return new ModelOmegaFire(0.5f, false, false, true, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem");
|
||||
this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaHelmet_fire");
|
||||
this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaPlate_fire");
|
||||
this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaLeggings_fire");
|
||||
this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaBoots_fire");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1)
|
||||
{
|
||||
if (this.equals(ModItems.boundHelmetFire))
|
||||
{
|
||||
return this.helmetIcon;
|
||||
}
|
||||
|
||||
if (this.equals(ModItems.boundPlateFire))
|
||||
{
|
||||
return this.plateIcon;
|
||||
}
|
||||
|
||||
if (this.equals(ModItems.boundLeggingsFire))
|
||||
{
|
||||
return this.leggingsIcon;
|
||||
}
|
||||
|
||||
if (this.equals(ModItems.boundBootsFire))
|
||||
{
|
||||
return this.bootsIcon;
|
||||
}
|
||||
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public Multimap getAttributeModifiers(ItemStack stack)
|
||||
// {
|
||||
|
|
|
@ -8,15 +8,23 @@ import com.google.common.collect.Multimap;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWater;
|
||||
|
||||
public class OmegaArmourWater extends OmegaArmour
|
||||
{
|
||||
private static IIcon helmetIcon;
|
||||
private static IIcon plateIcon;
|
||||
private static IIcon leggingsIcon;
|
||||
private static IIcon bootsIcon;
|
||||
|
||||
public OmegaArmourWater(int armorType)
|
||||
{
|
||||
super(armorType);
|
||||
|
@ -43,6 +51,44 @@ public class OmegaArmourWater extends OmegaArmour
|
|||
return new ModelOmegaWater(0.5f, false, false, true, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem");
|
||||
this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaHelmet_water");
|
||||
this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaPlate_water");
|
||||
this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaLeggings_water");
|
||||
this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaBoots_water");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1)
|
||||
{
|
||||
if (this.equals(ModItems.boundHelmetWater))
|
||||
{
|
||||
return this.helmetIcon;
|
||||
}
|
||||
|
||||
if (this.equals(ModItems.boundPlateWater))
|
||||
{
|
||||
return this.plateIcon;
|
||||
}
|
||||
|
||||
if (this.equals(ModItems.boundLeggingsWater))
|
||||
{
|
||||
return this.leggingsIcon;
|
||||
}
|
||||
|
||||
if (this.equals(ModItems.boundBootsWater))
|
||||
{
|
||||
return this.bootsIcon;
|
||||
}
|
||||
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Multimap getAttributeModifiers(ItemStack stack)
|
||||
{
|
||||
|
|
|
@ -3,10 +3,13 @@ package WayofTime.alchemicalWizardry.common.items.armour;
|
|||
import java.util.UUID;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWind;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
|
@ -17,6 +20,11 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class OmegaArmourWind extends OmegaArmour
|
||||
{
|
||||
private static IIcon helmetIcon;
|
||||
private static IIcon plateIcon;
|
||||
private static IIcon leggingsIcon;
|
||||
private static IIcon bootsIcon;
|
||||
|
||||
public OmegaArmourWind(int armorType)
|
||||
{
|
||||
super(armorType);
|
||||
|
@ -43,6 +51,44 @@ public class OmegaArmourWind extends OmegaArmour
|
|||
return new ModelOmegaWind(0.5f, false, false, true, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem");
|
||||
this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaHelmet_wind");
|
||||
this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaPlate_wind");
|
||||
this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaLeggings_wind");
|
||||
this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaBoots_wind");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1)
|
||||
{
|
||||
if (this.equals(ModItems.boundHelmetWind))
|
||||
{
|
||||
return this.helmetIcon;
|
||||
}
|
||||
|
||||
if (this.equals(ModItems.boundPlateWind))
|
||||
{
|
||||
return this.plateIcon;
|
||||
}
|
||||
|
||||
if (this.equals(ModItems.boundLeggingsWind))
|
||||
{
|
||||
return this.leggingsIcon;
|
||||
}
|
||||
|
||||
if (this.equals(ModItems.boundBootsWind))
|
||||
{
|
||||
return this.bootsIcon;
|
||||
}
|
||||
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Multimap getAttributeModifiers(ItemStack stack)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue