mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-13 00:37:57 +00:00
Added the Rod of the Seas.
This commit is contained in:
1 parent
c4fda26f83
commit
ef721d287c
10 files changed
+90
-9
No files matched your search
@@ -21,6 +21,7 @@ import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -28,9 +29,12 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.mana.ManaItemHandler;
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
import vazkii.botania.common.block.tile.TileAltar;
|
||||
import vazkii.botania.common.block.tile.TileSimpleInventory;
|
||||
import vazkii.botania.common.item.ItemWaterRod;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
|
||||
@@ -67,7 +71,7 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
|
||||
ItemStack stack = par5EntityPlayer.getCurrentEquippedItem();
|
||||
TileAltar tile = (TileAltar) par1World.getTileEntity(par2, par3, par4);
|
||||
|
||||
|
||||
if(par5EntityPlayer.isSneaking()) {
|
||||
for(int i = tile.getSizeInventory() - 1; i >= 0; i--) {
|
||||
ItemStack stackAt = tile.getStackInSlot(i);
|
||||
@@ -81,10 +85,13 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(stack != null && stack.getItem() == Items.water_bucket) {
|
||||
if(stack != null && (stack.getItem() == Items.water_bucket || (stack.getItem() == ModItems.waterRod && ManaItemHandler.requestManaExact(stack, par5EntityPlayer, ItemWaterRod.COST, false)))) {
|
||||
if(!tile.hasWater) {
|
||||
if(!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
if(stack.getItem() == ModItems.waterRod)
|
||||
ManaItemHandler.requestManaExact(stack, par5EntityPlayer, ItemWaterRod.COST, true);
|
||||
else if(!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, new ItemStack(Items.bucket));
|
||||
|
||||
tile.hasWater = true;
|
||||
par1World.func_147453_f(par2, par3, par4, this);
|
||||
par1World.markBlockForUpdate(par2, par3, par4);
|
||||
@@ -93,7 +100,7 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -130,6 +130,7 @@ public final class ModCrafingRecipes {
|
||||
public static IRecipe recipeRedQuartz;
|
||||
public static IRecipe recipeAlfPortal;
|
||||
public static IRecipe recipeNaturaPylon;
|
||||
public static IRecipe recipeWaterRod;
|
||||
|
||||
public static void init() {
|
||||
// Lexicon Recipe
|
||||
@@ -725,6 +726,14 @@ public final class ModCrafingRecipes {
|
||||
addShapelessOreDictRecipe(new ItemStack(ModBlocks.pylon, 1, 1), ModBlocks.pylon, LibOreDict.LIFE_ESSENCE, LibOreDict.LIFE_ESSENCE);
|
||||
recipeNaturaPylon = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Rod of the Seas Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.waterRod),
|
||||
" B", " T ", "R ",
|
||||
'B', new ItemStack(Items.potionitem),
|
||||
'T', LibOreDict.LIVINGWOOD_TWIG,
|
||||
'R', LibOreDict.RUNE[0]);
|
||||
recipeWaterRod = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Mana and Terrasteel Block Recipes
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0),
|
||||
"III", "III", "III",
|
||||
|
||||
@@ -62,7 +62,5 @@ public class ItemDirtRod extends ItemMod implements IManaUsingItem {
|
||||
public boolean usesMana(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
import vazkii.botania.api.mana.ManaItemHandler;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemWaterRod extends ItemMod implements IManaUsingItem {
|
||||
|
||||
public static final int COST = 75;
|
||||
|
||||
public ItemWaterRod() {
|
||||
super();
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(LibItemNames.WATER_ROD);
|
||||
}
|
||||
|
||||
@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(ManaItemHandler.requestManaExact(par1ItemStack, par2EntityPlayer, COST, false)) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(par7);
|
||||
|
||||
ItemStack stackToPlace = new ItemStack(Blocks.flowing_water);
|
||||
stackToPlace.tryPlaceItemIntoWorld(par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10);
|
||||
|
||||
if(stackToPlace.stackSize == 0) {
|
||||
ManaItemHandler.requestManaExact(par1ItemStack, par2EntityPlayer, COST, true);
|
||||
for(int i = 0; i < 6; i++)
|
||||
Botania.proxy.sparkleFX(par3World, par4 + dir.offsetX + Math.random(), par5 + dir.offsetY + Math.random(), par6 + dir.offsetZ + Math.random(), 0.2F, 0.2F, 1F, 1F, 5);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFull3D() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean usesMana(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -101,6 +101,7 @@ public final class ModItems {
|
||||
public static Item flightTiara;
|
||||
public static Item enderDagger;
|
||||
public static Item quartz;
|
||||
public static Item waterRod;
|
||||
|
||||
public static void init() {
|
||||
lexicon = new ItemLexicon();
|
||||
@@ -154,6 +155,7 @@ public final class ModItems {
|
||||
flightTiara = new ItemFlightTiara();
|
||||
enderDagger = new ItemEnderDagger();
|
||||
quartz = new ItemQuartz();
|
||||
waterRod = new ItemWaterRod();
|
||||
|
||||
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
|
||||
for(int i = 0; i < 16; i++) {
|
||||
|
||||
@@ -127,6 +127,7 @@ public final class LexiconData {
|
||||
public static LexiconEntry terraBlade;
|
||||
public static LexiconEntry terraPick;
|
||||
public static LexiconEntry enderDagger;
|
||||
public static LexiconEntry waterRod;
|
||||
|
||||
public static LexiconEntry baublesIntro;
|
||||
public static LexiconEntry tinyPlanet;
|
||||
@@ -411,6 +412,9 @@ public final class LexiconData {
|
||||
enderDagger = new BLexiconEntry(LibLexicon.TOOL_ENDER_DAGGER, categoryTools);
|
||||
enderDagger.setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCrafingRecipes.recipeEnderDagger));
|
||||
|
||||
waterRod = new BLexiconEntry(LibLexicon.TOOL_WATER_ROD, categoryTools);
|
||||
waterRod.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeWaterRod));
|
||||
|
||||
// BAUBLES ENTRIES
|
||||
baublesIntro = new BLexiconEntry(LibLexicon.BAUBLE_INTRO, categoryBaubles);
|
||||
baublesIntro.setPriority().setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_BAUBLES), new PageText("2"));
|
||||
@@ -464,7 +468,7 @@ public final class LexiconData {
|
||||
elvenMessage.setPriority().setLexiconPages(new PageImage("0", LibResources.ENTRY_ELVEN_GARDE), new PageText("1"), new PageText("2"), new PageText("3"), new PageText("4"), new PageText("5"), new PageText("6"));
|
||||
|
||||
elvenResources = new ALexiconEntry(LibLexicon.ALF_RESOURCES, categoryAlfhomancy);
|
||||
elvenResources.setPriority().setLexiconPages(new PageText("0"), new PageElvenRecipe("1", ModElvenTradeRecipes.dreamwoodRecipe), new PageElvenRecipe("2", ModElvenTradeRecipes.elementiumRecipe), new PageElvenRecipe("3", ModElvenTradeRecipes.pixieDustRecipe), new PageElvenRecipe("3", ModElvenTradeRecipes.dragonstoneRecipe));
|
||||
elvenResources.setPriority().setLexiconPages(new PageText("0"), new PageElvenRecipe("1", ModElvenTradeRecipes.dreamwoodRecipe), new PageElvenRecipe("2", ModElvenTradeRecipes.elementiumRecipe), new PageElvenRecipe("3", ModElvenTradeRecipes.pixieDustRecipe), new PageElvenRecipe("4", ModElvenTradeRecipes.dragonstoneRecipe));
|
||||
|
||||
// MISCLENAEOUS ENTRIES
|
||||
unstableBlocks = new BLexiconEntry(LibLexicon.MISC_UNSTABLE_BLOCKS, categoryMisc);
|
||||
|
||||
@@ -64,6 +64,7 @@ public final class LibItemNames {
|
||||
public static final String FLIGHT_TIARA = "flightTiara";
|
||||
public static final String ENDER_DAGGER = "enderDagger";
|
||||
public static final String QUARTZ = "quartz";
|
||||
public static final String WATER_ROD = "waterRod";
|
||||
|
||||
public static final String[] LENS_NAMES = new String[] {
|
||||
"lensNormal",
|
||||
|
||||
@@ -105,6 +105,7 @@ public final class LibLexicon {
|
||||
public static final String TOOL_TERRA_SWORD = "terraSword";
|
||||
public static final String TOOL_TERRA_PICK = "terraPick";
|
||||
public static final String TOOL_ENDER_DAGGER = "enderDagger";
|
||||
public static final String TOOL_WATER_ROD = "waterRod";
|
||||
|
||||
public static final String BAUBLE_INTRO = "bIntro";
|
||||
public static final String BAUBLE_TINY_PLANET = "tinyPlanet";
|
||||
|
||||
@@ -465,6 +465,7 @@ item.botania:quartz4.name=Redquartz
|
||||
item.botania:elementium.name=Elementium Ingot
|
||||
item.botania:pixieDust.name=Pixie Dust
|
||||
item.botania:dragonstone.name=Dragonstone
|
||||
item.botania:waterRod.name=Rod of the Seas
|
||||
|
||||
# GUI TEXT
|
||||
botania.gui.lexicon.header=Lexica Botania, %s Edition's Index - Pick which category you would like to study:
|
||||
@@ -979,6 +980,11 @@ botania.page.enderDagger0=Those &4Endermen&0. They're the second more pesky thin
|
||||
botania.page.enderDagger1=Due of the type of infusion, though, the dagger only lasts for a few kills, and the energy that radiates from it prevents the &1Manasteel&0 from gathering &4Mana&0 to avoid damage, like typical tools would. Still, all in the name of killing those monsters.
|
||||
botania.page.enderDagger2=Strike my Soul
|
||||
|
||||
# -- ROD OF THE SEAS
|
||||
botania.entry.waterRod=Rod of the Seas
|
||||
botania.page.waterRod0=Similarly to it's land counterpart, the &1Rod of the Seas&0 will, at the cost of some &4Mana&0, place down a &1Water&0 block wherever it's used on. Furthermore, it can also be used to refil a &1Petal Apothecary&0.
|
||||
botania.page.waterRod1=Keep the Earth clean, it isn't Uranus
|
||||
|
||||
# - BAUBLES
|
||||
# -- AN INTRODUCTION TO BAUBLES
|
||||
botania.entry.bIntro=An Introduction to Baubles
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Reference in new issue
Block a user