mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-22 21:20:02 +00:00
Fix #24 Game does not load if Thaumcraft not installed
This commit is contained in:
1 parent
8e11456ea3
commit
629cd06ef6
4 files changed
+15
-15
No files matched your search
@@ -23,8 +23,8 @@ import forestry.api.arboriculture.IToolGrafter;
|
||||
|
||||
@Optional.InterfaceList(
|
||||
{
|
||||
@Optional.Interface(iface = "IRepairableExtended", modid = "Thaumcraft", striprefs = true),
|
||||
@Optional.Interface(iface = "IToolGrafter", modid = "forestry", striprefs = true)
|
||||
@Optional.Interface(iface = "thaumcraft.api.IRepairableExtended", modid = CommonProxy.ThaumcraftID, striprefs = true),
|
||||
@Optional.Interface(iface = "forestry.api.arboriculture.IToolGrafter", modid = CommonProxy.ForestryID, striprefs = true)
|
||||
}
|
||||
)
|
||||
public class ItemThaumiumGrafter extends Item implements IRepairableExtended, IToolGrafter
|
||||
@@ -108,7 +108,7 @@ public class ItemThaumiumGrafter extends Item implements IRepairableExtended, IT
|
||||
/**
|
||||
* Return the enchantability factor of the item, most of the time is based on material.
|
||||
*/
|
||||
@Optional.Method(modid = "Thaumcraft")
|
||||
@Optional.Method(modid = CommonProxy.ThaumcraftID)
|
||||
public int getItemEnchantability()
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.getEnchantability();
|
||||
@@ -117,7 +117,7 @@ public class ItemThaumiumGrafter extends Item implements IRepairableExtended, IT
|
||||
/**
|
||||
* Return the name for this tool's material.
|
||||
*/
|
||||
@Optional.Method(modid = "Thaumcraft")
|
||||
@Optional.Method(modid = CommonProxy.ThaumcraftID)
|
||||
public String getToolMaterialName()
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.toString();
|
||||
@@ -126,15 +126,13 @@ public class ItemThaumiumGrafter extends Item implements IRepairableExtended, IT
|
||||
/**
|
||||
* Return whether this item is repairable in an anvil.
|
||||
*/
|
||||
@Optional.Method(modid = "Thaumcraft")
|
||||
@Optional.Method(modid = CommonProxy.ThaumcraftID)
|
||||
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.customCraftingMaterial == par2ItemStack.getItem() ? true : super.getIsRepairable
|
||||
(par1ItemStack, par2ItemStack);
|
||||
return ThaumcraftApi.toolMatThaumium.customCraftingMaterial == par2ItemStack.getItem() || super.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "Thaumcraft")
|
||||
public boolean doRepair(ItemStack stack, EntityPlayer player, int enchantLevel)
|
||||
{
|
||||
boolean flag = false;
|
||||
|
||||
@@ -20,8 +20,8 @@ import forestry.api.core.IToolScoop;
|
||||
|
||||
@Optional.InterfaceList(
|
||||
{
|
||||
@Optional.Interface(iface = "IRepairable", modid = "Thaumcraft", striprefs = true),
|
||||
@Optional.Interface(iface = "IToolScoop", modid = "forestry", striprefs = true)
|
||||
@Optional.Interface(iface = "thaumcraft.api.IRepairable", modid = CommonProxy.ThaumcraftID, striprefs = true),
|
||||
@Optional.Interface(iface = "forestry.api.core.IToolScoop", modid = CommonProxy.ForestryID, striprefs = true)
|
||||
}
|
||||
)
|
||||
public class ItemThaumiumScoop extends Item implements IRepairable, IToolScoop
|
||||
@@ -72,6 +72,7 @@ public class ItemThaumiumScoop extends Item implements IRepairable, IToolScoop
|
||||
/**
|
||||
* Return the enchantability factor of the item, most of the time is based on material.
|
||||
*/
|
||||
@Optional.Method(modid = CommonProxy.ThaumcraftID)
|
||||
public int getItemEnchantability()
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.getEnchantability();
|
||||
@@ -80,6 +81,7 @@ public class ItemThaumiumScoop extends Item implements IRepairable, IToolScoop
|
||||
/**
|
||||
* Return the name for this tool's material.
|
||||
*/
|
||||
@Optional.Method(modid = CommonProxy.ThaumcraftID)
|
||||
public String getToolMaterialName()
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.toString();
|
||||
@@ -88,10 +90,10 @@ public class ItemThaumiumScoop extends Item implements IRepairable, IToolScoop
|
||||
/**
|
||||
* Return whether this item is repairable in an anvil.
|
||||
*/
|
||||
@Optional.Method(modid = CommonProxy.ThaumcraftID)
|
||||
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.customCraftingMaterial == par2ItemStack.getItem() ? true : super
|
||||
.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||
return ThaumcraftApi.toolMatThaumium.customCraftingMaterial == par2ItemStack.getItem() || super.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user