Added two viruses.

This commit is contained in:
Vasco Lavos committed 2014-07-21 19:49:19 +01:00
1 parent efcec9b1dd
commit 7914585f05
11 files changed
+124

No files matched your search

@@ -71,6 +71,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
addItem(ModItems.rainbowRod);
addItem(ModItems.tornadoRod);
addItem(ModItems.fireRod);
addItem(ModItems.virus);
addItem(ModItems.slingshot);
addItem(ModItems.vineBall);
addBlock(ModBlocks.forestDrum);
@@ -164,6 +164,8 @@ public final class ModCrafingRecipes {
public static IRecipe recipeLensFire;
public static IRecipe recipeLensPiston;
public static List<IRecipe> recipesLaputaShard;
public static IRecipe recipeVirusZombie;
public static IRecipe recipeVirusSkeleton;
public static void init() {
// Lexicon Recipe
@@ -1005,6 +1007,14 @@ public final class ModCrafingRecipes {
'E', LibOreDict.RUNE[2]);
recipesLaputaShard = BotaniaAPI.getLatestAddedRecipes(16);
// Necrodermal Virus Recipe
addShapelessOreDictRecipe(new ItemStack(ModItems.virus), LibOreDict.PIXIE_DUST, new ItemStack(ModItems.vineBall), new ItemStack(Items.magma_cream), new ItemStack(Items.fermented_spider_eye), new ItemStack(Items.ender_eye), new ItemStack(Items.skull, 1, 2));
recipeVirusZombie = BotaniaAPI.getLatestAddedRecipe();
// Nullodermal Virus Recipe
addShapelessOreDictRecipe(new ItemStack(ModItems.virus, 1, 1), LibOreDict.PIXIE_DUST, new ItemStack(ModItems.vineBall), new ItemStack(Items.magma_cream), new ItemStack(Items.fermented_spider_eye), new ItemStack(Items.ender_eye), new ItemStack(Items.skull));
recipeVirusSkeleton = BotaniaAPI.getLatestAddedRecipe();
// Mana and Terrasteel Block Recipes
addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0),
"III", "III", "III",
@@ -0,0 +1,94 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* File Created @ [Jul 21, 2014, 4:46:17 PM (GMT)]
*/
package vazkii.botania.common.item;
import java.util.List;
import cpw.mods.fml.relauncher.ReflectionHelper;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.ai.attributes.BaseAttributeMap;
import net.minecraft.entity.ai.attributes.IAttribute;
import net.minecraft.entity.ai.attributes.IAttributeInstance;
import net.minecraft.entity.passive.EntityHorse;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import vazkii.botania.client.core.helper.IconHelper;
import vazkii.botania.common.lib.LibItemNames;
import vazkii.botania.common.lib.LibObfuscation;
public class ItemVirus extends ItemMod {
IIcon[] icons;
private static final int SUBTYPES = 2;
public ItemVirus() {
setUnlocalizedName(LibItemNames.VIRUS);
setHasSubtypes(true);
}
@Override
public boolean itemInteractionForEntity(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, EntityLivingBase par3EntityLivingBase) {
if(par3EntityLivingBase instanceof EntityHorse) {
EntityHorse horse = (EntityHorse) par3EntityLivingBase;
if(horse.getHorseType() != 3 && horse.getHorseType() != 4 && horse.isTame()) {
horse.setHorseType(3 + par1ItemStack.getItemDamage());
BaseAttributeMap attributes = horse.getAttributeMap();
IAttributeInstance movementSpeed = attributes.getAttributeInstance(SharedMonsterAttributes.movementSpeed);
IAttributeInstance health = attributes.getAttributeInstance(SharedMonsterAttributes.maxHealth);
health.applyModifier(new AttributeModifier("Ermergerd Virus D:", health.getBaseValue(), 0));
movementSpeed.applyModifier(new AttributeModifier("Ermergerd Virus D:", movementSpeed.getBaseValue(), 0));
IAttributeInstance jumpHeight = attributes.getAttributeInstance(ReflectionHelper.<IAttribute, EntityHorse>getPrivateValue(EntityHorse.class, null, LibObfuscation.HORSE_JUMP_STRENGTH));
jumpHeight.applyModifier(new AttributeModifier("Ermergerd Virus D:", jumpHeight.getBaseValue() * 0.5, 0));
par2EntityPlayer.worldObj.playSound(par3EntityLivingBase.posX + 0.5D, par3EntityLivingBase.posY + 0.5D, par3EntityLivingBase.posZ + 0.5D, "mob.zombie.remedy", 1.0F + par3EntityLivingBase.worldObj.rand.nextFloat(), par3EntityLivingBase.worldObj.rand.nextFloat() * 0.7F + 1.3F, false);
par1ItemStack.stackSize--;
return true;
}
}
return false;
}
@Override
public void getSubItems(Item item, CreativeTabs tab, List list) {
for(int i = 0; i < SUBTYPES; i++)
list.add(new ItemStack(item, 1, i));
}
@Override
public IIcon getIconFromDamage(int par1) {
return icons[Math.min(icons.length - 1, par1)];
}
@Override
public String getUnlocalizedName(ItemStack par1ItemStack) {
return getUnlocalizedNameLazy(par1ItemStack) + par1ItemStack.getItemDamage();
}
String getUnlocalizedNameLazy(ItemStack par1ItemStack) {
return super.getUnlocalizedName(par1ItemStack);
}
@Override
public void registerIcons(IIconRegister par1IconRegister) {
icons = new IIcon[SUBTYPES];
for(int i = 0; i < SUBTYPES; i++)
icons[i] = IconHelper.forItem(par1IconRegister, this, i);
}
}
@@ -132,6 +132,7 @@ public final class ModItems {
public static Item slingshot;
public static Item manaBottle;
public static Item laputaShard;
public static Item virus;
public static void init() {
lexicon = new ItemLexicon();
@@ -206,6 +207,7 @@ public final class ModItems {
slingshot = new ItemSlingshot();
manaBottle = new ItemBottledMana();
laputaShard = new ItemLaputaShard();
virus = new ItemVirus();
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
for(int i = 0; i < 16; i++) {
@@ -134,6 +134,7 @@ public final class LexiconData {
public static LexiconEntry fireRod;
public static LexiconEntry vineBall;
public static LexiconEntry laputaShard;
public static LexiconEntry virus;
public static LexiconEntry baublesIntro;
public static LexiconEntry tinyPlanet;
@@ -457,6 +458,9 @@ public final class LexiconData {
laputaShard = new ALexiconEntry(LibLexicon.TOOL_LAPUTA_SHARD, categoryTools);
laputaShard.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipesLaputaShard));
virus = new ALexiconEntry(LibLexicon.TOOL_VIRUS, categoryTools);
virus.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeVirusZombie), new PageCraftingRecipe("2", ModCrafingRecipes.recipeVirusSkeleton));
// BAUBLES ENTRIES
baublesIntro = new BLexiconEntry(LibLexicon.BAUBLE_INTRO, categoryBaubles);
baublesIntro.setPriority().setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_BAUBLES), new PageText("2"));
@@ -85,6 +85,7 @@ public final class LibItemNames {
public static final String SLINGSHOT = "slingshot";
public static final String MANA_BOTTLE = "manaBottle";
public static final String LAPUTA_SHARD = "laputaShard";
public static final String VIRUS = "virus";
public static final String[] LENS_NAMES = new String[] {
"lensNormal",
@@ -111,6 +111,7 @@ public final class LibLexicon {
public static final String TOOL_FIRE_ROD = "fireRod";
public static final String TOOL_VINE_BALL = "vineBall";
public static final String TOOL_LAPUTA_SHARD = "laputaShard";
public static final String TOOL_VIRUS = "virus";
public static final String BAUBLE_INTRO = "bIntro";
public static final String BAUBLE_TINY_PLANET = "tinyPlanet";
@@ -47,4 +47,7 @@ public final class LibObfuscation {
// Potion
public static final String[] IS_BAD_EFFECT = new String[] { "isBadEffect", "field_76418_K", "J" };
// EntityHorse
public static final String[] HORSE_JUMP_STRENGTH = new String[] { "horseJumpStrength", "field_110271_bv", "bv" };
}
+8
View File
@@ -606,6 +606,8 @@ item.botania:slingshot.name=Livingwood Slingshot
item.botania:manaBottle.name=Mana in a Bottle
item.botania:prismarineShard.name=Prismarine Shard
item.botania:laputaShard.name=Shard of Laputa
item.botania:virus0.name=Necrodermal Virus
item.botania:virus1.name=Nullodermal Virus
# GUI TEXT
botania.gui.lexicon.header=Lexica Botania, %s Edition's Index - Pick which category you would like to study:
@@ -1202,6 +1204,12 @@ botania.entry.laputaShard=Shard of Laputa
botania.page.laputaShard0=Via a somewhat complex magic activation sequence, combining a few interesting resources, including &1Gaia Spirits&0 would allow one to create a shard that, when used on the ground, will allow one to lift a spherical area arount that point up into the air.<br>This process consumes the shard and can take upwards of ten minutes depending on the mass of land.
botania.page.laputaShard1=Look Shiro, Laputa exists!
# -- EQUESTRIAN VIRUS
botania.entry.virus=Equestrian Virus
botania.page.virus0=Through the mixing of some ingredients, a type of virus that can alter the genetic code of equestrian life can be made.<br>Using one of these viruses on a &1Horse&0 will alter it's genetic code, turning it into either a &1Zombie&0 or &1Skeleton Horse&0. Not only will it do that, but it will vastly increase all the &1Horse&0's genetic attributes.
botania.page.virus1=No ponies here
botania.page.virus2=None here either
# - BAUBLES
# -- AN INTRODUCTION TO BAUBLES
botania.entry.bIntro=An Introduction to Baubles
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB