mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 11:19:19 +00:00
Fixed the Terra Shatterer not working when the player has full Terrasteel Armor and their first available Mana Tablet isn't full and is in a hotbar slot before the Terra Shatterer. Closes #1626
This commit is contained in:
1 parent
56748b62bb
commit
d3ef44974d
6 files changed
+29
-5
No files matched your search
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* 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 @ [08/12/2015, 18:10:29 (GMT)]
|
||||
*/
|
||||
package vazkii.botania.api.mana;
|
||||
|
||||
/**
|
||||
* An item that implements this is an item that can give mana to other items.
|
||||
* This is used in botania for the terra shatterer to not be constantly
|
||||
* receiving mana from these items..
|
||||
*/
|
||||
public interface IManaGivingItem {
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
@API(owner = "Botania", apiVersion = "71", provides = "BotaniaAPI")
|
||||
@API(owner = "Botania", apiVersion = "72", provides = "BotaniaAPI")
|
||||
package vazkii.botania.api;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
@@ -19,6 +19,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.internal.VanillaPacketDispatcher;
|
||||
import vazkii.botania.api.mana.IManaGivingItem;
|
||||
import vazkii.botania.api.mana.spark.ISparkAttachable;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.achievement.ICraftAchievement;
|
||||
@@ -26,7 +27,7 @@ import vazkii.botania.common.achievement.ModAchievements;
|
||||
import vazkii.botania.common.entity.EntitySpark;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemSpark extends ItemMod implements ICraftAchievement {
|
||||
public class ItemSpark extends ItemMod implements ICraftAchievement, IManaGivingItem {
|
||||
|
||||
public static IIcon invIcon, worldIcon;
|
||||
|
||||
|
||||
+2
-1
@@ -34,6 +34,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import vazkii.botania.api.item.IAncientWillContainer;
|
||||
import vazkii.botania.api.item.IBaubleRender.Helper;
|
||||
import vazkii.botania.api.mana.IManaDiscountArmor;
|
||||
import vazkii.botania.api.mana.IManaGivingItem;
|
||||
import vazkii.botania.api.mana.ManaItemHandler;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
@@ -42,7 +43,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemTerrasteelHelm extends ItemTerrasteelArmor implements IManaDiscountArmor, IAncientWillContainer {
|
||||
public class ItemTerrasteelHelm extends ItemTerrasteelArmor implements IManaDiscountArmor, IAncientWillContainer, IManaGivingItem {
|
||||
|
||||
private static final String TAG_ANCIENT_WILL = "AncientWill";
|
||||
static IIcon willIcon;
|
||||
|
||||
@@ -13,11 +13,12 @@ package vazkii.botania.common.item.equipment.bauble;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.api.mana.IManaGivingItem;
|
||||
import vazkii.botania.api.mana.ManaItemHandler;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import baubles.api.BaubleType;
|
||||
|
||||
public class ItemAuraRing extends ItemBauble {
|
||||
public class ItemAuraRing extends ItemBauble implements IManaGivingItem {
|
||||
|
||||
public ItemAuraRing(String name) {
|
||||
super(name);
|
||||
|
||||
+2
-1
@@ -32,6 +32,7 @@ import net.minecraftforge.oredict.RecipeSorter;
|
||||
import net.minecraftforge.oredict.RecipeSorter.Category;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.item.ISequentialBreaker;
|
||||
import vazkii.botania.api.mana.IManaGivingItem;
|
||||
import vazkii.botania.api.mana.IManaItem;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.achievement.ModAchievements;
|
||||
@@ -268,7 +269,7 @@ public class ItemTerraPick extends ItemManasteelPick implements IManaItem, ISequ
|
||||
|
||||
@Override
|
||||
public boolean canReceiveManaFromItem(ItemStack stack, ItemStack otherStack) {
|
||||
return !(otherStack.getItem() instanceof ItemSpark) && !(otherStack.getItem() instanceof ItemAuraRing) && !(otherStack.getItem() instanceof ItemGreaterAuraRing);
|
||||
return !(otherStack.getItem() instanceof IManaGivingItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user