mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 19:29:31 +00:00
Ring of Thor.
This commit is contained in:
1 parent
0ab208a9ee
commit
ff3b50f47b
2 files changed
+20
-3
No files matched your search
@@ -43,6 +43,7 @@ import vazkii.botania.common.item.equipment.bauble.ItemAuraRing;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemGreaterAuraRing;
|
||||
import vazkii.botania.common.item.equipment.tool.manasteel.ItemManasteelPick;
|
||||
import vazkii.botania.common.item.relic.ItemLokiRing;
|
||||
import vazkii.botania.common.item.relic.ItemThorRing;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -147,9 +148,10 @@ public class ItemTerraPick extends ItemManasteelPick implements IManaItem, ISequ
|
||||
ForgeDirection direction = ForgeDirection.getOrientation(side);
|
||||
int fortune = EnchantmentHelper.getFortuneModifier(player);
|
||||
boolean silk = EnchantmentHelper.getSilkTouchModifier(player);
|
||||
boolean doX = direction.offsetX == 0;
|
||||
boolean doY = direction.offsetY == 0;
|
||||
boolean doZ = direction.offsetZ == 0;
|
||||
boolean thor = ItemThorRing.getThorRing(player) != null;
|
||||
boolean doX = thor || direction.offsetX == 0;
|
||||
boolean doY = thor || direction.offsetY == 0;
|
||||
boolean doZ = thor || direction.offsetZ == 0;
|
||||
|
||||
int level = getLevel(stack);
|
||||
int range = Math.max(0, level - 1);
|
||||
|
||||
@@ -10,8 +10,12 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.relic;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.common.container.InventoryBaubles;
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemThorRing extends ItemRelicBauble {
|
||||
@@ -24,5 +28,16 @@ public class ItemThorRing extends ItemRelicBauble {
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.RING;
|
||||
}
|
||||
|
||||
public static ItemStack getThorRing(EntityPlayer player) {
|
||||
InventoryBaubles baubles = PlayerHandler.getPlayerBaubles(player);
|
||||
ItemStack stack1 = baubles.getStackInSlot(1);
|
||||
ItemStack stack2 = baubles.getStackInSlot(2);
|
||||
return isThorRing(stack1) ? stack1 : isThorRing(stack2) ? stack2 : null;
|
||||
}
|
||||
|
||||
private static boolean isThorRing(ItemStack stack) {
|
||||
return stack != null && (stack.getItem() == ModItems.thorRing || stack.getItem() == ModItems.aesirRing);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user