Initial work on Pixies.

This commit is contained in:
Vasco Lavos committed 2014-06-18 22:50:58 +01:00
1 parent ada7235ab0
commit 21718afe50
7 files changed
+47 -2

No files matched your search

@@ -0,0 +1,13 @@
package vazkii.botania.common.core.handler;
import net.minecraft.item.ItemStack;
public class PixieHandler {
public static interface IPixieSpawner {
public float getPixieChance(ItemStack stack);
}
}
@@ -4,10 +4,11 @@ import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.client.lib.LibResources;
import vazkii.botania.common.core.handler.PixieHandler.IPixieSpawner;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.item.equipment.armor.manasteel.ItemManasteelArmor;
public class ItemElementiumArmor extends ItemManasteelArmor {
public abstract class ItemElementiumArmor extends ItemManasteelArmor implements IPixieSpawner {
public ItemElementiumArmor(int type, String name) {
super(type, name, BotaniaAPI.elementiumArmorMaterial);
@@ -1,5 +1,6 @@
package vazkii.botania.common.item.equipment.armor.elementium;
import net.minecraft.item.ItemStack;
import vazkii.botania.common.lib.LibItemNames;
public class ItemElementiumBoots extends ItemElementiumArmor {
@@ -8,4 +9,9 @@ public class ItemElementiumBoots extends ItemElementiumArmor {
super(3, LibItemNames.ELEMENTIUM_BOOTS);
}
@Override
public float getPixieChance(ItemStack stack) {
return 0.041666666666666666666666666666667F;
}
}
@@ -1,5 +1,6 @@
package vazkii.botania.common.item.equipment.armor.elementium;
import net.minecraft.item.ItemStack;
import vazkii.botania.common.lib.LibItemNames;
public class ItemElementiumChest extends ItemElementiumArmor {
@@ -7,5 +8,10 @@ public class ItemElementiumChest extends ItemElementiumArmor {
public ItemElementiumChest() {
super(1, LibItemNames.ELEMENTIUM_CHEST);
}
@Override
public float getPixieChance(ItemStack stack) {
return 0.083333333333333333333333333333336F;
}
}
@@ -1,5 +1,6 @@
package vazkii.botania.common.item.equipment.armor.elementium;
import net.minecraft.item.ItemStack;
import vazkii.botania.common.lib.LibItemNames;
public class ItemElementiumHelm extends ItemElementiumArmor {
@@ -8,4 +9,9 @@ public class ItemElementiumHelm extends ItemElementiumArmor {
super(0, LibItemNames.ELEMENTIUM_HELM);
}
@Override
public float getPixieChance(ItemStack stack) {
return 0.052083333333333333333333333333335F;
}
}
@@ -1,5 +1,6 @@
package vazkii.botania.common.item.equipment.armor.elementium;
import net.minecraft.item.ItemStack;
import vazkii.botania.common.lib.LibItemNames;
public class ItemElementiumLegs extends ItemElementiumArmor {
@@ -7,5 +8,10 @@ public class ItemElementiumLegs extends ItemElementiumArmor {
public ItemElementiumLegs() {
super(2, LibItemNames.ELEMENTIUM_LEGS);
}
@Override
public float getPixieChance(ItemStack stack) {
return 0.072916666666666666666666666666669F;
}
}
@@ -1,13 +1,20 @@
package vazkii.botania.common.item.equipment.tool.elementium;
import net.minecraft.item.ItemStack;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.common.core.handler.PixieHandler.IPixieSpawner;
import vazkii.botania.common.item.equipment.tool.manasteel.ItemManasteelSword;
import vazkii.botania.common.lib.LibItemNames;
public class ItemElementiumSword extends ItemManasteelSword {
public class ItemElementiumSword extends ItemManasteelSword implements IPixieSpawner {
public ItemElementiumSword() {
super(BotaniaAPI.elementiumToolMaterial, LibItemNames.ELEMENTIUM_SWORD);
}
@Override
public float getPixieChance(ItemStack stack) {
return 0.5F;
}
}