mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-27 15:33:08 +00:00
Shift right clicking a Petal Apothecary or Runic Altar removes the last item.
This commit is contained in:
1 parent
555b4c2d34
commit
d9960f6d6e
5 files changed
+48
-15
No files matched your search
@@ -68,17 +68,33 @@ 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(stack != null && stack.getItem() == Items.water_bucket) {
|
||||
if(!tile.hasWater) {
|
||||
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);
|
||||
|
||||
if(par5EntityPlayer.isSneaking()) {
|
||||
for(int i = tile.getSizeInventory() - 1; i >= 0; i--) {
|
||||
ItemStack stackAt = tile.getStackInSlot(i);
|
||||
if(stackAt != null) {
|
||||
ItemStack copy = stackAt.copy();
|
||||
if(!par5EntityPlayer.inventory.addItemStackToInventory(copy))
|
||||
par5EntityPlayer.dropPlayerItemWithRandomChoice(copy, false);
|
||||
tile.setInventorySlotContents(i, null);
|
||||
par1World.func_147453_f(par2, par3, par4, this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(stack != null && stack.getItem() == Items.water_bucket) {
|
||||
if(!tile.hasWater) {
|
||||
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);
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,10 +67,26 @@ public class BlockRuneAltar extends BlockModContainer implements IWandable, ILex
|
||||
|
||||
@Override
|
||||
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();
|
||||
if(stack != null)
|
||||
return ((TileRuneAltar) par1World.getTileEntity(par2, par3, par4)).addItem(par5EntityPlayer, stack);
|
||||
if(par5EntityPlayer.isSneaking()) {
|
||||
TileRuneAltar altar = (TileRuneAltar) par1World.getTileEntity(par2, par3, par4);
|
||||
|
||||
if(altar.manaToGet == 0)
|
||||
for(int i = altar.getSizeInventory() - 1; i >= 0; i--) {
|
||||
ItemStack stackAt = altar.getStackInSlot(i);
|
||||
if(stackAt != null) {
|
||||
ItemStack copy = stackAt.copy();
|
||||
if(!par5EntityPlayer.inventory.addItemStackToInventory(copy))
|
||||
par5EntityPlayer.dropPlayerItemWithRandomChoice(copy, false);
|
||||
altar.setInventorySlotContents(i, null);
|
||||
par1World.func_147453_f(par2, par3, par4, this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ItemStack stack = par5EntityPlayer.getCurrentEquippedItem();
|
||||
if(stack != null)
|
||||
return ((TileRuneAltar) par1World.getTileEntity(par2, par3, par4)).addItem(par5EntityPlayer, stack);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ public class TileRuneAltar extends TileSimpleInventory implements ISidedInventor
|
||||
|
||||
private static final String TAG_MANA = "mana";
|
||||
|
||||
int manaToGet = 0;
|
||||
public int manaToGet = 0;
|
||||
int mana = 0;
|
||||
int cooldown = 0;
|
||||
|
||||
@@ -227,7 +227,7 @@ public class TileRuneAltar extends TileSimpleInventory implements ISidedInventor
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemstack, int j) {
|
||||
return false;
|
||||
return mana == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -179,7 +179,7 @@ public final class LexiconData {
|
||||
LexiconRecipeMappings.map(new ItemStack(ModBlocks.livingrock), pureDaisy, 1);
|
||||
|
||||
runicAltar = new BLexiconEntry(LibLexicon.BASICS_RUNE_ALTAR, categoryBasics);
|
||||
runicAltar.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCrafingRecipes.recipesRuneAltar), new PageText("3"), new PageRuneRecipe("4", ModRuneRecipes.recipeWaterRune), new PageRuneRecipe("5", ModRuneRecipes.recipesEarthRune), new PageRuneRecipe("6", ModRuneRecipes.recipesAirRune), new PageRuneRecipe("7", ModRuneRecipes.recipeFireRune),
|
||||
runicAltar.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCrafingRecipes.recipesRuneAltar), new PageText("3"), new PageText("20"), new PageRuneRecipe("4", ModRuneRecipes.recipeWaterRune), new PageRuneRecipe("5", ModRuneRecipes.recipesEarthRune), new PageRuneRecipe("6", ModRuneRecipes.recipesAirRune), new PageRuneRecipe("7", ModRuneRecipes.recipeFireRune),
|
||||
new PageRuneRecipe("8", ModRuneRecipes.recipeSpringRune), new PageRuneRecipe("9", ModRuneRecipes.recipeSummerRune), new PageRuneRecipe("10", ModRuneRecipes.recipeAutumnRune), new PageRuneRecipe("11", ModRuneRecipes.recipesWinterRune), new PageRuneRecipe("12", ModRuneRecipes.recipeManaRune),
|
||||
new PageRuneRecipe("13", ModRuneRecipes.recipeLustRune), new PageRuneRecipe("14", ModRuneRecipes.recipeGluttonyRune), new PageRuneRecipe("15", ModRuneRecipes.recipeGreedRune), new PageRuneRecipe("16", ModRuneRecipes.recipeSlothRune), new PageRuneRecipe("17", ModRuneRecipes.recipeWrathRune), new PageRuneRecipe("18", ModRuneRecipes.recipeEnvyRune), new PageRuneRecipe("19", ModRuneRecipes.recipePrideRune));
|
||||
|
||||
|
||||
@@ -473,7 +473,7 @@ botania.entry.apothecary=Petal Apothecary
|
||||
botania.page.apothecary0=In order for a botanist to create plantlife that can do it's bidding, one would need special means of infusing plants with mystical energy.<br>Luckilly, the &1Petal Apothecary&0 does just that.
|
||||
botania.page.apothecary1=The &1Petal Apothecary&0.
|
||||
botania.page.apothecary2=This block, when placed in the world and given some water (by use of a &1Water Bucket&0), will accept any &1Mystical Petals&0 thrown at it, releasing their energies.<br>Once one has set the correct petals in, throwing some &1Seeds&0 in will finalize the proccess.<br>Tossing in the full bucket will also fill the recipient with water.
|
||||
botania.page.apothecary3=Quite a few plants can be made using this method, for more information, read on the &4Functional Flora&0 and &4Generation Flora&0 sections of this Lexicon.
|
||||
botania.page.apothecary3=Quite a few plants can be made using this method, for more information, read on the &4Functional Flora&0 and &4Generation Flora&0 sections of this Lexicon.<br>Last but not least, shift-right clicking the &1Petal Apothecary&0 with an empty hand will remove the last item thrown in.
|
||||
botania.page.apothecary4=Crafting the &1Petal Apothecary&0.
|
||||
|
||||
# -- PURE DAISY
|
||||
@@ -494,6 +494,7 @@ botania.page.runeAltar0=&1Runes&0 are extremely important components of complex
|
||||
botania.page.runeAltar1=Proceed by linking a &1Mana Spreader&0 to the altar, and right click it with a &1Wand of the Forest&0.<br>It should be apparent when the altar has received enough &4Mana&0. When that happens, just drop a piece of &1Livingrock&0 on top of it and use the wand on it again to collect your rune.
|
||||
botania.page.runeAltar2=Crafting the &1Runic Altar&0.
|
||||
botania.page.runeAltar3=A total of 16 &1Runes&0 exist.<br>The most basic and elementary runes are named after the &4Four Elements&0. The intermediate runes are named after the &4Four Seasons&0, and the most advanced runes are named after the &4Seven Deadly Sins&0. A separate &1Rune of Mana&0 also exists.
|
||||
botania.page.runeAltar20=Last but not least, sneaking and right-clicking the &1Runic Altar&0 with an empty hand while it's not accepting mana will remove the last item put into it.
|
||||
botania.page.runeAltar4=The &1Rune of Water&0.
|
||||
botania.page.runeAltar5=The &1Rune of Earth&0.
|
||||
botania.page.runeAltar6=The &1Rune of Air&0.
|
||||
|
||||
Reference in new issue
Block a user