mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-21 12:42:50 +00:00
Wrap off the new baubles.
This commit is contained in:
1 parent
f640a886f9
commit
0453eeb28a
5 files changed
+64
-6
No files matched your search
@@ -21,11 +21,14 @@ import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.common.block.BlockSpecialFlower;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.item.ItemLens;
|
||||
import vazkii.botania.common.item.ItemSignalFlare;
|
||||
import vazkii.botania.common.item.ItemTwigWand;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
import vazkii.botania.common.lib.LibOreDict;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
@@ -116,6 +119,8 @@ public final class ModCrafingRecipes {
|
||||
public static IRecipe recipeMiningRing;
|
||||
public static IRecipe recipeMagnetRing;
|
||||
public static IRecipe recipeTerraPick;
|
||||
public static IRecipe recipeDivaCharm;
|
||||
public static IRecipe recipeFlightTiara;
|
||||
|
||||
public static void init() {
|
||||
// Lexicon Recipe
|
||||
@@ -635,6 +640,23 @@ public final class ModCrafingRecipes {
|
||||
'L', LibOreDict.LIVINGWOOD_TWIG);
|
||||
recipeTerraPick = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Charm of the Diva Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.divaCharm),
|
||||
"LGP", " HG", " GL",
|
||||
'L', LibOreDict.LIFE_ESSENCE,
|
||||
'G', "ingotGold",
|
||||
'H', ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HEISEI_DREAM),
|
||||
'P', new ItemStack(ModItems.tinyPlanet));
|
||||
recipeDivaCharm = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Flugel Tiara Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.flightTiara),
|
||||
"LLL", "ILI", "FIF",
|
||||
'L', LibOreDict.LIFE_ESSENCE,
|
||||
'I', "ingotIron",
|
||||
'F', new ItemStack(Items.feather));
|
||||
recipeFlightTiara = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Mana and Terrasteel Block Recipes
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0),
|
||||
"III", "III", "III",
|
||||
|
||||
@@ -18,7 +18,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
import vazkii.botania.api.mana.ManaItemHandler;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
@@ -26,11 +28,11 @@ import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||
|
||||
public class ItemFlightTiara extends ItemBauble {
|
||||
public class ItemFlightTiara extends ItemBauble implements IManaUsingItem {
|
||||
|
||||
public static List<String> playersWithFlight = new ArrayList();
|
||||
private static final int COST = 20;
|
||||
|
||||
private static final int COST = 50;
|
||||
|
||||
public ItemFlightTiara() {
|
||||
super(LibItemNames.FLIGHT_TIARA);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
@@ -51,8 +53,17 @@ public class ItemFlightTiara extends ItemBauble {
|
||||
if(playersWithFlight.contains(playerStr(player))) {
|
||||
if(shouldPlayerHaveFlight(player)) {
|
||||
player.capabilities.allowFlying = true;
|
||||
if(player.capabilities.isFlying)
|
||||
ManaItemHandler.requestManaExact(armor, player, COST, true);
|
||||
if(player.capabilities.isFlying) {
|
||||
if(!player.worldObj.isRemote)
|
||||
ManaItemHandler.requestManaExact(armor, player, COST, true);
|
||||
else if(Math.abs(player.motionX) > 0.1 || Math.abs(player.motionZ) > 0.1) {
|
||||
double x = event.entityLiving.posX - 0.5;
|
||||
double y = event.entityLiving.posY - 1.7;
|
||||
double z = event.entityLiving.posZ - 0.5;
|
||||
for(int i = 0; i < 3; i++)
|
||||
Botania.proxy.sparkleFX(event.entityLiving.worldObj, x + Math.random() * event.entityLiving.width, y + Math.random() * 0.4, z + Math.random() * event.entityLiving.width, 1F, 1F, 1F, 2F * (float) Math.random(), 20);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(!player.capabilities.isCreativeMode) {
|
||||
player.capabilities.allowFlying = false;
|
||||
@@ -67,7 +78,7 @@ public class ItemFlightTiara extends ItemBauble {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SubscribeEvent
|
||||
public void playerLoggedOut(PlayerEvent.PlayerLoggedOutEvent event) {
|
||||
String username = event.player.getGameProfile().getName();
|
||||
@@ -84,5 +95,10 @@ public class ItemFlightTiara extends ItemBauble {
|
||||
return armor != null && armor.getItem() == this && ManaItemHandler.requestManaExact(armor, player, COST, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean usesMana(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -130,6 +130,8 @@ public final class LexiconData {
|
||||
public static LexiconEntry waterRing;
|
||||
public static LexiconEntry miningRing;
|
||||
public static LexiconEntry magnetRing;
|
||||
public static LexiconEntry divaCharm;
|
||||
public static LexiconEntry flightTiara;
|
||||
|
||||
public static LexiconEntry unstableBlocks;
|
||||
public static LexiconEntry decorativeBlocks;
|
||||
@@ -410,6 +412,12 @@ public final class LexiconData {
|
||||
magnetRing = new BLexiconEntry(LibLexicon.BAUBLE_MAGNET_RING, categoryBaubles);
|
||||
magnetRing.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeMagnetRing));
|
||||
|
||||
divaCharm = new BLexiconEntry(LibLexicon.BAUBLE_DIVA_CHARM, categoryBaubles);
|
||||
divaCharm.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeDivaCharm));
|
||||
|
||||
flightTiara = new BLexiconEntry(LibLexicon.BAUBLE_FLIGHT_TIARA, categoryBaubles);
|
||||
flightTiara.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeFlightTiara));
|
||||
|
||||
// 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));
|
||||
|
||||
@@ -111,6 +111,8 @@ public final class LibLexicon {
|
||||
public static final String BAUBLE_WATER_RING = "waterRing";
|
||||
public static final String BAUBLE_MINING_RING = "miningRing";
|
||||
public static final String BAUBLE_MAGNET_RING = "magnetRing";
|
||||
public static final String BAUBLE_DIVA_CHARM = "divaCharm";
|
||||
public static final String BAUBLE_FLIGHT_TIARA = "flightTiara";
|
||||
|
||||
public static final String MISC_UNSTABLE_BLOCKS = "unstableBlocks";
|
||||
public static final String MISC_DECORATIVE_BLOCKS = "decorativeBlocks";
|
||||
|
||||
@@ -878,6 +878,16 @@ botania.entry.magnetRing=Ring of Magnetization
|
||||
botania.page.magnetRing0=By turning a &1Magnetizing Lens&0 into a wearable ring, one can use it to magnetize nearby items.<br>While equipped, this ring will make any nearby items magnetize towards the wearer, case they aren't sneaking.
|
||||
botania.page.magnetRing1=How do they work?
|
||||
|
||||
# -- CHARM OF THE DIVA
|
||||
botania.entry.divaCharm=Charm of the Diva
|
||||
botania.page.divaCharm0=The &1Charm of the Diva&0 blesses the wearer with the ability to have any attacked mob follow the attacker's will, and, case there are any nearby enemies, go after them instead. This process, of course, requires a bit of &4Mana&0 from the wearer's inventory in order to function.
|
||||
botania.page.divaCharm1=You shall not disrespect Big Sister
|
||||
|
||||
# -- FLUGEL TIARA
|
||||
botania.entry.flightTiara=Flügel Tiara
|
||||
botania.page.flightTiara0=The &4Flügel&0 were once a dominant species in the lands, now they're but a race past extinct, once created as godslayers, who possessed the ability of flight.<br>The usage of &1Essence of Eternal Life&0 allows for a small replica of their power, in the form of the &1Flügel Tiara&0, which, at the cost of &4Mana&0 allows for flight.
|
||||
botania.page.flightTiara1=Forty thousand books from another world
|
||||
|
||||
# - MISCLANEOUS
|
||||
# -- UNSTABLE CUBE
|
||||
botania.entry.unstableBlocks=Unstable Cubes
|
||||
|
||||
Reference in new issue
Block a user