diff --git a/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java b/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java index bc539f159..c7e6900ec 100644 --- a/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java +++ b/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java @@ -165,6 +165,7 @@ public final class ModCrafingRecipes { public static IRecipe recipeLensFire; public static IRecipe recipeLensPiston; public static List recipesLaputaShard; + public static List recipesLaputaShardUpgrade; public static IRecipe recipeVirusZombie; public static IRecipe recipeVirusSkeleton; public static IRecipe recipeReachRing; @@ -1025,6 +1026,10 @@ public final class ModCrafingRecipes { 'E', LibOreDict.RUNE[2]); recipesLaputaShard = BotaniaAPI.getLatestAddedRecipes(16); + for(int i = 1; i < 20; i++) + addShapelessOreDictRecipe(new ItemStack(ModItems.laputaShard, 1, i), LibOreDict.LIFE_ESSENCE,new ItemStack(ModItems.laputaShard, 1, i - 1)); + recipesLaputaShardUpgrade = BotaniaAPI.getLatestAddedRecipes(19); + // 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(); diff --git a/MODSRC/vazkii/botania/common/item/ItemLaputaShard.java b/MODSRC/vazkii/botania/common/item/ItemLaputaShard.java index 95ae56002..c5dfc2887 100644 --- a/MODSRC/vazkii/botania/common/item/ItemLaputaShard.java +++ b/MODSRC/vazkii/botania/common/item/ItemLaputaShard.java @@ -11,14 +11,19 @@ */ package vazkii.botania.common.item; +import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.BlockFalling; +import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityThrowable; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.StatCollector; import net.minecraft.world.World; import vazkii.botania.api.internal.IManaBurst; import vazkii.botania.api.mana.BurstProperties; @@ -43,32 +48,47 @@ public class ItemLaputaShard extends ItemMod implements ILensEffect, ITinyPlanet public ItemLaputaShard() { setUnlocalizedName(LibItemNames.LAPUTA_SHARD); + setHasSubtypes(true); + } + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + super.getSubItems(item, tab, list); + for(int i = 0; i < 4; i++) + list.add(new ItemStack(item, 1, (i + 1) * 5 - 1)); + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean adv) { + list.add(String.format(StatCollector.translateToLocal("botaniamisc.shardLevel"), StatCollector.translateToLocal("botania.roman" + (stack.getItemDamage() + 1)))); } @Override public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { if(par5 < 160 && !par3World.provider.isHellWorld) { par3World.playSound(par4 + 0.5D, par5 + 0.5D, par6 + 0.5D, "mob.zombie.remedy", 1.0F + par3World.rand.nextFloat(), par3World.rand.nextFloat() * 0.7F + 1.3F, false); - spawnBurst(par3World, par4, par5, par6); + spawnBurst(par3World, par4, par5, par6, par1ItemStack); par1ItemStack.stackSize--; } return true; } - public void spawnBurst(World world, int srcx, int srcy, int srcz) { + public void spawnBurstFirst(World world, int srcx, int srcy, int srcz, ItemStack lens) { boolean pointy = world.rand.nextDouble() < 0.25; double heightscale = world.rand.nextDouble() + 0.5; - spawnBurst(world, srcx, srcy, srcz, pointy, heightscale); + spawnBurst(world, srcx, srcy, srcz, lens, pointy, heightscale); } public void spawnBurst(World world, int srcx, int srcy, int srcz, ItemStack lens) { boolean pointy = ItemNBTHelper.getBoolean(lens, TAG_POINTY, false); double heightscale = ItemNBTHelper.getDouble(lens, TAG_HEIGHTSCALE, 1); - spawnBurst(world, srcx, srcy, srcz, pointy, heightscale); + + spawnBurst(world, srcx, srcy, srcz, lens, pointy, heightscale); } - public void spawnBurst(World world, int srcx, int srcy, int srcz, boolean pointy, double heightscale) { - int range = 14; + + public void spawnBurst(World world, int srcx, int srcy, int srcz, ItemStack lens, boolean pointy, double heightscale) { + int range = 14 + lens.getItemDamage(); if(!world.isRemote) { for(int i = 0; i < range * 2 + 1; i++) @@ -78,7 +98,7 @@ public class ItemLaputaShard extends ItemMod implements ILensEffect, ITinyPlanet int y = srcy - range + j; int z = srcz - range + k; - if(inRange(x, y, z, srcx, srcy, srcz,range, heightscale, pointy)) { + if(inRange(x, y, z, srcx, srcy, srcz, range, heightscale, pointy)) { Block block = world.getBlock(x, y, z); if(!block.isAir(world, x, y, z) && !block.isReplaceable(world, x, y, z) && !(block instanceof BlockFalling) && (!(block instanceof ILaputaImmobile) || ((ILaputaImmobile) block).canMove(world, x, y, z)) && block.getBlockHardness(world, x, y, z) != -1) { int id = Block.getIdFromBlock(block); @@ -92,20 +112,20 @@ public class ItemLaputaShard extends ItemMod implements ILensEffect, ITinyPlanet world.setBlockToAir(x, y, z); world.playAuxSFX(2001, x, y, z, id + (meta << 12)); - ItemStack lens = new ItemStack(this); - ItemNBTHelper.setInt(lens, TAG_BLOCK, id); - ItemNBTHelper.setInt(lens, TAG_META, meta); + ItemStack copyLens = new ItemStack(this, 1, lens.getItemDamage()); + ItemNBTHelper.setInt(copyLens, TAG_BLOCK, id); + ItemNBTHelper.setInt(copyLens, TAG_META, meta); NBTTagCompound cmp = new NBTTagCompound(); if(tile != null) tile.writeToNBT(cmp); - ItemNBTHelper.setCompound(lens, TAG_TILE, cmp); - ItemNBTHelper.setInt(lens, TAG_X, srcx); - ItemNBTHelper.setInt(lens, TAG_Y, srcy); - ItemNBTHelper.setInt(lens, TAG_Z, srcz); - ItemNBTHelper.setBoolean(lens, TAG_POINTY, pointy); - ItemNBTHelper.setDouble(lens, TAG_HEIGHTSCALE, heightscale); + ItemNBTHelper.setCompound(copyLens, TAG_TILE, cmp); + ItemNBTHelper.setInt(copyLens, TAG_X, srcx); + ItemNBTHelper.setInt(copyLens, TAG_Y, srcy); + ItemNBTHelper.setInt(copyLens, TAG_Z, srcz); + ItemNBTHelper.setBoolean(copyLens, TAG_POINTY, pointy); + ItemNBTHelper.setDouble(copyLens, TAG_HEIGHTSCALE, heightscale); - EntityManaBurst burst = getBurst(world, x, y, z, lens); + EntityManaBurst burst = getBurst(world, x, y, z, copyLens); world.spawnEntityInWorld(burst); return; } @@ -114,12 +134,12 @@ public class ItemLaputaShard extends ItemMod implements ILensEffect, ITinyPlanet } } - private boolean inRange(int x,int y,int z,int srcx, int srcy, int srcz, int range, double heightscale, boolean pointy) { + private boolean inRange(int x, int y, int z, int srcx, int srcy, int srcz, int range, double heightscale, boolean pointy) { if(y >= srcy) return MathHelper.pointDistanceSpace(x, 0, z, srcx, 0, srcz) < range; else if(!pointy) - return MathHelper.pointDistanceSpace(x, y/heightscale, z, srcx, srcy/heightscale, srcz) < range; - else return MathHelper.pointDistanceSpace(x, 0, z, srcx, 0, srcz) < range-(srcy-y)/heightscale; + return MathHelper.pointDistanceSpace(x, y / heightscale, z, srcx, srcy / heightscale, srcz) < range; + else return MathHelper.pointDistanceSpace(x, 0, z, srcx, 0, srcz) < range - (srcy - y) / heightscale; } public EntityManaBurst getBurst(World world, int x, int y, int z, ItemStack stack) { @@ -158,7 +178,7 @@ public class ItemLaputaShard extends ItemMod implements ILensEffect, ITinyPlanet entity.motionY = 0.35; entity.motionZ = 0; - final int spawnTicks = 3; + final int spawnTicks = 1000; final int placeTicks = 120; ItemStack lens = burst.getSourceLens(); diff --git a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java index 6fd8d3438..246d595c6 100644 --- a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java +++ b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java @@ -481,7 +481,7 @@ public final class LexiconData { vineBall.setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCrafingRecipes.recipeVineBall), new PageCraftingRecipe("3", ModCrafingRecipes.recipeSlingshot)); laputaShard = new ALexiconEntry(LibLexicon.TOOL_LAPUTA_SHARD, categoryTools); - laputaShard.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipesLaputaShard)); + laputaShard.setLexiconPages(new PageText("0"), new PageText("2"), new PageCraftingRecipe("1", ModCrafingRecipes.recipesLaputaShard), new PageCraftingRecipe("3", ModCrafingRecipes.recipesLaputaShardUpgrade)); virus = new ALexiconEntry(LibLexicon.TOOL_VIRUS, categoryTools); virus.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeVirusZombie), new PageCraftingRecipe("2", ModCrafingRecipes.recipeVirusSkeleton)); diff --git a/resources/assets/botania/lang/en_US.lang b/resources/assets/botania/lang/en_US.lang index 5594caf28..69f2ac0ff 100644 --- a/resources/assets/botania/lang/en_US.lang +++ b/resources/assets/botania/lang/en_US.lang @@ -46,6 +46,7 @@ botaniamisc.bottleTooltip=It has an acquired taste botaniamisc.coarseDirt0=Coarse Dirt, grass botaniamisc.coarseDirt1=won't grow on it botaniamisc.spawnerTip=Tip: Use a Spawn Egg to change the mob +botaniamisc.shardLevel=Shard Power %s # COLORS botania.color0=White @@ -74,6 +75,28 @@ botania.rank3=&aA botania.rank4=&dS botania.rank5=&6SS +# ROMAN NUMERALS +botania.roman1=I +botania.roman2=II +botania.roman3=III +botania.roman4=IV +botania.roman5=V +botania.roman6=VI +botania.roman7=VII +botania.roman8=VIII +botania.roman9=IX +botania.roman10=X +botania.roman11=XI +botania.roman12=XII +botania.roman13=XIII +botania.roman14=XIV +botania.roman15=XV +botania.roman16=XVI +botania.roman17=XVII +botania.roman18=XVIII +botania.roman19=XIX +botania.roman20=XX + # KNOWLEDGE botania.knowledge.minecraft=Minecraftian Knowledge botania.knowledge.alfheim=&aElven&7 Knowledge @@ -1286,7 +1309,9 @@ botania.page.vineBall3=...if that actually existed. # -- SHARD OF LAPUTA 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 around that point up into the air.
This process consumes the shard and can take upwards of ten minutes depending on the mass of land. +botania.page.laputaShard2=The radius of the island creates start at 14 blocks, on other words, 28 blocks of diameter. It's possible to increase the size by upgrading the shard with aditional &1Gaia Spirits&0, each one adds 1 block to the radius, or 2 to the diameter. botania.page.laputaShard1=Look Shiro, Laputa exists! +botania.page.laputaShard3=Size does matter # -- EQUESTRIAN VIRUS botania.entry.virus=Equestrian Virus