mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 11:49:37 +00:00
Recipe/docs for the horn.
This commit is contained in:
1 parent
a7db3d3b20
commit
50214ee3f2
5 files changed
+23
-4
No files matched your search
@@ -91,6 +91,7 @@ public final class ModCrafingRecipes {
|
||||
public static IRecipe recipeManasteelAxe;
|
||||
public static IRecipe recipeManasteelShears;
|
||||
public static IRecipe recipeManasteelSword;
|
||||
public static IRecipe recipeGrassHorn;
|
||||
|
||||
public static void init() {
|
||||
// Lexicon Recipe
|
||||
@@ -418,6 +419,13 @@ public final class ModCrafingRecipes {
|
||||
"S ", " S",
|
||||
'S', LibOreDict.MANA_STEEL);
|
||||
recipeManasteelShears = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// HORN OF THE WILD RECIPE
|
||||
addOreDictRecipe(new ItemStack(ModItems.grassHorn),
|
||||
" W ", "WSW", "WW ",
|
||||
'W', LibOreDict.LIVING_WOOD,
|
||||
'S', new ItemStack(ModItems.grassSeeds));
|
||||
recipeGrassHorn = BotaniaAPI.getLatestAddedRecipe();
|
||||
}
|
||||
|
||||
private static void addOreDictRecipe(ItemStack output, Object... recipe) {
|
||||
|
||||
@@ -24,6 +24,7 @@ import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.ISpecialFlower;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemGrassHorn extends ItemMod {
|
||||
@@ -52,7 +53,7 @@ public class ItemGrassHorn extends ItemMod {
|
||||
|
||||
@Override
|
||||
public void onUsingTick(ItemStack stack, EntityPlayer player, int time) {
|
||||
if(time != getMaxItemUseDuration(stack) && time % 10 == 0) {
|
||||
if(time != getMaxItemUseDuration(stack) && time % 5 == 0) {
|
||||
Random rand = new Random((int) player.posX ^ (int) player.posZ);
|
||||
int range = 12;
|
||||
List<ChunkCoordinates> coords = new ArrayList();
|
||||
@@ -64,13 +65,14 @@ public class ItemGrassHorn extends ItemMod {
|
||||
int y = (int) player.posY + k;
|
||||
int z = (int) player.posZ + j;
|
||||
|
||||
if(player.worldObj.getBlock(x, y, z) instanceof BlockBush)
|
||||
Block block = player.worldObj.getBlock(x, y, z);
|
||||
if(block instanceof BlockBush && !(block instanceof ISpecialFlower))
|
||||
coords.add(new ChunkCoordinates(x, y, z));
|
||||
}
|
||||
|
||||
Collections.shuffle(coords, rand);
|
||||
|
||||
int count = Math.min(coords.size(), 45);
|
||||
int count = Math.min(coords.size(), 32);
|
||||
for(int i = 0; i < count; i++) {
|
||||
ChunkCoordinates currCoords = coords.get(i);
|
||||
List<ItemStack> items = new ArrayList();
|
||||
@@ -91,5 +93,4 @@ public class ItemGrassHorn extends ItemMod {
|
||||
if(!player.worldObj.isRemote)
|
||||
player.worldObj.playSoundAtEntity(player, "note.bassattack", 1F, 0.001F);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -97,6 +97,7 @@ public final class LexiconData {
|
||||
public static LexiconEntry dirtRod;
|
||||
public static LexiconEntry terraformRod;
|
||||
public static LexiconEntry manasteelGear;
|
||||
public static LexiconEntry grassHorn;
|
||||
|
||||
public static LexiconEntry unstableBlocks;
|
||||
public static LexiconEntry decorativeBlocks;
|
||||
@@ -282,6 +283,9 @@ public final class LexiconData {
|
||||
new PageCraftingRecipe("4", ModCrafingRecipes.recipeManasteelShears), new PageCraftingRecipe("5", ModCrafingRecipes.recipeManasteelSword),
|
||||
new PageCraftingRecipe("6", ModCrafingRecipes.recipeManasteelHelm), new PageCraftingRecipe("7", ModCrafingRecipes.recipeManasteelChest), new PageCraftingRecipe("8", ModCrafingRecipes.recipeManasteelLegs), new PageCraftingRecipe("9", ModCrafingRecipes.recipeManasteelBoots));
|
||||
|
||||
grassSeeds = new BLexiconEntry(LibLexicon.TOOL_GRASS_HORN, categoryTools);
|
||||
grassSeeds.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeGrassHorn));
|
||||
|
||||
// MISCLENAEOUS ENTRIES
|
||||
unstableBlocks = new BLexiconEntry(LibLexicon.MISC_UNSTABLE_BLOCKS, categoryMisc);
|
||||
unstableBlocks.setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_UNSTABLE_BLOCK), new PageCraftingRecipe("2", ModCrafingRecipes.recipesUnstableBlocks), new PageText("3"), new PageImage("4", LibResources.ENTRY_UNSTABLE_BEACON), new PageCraftingRecipe("5", ModCrafingRecipes.recipesManaBeacons), new PageText("6"), new PageCraftingRecipe("7", ModCrafingRecipes.recipesSignalFlares));
|
||||
|
||||
@@ -80,6 +80,7 @@ public final class LibLexicon {
|
||||
public static final String TOOL_DIRT_ROD = "dirtRod";
|
||||
public static final String TOOL_TERRAFORM_ROD = "terraformRod";
|
||||
public static final String TOOL_MANASTEEL_GEAR = "manaGear";
|
||||
public static final String TOOL_GRASS_HORN = "grassHorn";
|
||||
|
||||
public static final String MISC_UNSTABLE_BLOCKS = "unstableBlocks";
|
||||
public static final String MISC_DECORATIVE_BLOCKS = "decorativeBlocks";
|
||||
|
||||
@@ -626,6 +626,11 @@ botania.page.manaGear7=The &1Manasteel Chestplate&0
|
||||
botania.page.manaGear8=The &1Manasteel Leggings&0
|
||||
botania.page.manaGear9=The &1Manasteel Boots&0
|
||||
|
||||
# -- Horn of the Wild
|
||||
botania.entry.grassHorn=Horn of the Wild
|
||||
botania.page.grassHorn0=Clearing out &1Tall Grass&0 by hand can definitely be a nuisance.<br>Simply blowing the &1Horn of the Wild&0 will quickly cause any nearby vegetation to uproot, leaving behind drops as if it had been broken by hand.
|
||||
botania.page.grassHorn1=Crafting the horn
|
||||
|
||||
# - MISCLANEOUS
|
||||
# -- UNSTABLE CUBE
|
||||
botania.entry.unstableBlocks=Unstable Cubes
|
||||
|
||||
Reference in new issue
Block a user