Massive rework of configs, items and blocks.
I redone where the items/blocsks are stored and how the configs are handled to clean up it and give space. You can change the config line to AWWayofTime if you want to keep the compatibility with old configs. Now you reference the blocks from the ModBlocks and Items from the ModItems.
This commit is contained in:
parent
8601e9faff
commit
e3644f2d2b
304 changed files with 3941 additions and 5108 deletions
|
@ -1,14 +1,14 @@
|
|||
package WayofTime.alchemicalWizardry.common.alchemy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ModItems;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
||||
public class AlchemicalPotionCreationHandler
|
||||
{
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class AlchemicalPotionCreationHandler {
|
||||
public static ArrayList<AlchemyPotionHandlerComponent> registeredPotionEffects = new ArrayList();
|
||||
|
||||
public static void initializePotions()
|
||||
|
@ -21,7 +21,7 @@ public class AlchemicalPotionCreationHandler
|
|||
addPotion(new ItemStack(Item.spiderEye), Potion.poison.id, 450);
|
||||
addPotion(new ItemStack(Item.fermentedSpiderEye), Potion.weakness.id, 450);
|
||||
addPotion(new ItemStack(Item.blazePowder), Potion.damageBoost.id, 2 * 60 * 20);
|
||||
addPotion(new ItemStack(AlchemicalWizardry.aether), Potion.jump.id, 2 * 60 * 20);
|
||||
addPotion(new ItemStack(ModItems.aether), Potion.jump.id, 2 * 60 * 20);
|
||||
addPotion(new ItemStack(Item.clay), Potion.moveSlowdown.id, 450);
|
||||
addPotion(new ItemStack(Item.redstone), Potion.digSpeed.id, 2 * 60 * 20);
|
||||
addPotion(new ItemStack(Item.potion, 1, 0), AlchemicalWizardry.customPotionDrowning.id, 450);
|
||||
|
@ -29,9 +29,9 @@ public class AlchemicalPotionCreationHandler
|
|||
addPotion(new ItemStack(Item.glassBottle), Potion.invisibility.id, 2 * 60 * 20);
|
||||
addPotion(new ItemStack(Item.diamond), Potion.resistance.id, 2 * 60 * 20);
|
||||
addPotion(new ItemStack(Item.poisonousPotato), Potion.field_76443_y.id, 2); //saturation
|
||||
addPotion(new ItemStack(AlchemicalWizardry.demonBloodShard), Potion.field_76434_w.id, 4 * 60 * 20); //health boost
|
||||
addPotion(new ItemStack(AlchemicalWizardry.weakBloodShard), Potion.field_76444_x.id, 4 * 60 * 20); //Absorption
|
||||
addPotion(new ItemStack(AlchemicalWizardry.terrae), AlchemicalWizardry.customPotionBoost.id, 1 * 60 * 20);
|
||||
addPotion(new ItemStack(ModItems.demonBloodShard), Potion.field_76434_w.id, 4 * 60 * 20); //health boost
|
||||
addPotion(new ItemStack(ModItems.weakBloodShard), Potion.field_76444_x.id, 4 * 60 * 20); //Absorption
|
||||
addPotion(new ItemStack(ModItems.terrae), AlchemicalWizardry.customPotionBoost.id, 1 * 60 * 20);
|
||||
addPotion(new ItemStack(Item.feather), AlchemicalWizardry.customPotionFlight.id, 1 * 60 * 20);
|
||||
addPotion(new ItemStack(Item.arrow), AlchemicalWizardry.customPotionReciprocation.id, 1 * 60 * 20);
|
||||
}
|
||||
|
|
|
@ -3,8 +3,7 @@ package WayofTime.alchemicalWizardry.common.alchemy;
|
|||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class AlchemyPotionHandlerComponent
|
||||
{
|
||||
public class AlchemyPotionHandlerComponent {
|
||||
private ItemStack itemStack;
|
||||
private int potionID;
|
||||
private int tickDuration;
|
||||
|
@ -26,8 +25,7 @@ public class AlchemyPotionHandlerComponent
|
|||
{
|
||||
return comparedStack.itemID == itemStack.itemID && comparedStack.getItemDamage() == itemStack.getItemDamage();
|
||||
}
|
||||
}
|
||||
else if (!(itemStack.getItem() instanceof ItemBlock))
|
||||
} else if (!(itemStack.getItem() instanceof ItemBlock))
|
||||
{
|
||||
return comparedStack.itemID == itemStack.itemID && comparedStack.getItemDamage() == itemStack.getItemDamage();
|
||||
}
|
||||
|
|
|
@ -4,8 +4,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
||||
public class AlchemyPotionHelper
|
||||
{
|
||||
public class AlchemyPotionHelper {
|
||||
private int potionID;
|
||||
private int tickDuration;
|
||||
private int concentration;
|
||||
|
@ -53,10 +52,10 @@ public class AlchemyPotionHelper
|
|||
{
|
||||
if (potionID == Potion.heal.id || potionID == Potion.harm.id)
|
||||
{
|
||||
return(new PotionEffect(potionID, 1, concentration));
|
||||
return (new PotionEffect(potionID, 1, concentration));
|
||||
}
|
||||
|
||||
return(new PotionEffect(potionID, (int)(tickDuration * Math.pow(0.5f, concentration) * Math.pow(8.0f / 3.0f, durationFactor)), concentration));
|
||||
return (new PotionEffect(potionID, (int) (tickDuration * Math.pow(0.5f, concentration) * Math.pow(8.0f / 3.0f, durationFactor)), concentration));
|
||||
}
|
||||
|
||||
public static AlchemyPotionHelper readEffectFromNBT(NBTTagCompound tagCompound)
|
||||
|
|
|
@ -4,8 +4,7 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class AlchemyRecipe
|
||||
{
|
||||
public class AlchemyRecipe {
|
||||
private ItemStack output;
|
||||
private ItemStack[] recipe;
|
||||
private int bloodOrbLevel;
|
||||
|
@ -42,16 +41,14 @@ public class AlchemyRecipe
|
|||
if (i + 1 > this.recipe.length)
|
||||
{
|
||||
newRecipe[i] = null;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
newRecipe[i] = this.recipe[i];
|
||||
}
|
||||
}
|
||||
|
||||
recipe = newRecipe;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
recipe = this.recipe;
|
||||
}
|
||||
|
@ -96,8 +93,7 @@ public class AlchemyRecipe
|
|||
{
|
||||
quickTest = true;
|
||||
}
|
||||
}
|
||||
else if (!(checkedItemStack.getItem() instanceof ItemBlock))
|
||||
} else if (!(checkedItemStack.getItem() instanceof ItemBlock))
|
||||
{
|
||||
quickTest = true;
|
||||
}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.alchemy;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
|
||||
public class AlchemyRecipeRegistry
|
||||
{
|
||||
public class AlchemyRecipeRegistry {
|
||||
public static List<AlchemyRecipe> recipes = new ArrayList();
|
||||
|
||||
public static void registerRecipe(ItemStack output, int amountNeeded, ItemStack[] recipe, int bloodOrbLevel)
|
||||
|
@ -27,13 +26,13 @@ public class AlchemyRecipeRegistry
|
|||
return null;
|
||||
}
|
||||
|
||||
int bloodOrbLevel = ((EnergyBattery)bloodOrb.getItem()).getOrbLevel();
|
||||
int bloodOrbLevel = ((EnergyBattery) bloodOrb.getItem()).getOrbLevel();
|
||||
|
||||
for (AlchemyRecipe ar : recipes)
|
||||
{
|
||||
if (ar.doesRecipeMatch(recipe, bloodOrbLevel))
|
||||
{
|
||||
return(ar.getResult());
|
||||
return (ar.getResult());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,13 +51,13 @@ public class AlchemyRecipeRegistry
|
|||
return 0;
|
||||
}
|
||||
|
||||
int bloodOrbLevel = ((EnergyBattery)bloodOrb.getItem()).getOrbLevel();
|
||||
int bloodOrbLevel = ((EnergyBattery) bloodOrb.getItem()).getOrbLevel();
|
||||
|
||||
for (AlchemyRecipe ar : recipes)
|
||||
{
|
||||
if (ar.doesRecipeMatch(recipe, bloodOrbLevel))
|
||||
{
|
||||
return(ar.getAmountNeeded());
|
||||
return (ar.getAmountNeeded());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,7 +66,7 @@ public class AlchemyRecipeRegistry
|
|||
|
||||
public static ItemStack[] getRecipeForItemStack(ItemStack itemStack)
|
||||
{
|
||||
for (AlchemyRecipe ar: recipes)
|
||||
for (AlchemyRecipe ar : recipes)
|
||||
{
|
||||
ItemStack result = ar.getResult();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue