diff --git a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java
index 9c9f894ab..ed8489add 100644
--- a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java
+++ b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java
@@ -304,6 +304,7 @@ public final class ModCraftingRecipes {
public static IRecipe recipeCloudPendant;
public static IRecipe recipeSuperCloudPendant;
public static IRecipe recipeThirdEye;
+ public static IRecipe recipeAstrolabe;
// Garden of Glass
public static IRecipe recipeRootToSapling;
@@ -2072,6 +2073,14 @@ public final class ModCraftingRecipes {
'D', LibOreDict.MANA_DIAMOND);
recipeThirdEye = BotaniaAPI.getLatestAddedRecipe();
+ // Astrolabe Recipe
+ addOreDictRecipe(new ItemStack(ModItems.astrolabe),
+ " EG", "EEE", "GED",
+ 'E', LibOreDict.ELEMENTIUM,
+ 'G', LibOreDict.LIFE_ESSENCE,
+ 'D', LibOreDict.DREAM_WOOD);
+ recipeAstrolabe = BotaniaAPI.getLatestAddedRecipe();
+
///////////////////////////////////////////////////////////////////////////////////////////////////////////
// Storage Block/Nugget Recipes
diff --git a/src/main/java/vazkii/botania/common/item/ItemAstrolabe.java b/src/main/java/vazkii/botania/common/item/ItemAstrolabe.java
index 92d23aae0..ff06475d5 100644
--- a/src/main/java/vazkii/botania/common/item/ItemAstrolabe.java
+++ b/src/main/java/vazkii/botania/common/item/ItemAstrolabe.java
@@ -38,6 +38,7 @@ import vazkii.botania.api.mana.ManaItemHandler;
import vazkii.botania.client.core.handler.ItemsRemainingRenderHandler;
import vazkii.botania.common.core.helper.ItemNBTHelper;
import vazkii.botania.common.item.equipment.tool.ToolCommons;
+import vazkii.botania.common.item.rod.ItemExchangeRod;
import vazkii.botania.common.lib.LibItemNames;
public class ItemAstrolabe extends ItemMod {
@@ -58,12 +59,18 @@ public class ItemAstrolabe extends ItemMod {
int meta = block.getMetaFromState(state);
if(playerIn.isSneaking()) {
- if(setBlock(stack, block, meta))
+ if(setBlock(stack, block, meta)) {
+ displayRemainderCounter(playerIn, stack);
return EnumActionResult.SUCCESS;
+ }
} else {
boolean did = placeAllBlocks(stack, playerIn);
- if(!worldIn.isRemote)
- playerIn.swingArm(hand);
+ if(did) {
+ displayRemainderCounter(playerIn, stack);
+ if(!worldIn.isRemote)
+ playerIn.swingArm(hand);
+ }
+
return did ? EnumActionResult.SUCCESS : EnumActionResult.FAIL;
}
@@ -221,6 +228,15 @@ public class ItemAstrolabe extends ItemMod {
return coords.toArray(new BlockPos[coords.size()]);
}
+
+
+ public void displayRemainderCounter(EntityPlayer player, ItemStack stack) {
+ Block block = getBlock(stack);
+ int meta = getBlockMeta(stack);
+ int count = ItemExchangeRod.getInventoryItemCount(player, stack, block, meta);
+ if(!player.worldObj.isRemote)
+ ItemsRemainingRenderHandler.set(new ItemStack(block, 1, meta), count);
+ }
private boolean setBlock(ItemStack stack, Block block, int meta) {
if(Item.getItemFromBlock(block) != null) {
diff --git a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java
index c0495877e..b5e73bfb8 100644
--- a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java
+++ b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java
@@ -203,6 +203,7 @@ public final class LexiconData {
public static LexiconEntry manaweave;
public static LexiconEntry autocraftingHalo;
public static LexiconEntry sextant;
+ public static LexiconEntry astrolabe;
public static LexiconEntry enderAir;
public static LexiconEntry enderEyeBlock;
@@ -1034,6 +1035,10 @@ public final class LexiconData {
sextant.setLexiconPages(new PageText("0"), new PageText("1"),
new PageCraftingRecipe("2", ModCraftingRecipes.recipeSextant));
+ astrolabe = new AlfheimLexiconEntry(LibLexicon.TOOL_ASTROLABE, categoryTools);
+ astrolabe.setLexiconPages(new PageText("0"), new PageText("1"),
+ new PageCraftingRecipe("2", ModCraftingRecipes.recipeAstrolabe));
+
// ENDER ENTRIES
enderAir = new BasicLexiconEntry(LibLexicon.ENDER_AIR, categoryEnder);
enderAir.setPriority().setLexiconPages(new PageText("0"));
diff --git a/src/main/java/vazkii/botania/common/lib/LibLexicon.java b/src/main/java/vazkii/botania/common/lib/LibLexicon.java
index a2b9c27ee..02f977032 100644
--- a/src/main/java/vazkii/botania/common/lib/LibLexicon.java
+++ b/src/main/java/vazkii/botania/common/lib/LibLexicon.java
@@ -178,6 +178,7 @@ public final class LibLexicon {
public static final String TOOL_MANAWEAVE = "manaweave";
public static final String TOOL_AUTOCRAFTING_HALO = "autocraftingHalo";
public static final String TOOL_SEXTANT = "sextant";
+ public static final String TOOL_ASTROLABE = "astrolabe";
public static final String ENDER_AIR = "enderAir";
public static final String ENDER_ENDER_EYE_BLOCK = "enderEyeBlock";
diff --git a/src/main/resources/assets/botania/lang/en_US.lang b/src/main/resources/assets/botania/lang/en_US.lang
index 5b00c0099..cb287dd73 100644
--- a/src/main/resources/assets/botania/lang/en_US.lang
+++ b/src/main/resources/assets/botania/lang/en_US.lang
@@ -2612,7 +2612,6 @@ botania.page.manaAlchemy24=Transmuting &1Tall Grass&0 types
botania.page.manaAlchemy25=Transmuting mundane flowers
botania.page.manaAlchemy26=Transmuting stones
-
# -- BOTANICAL BREWERY
botania.entry.brewery=Botanical Brewery
botania.tagline.brewery=Create brews, more effective potions
@@ -3144,6 +3143,13 @@ botania.page.sextant0=In this cubic world, the art of creating circles often elu
botania.page.sextant1=While the item is being used, a blue circle will appear in the world, as a simple preview of where the circle will be placed. Upon letting go, a circle of fake &1Cobblestone&0 blocks will show up as your building guide.
Shift-right clicking with this item in hand resets or removes the circle.
botania.page.sextant2=You sketch a circle, filling you with determination
+# -- WORLDSHAPER's ASTROLABAE
+botania.entry.astrolabe=Worldshaper's Astrolabe
+botania.tagline.astrolabe=A tool to help create planes
+botania.page.astrolabe0=The &1Worldshaper's Astrolabe&0 is a handy tool to place down blocks, a lot of them, really quick.
To start off, shift-right click the astrolabe on a block in the world. This will set the block that will be placed.
Shift-right clicking with the astrolabe on the air will change how many blocks will get placed.
+botania.page.astrolabe1=When looking at a block with the astrolabe in hand, a quick preview will show up, of what blocks will be placed upon right click.
To create the wall or floor displayed, alongside &4Mana&0, the respective blocks will be taken from the user's inventory, or items that can provide blocks to items such as the &1Rod of the Shifting Crust&0. (e.g. &1Rod of the Depths&0, &1Hand of Ender&0).
+botania.page.astrolabe2=Builds walls, creates worlds
+
# - ENDER ARTEFACTS
# -- EXTRACTING ENDER AIR
botania.entry.enderAir=Extracting Ender Air