2015-11-02 12:39:44 -08:00
package WayofTime.bloodmagic.registry ;
import WayofTime.bloodmagic.BloodMagic ;
import WayofTime.bloodmagic.ConfigHandler ;
2015-11-28 18:25:46 -08:00
import WayofTime.bloodmagic.api.Constants ;
2015-11-02 12:39:44 -08:00
import WayofTime.bloodmagic.api.orb.BloodOrb ;
import WayofTime.bloodmagic.api.registry.OrbRegistry ;
2016-03-17 13:00:44 -07:00
import WayofTime.bloodmagic.item.* ;
2015-11-08 17:42:02 -05:00
import WayofTime.bloodmagic.item.armour.ItemLivingArmour ;
2016-01-09 13:01:05 -05:00
import WayofTime.bloodmagic.item.armour.ItemSentientArmour ;
2015-11-28 18:25:46 -08:00
import WayofTime.bloodmagic.item.gear.ItemPackSacrifice ;
import WayofTime.bloodmagic.item.gear.ItemPackSelfSacrifice ;
2016-01-12 17:05:56 -05:00
import WayofTime.bloodmagic.item.routing.ItemNodeRouter ;
2016-01-16 11:10:58 -05:00
import WayofTime.bloodmagic.item.routing.ItemRouterFilter ;
2016-03-17 13:00:44 -07:00
import WayofTime.bloodmagic.item.sigil.* ;
import WayofTime.bloodmagic.item.soul.* ;
2015-11-02 12:39:44 -08:00
import WayofTime.bloodmagic.util.helper.InventoryRenderHelper ;
2016-02-14 21:50:32 -05:00
import WayofTime.bloodmagic.util.helper.InventoryRenderHelperV2 ;
2016-03-17 13:00:44 -07:00
import net.minecraft.item.Item ;
import net.minecraft.util.ResourceLocation ;
import net.minecraftforge.common.util.EnumHelper ;
import net.minecraftforge.fml.common.registry.GameRegistry ;
2015-10-29 20:22:14 -07:00
2015-12-30 15:34:40 -05:00
public class ModItems
{
2015-10-29 20:22:14 -07:00
public static Item bloodOrb ;
public static BloodOrb orbWeak ;
public static BloodOrb orbApprentice ;
public static BloodOrb orbMagician ;
public static BloodOrb orbMaster ;
public static BloodOrb orbArchmage ;
public static BloodOrb orbTranscendent ;
2015-10-29 22:22:08 -07:00
public static Item bucketEssence ;
2015-11-02 09:51:11 -08:00
public static Item activationCrystal ;
2015-12-02 00:55:32 -08:00
public static Item slate ;
public static Item inscriptionTool ;
2015-11-02 09:51:11 -08:00
2015-11-07 11:51:41 -05:00
public static Item sacrificialDagger ;
2015-11-11 10:45:46 -08:00
public static Item packSelfSacrifice ;
public static Item packSacrifice ;
2015-12-28 19:09:51 -05:00
public static Item daggerOfSacrifice ;
2015-12-30 11:34:04 -05:00
public static Item ritualDiviner ;
2015-11-07 11:51:41 -05:00
2015-12-30 17:24:40 -05:00
public static Item lavaCrystal ;
2015-12-29 14:32:35 -05:00
public static Item boundSword ;
public static Item boundPickaxe ;
public static Item boundAxe ;
public static Item boundShovel ;
2015-10-29 22:05:00 -07:00
public static Item sigilDivination ;
2015-11-02 19:57:48 -08:00
public static Item sigilAir ;
2015-11-07 21:37:12 -05:00
public static Item sigilWater ;
public static Item sigilLava ;
public static Item sigilVoid ;
2015-12-27 19:38:12 -05:00
public static Item sigilGreenGrove ;
public static Item sigilBloodLight ;
public static Item sigilElementalAffinity ;
public static Item sigilHaste ;
public static Item sigilMagnetism ;
public static Item sigilSuppression ;
public static Item sigilFastMiner ;
public static Item sigilSeer ;
public static Item sigilEnderSeverance ;
2015-12-28 19:09:51 -05:00
public static Item sigilWhirlwind ;
2015-12-27 19:38:12 -05:00
public static Item sigilPhantomBridge ;
public static Item sigilCompression ;
2015-11-28 18:25:46 -08:00
2016-02-18 17:25:11 +01:00
public static Item sigilTeleposition ;
public static Item sigilTransposition ;
2015-12-28 15:59:35 -05:00
public static Item itemComponent ;
2016-02-27 16:36:56 -05:00
public static Item itemDemonCrystal ;
2015-12-30 23:00:49 -05:00
public static Item telepositionFocus ;
2015-12-29 14:32:35 -05:00
public static Item bloodShard ;
2015-12-30 15:34:40 -05:00
2015-11-08 17:42:02 -05:00
public static Item livingArmourHelmet ;
public static Item livingArmourChest ;
public static Item livingArmourLegs ;
public static Item livingArmourBoots ;
2015-10-29 20:22:14 -07:00
2016-01-09 13:01:05 -05:00
public static Item sentientArmourHelmet ;
public static Item sentientArmourChest ;
public static Item sentientArmourLegs ;
public static Item sentientArmourBoots ;
2015-11-29 19:04:50 -05:00
public static Item altarMaker ;
2016-01-09 22:20:59 -05:00
public static Item upgradeTome ;
2016-02-14 21:50:32 -05:00
public static Item upgradeTrainer ;
2015-11-29 19:04:50 -05:00
2016-01-01 11:54:44 -05:00
public static Item arcaneAshes ;
2016-01-07 11:01:38 -05:00
public static Item monsterSoul ;
2016-01-07 12:59:46 -05:00
public static Item soulGem ;
2016-01-08 14:56:36 -05:00
public static Item soulSnare ;
2016-01-01 11:54:44 -05:00
2016-01-09 10:47:36 -05:00
public static Item sentientSword ;
public static Item sentientBow ;
2016-01-09 15:05:41 -05:00
public static Item sentientArmourGem ;
2016-01-07 11:01:38 -05:00
2016-01-12 17:05:56 -05:00
public static Item nodeRouter ;
2016-01-16 11:10:58 -05:00
public static Item baseItemFilter ;
2016-01-12 17:05:56 -05:00
2016-02-04 02:45:19 -08:00
public static Item . ToolMaterial boundToolMaterial = EnumHelper . addToolMaterial ( " BoundToolMaterial " , 4 , 1 , 10 , 8 , 50 ) ;
2016-01-10 18:31:48 -05:00
public static Item . ToolMaterial soulToolMaterial = EnumHelper . addToolMaterial ( " SoulToolMaterial " , 4 , 520 , 7 , 8 , 50 ) ;
2015-12-29 14:32:35 -05:00
2015-12-30 15:34:40 -05:00
public static void init ( )
{
2015-10-29 20:22:14 -07:00
bloodOrb = registerItem ( new ItemBloodOrb ( ) ) ;
orbWeak = new BloodOrb ( " weak " , 1 , 5000 ) ;
OrbRegistry . registerOrb ( orbWeak ) ;
orbApprentice = new BloodOrb ( " apprentice " , 2 , 25000 ) ;
OrbRegistry . registerOrb ( orbApprentice ) ;
orbMagician = new BloodOrb ( " magician " , 3 , 150000 ) ;
OrbRegistry . registerOrb ( orbMagician ) ;
orbMaster = new BloodOrb ( " master " , 4 , 1000000 ) ;
OrbRegistry . registerOrb ( orbMaster ) ;
orbArchmage = new BloodOrb ( " archmage " , 5 , 10000000 ) ;
OrbRegistry . registerOrb ( orbArchmage ) ;
orbTranscendent = new BloodOrb ( " transcendent " , 6 , 30000000 ) ;
OrbRegistry . registerOrb ( orbTranscendent ) ;
2015-10-29 22:05:00 -07:00
2015-10-29 22:22:08 -07:00
bucketEssence = registerItem ( new ItemBucketEssence ( ) ) ;
2015-11-02 09:51:11 -08:00
activationCrystal = registerItem ( new ItemActivationCrystal ( ) ) ;
2015-12-02 00:55:32 -08:00
slate = registerItem ( new ItemSlate ( ) ) ;
inscriptionTool = registerItem ( new ItemInscriptionTool ( ) ) ;
2015-11-02 09:51:11 -08:00
2015-11-07 11:51:41 -05:00
sacrificialDagger = registerItem ( new ItemSacrificialDagger ( ) ) ;
2015-11-11 10:45:46 -08:00
packSacrifice = registerItem ( new ItemPackSacrifice ( ) ) ;
packSelfSacrifice = registerItem ( new ItemPackSelfSacrifice ( ) ) ;
2015-12-28 19:09:51 -05:00
daggerOfSacrifice = registerItem ( new ItemDaggerOfSacrifice ( ) ) ;
2015-11-07 11:51:41 -05:00
2015-12-30 11:34:04 -05:00
ritualDiviner = registerItem ( new ItemRitualDiviner ( ) ) ;
2015-12-31 13:50:38 -05:00
2015-12-30 17:24:40 -05:00
lavaCrystal = registerItem ( new ItemLavaCrystal ( ) ) ;
GameRegistry . registerFuelHandler ( new ItemLavaCrystal ( ) ) ;
2015-12-30 15:34:40 -05:00
2015-12-29 14:32:35 -05:00
boundSword = registerItem ( new ItemBoundSword ( ) ) ;
boundPickaxe = registerItem ( new ItemBoundPickaxe ( ) ) ;
boundAxe = registerItem ( new ItemBoundAxe ( ) ) ;
boundShovel = registerItem ( new ItemBoundShovel ( ) ) ;
2015-10-29 22:05:00 -07:00
sigilDivination = registerItem ( new ItemSigilDivination ( ) ) ;
2015-11-02 19:57:48 -08:00
sigilAir = registerItem ( new ItemSigilAir ( ) ) ;
2015-11-07 21:37:12 -05:00
sigilWater = registerItem ( new ItemSigilWater ( ) ) ;
sigilLava = registerItem ( new ItemSigilLava ( ) ) ;
sigilVoid = registerItem ( new ItemSigilVoid ( ) ) ;
2015-12-27 19:38:12 -05:00
sigilGreenGrove = registerItem ( new ItemSigilGreenGrove ( ) ) ;
sigilBloodLight = registerItem ( new ItemSigilBloodLight ( ) ) ;
sigilElementalAffinity = registerItem ( new ItemSigilElementalAffinity ( ) ) ;
sigilMagnetism = registerItem ( new ItemSigilMagnetism ( ) ) ;
sigilSuppression = registerItem ( new ItemSigilSuppression ( ) ) ;
sigilHaste = registerItem ( new ItemSigilHaste ( ) ) ;
sigilFastMiner = registerItem ( new ItemSigilFastMiner ( ) ) ;
sigilSeer = registerItem ( new ItemSigilSeer ( ) ) ;
sigilPhantomBridge = registerItem ( new ItemSigilPhantomBridge ( ) ) ;
2015-12-28 19:09:51 -05:00
sigilWhirlwind = registerItem ( new ItemSigilWhirlwind ( ) ) ;
sigilCompression = registerItem ( new ItemSigilCompression ( ) ) ;
sigilEnderSeverance = registerItem ( new ItemSigilEnderSeverance ( ) ) ;
2015-11-28 18:25:46 -08:00
2016-02-18 17:25:11 +01:00
sigilTeleposition = registerItem ( new ItemSigilTeleposition ( ) ) ;
sigilTransposition = registerItem ( new ItemSigilTransposition ( ) ) ;
2015-12-28 15:59:35 -05:00
itemComponent = registerItem ( new ItemComponent ( ) ) ;
2016-02-27 16:36:56 -05:00
itemDemonCrystal = registerItem ( new ItemDemonCrystal ( ) ) ;
2015-12-30 23:00:49 -05:00
telepositionFocus = registerItem ( new ItemTelepositionFocus ( ) ) ;
2015-12-29 14:32:35 -05:00
bloodShard = registerItem ( new ItemBloodShard ( ) ) ;
2015-12-30 15:34:40 -05:00
2015-11-08 17:42:02 -05:00
livingArmourHelmet = registerItem ( new ItemLivingArmour ( 0 ) , " ItemLivingArmourHelmet " ) ;
livingArmourChest = registerItem ( new ItemLivingArmour ( 1 ) , " ItemLivingArmourChest " ) ;
livingArmourLegs = registerItem ( new ItemLivingArmour ( 2 ) , " ItemLivingArmourLegs " ) ;
livingArmourBoots = registerItem ( new ItemLivingArmour ( 3 ) , " ItemLivingArmourBoots " ) ;
2015-11-29 19:04:50 -05:00
2016-01-09 13:01:05 -05:00
sentientArmourHelmet = registerItem ( new ItemSentientArmour ( 0 ) , " ItemSentientArmourHelmet " ) ;
sentientArmourChest = registerItem ( new ItemSentientArmour ( 1 ) , " ItemSentientArmourChest " ) ;
sentientArmourLegs = registerItem ( new ItemSentientArmour ( 2 ) , " ItemSentientArmourLegs " ) ;
sentientArmourBoots = registerItem ( new ItemSentientArmour ( 3 ) , " ItemSentientArmourBoots " ) ;
2015-11-29 19:04:50 -05:00
altarMaker = registerItem ( new ItemAltarMaker ( ) ) ;
2016-01-09 22:20:59 -05:00
upgradeTome = registerItem ( new ItemUpgradeTome ( ) ) ;
2016-02-14 21:50:32 -05:00
upgradeTrainer = registerItem ( new ItemUpgradeTrainer ( ) ) ;
2016-01-01 11:54:44 -05:00
arcaneAshes = registerItem ( new ItemArcaneAshes ( ) ) ;
2016-01-07 11:01:38 -05:00
monsterSoul = registerItem ( new ItemMonsterSoul ( ) ) ;
2016-01-07 12:59:46 -05:00
soulGem = registerItem ( new ItemSoulGem ( ) ) ;
2016-01-08 14:56:36 -05:00
soulSnare = registerItem ( new ItemSoulSnare ( ) ) ;
2016-01-07 11:01:38 -05:00
2016-01-09 10:47:36 -05:00
sentientSword = registerItem ( new ItemSentientSword ( ) ) ;
sentientBow = registerItem ( new ItemSentientBow ( ) ) ;
2016-01-09 15:05:41 -05:00
sentientArmourGem = registerItem ( new ItemSentientArmourGem ( ) ) ;
2016-01-12 17:05:56 -05:00
nodeRouter = registerItem ( new ItemNodeRouter ( ) ) ;
2016-01-16 11:10:58 -05:00
baseItemFilter = registerItem ( new ItemRouterFilter ( ) ) ;
2015-10-29 20:22:14 -07:00
}
2015-12-30 15:34:40 -05:00
public static void initRenders ( )
{
2015-12-28 13:43:26 -08:00
InventoryRenderHelper renderHelper = BloodMagic . proxy . getRenderHelper ( ) ;
2016-02-09 19:07:56 -08:00
InventoryRenderHelperV2 renderHelperV2 = BloodMagic . proxy . getRenderHelperV2 ( ) ;
2015-10-29 20:22:14 -07:00
2016-02-10 18:49:02 -08:00
renderHelperV2 . registerRender ( livingArmourHelmet , " ItemLivingArmour " , " helm " ) ;
renderHelperV2 . registerRender ( livingArmourChest , " ItemLivingArmour " , " chest " ) ;
renderHelperV2 . registerRender ( livingArmourLegs , " ItemLivingArmour " , " legs " ) ;
renderHelperV2 . registerRender ( livingArmourBoots , " ItemLivingArmour " , " boots " ) ;
renderHelperV2 . registerRender ( sentientArmourHelmet , " ItemSentientArmour " , " helm " ) ;
renderHelperV2 . registerRender ( sentientArmourChest , " ItemSentientArmour " , " chest " ) ;
renderHelperV2 . registerRender ( sentientArmourLegs , " ItemSentientArmour " , " legs " ) ;
renderHelperV2 . registerRender ( sentientArmourBoots , " ItemSentientArmour " , " boots " ) ;
2015-10-29 20:22:14 -07:00
renderHelper . itemRenderAll ( bloodOrb ) ;
2016-01-10 14:34:01 -08:00
OrbRegistry . registerOrbTexture ( orbWeak , new ResourceLocation ( Constants . Mod . DOMAIN + " ItemBloodOrbWeak " ) ) ;
OrbRegistry . registerOrbTexture ( orbApprentice , new ResourceLocation ( Constants . Mod . DOMAIN + " ItemBloodOrbApprentice " ) ) ;
OrbRegistry . registerOrbTexture ( orbMagician , new ResourceLocation ( Constants . Mod . DOMAIN + " ItemBloodOrbMagician " ) ) ;
OrbRegistry . registerOrbTexture ( orbMaster , new ResourceLocation ( Constants . Mod . DOMAIN + " ItemBloodOrbMaster " ) ) ;
OrbRegistry . registerOrbTexture ( orbArchmage , new ResourceLocation ( Constants . Mod . DOMAIN + " ItemBloodOrbArchmage " ) ) ;
OrbRegistry . registerOrbTexture ( orbTranscendent , new ResourceLocation ( Constants . Mod . DOMAIN + " ItemBloodOrbTranscendent " ) ) ;
2015-10-29 22:22:08 -07:00
renderHelper . itemRender ( bucketEssence ) ;
2016-01-09 10:47:36 -05:00
renderHelper . itemRender ( sentientBow , 0 , " ItemSentientBow " ) ;
renderHelper . itemRender ( sentientBow , 1 , " ItemSentientBow_pulling_0 " ) ;
renderHelper . itemRender ( sentientBow , 2 , " ItemSentientBow_pulling_1 " ) ;
renderHelper . itemRender ( sentientBow , 3 , " ItemSentientBow_pulling_2 " ) ;
2016-01-08 21:05:13 -05:00
2016-01-09 15:05:41 -05:00
renderHelper . itemRender ( sentientArmourGem , 0 , " ItemSentientArmourGem0 " ) ;
renderHelper . itemRender ( sentientArmourGem , 1 , " ItemSentientArmourGem1 " ) ;
2015-10-29 20:22:14 -07:00
}
2015-12-30 15:34:40 -05:00
private static Item registerItem ( Item item , String name )
{
2015-10-29 20:22:14 -07:00
if ( ! ConfigHandler . itemBlacklist . contains ( name ) )
2016-03-15 22:48:01 -07:00
{
2015-10-29 20:22:14 -07:00
GameRegistry . registerItem ( item , name ) ;
2016-03-15 22:48:01 -07:00
BloodMagic . proxy . tryHandleItemModel ( item , name ) ;
}
2015-10-29 20:22:14 -07:00
return item ;
}
2015-12-30 15:34:40 -05:00
private static Item registerItem ( Item item )
{
2016-02-05 22:23:00 -05:00
if ( item . getRegistryName ( ) = = null )
{
2016-01-18 22:34:12 -08:00
BloodMagic . instance . getLogger ( ) . error ( " Attempted to register Item {} without setting a registry name. Item will not be registered. Please report this. " , item . getClass ( ) . getCanonicalName ( ) ) ;
return item ;
}
2016-03-15 22:48:01 -07:00
String itemName = item . getRegistryName ( ) . split ( " : " ) [ 1 ] ;
if ( ! ConfigHandler . itemBlacklist . contains ( itemName ) )
{
2016-01-18 22:34:12 -08:00
GameRegistry . registerItem ( item ) ;
2016-03-15 22:48:01 -07:00
BloodMagic . proxy . tryHandleItemModel ( item , itemName ) ;
}
2016-01-18 22:34:12 -08:00
return item ;
2015-10-29 20:22:14 -07:00
}
}