mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-12 16:27:37 +00:00
Added the Extrapolated Bucket.
This commit is contained in:
1 parent
4fd5376c68
commit
409c74c08f
8 files changed
+93
No files matched your search
@@ -62,6 +62,8 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addItem(ModItems.rune);
|
||||
|
||||
addItem(ModItems.dirtRod);
|
||||
addItem(ModItems.waterRod);
|
||||
addItem(ModItems.openBucket);
|
||||
addItem(ModItems.terraformRod);
|
||||
addItem(ModItems.grassHorn);
|
||||
addBlock(ModBlocks.forestDrum);
|
||||
|
||||
@@ -140,6 +140,7 @@ public final class ModCrafingRecipes {
|
||||
public static IRecipe recipeElementiumAxe;
|
||||
public static IRecipe recipeElementiumShears;
|
||||
public static IRecipe recipeElementiumSword;
|
||||
public static IRecipe recipeOpenBucket;
|
||||
|
||||
public static void init() {
|
||||
// Lexicon Recipe
|
||||
@@ -785,6 +786,12 @@ public final class ModCrafingRecipes {
|
||||
'S', LibOreDict.ELEMENTIUM);
|
||||
recipeElementiumShears = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Extrapolated Bucket Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.openBucket),
|
||||
"E E", " E ",
|
||||
'E', LibOreDict.ELEMENTIUM);
|
||||
recipeOpenBucket = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Mana and Terrasteel Block Recipes
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0),
|
||||
"III", "III", "III",
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* 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 @ [Jun 20, 2014, 12:12:58 AM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import net.minecraft.block.material.Material;
|
||||
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.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.FillBucketEvent;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
|
||||
public class ItemOpenBucket extends ItemMod {
|
||||
|
||||
public ItemOpenBucket() {
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(LibItemNames.OPEN_BUCKET);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
MovingObjectPosition movingobjectposition = getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, true);
|
||||
|
||||
if(movingobjectposition == null)
|
||||
return par1ItemStack;
|
||||
else {
|
||||
if(movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
int i = movingobjectposition.blockX;
|
||||
int j = movingobjectposition.blockY;
|
||||
int k = movingobjectposition.blockZ;
|
||||
|
||||
if(!par2World.canMineBlock(par3EntityPlayer, i, j, k))
|
||||
return par1ItemStack;
|
||||
|
||||
if(!par3EntityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, par1ItemStack))
|
||||
return par1ItemStack;
|
||||
|
||||
Material material = par2World.getBlock(i, j, k).getMaterial();
|
||||
int l = par2World.getBlockMetadata(i, j, k);
|
||||
|
||||
if(material == Material.water && l == 0) {
|
||||
par2World.setBlockToAir(i, j, k);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if(material == Material.lava && l == 0) {
|
||||
par2World.setBlockToAir(i, j, k);
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -119,6 +119,7 @@ public final class ModItems {
|
||||
public static Item elementiumAxe;
|
||||
public static Item elementiumSword;
|
||||
public static Item elementiumShears;
|
||||
public static Item openBucket;
|
||||
|
||||
public static void init() {
|
||||
lexicon = new ItemLexicon();
|
||||
@@ -182,6 +183,7 @@ public final class ModItems {
|
||||
elementiumAxe = new ItemElementiumAxe();
|
||||
elementiumSword = new ItemElementiumSword();
|
||||
elementiumShears = new ItemElementiumShears();
|
||||
openBucket = new ItemOpenBucket();
|
||||
|
||||
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
|
||||
for(int i = 0; i < 16; i++) {
|
||||
|
||||
@@ -129,6 +129,7 @@ public final class LexiconData {
|
||||
public static LexiconEntry enderDagger;
|
||||
public static LexiconEntry waterRod;
|
||||
public static LexiconEntry elfGear;
|
||||
public static LexiconEntry openBucket;
|
||||
|
||||
public static LexiconEntry baublesIntro;
|
||||
public static LexiconEntry tinyPlanet;
|
||||
@@ -421,6 +422,9 @@ public final class LexiconData {
|
||||
new PageText("6"), new PageCraftingRecipe("7", ModCrafingRecipes.recipeElementiumAxe), new PageText("8"), new PageCraftingRecipe("9", ModCrafingRecipes.recipeElementiumShears), new PageText("10"), new PageCraftingRecipe("11", ModCrafingRecipes.recipeElementiumSword),
|
||||
new PageCraftingRecipe("12", ModCrafingRecipes.recipeElementiumHelm), new PageCraftingRecipe("13", ModCrafingRecipes.recipeElementiumChest), new PageCraftingRecipe("14", ModCrafingRecipes.recipeElementiumLegs), new PageCraftingRecipe("15", ModCrafingRecipes.recipeElementiumBoots));
|
||||
|
||||
openBucket = new ALexiconEntry(LibLexicon.TOOL_OPEN_BUCKET, categoryTools);
|
||||
openBucket.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeOpenBucket));
|
||||
|
||||
// BAUBLES ENTRIES
|
||||
baublesIntro = new BLexiconEntry(LibLexicon.BAUBLE_INTRO, categoryBaubles);
|
||||
baublesIntro.setPriority().setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_BAUBLES), new PageText("2"));
|
||||
|
||||
@@ -74,6 +74,7 @@ public final class LibItemNames {
|
||||
public static final String ELEMENTIUM_AXE = "elementiumAxe";
|
||||
public static final String ELEMENTIUM_SWORD = "elementiumSword";
|
||||
public static final String ELEMENTIUM_SHEARS = "elementiumShears";
|
||||
public static final String OPEN_BUCKET = "openBucket";
|
||||
|
||||
public static final String[] LENS_NAMES = new String[] {
|
||||
"lensNormal",
|
||||
|
||||
@@ -107,6 +107,7 @@ public final class LibLexicon {
|
||||
public static final String TOOL_ENDER_DAGGER = "enderDagger";
|
||||
public static final String TOOL_WATER_ROD = "waterRod";
|
||||
public static final String TOOL_ELF_GEAR = "elfGear";
|
||||
public static final String TOOL_OPEN_BUCKET = "openBucket";
|
||||
|
||||
public static final String BAUBLE_INTRO = "bIntro";
|
||||
public static final String BAUBLE_TINY_PLANET = "tinyPlanet";
|
||||
|
||||
@@ -491,6 +491,7 @@ item.botania:elementiumShovel.name=Elementium Shovel
|
||||
item.botania:elementiumAxe.name=Elementium Axe
|
||||
item.botania:elementiumSword.name=Elementium Sword
|
||||
item.botania:elementiumShears.name=Elementium Shears
|
||||
item.botania:openBucket.name=Extrapolated Bucket
|
||||
|
||||
# GUI TEXT
|
||||
botania.gui.lexicon.header=Lexica Botania, %s Edition's Index - Pick which category you would like to study:
|
||||
@@ -1029,6 +1030,11 @@ botania.page.elfGear13=The &1Elementium Chestplate&0
|
||||
botania.page.elfGear14=The &1Elementium Leggings&0
|
||||
botania.page.elfGear15=The &1Elementium Boots&0
|
||||
|
||||
# -- EXTRAPOLATED BUCKET
|
||||
botania.entry.openBucket=Extrapolated Bucket
|
||||
botania.page.openBucket0=By creating a bucket out of &1Elementium&0 one seems to notice an interesting feature. The liquids acquired by it simply vanish into the ether, never to be seen again. This seems like a great clean up tool.
|
||||
botania.page.openBucket1=Geeks...
|
||||
|
||||
# - BAUBLES
|
||||
# -- AN INTRODUCTION TO BAUBLES
|
||||
botania.entry.bIntro=An Introduction to Baubles
|
||||
|
||||
Reference in new issue
Block a user