mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Big magnet!
This commit is contained in:
1 parent
8d55cb73e3
commit
f05a08955c
10 files changed
+47
-6
No files matched your search
@@ -215,6 +215,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addItem(ModItems.waterRing);
|
||||
addItem(ModItems.miningRing);
|
||||
addItem(ModItems.magnetRing);
|
||||
addItem(ModItems.magnetRingGreater);
|
||||
addItem(ModItems.swapRing);
|
||||
addItem(ModItems.reachRing);
|
||||
addItem(ModItems.pixieRing);
|
||||
|
||||
@@ -278,6 +278,7 @@ public final class ModCraftingRecipes {
|
||||
public static IRecipe recipeSlimeBottle;
|
||||
public static IRecipe recipeStarSword;
|
||||
public static IRecipe recipeExchangeRod;
|
||||
public static IRecipe recipeGreaterMagnetRing;
|
||||
|
||||
// Garden of Glass
|
||||
public static IRecipe recipeRootToSapling;
|
||||
@@ -1887,7 +1888,7 @@ public final class ModCraftingRecipes {
|
||||
'T', new ItemStack(ModItems.terraSword));
|
||||
recipeStarSword = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Rod of the Shifting Crust
|
||||
// Rod of the Shifting Crust Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.exchangeRod),
|
||||
" SR", " TS", "T ",
|
||||
'T', LibOreDict.LIVINGWOOD_TWIG,
|
||||
@@ -1895,6 +1896,12 @@ public final class ModCraftingRecipes {
|
||||
'R', LibOreDict.RUNE[12]);
|
||||
recipeExchangeRod = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Greater Ring of Magnetization Recipe
|
||||
addShapelessOreDictRecipe(new ItemStack(ModItems.magnetRingGreater), LibOreDict.TERRA_STEEL, new ItemStack(ModItems.magnetRing));
|
||||
recipeGreaterMagnetRing = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Storage Block/Nugget Recipes
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0),
|
||||
"III", "III", "III",
|
||||
|
||||
@@ -38,6 +38,7 @@ import vazkii.botania.common.item.equipment.bauble.ItemDivaCharm;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemFlightTiara;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemGoldenLaurel;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemGreaterAuraRing;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemGreaterMagnetRing;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemGreaterManaRing;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemHolyCloak;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemIcePendant;
|
||||
@@ -251,7 +252,8 @@ public final class ModItems {
|
||||
public static Item slimeBottle;
|
||||
public static Item starSword;
|
||||
public static Item exchangeRod;
|
||||
|
||||
public static Item magnetRingGreater;
|
||||
|
||||
public static void init() {
|
||||
lexicon = new ItemLexicon();
|
||||
petal = new ItemPetal();
|
||||
@@ -390,6 +392,7 @@ public final class ModItems {
|
||||
slimeBottle = new ItemSlimeBottle();
|
||||
starSword = new ItemStarSword();
|
||||
exchangeRod = new ItemExchangeRod();
|
||||
magnetRingGreater = new ItemGreaterMagnetRing();
|
||||
|
||||
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
|
||||
for(int i = 0; i < 16; i++) {
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Aug 21, 2015, 9:00:04 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemGreaterMagnetRing extends ItemMagnetRing {
|
||||
|
||||
public ItemGreaterMagnetRing() {
|
||||
super(LibItemNames.MAGNET_RING_GREATER, 16);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -49,10 +49,17 @@ public class ItemMagnetRing extends ItemBauble {
|
||||
"appliedenergistics2:item.ItemCrystalSeed",
|
||||
});
|
||||
|
||||
int range;
|
||||
|
||||
public ItemMagnetRing() {
|
||||
super(LibItemNames.MAGNET_RING);
|
||||
this(LibItemNames.MAGNET_RING, 6);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
public ItemMagnetRing(String name, int range) {
|
||||
super(name);
|
||||
this.range = range;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -72,7 +79,7 @@ public class ItemMagnetRing extends ItemBauble {
|
||||
InventoryBaubles inv = PlayerHandler.getPlayerBaubles(event.player);
|
||||
for(int i = 0; i < inv.getSizeInventory(); i++) {
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
if(stack != null && stack.getItem() == this) {
|
||||
if(stack != null && stack.getItem() instanceof ItemMagnetRing) {
|
||||
setCooldown(stack, 100);
|
||||
BotaniaAPI.internalHandler.sendBaubleUpdatePacket(event.player, i);
|
||||
}
|
||||
@@ -87,7 +94,6 @@ public class ItemMagnetRing extends ItemBauble {
|
||||
|
||||
if(cooldown <= 0) {
|
||||
if(!player.isSneaking()) {
|
||||
int range = 6;
|
||||
double x = player.posX;
|
||||
double y = player.posY -(player.worldObj.isRemote ? 1.62 : 0) + 0.75;
|
||||
double z = player.posZ;
|
||||
|
||||
@@ -868,7 +868,7 @@ public final class LexiconData {
|
||||
miningRing.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeMiningRing));
|
||||
|
||||
magnetRing = new BLexiconEntry(LibLexicon.BAUBLE_MAGNET_RING, categoryBaubles);
|
||||
magnetRing.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeMagnetRing));
|
||||
magnetRing.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeMagnetRing), new PageCraftingRecipe("2", ModCraftingRecipes.recipeGreaterMagnetRing));
|
||||
|
||||
divaCharm = new ALexiconEntry(LibLexicon.BAUBLE_DIVA_CHARM, categoryBaubles);
|
||||
divaCharm.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeDivaCharm));
|
||||
|
||||
@@ -150,6 +150,7 @@ public final class LibItemNames {
|
||||
public static final String SLIME_BOTTLE = "slimeBottle";
|
||||
public static final String STAR_SWORD = "starSword";
|
||||
public static final String EXCHANGE_ROD = "exchangeRod";
|
||||
public static final String MAGNET_RING_GREATER = "magnetRingGreater";
|
||||
|
||||
public static final String[] LENS_NAMES = new String[] {
|
||||
"lensNormal",
|
||||
|
||||
Reference in new issue
Block a user