Added wading boots

This commit is contained in:
Matt Caughey 2013-09-13 19:28:11 -04:00
parent 802c5aa0e9
commit 98ca75c400
9 changed files with 82 additions and 3 deletions

View file

@ -48,4 +48,5 @@ public class Items
public static Optional<? extends Item> soulManipulator = Optional.absent(); public static Optional<? extends Item> soulManipulator = Optional.absent();
public static Optional<? extends Item> flowerBand = Optional.absent(); public static Optional<? extends Item> flowerBand = Optional.absent();
public static Optional<? extends Item> wadingBoots = Optional.absent();
} }

View file

@ -0,0 +1,37 @@
package biomesoplenty.armor;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Items;
public class ArmorWadingBoots extends ItemArmor
{
public int textureID = 0;
public ArmorWadingBoots(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4)
{
super(par1, par2EnumArmorMaterial, par3, par4);
textureID = par4;
setMaxDamage(0);
setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type)
{
if (stack.itemID == Items.wadingBoots.get().itemID)
return "biomesoplenty:textures/armor/wadingboots.png";
return null;
}
@Override
public void registerIcons(IconRegister iconRegister)
{
if (textureID == 3) { itemIcon = iconRegister.registerIcon("biomesoplenty:wadingboots"); }
}
}

View file

@ -8,7 +8,13 @@ import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Icon; import net.minecraft.util.Icon;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
@ -81,10 +87,36 @@ public class BlockMud extends Block
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
{ {
if (world.getBlockMetadata(x, y, z) == 0) if (world.getBlockMetadata(x, y, z) == 0)
{
if (!world.isRemote)
{
if (entity instanceof EntityLivingBase)
{
if (entity instanceof EntityPlayer)
{
InventoryPlayer inventory = ((EntityPlayer)entity).inventory;
if (inventory.armorInventory[0] != null && inventory.armorInventory[0].itemID != Items.wadingBoots.get().itemID)
{ {
entity.motionX *= 0.1D; entity.motionX *= 0.1D;
entity.motionZ *= 0.1D; entity.motionZ *= 0.1D;
} else { }
}
else
{
entity.motionX *= 0.1D;
entity.motionZ *= 0.1D;
}
}
else
{
entity.motionX *= 0.1D;
entity.motionZ *= 0.1D;
}
}
}
else
{
entity.setInWeb(); entity.setInWeb();
} }
} }

View file

@ -674,6 +674,7 @@ public class BOPConfiguration
public static int scytheAmethystID; public static int scytheAmethystID;
public static int flowerBandID; public static int flowerBandID;
public static int wadingBootsID;
//Liquid IDs //Liquid IDs
public static int springWaterStillID; public static int springWaterStillID;
@ -971,6 +972,8 @@ public class BOPConfiguration
scytheMudID = config.getItem("Mud Scythe ID", 21086).getInt(); scytheMudID = config.getItem("Mud Scythe ID", 21086).getInt();
scytheAmethystID = config.getItem("Amethyst Scythe ID", 21087).getInt(); scytheAmethystID = config.getItem("Amethyst Scythe ID", 21087).getInt();
wadingBootsID = config.getItem("Wading Boots ID", 21088).getInt();
//Liquid Ids //Liquid Ids
springWaterStillID = config.get("Liquid IDs", "Spring Water Still ID (ID before this must be free!)", 1971, null).getInt(); springWaterStillID = config.get("Liquid IDs", "Spring Water Still ID (ID before this must be free!)", 1971, null).getInt();
liquidPoisonStillID = config.get("Liquid IDs", "Liquid Poison Still ID (ID before this must be free!)", 1973, null).getInt(); liquidPoisonStillID = config.get("Liquid IDs", "Liquid Poison Still ID (ID before this must be free!)", 1973, null).getInt();

View file

@ -13,6 +13,7 @@ import biomesoplenty.api.Items;
import biomesoplenty.armor.ArmorAmethyst; import biomesoplenty.armor.ArmorAmethyst;
import biomesoplenty.armor.ArmorFlowerBand; import biomesoplenty.armor.ArmorFlowerBand;
import biomesoplenty.armor.ArmorMuddy; import biomesoplenty.armor.ArmorMuddy;
import biomesoplenty.armor.ArmorWadingBoots;
import biomesoplenty.items.ItemBOP; import biomesoplenty.items.ItemBOP;
import biomesoplenty.items.ItemBOPAncientStaff; import biomesoplenty.items.ItemBOPAncientStaff;
import biomesoplenty.items.ItemBOPAxe; import biomesoplenty.items.ItemBOPAxe;
@ -45,6 +46,7 @@ public class BOPItems {
public static EnumArmorMaterial EnumArmorMaterialAmethyst; public static EnumArmorMaterial EnumArmorMaterialAmethyst;
public static EnumToolMaterial EnumToolMaterialAmethyst; public static EnumToolMaterial EnumToolMaterialAmethyst;
public static EnumArmorMaterial EnumArmorMaterialFlowerBand; public static EnumArmorMaterial EnumArmorMaterialFlowerBand;
public static EnumArmorMaterial EnumArmorMaterialWadingBoots;
public static int clearItem(Item var1) public static int clearItem(Item var1)
{ {
@ -87,6 +89,7 @@ public class BOPItems {
EnumArmorMaterialAmethyst = EnumHelper.addArmorMaterial("AMETHYST", 40, new int[]{6, 12, 10, 6}, 20); EnumArmorMaterialAmethyst = EnumHelper.addArmorMaterial("AMETHYST", 40, new int[]{6, 12, 10, 6}, 20);
EnumToolMaterialAmethyst = EnumHelper.addToolMaterial("AMETHYST", 4, 2013, 15.0F, 5, 16); EnumToolMaterialAmethyst = EnumHelper.addToolMaterial("AMETHYST", 4, 2013, 15.0F, 5, 16);
EnumArmorMaterialFlowerBand = EnumHelper.addArmorMaterial("FLOWERBAND", -1, new int[]{0, 0, 0, 0}, 0); EnumArmorMaterialFlowerBand = EnumHelper.addArmorMaterial("FLOWERBAND", -1, new int[]{0, 0, 0, 0}, 0);
EnumArmorMaterialWadingBoots = EnumHelper.addArmorMaterial("WADINGBOOTS", -1, new int[]{0, 0, 0, 0}, 0);
initializeItems(); initializeItems();
@ -141,5 +144,6 @@ public class BOPItems {
Items.scytheAmethyst = Optional.of((new ItemBOPScythe(BOPConfiguration.IDs.scytheAmethystID, 2, EnumToolMaterialAmethyst, 6).setUnlocalizedName("bop.scytheAmethyst"))); Items.scytheAmethyst = Optional.of((new ItemBOPScythe(BOPConfiguration.IDs.scytheAmethystID, 2, EnumToolMaterialAmethyst, 6).setUnlocalizedName("bop.scytheAmethyst")));
Items.flowerBand = Optional.of((new ArmorFlowerBand(BOPConfiguration.IDs.flowerBandID, EnumArmorMaterialFlowerBand, BiomesOPlenty.proxy.addArmor("flowerBand"), 0)).setCreativeTab(BiomesOPlenty.tabBiomesOPlenty).setUnlocalizedName("bop.flowerBand")); Items.flowerBand = Optional.of((new ArmorFlowerBand(BOPConfiguration.IDs.flowerBandID, EnumArmorMaterialFlowerBand, BiomesOPlenty.proxy.addArmor("flowerBand"), 0)).setCreativeTab(BiomesOPlenty.tabBiomesOPlenty).setUnlocalizedName("bop.flowerBand"));
Items.wadingBoots = Optional.of((new ArmorWadingBoots(BOPConfiguration.IDs.wadingBootsID, EnumArmorMaterialWadingBoots, BiomesOPlenty.proxy.addArmor("wadingBoots"), 3)).setCreativeTab(BiomesOPlenty.tabBiomesOPlenty).setUnlocalizedName("bop.wadingBoots"));
} }
} }

View file

@ -355,6 +355,8 @@
<entry key="item.bop.flowerBand.lushflowerband.name">Lush Flower Band</entry> <entry key="item.bop.flowerBand.lushflowerband.name">Lush Flower Band</entry>
<entry key="item.bop.flowerBand.exoticflowerband.name">Exotic Flower Band</entry> <entry key="item.bop.flowerBand.exoticflowerband.name">Exotic Flower Band</entry>
<entry key="item.bop.wadingBoots.name">Wading Boots</entry>
<!--Fluids --> <!--Fluids -->
<entry key="item.bop.bopBucket.amethyst_empty.name">Amethyst Bucket</entry> <entry key="item.bop.bopBucket.amethyst_empty.name">Amethyst Bucket</entry>
<entry key="item.bop.bopBucket.amethyst_spring_water.name">Spring Water Amethyst Bucket</entry> <entry key="item.bop.bopBucket.amethyst_spring_water.name">Spring Water Amethyst Bucket</entry>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B