The Wand of the Forest can rotate blocks now.

This commit is contained in:
Vasco Lavos committed 2014-06-22 00:07:00 +01:00
1 parent 470790819d
commit fdd7aea16b
3 files changed
+10 -3

No files matched your search

@@ -30,6 +30,7 @@ import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import vazkii.botania.api.wand.ICoordBoundItem;
import vazkii.botania.api.wand.ITileBound;
import vazkii.botania.api.wand.IWandable;
@@ -62,7 +63,9 @@ public class ItemTwigWand extends Item16Colors implements ICoordBoundItem {
@Override
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) {
Block block = par3World.getBlock(par4, par5, par6);
ChunkCoordinates boundSpreader = getBoundSpreader(par1ItemStack);
if(boundSpreader.posY != -1 && par2EntityPlayer.isSneaking() && !par3World.isRemote && (boundSpreader.posX != par4 || boundSpreader.posY != par5 || boundSpreader.posZ != par6)) {
TileEntity tile = par3World.getTileEntity(boundSpreader.posX, boundSpreader.posY, boundSpreader.posZ);
if(tile instanceof TileSpreader) {
@@ -96,9 +99,12 @@ public class ItemTwigWand extends Item16Colors implements ICoordBoundItem {
par3World.markBlockForUpdate(boundSpreader.posX, boundSpreader.posY, boundSpreader.posZ);
return true;
} else setBoundSpreader(par1ItemStack, 0, -1, 0);
} else if(par2EntityPlayer.isSneaking()) {
block.rotateBlock(par3World, par4, par5, par6, ForgeDirection.getOrientation(par7));
if(par3World.isRemote)
par2EntityPlayer.swingItem();
}
Block block = par3World.getBlock(par4, par5, par6);
if(block == Blocks.lapis_block) {
int meta = -1;
if(TileEnchanter.canEnchanterExist(par3World, par4, par5, par6, 0))
@@ -187,7 +187,7 @@ public final class LexiconData {
lexicon.setPriority().setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeLexicon), new PageText("2"));
wand = new BLexiconEntry(LibLexicon.BASICS_WAND, categoryBasics);
wand.setPriority().setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipesTwigWand));
wand.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCrafingRecipes.recipesTwigWand));
pureDaisy = new BLexiconEntry(LibLexicon.BASICS_PURE_DAISY, categoryBasics);
pureDaisy.setPriority().setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_PURE_DAISY), new PageCraftingRecipe("2", ModCrafingRecipes.recipeLivingwoodTwig), new PagePetalRecipe("3", ModPetalRecipes.pureDaisyRecipe));
+2 -1
View File
@@ -566,7 +566,8 @@ botania.page.pureDaisy3=White is bright and pure
# -- WAND OF THE FOREST
botania.entry.wand=Wand of the Forest
botania.page.wand0=The general multi-use tool for a botanist is the &1Wand of the Forest&0.<br>This wand, made by, effectively, strapping a pair of &1Mystical Petals&0 of any color to a few &1Livingwood Twigs&0, is required for a good amount of tasks.
botania.page.wand1=The petals used determine the colors of the wand
botania.page.wand1=The wand can be bound to &1Mana Spreaders&0 by shift-right clicking them, and unbound via the same task. If the wand isn't bound to anything, shift-right clicking a block allows it to be rotated around the axis of the side it's clicked on.<br>For example, clicking on the top of a &1Chest&0 rotates it around. Most blocks which can be rotated should work.
botania.page.wand2=The petals used determine the colors of the wand
# -- RUNIC ALTAR
botania.entry.runeAltar=Runic Altar