v1.0.0 finilization

This commit is contained in:
WayofTime 2014-03-22 17:15:58 -04:00
parent 4394ba4541
commit b962ede72d
12 changed files with 123 additions and 61 deletions

View file

@ -878,9 +878,9 @@ public class AlchemicalWizardry
AlchemyRecipeRegistry.registerRecipe(orbisTerraeStack, 10, new ItemStack[]{strengthenedCatalystStack,terraeStack, gunpowderStack, new ItemStack(Block.netherrack), new ItemStack(Block.sand)}, 3);
AlchemyRecipeRegistry.registerRecipe(concentratedCatalystStack,10,new ItemStack[]{strengthenedCatalystStack,fracturedBoneStack,goldNuggetStack},4);
AlchemyRecipeRegistry.registerRecipe(fracturedBoneStackCrafted, 2, new ItemStack[]{new ItemStack(Item.bone), new ItemStack(Item.bone),new ItemStack(Item.bone),new ItemStack(Item.bone), gunpowderStack},1);
AlchemyRecipeRegistry.registerRecipe(virtusStack, 10, new ItemStack[]{redstoneStack, new ItemStack(Item.coal),strengthenedCatalystStack,redstoneStack,gunpowderStack}, 3);
AlchemyRecipeRegistry.registerRecipe(reductusStack,10,new ItemStack[]{redstoneStack, goldIngotStack, strengthenedCatalystStack,new ItemStack(Block.slowSand), new ItemStack(Item.carrot)},3);
AlchemyRecipeRegistry.registerRecipe(potentiaStack, 10, new ItemStack[]{glowstoneDustStack,strengthenedCatalystStack,lapisStack,lapisStack,new ItemStack(Item.netherQuartz)}, 3);
AlchemyRecipeRegistry.registerRecipe(virtusStack,20, new ItemStack[]{redstoneStack, new ItemStack(Item.coal),strengthenedCatalystStack,redstoneStack,gunpowderStack}, 3);
AlchemyRecipeRegistry.registerRecipe(reductusStack,20,new ItemStack[]{redstoneStack, goldIngotStack, strengthenedCatalystStack,new ItemStack(Block.slowSand), new ItemStack(Item.carrot)},3);
AlchemyRecipeRegistry.registerRecipe(potentiaStack,20, new ItemStack[]{glowstoneDustStack,strengthenedCatalystStack,lapisStack,lapisStack,new ItemStack(Item.netherQuartz)}, 3);
HomSpellRegistry.registerBasicSpell(new ItemStack(Item.flintAndSteel), new SpellFireBurst());
HomSpellRegistry.registerBasicSpell(new ItemStack(Block.ice), new SpellFrozenWater());
@ -1015,7 +1015,7 @@ public class AlchemicalWizardry
AlchemyRecipeRegistry.registerRecipe(crackedRunicPlateStackCrafted, 10, new ItemStack[]{imbuedSlateStack,imbuedSlateStack,concentratedCatalystStack}, 4);
AlchemyRecipeRegistry.registerRecipe(runicPlateStack, 30, new ItemStack[]{crackedRunicPlateStack,terraeStack}, 5);
AlchemyRecipeRegistry.registerRecipe(imbuedRunicPlateStack, 100, new ItemStack[]{magicalesStack,incendiumStack,runicPlateStack, runicPlateStack,aquasalusStack}, 5);
AlchemyRecipeRegistry.registerRecipe(complexSpellCrystalStack,50,new ItemStack[]{new ItemStack(ModItems.blankSpell), weakBloodShardStack, weakBloodShardStack, glassStack,goldIngotStack},3);
AlchemyRecipeRegistry.registerRecipe(complexSpellCrystalStack,50,new ItemStack[]{new ItemStack(ModItems.blankSpell), weakBloodShardStack, weakBloodShardStack, diamondStack,goldIngotStack},3);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockConduit,1,0),"q q","ccc","q q",'q', quartzRodStack,'c', magicalesCableStack);
@ -1045,6 +1045,29 @@ public class AlchemicalWizardry
GameRegistry.addShapelessRecipe(new ItemStack(Item.dyePowder,5,15),fracturedBoneStack);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Item.flint,2,0), 1, new ItemStack[]{new ItemStack(Block.gravel),new ItemStack(Item.flint)}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Block.grass), 2, new ItemStack[]{new ItemStack(Block.dirt),new ItemStack(Item.dyePowder,1,15),new ItemStack(Item.seeds),new ItemStack(Item.seeds)}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Item.leather,3,0), 2, new ItemStack[]{new ItemStack(Item.rottenFlesh),new ItemStack(Item.rottenFlesh),new ItemStack(Item.rottenFlesh),waterBucketStack,new ItemStack(Item.flint)}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Item.bread), 1, new ItemStack[]{new ItemStack(Item.wheat),new ItemStack(Item.sugar)}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Item.fireballCharge,5,0), 3, new ItemStack[]{new ItemStack(Item.coal),new ItemStack(Item.blazePowder),gunpowderStack}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Block.sand,2,0), 1, new ItemStack[]{new ItemStack(Block.cobblestone),gunpowderStack}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Block.blockClay,4,0), 2, new ItemStack[]{new ItemStack(Block.hardenedClay,1,craftingConstant),new ItemStack(Block.hardenedClay,1,craftingConstant),new ItemStack(Block.hardenedClay,1,craftingConstant),new ItemStack(Block.hardenedClay,1,craftingConstant),waterBucketStack}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Item.silk,4,0), 1, new ItemStack[]{new ItemStack(Block.cloth,1,craftingConstant),new ItemStack(Item.flint)}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Block.gravel,2,0), 1, new ItemStack[]{new ItemStack(Block.stone),gunpowderStack}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Block.obsidian), 1, new ItemStack[]{waterBucketStack,lavaBucketStack}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Item.paper), 1, new ItemStack[]{new ItemStack(Item.reed)}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Block.slowSand,3,0), 3, new ItemStack[]{new ItemStack(Block.sand),new ItemStack(Block.sand),new ItemStack(Block.sand),waterBucketStack,weakBloodShardStack}, 3);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Block.mycelium,1,0), 5, new ItemStack[]{new ItemStack(Block.grass),new ItemStack(Block.mushroomCapBrown), new ItemStack(Block.mushroomCapRed)}, 2);
LanguageRegistry.addName(strengthenedCatalystStack, "Strengthened Catalyst");
LanguageRegistry.addName(offensaStack, "Offensa");
LanguageRegistry.addName(praesidiumStack,"Praesidium");

View file

@ -117,4 +117,10 @@ public class RitualStone extends Block
return blankIcon;
}
}
@Override
public boolean canSilkHarvest(World world, EntityPlayer player, int x, int y, int z, int meta)
{
return false;
}
}

View file

@ -1,6 +1,7 @@
package WayofTime.alchemicalWizardry.common.items;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -9,11 +10,14 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import java.util.List;
import org.lwjgl.input.Keyboard;
public class ItemComplexSpellCrystal extends EnergyItems
{
public ItemComplexSpellCrystal(int par1)
@ -27,7 +31,7 @@ public class ItemComplexSpellCrystal extends EnergyItems
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BlankSpell");
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ComplexCrystal");
}
@Override
@ -47,6 +51,31 @@ public class ItemComplexSpellCrystal extends EnergyItems
par3List.add("Coords: " + itemTag.getInteger("xCoord") + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord"));
par3List.add("Bound Dimension: " + getDimensionID(par1ItemStack));
}
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT))
{
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
if (recipe != null)
{
par3List.add(EnumChatFormatting.BLUE + "Recipe:");
for (ItemStack item : recipe)
{
if (item != null)
{
par3List.add("" + item.getDisplayName());
}
}
}
} else
{
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
if(recipe!=null)
{
par3List.add("-Press " + EnumChatFormatting.BLUE + "shift" + EnumChatFormatting.GRAY + " for Recipe-");
}
}
}
@Override

View file

@ -38,6 +38,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
private int ticksInAir = 0;
private int ricochetCounter = 0;
private boolean scheduledForDeath = false;
private boolean isSilkTouch = false;
//Custom variables
private int maxRicochet = 0;
@ -288,6 +289,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
par1NBTTagCompound.setTag("Effects", effectList);
par1NBTTagCompound.setInteger("blocksBroken", blocksBroken);
par1NBTTagCompound.setBoolean("isSilkTouch", isSilkTouch);
}
/**
@ -303,6 +305,8 @@ public class EntitySpellProjectile extends Entity implements IProjectile
inData = par1NBTTagCompound.getByte("inData") & 255;
inGround = par1NBTTagCompound.getByte("inGround") == 1;
blocksBroken = par1NBTTagCompound.getInteger("blocksBroken");
isSilkTouch = par1NBTTagCompound.getBoolean("isSilkTouch");
NBTTagList tagList = par1NBTTagCompound.getTagList("Effects");
@ -580,4 +584,14 @@ public class EntitySpellProjectile extends Entity implements IProjectile
{
this.blocksBroken = blocksBroken;
}
public boolean getIsSilkTouch()
{
return this.isSilkTouch;
}
public void setIsSilkTouch(boolean bool)
{
this.isSilkTouch = bool;
}
}

View file

@ -23,6 +23,7 @@ public class SpellParadigmProjectile extends SpellParadigm
public List<IProjectileUpdateEffect> updateEffectList;
public boolean penetration;
public int ricochetMax;
public boolean isSilkTouch;
public SpellParadigmProjectile()
{
@ -33,6 +34,7 @@ public class SpellParadigmProjectile extends SpellParadigm
this.updateEffectList = new ArrayList();
this.penetration = false;
this.ricochetMax = 0;
this.isSilkTouch = false;
}
@Override
@ -70,7 +72,8 @@ public class SpellParadigmProjectile extends SpellParadigm
proj.setImpactList(impactList);
proj.setUpdateEffectList(updateEffectList);
proj.setPenetration(penetration);
proj.setRicochetMax(ricochetMax);
proj.setRicochetMax(ricochetMax);
proj.setIsSilkTouch(isSilkTouch);
proj.setSpellEffectList(bufferedEffectList);
}

View file

@ -136,8 +136,7 @@ public class SpellEffectEarth extends SpellEffect
@Override
protected int getCostForEnvironmentSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(250*(1.2*this.potencyEnhancement+1)*(3*this.powerEnhancement+2.5)*Math.pow(0.85, costEnhancement));
}
@Override

View file

@ -32,7 +32,7 @@ public class SpellEffectWind extends SpellEffect
@Override
public void defensiveModificationProjectile(SpellParadigmProjectile parad)
{
parad.ricochetMax+=this.potencyEnhancement;
parad.isSilkTouch = true;
}
@Override
@ -86,7 +86,7 @@ public class SpellEffectWind extends SpellEffect
@Override
public void environmentalModificationMelee(SpellParadigmMelee parad)
{
//TODO parad.addWorldEffect(new MeleeEnvironmentalWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
parad.addWorldEffect(new MeleeEnvironmentalWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
@ -158,7 +158,6 @@ public class SpellEffectWind extends SpellEffect
@Override
protected int getCostForEnvironmentMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(100*(1.0*this.potencyEnhancement+1)*(0.7*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
}
}

View file

@ -1,7 +1,5 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import java.util.ArrayList;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
@ -52,13 +50,25 @@ public class ProjectileEnvironmentalEarth extends ProjectileUpdateEffect
if(!worldObj.isAirBlock(posX+i, posY+j, posZ+k)&&blocksBroken<maxBlocks)
{
Block block = Block.blocksList[worldObj.getBlockId(posX+i, posY+j, posZ+k)];
int meta = worldObj.getBlockMetadata(posX+i, posY+j, posZ+k);
if(block == null || block.getBlockHardness(worldObj, posX+i, posY+j, posZ+k)==-1 || SpellHelper.isBlockFluid(block))
{
continue;
}
if(((EntitySpellProjectile)projectile).getIsSilkTouch()&&block.canSilkHarvest(worldObj, ((EntitySpellProjectile)projectile).shootingEntity, posX+i, posY+j, posZ+k, meta))
{
ItemStack stack = new ItemStack(block,1,meta);
EntityItem itemEntity = new EntityItem(worldObj,posX+i+0.5, posY+j+0.5, posZ+k+0.5,stack);
worldObj.spawnEntityInWorld(itemEntity);
worldObj.setBlockToAir(posX+i, posY+j, posZ+k);
}else
{
worldObj.destroyBlock(posX+i, posY+j, posZ+k, true);
}
//block.breakBlock(worldObj, posX+i, posY+j, posZ+k, block.blockID, worldObj.getBlockMetadata(posX+i, posY+j, posZ+k));
//worldObj.destroyBlock(posX+i, posY+j, posZ+k, true);
worldObj.destroyBlock(posX+i, posY+j, posZ+k, true);
blocksBroken++;
}

View file

@ -1,9 +1,13 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.Vec3;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
@ -17,28 +21,16 @@ public class SelfEnvironmentalEarth extends SelfSpellEffect
@Override
public void onSelfUse(World world, EntityPlayer player)
{
int horizRadius = this.powerUpgrades + 1;
int vertRadius = this.potencyUpgrades + 2;
float radius = this.powerUpgrades*2 + 1.5f;
int dur = this.powerUpgrades*5*20 + 60;
Vec3 blockVec = SpellHelper.getEntityBlockVector(player);
List<Entity> entities = SpellHelper.getEntitiesInRange(world, player.posX, player.posY, player.posZ, radius, radius);
int posX = (int)(blockVec.xCoord);
int posY = (int)(blockVec.yCoord);
int posZ = (int)(blockVec.zCoord);
for(int i=-horizRadius; i<=horizRadius; i++)
for(Entity entity : entities)
{
for(int j=0; j<vertRadius; j++)
if(entity instanceof EntityLiving)
{
for(int k=-horizRadius; k<=horizRadius; k++)
{
// if(k==0&&i==0)
// {
// continue;
// }
BlockTeleposer.swapBlocks(world, world, posX + i, posY + j, posZ+k, posX+i, posY+j-vertRadius, posZ+k);
}
((EntityLiving) entity).addPotionEffect(new PotionEffect(Potion.weakness.id,dur,this.potencyUpgrades));
}
}
}

View file

@ -19,6 +19,7 @@ public class MeleeEnvironmentalIce extends ExtrapolatedMeleeEntityEffect
@Override
protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer)
{
//TODO Change to an Ice Cage
for(int i=0;i<=this.powerUpgrades;i++)
{
double randX = (world.rand.nextDouble()-world.rand.nextDouble())*3;

View file

@ -1,7 +1,9 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
import net.minecraft.block.Block;
import net.minecraft.entity.item.EntityFallingSand;
import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
@ -12,38 +14,22 @@ public class MeleeEnvironmentalWind extends MeleeSpellCenteredWorldEffect
public MeleeEnvironmentalWind(int power, int potency, int cost)
{
super(power, potency, cost);
this.setRange(3*power + 2);
this.setRange(5*power + 5);
}
@Override
public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ)
{
int radius = this.potencyUpgrades;
double wantedVel = 0.5d;
int radius = 5*this.potencyUpgrades + 3;
for(int i=-radius; i<=radius; i++)
List<Entity> entities = SpellHelper.getEntitiesInRange(world, posX, posY, posZ, radius, radius);
for(Entity entity : entities)
{
for(int j=-radius; j<=radius; j++)
if(entity instanceof EntityItem)
{
for(int k=-radius; k<=radius; k++)
{
Block block = Block.blocksList[world.getBlockId(posX+i, posY+j, posZ+k)];
int meta = world.getBlockMetadata(posX+i, posY+j, posZ+k);
if(SpellHelper.isBlockFluid(block)&&world.rand.nextFloat()<0.9f)
{
EntityFallingSand liquid = new EntityFallingSand(world, posX+i, posY+j, posZ+k, block.blockID, meta);
if(liquid!=null)
{
liquid.motionX = (world.rand.nextDouble()-world.rand.nextDouble())*wantedVel;
liquid.motionY = (world.rand.nextDouble()-world.rand.nextDouble())*wantedVel;
liquid.motionZ = (world.rand.nextDouble()-world.rand.nextDouble())*wantedVel;
world.spawnEntityInWorld(liquid);
}
}
}
((EntityItem)entity).delayBeforeCanPickup = 0;
entity.onCollideWithPlayer((EntityPlayer)player);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B