Merge pull request #409 from Arcaratus/bloodmagic1.8
Finished (almost) everything !items
This commit is contained in:
commit
8fcbc53983
|
@ -563,7 +563,6 @@ public class AlchemicalWizardry
|
|||
|
||||
ModBlocks.init();
|
||||
ModItems.init();
|
||||
ModItems.registerItems();
|
||||
|
||||
RecipeSorter.register("AWWayofTime:shapedorb", ShapedBloodOrbRecipe.class, Category.SHAPED, "before:minecraft:shapeless");
|
||||
RecipeSorter.register("AWWayofTime:shapelessorb", ShapelessBloodOrbRecipe.class, Category.SHAPELESS, "after:minecraft:shapeless");
|
||||
|
@ -828,7 +827,7 @@ public class AlchemicalWizardry
|
|||
blacklistAccelerators();
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new ModLivingDropsEvent());
|
||||
proxy.InitRendering();
|
||||
proxy.initRendering();
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
|
||||
|
||||
ItemStack gunpowderStack = new ItemStack(Items.gunpowder);
|
||||
|
@ -1535,10 +1534,10 @@ public class AlchemicalWizardry
|
|||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 7), new ReagentStack(ReagentRegistry.reductusReagent, 1000));
|
||||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 8), new ReagentStack(ReagentRegistry.potentiaReagent, 1000));
|
||||
|
||||
OmegaRegistry.registerParadigm(ReagentRegistry.aquasalusReagent, new OmegaParadigmWater((OmegaArmour)ModItems.boundHelmetWater, (OmegaArmour)ModItems.boundPlateWater, (OmegaArmour)ModItems.boundLeggingsWater, (OmegaArmour)ModItems.boundBootsWater));
|
||||
OmegaRegistry.registerParadigm(ReagentRegistry.terraeReagent, new OmegaParadigmEarth((OmegaArmour)ModItems.boundHelmetEarth, (OmegaArmour)ModItems.boundPlateEarth, (OmegaArmour)ModItems.boundLeggingsEarth, (OmegaArmour)ModItems.boundBootsEarth));
|
||||
OmegaRegistry.registerParadigm(ReagentRegistry.aetherReagent, new OmegaParadigmWind((OmegaArmour)ModItems.boundHelmetWind, (OmegaArmour)ModItems.boundPlateWind, (OmegaArmour)ModItems.boundLeggingsWind, (OmegaArmour)ModItems.boundBootsWind));
|
||||
OmegaRegistry.registerParadigm(ReagentRegistry.incendiumReagent, new OmegaParadigmFire((OmegaArmour)ModItems.boundHelmetFire, (OmegaArmour)ModItems.boundPlateFire, (OmegaArmour)ModItems.boundLeggingsFire, (OmegaArmour)ModItems.boundBootsFire));
|
||||
OmegaRegistry.registerParadigm(ReagentRegistry.aquasalusReagent, new OmegaParadigmWater((OmegaArmour)ModItems.boundHelmetWater, (OmegaArmour)ModItems.boundChestplateWater, (OmegaArmour)ModItems.boundLeggingsWater, (OmegaArmour)ModItems.boundBootsWater));
|
||||
OmegaRegistry.registerParadigm(ReagentRegistry.terraeReagent, new OmegaParadigmEarth((OmegaArmour)ModItems.boundHelmetEarth, (OmegaArmour)ModItems.boundChestplateEarth, (OmegaArmour)ModItems.boundLeggingsEarth, (OmegaArmour)ModItems.boundBootsEarth));
|
||||
OmegaRegistry.registerParadigm(ReagentRegistry.aetherReagent, new OmegaParadigmWind((OmegaArmour)ModItems.boundHelmetWind, (OmegaArmour)ModItems.boundChestplateWind, (OmegaArmour)ModItems.boundLeggingsWind, (OmegaArmour)ModItems.boundBootsWind));
|
||||
OmegaRegistry.registerParadigm(ReagentRegistry.incendiumReagent, new OmegaParadigmFire((OmegaArmour)ModItems.boundHelmetFire, (OmegaArmour)ModItems.boundChestplateFire, (OmegaArmour)ModItems.boundLeggingsFire, (OmegaArmour)ModItems.boundBootsFire));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import WayofTime.alchemicalWizardry.common.items.EarthScribeTool;
|
|||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBazooka;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBlast;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergySword;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundBlade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnhancedTelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.items.FireScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemAlchemyBase;
|
||||
|
@ -94,6 +94,8 @@ import WayofTime.alchemicalWizardry.common.items.sigil.SigilVoid;
|
|||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilWater;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* User: Pokefenn
|
||||
|
@ -131,7 +133,7 @@ public class ModItems
|
|||
public static Item boundAxe;
|
||||
public static Item boundShovel;
|
||||
public static Item boundHelmet;
|
||||
public static Item boundPlate;
|
||||
public static Item boundChestplate;
|
||||
public static Item boundLeggings;
|
||||
public static Item boundBoots;
|
||||
public static Item weakBloodShard;
|
||||
|
@ -216,22 +218,22 @@ public class ModItems
|
|||
public static Item itemAssassinSigil;
|
||||
|
||||
public static Item boundHelmetWater;
|
||||
public static Item boundPlateWater;
|
||||
public static Item boundChestplateWater;
|
||||
public static Item boundLeggingsWater;
|
||||
public static Item boundBootsWater;
|
||||
|
||||
public static Item boundHelmetEarth;
|
||||
public static Item boundPlateEarth;
|
||||
public static Item boundChestplateEarth;
|
||||
public static Item boundLeggingsEarth;
|
||||
public static Item boundBootsEarth;
|
||||
|
||||
public static Item boundHelmetWind;
|
||||
public static Item boundPlateWind;
|
||||
public static Item boundChestplateWind;
|
||||
public static Item boundLeggingsWind;
|
||||
public static Item boundBootsWind;
|
||||
|
||||
public static Item boundHelmetFire;
|
||||
public static Item boundPlateFire;
|
||||
public static Item boundChestplateFire;
|
||||
public static Item boundLeggingsFire;
|
||||
public static Item boundBootsFire;
|
||||
|
||||
|
@ -244,269 +246,159 @@ public class ModItems
|
|||
|
||||
public static Item ritualDismantler;
|
||||
|
||||
public static ArrayList<String> itemsNotToBeRegistered = new ArrayList<String>();
|
||||
|
||||
public static void init()
|
||||
{
|
||||
weakBloodOrb = new EnergyBattery(5000).setUnlocalizedName("weakBloodOrb");
|
||||
apprenticeBloodOrb = new ApprenticeBloodOrb(25000).setUnlocalizedName("apprenticeBloodOrb");
|
||||
magicianBloodOrb = new MagicianBloodOrb(150000).setUnlocalizedName("magicianBloodOrb");
|
||||
masterBloodOrb = new MasterBloodOrb(1000000).setUnlocalizedName("masterBloodOrb");
|
||||
archmageBloodOrb = new ArchmageBloodOrb(10000000).setUnlocalizedName("archmageBloodOrb");
|
||||
transcendentBloodOrb = new TranscendentBloodOrb(30000000).setUnlocalizedName("transcendentBloodOrb");
|
||||
energyBlaster = new EnergyBlast().setUnlocalizedName("energyBlast");
|
||||
energySword = new EnergySword().setUnlocalizedName("energySword");
|
||||
lavaCrystal = new LavaCrystal().setUnlocalizedName("lavaCrystal");
|
||||
waterSigil = new SigilWater().setUnlocalizedName("waterSigil");
|
||||
lavaSigil = new SigilLava().setUnlocalizedName("lavaSigil");
|
||||
voidSigil = new SigilVoid().setUnlocalizedName("voidSigil");
|
||||
blankSlate = new AWBaseItems().setUnlocalizedName("blankSlate");
|
||||
reinforcedSlate = new AWBaseItems().setUnlocalizedName("reinforcedSlate");
|
||||
sacrificialDagger = new SacrificialDagger().setUnlocalizedName("sacrificialDagger");
|
||||
daggerOfSacrifice = new DaggerOfSacrifice().setUnlocalizedName("daggerOfSacrifice");
|
||||
airSigil = new SigilAir().setUnlocalizedName("airSigil");
|
||||
sigilOfTheFastMiner = new SigilOfTheFastMiner().setUnlocalizedName("sigilOfTheFastMiner");
|
||||
sigilOfElementalAffinity = new SigilOfElementalAffinity().setUnlocalizedName("sigilOfElementalAffinity");
|
||||
sigilOfHaste = new SigilOfHaste().setUnlocalizedName("sigilOfHaste");
|
||||
sigilOfHolding = new SigilOfHolding().setUnlocalizedName("sigilOfHolding");
|
||||
divinationSigil = new SigilDivination().setUnlocalizedName("divinationSigil");
|
||||
waterScribeTool = new WaterScribeTool().setUnlocalizedName("waterScribeTool");
|
||||
fireScribeTool = new FireScribeTool().setUnlocalizedName("fireScribeTool");
|
||||
earthScribeTool = new EarthScribeTool().setUnlocalizedName("earthScribeTool");
|
||||
airScribeTool = new AirScribeTool().setUnlocalizedName("airScribeTool");
|
||||
activationCrystal = new ActivationCrystal();
|
||||
boundPickaxe = new BoundPickaxe().setUnlocalizedName("boundPickaxe");
|
||||
boundAxe = new BoundAxe().setUnlocalizedName("boundAxe");
|
||||
boundShovel = new BoundShovel().setUnlocalizedName("boundShovel");
|
||||
boundHelmet = new BoundArmour(0).setUnlocalizedName("boundHelmet");
|
||||
boundPlate = new BoundArmour(1).setUnlocalizedName("boundPlate");
|
||||
boundLeggings = new BoundArmour(2).setUnlocalizedName("boundLeggings");
|
||||
boundBoots = new BoundArmour(3).setUnlocalizedName("boundBoots");
|
||||
weakBloodShard = new BloodShard().setUnlocalizedName("weakBloodShard");
|
||||
growthSigil = new SigilOfGrowth().setUnlocalizedName("growthSigil");
|
||||
blankSpell = new BlankSpell().setUnlocalizedName("blankSpell");
|
||||
alchemyFlask = new AlchemyFlask().setUnlocalizedName("alchemyFlask");
|
||||
standardBindingAgent = new StandardBindingAgent().setUnlocalizedName("standardBindingAgent");
|
||||
mundanePowerCatalyst = new MundanePowerCatalyst().setUnlocalizedName("mundanePowerCatalyst");
|
||||
averagePowerCatalyst = new AveragePowerCatalyst().setUnlocalizedName("averagePowerCatalyst");
|
||||
greaterPowerCatalyst = new GreaterPowerCatalyst().setUnlocalizedName("greaterPowerCatalyst");
|
||||
mundaneLengtheningCatalyst = new MundaneLengtheningCatalyst().setUnlocalizedName("mundaneLengtheningCatalyst");
|
||||
averageLengtheningCatalyst = new AverageLengtheningCatalyst().setUnlocalizedName("averageLengtheningCatalyst");
|
||||
greaterLengtheningCatalyst = new GreaterLengtheningCatalyst().setUnlocalizedName("greaterLengtheningCatalyst");
|
||||
incendium = new AlchemyReagent().setUnlocalizedName("incendium");
|
||||
magicales = new AlchemyReagent().setUnlocalizedName("magicales");
|
||||
sanctus = new AlchemyReagent().setUnlocalizedName("sanctus");
|
||||
aether = new AlchemyReagent().setUnlocalizedName("aether");
|
||||
simpleCatalyst = new AlchemyReagent().setUnlocalizedName("simpleCatalyst");
|
||||
crepitous = new AlchemyReagent().setUnlocalizedName("crepitous");
|
||||
crystallos = new AlchemyReagent().setUnlocalizedName("crystallos");
|
||||
terrae = new AlchemyReagent().setUnlocalizedName("terrae");
|
||||
aquasalus = new AlchemyReagent().setUnlocalizedName("aquasalus");
|
||||
tennebrae = new AlchemyReagent().setUnlocalizedName("tennebrae");
|
||||
demonBloodShard = new BloodShard().setUnlocalizedName("demonBloodShard");
|
||||
sigilOfWind = new SigilOfWind().setUnlocalizedName("sigilOfWind");
|
||||
telepositionFocus = new TelepositionFocus(1).setUnlocalizedName("telepositionFocus");
|
||||
enhancedTelepositionFocus = new EnhancedTelepositionFocus().setUnlocalizedName("enhancedTelepositionFocus");
|
||||
reinforcedTelepositionFocus = new ReinforcedTelepositionFocus().setUnlocalizedName("reinforcedTelepositionFocus");
|
||||
demonicTelepositionFocus = new DemonicTelepositionFocus().setUnlocalizedName("demonicTelepositionFocus");
|
||||
imbuedSlate = new AWBaseItems().setUnlocalizedName("imbuedSlate");
|
||||
demonicSlate = new AWBaseItems().setUnlocalizedName("demonicSlate");
|
||||
duskScribeTool = new DuskScribeTool().setUnlocalizedName("duskScribeTool");
|
||||
sigilOfTheBridge = new SigilOfTheBridge().setUnlocalizedName("sigilOfTheBridge");
|
||||
armourInhibitor = new ArmourInhibitor().setUnlocalizedName("armourInhibitor");
|
||||
creativeFiller = new CheatyItem().setUnlocalizedName("cheatyItem");
|
||||
demonPlacer = new DemonPlacer().setUnlocalizedName("demonPlacer");
|
||||
creativeDagger = new CreativeDagger().setUnlocalizedName("creativeDagger");
|
||||
weakFillingAgent = new WeakFillingAgent().setUnlocalizedName("weakFillingAgent");
|
||||
standardFillingAgent = new StandardFillingAgent().setUnlocalizedName("standardFillingAgent");
|
||||
enhancedFillingAgent = new EnhancedFillingAgent().setUnlocalizedName("enhancedFillingAgent");
|
||||
weakBindingAgent = new WeakBindingAgent().setUnlocalizedName("weakBindingAgent");
|
||||
itemRitualDiviner = new ItemRitualDiviner().setUnlocalizedName("ritualDiviner");
|
||||
sigilOfMagnetism = new SigilOfMagnetism().setUnlocalizedName("sigilOfMagnetism");
|
||||
itemKeyOfDiablo = new ItemDiabloKey().setUnlocalizedName("itemDiabloKey");
|
||||
energyBazooka = new EnergyBazooka().setUnlocalizedName("energyBazooka");
|
||||
itemBloodLightSigil = new SigilBloodLight().setUnlocalizedName("bloodLightSigil");
|
||||
itemComplexSpellCrystal = new ItemComplexSpellCrystal().setUnlocalizedName("itemComplexSpellCrystal");
|
||||
bucketLife = (new LifeBucket(ModBlocks.blockLifeEssence)).setUnlocalizedName("bucketLife").setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc);
|
||||
itemSigilOfEnderSeverance = (new SigilOfEnderSeverance()).setUnlocalizedName("itemSigilOfEnderSeverance");
|
||||
baseItems = new ItemComponents().setUnlocalizedName("baseItems");
|
||||
baseAlchemyItems = new ItemAlchemyBase().setUnlocalizedName("baseAlchemyItems");
|
||||
itemSigilOfSupression = new SigilOfSupression().setUnlocalizedName("itemSigilOfSupression");
|
||||
itemFluidSigil = new SigilFluid().setUnlocalizedName("itemFluidSigil");
|
||||
itemSeerSigil = new SigilSeer().setUnlocalizedName("itemSeerSigil");
|
||||
customTool = (ItemSpellMultiTool)(new ItemSpellMultiTool().setUnlocalizedName("multiTool"));
|
||||
weakBloodOrb = registerItem(new EnergyBattery(5000), "weak_blood_orb");
|
||||
apprenticeBloodOrb = registerItem(new ApprenticeBloodOrb(25000), "apprentice_blood_orb");
|
||||
magicianBloodOrb = registerItem(new MagicianBloodOrb(150000), "magician_blood_orb");
|
||||
masterBloodOrb = registerItem(new MasterBloodOrb(1000000), "master_blood_orb");
|
||||
archmageBloodOrb = registerItem(new ArchmageBloodOrb(10000000), "archmage_blood_orb");
|
||||
transcendentBloodOrb = registerItem(new TranscendentBloodOrb(30000000), "transcendent_blood_orb");
|
||||
energyBlaster = registerItem(new EnergyBlast(), "energy_blaster");
|
||||
energySword = registerItem(new BoundBlade(), "bound_blade");
|
||||
lavaCrystal = registerItem(new LavaCrystal(), "lava_crystal");
|
||||
waterSigil = registerItem(new SigilWater(), "water_sigil");
|
||||
lavaSigil = registerItem(new SigilLava(), "lava_sigil");
|
||||
voidSigil = registerItem(new SigilVoid(), "void_sigil");
|
||||
blankSlate = registerItem(new AWBaseItems(), "blank_slate");
|
||||
reinforcedSlate = registerItem(new AWBaseItems(), "reinforced_slate");
|
||||
sacrificialDagger = registerItem(new SacrificialDagger(), "sacrificial_agger");
|
||||
daggerOfSacrifice = registerItem(new DaggerOfSacrifice(), "dagger_of_sacrifice");
|
||||
airSigil = registerItem(new SigilAir(), "air_sigil");
|
||||
sigilOfTheFastMiner = registerItem(new SigilOfTheFastMiner(), "sigil_of_the_fast_miner");
|
||||
sigilOfElementalAffinity = registerItem(new SigilOfElementalAffinity(), "sigil_of_elemental_affinity");
|
||||
sigilOfHaste = registerItem(new SigilOfHaste(), "sigil_of_haste");
|
||||
sigilOfHolding = registerItem(new SigilOfHolding(), "sigil_of_holding");
|
||||
divinationSigil = registerItem(new SigilDivination(), "divination_sigil");
|
||||
waterScribeTool = registerItem(new WaterScribeTool(), "water_scribe_tool");
|
||||
fireScribeTool = registerItem(new FireScribeTool(), "fire_scribe_tool");
|
||||
earthScribeTool = registerItem(new EarthScribeTool(), "earth_scribe_tool");
|
||||
airScribeTool = registerItem(new AirScribeTool(), "air_scribe_tool");
|
||||
activationCrystal = registerItem(new ActivationCrystal(), "activation_crystal");
|
||||
boundPickaxe = registerItem(new BoundPickaxe(), "bound_pickaxe");
|
||||
boundAxe = registerItem(new BoundAxe(), "bound_axe");
|
||||
boundShovel = registerItem(new BoundShovel(), "bound_shovel");
|
||||
boundHelmet = registerItem(new BoundArmour(0), "bound_helmet");
|
||||
boundChestplate = registerItem(new BoundArmour(1), "bound_chestplate");
|
||||
boundLeggings = registerItem(new BoundArmour(2), "bound_leggings");
|
||||
boundBoots = registerItem(new BoundArmour(3), "bound_boots");
|
||||
weakBloodShard = registerItem(new BloodShard(), "weak_blood_shard");
|
||||
growthSigil = registerItem(new SigilOfGrowth(), "growth_sigil");
|
||||
blankSpell = registerItem(new BlankSpell(), "blank_spell");
|
||||
alchemyFlask = registerItem(new AlchemyFlask(), "alchemy_flask");
|
||||
standardBindingAgent = registerItem(new StandardBindingAgent(), "standard_binding_agent");
|
||||
mundanePowerCatalyst = registerItem(new MundanePowerCatalyst(), "mundane_power_catalyst");
|
||||
averagePowerCatalyst = registerItem(new AveragePowerCatalyst(), "average_power_catalyst");
|
||||
greaterPowerCatalyst = registerItem(new GreaterPowerCatalyst(), "greater_power_catalyst");
|
||||
mundaneLengtheningCatalyst = registerItem(new MundaneLengtheningCatalyst(), "mundane_lengthening_catalyst");
|
||||
averageLengtheningCatalyst = registerItem(new AverageLengtheningCatalyst(), "average_lengthening_catalyst");
|
||||
greaterLengtheningCatalyst = registerItem(new GreaterLengtheningCatalyst(), "greater_lengthening_catalyst");
|
||||
incendium = registerItem(new AlchemyReagent(), "incendium");
|
||||
magicales = registerItem(new AlchemyReagent(), "magicales");
|
||||
sanctus = registerItem(new AlchemyReagent(), "sanctus");
|
||||
aether = registerItem(new AlchemyReagent(), "aether");
|
||||
simpleCatalyst = registerItem(new AlchemyReagent(), "simple_catalyst");
|
||||
crepitous = registerItem(new AlchemyReagent(), "crepitous");
|
||||
crystallos = registerItem(new AlchemyReagent(), "crystallos");
|
||||
terrae = registerItem(new AlchemyReagent(), "terrae");
|
||||
aquasalus = registerItem(new AlchemyReagent(), "aquasalus");
|
||||
tennebrae = registerItem(new AlchemyReagent(), "tennebrae");
|
||||
demonBloodShard = registerItem(new BloodShard(), "demon_blood_shard");
|
||||
sigilOfWind = registerItem(new SigilOfWind(), "sigil_of_wind");
|
||||
telepositionFocus = registerItem(new TelepositionFocus(1), "teleposition_focus");
|
||||
enhancedTelepositionFocus = registerItem(new EnhancedTelepositionFocus(), "enhanced_teleposition_focus");
|
||||
reinforcedTelepositionFocus = registerItem(new ReinforcedTelepositionFocus(), "reinforced_teleposition_focus");
|
||||
demonicTelepositionFocus = registerItem(new DemonicTelepositionFocus(), "demonic_teleposition_focus");
|
||||
imbuedSlate = registerItem(new AWBaseItems(), "imbued_slate");
|
||||
demonicSlate = registerItem(new AWBaseItems(), "demonic_slate");
|
||||
duskScribeTool = registerItem(new DuskScribeTool(), "dusk_scribe_tool");
|
||||
sigilOfTheBridge = registerItem(new SigilOfTheBridge(), "sigil_of_the_bridge");
|
||||
armourInhibitor = registerItem(new ArmourInhibitor(), "armour_inhibitor");
|
||||
creativeFiller = registerItem(new CheatyItem(), "creative_orb");
|
||||
demonPlacer = registerItem(new DemonPlacer(), "demon_placer");
|
||||
creativeDagger = registerItem(new CreativeDagger(), "creative_dagger");
|
||||
weakFillingAgent = registerItem(new WeakFillingAgent(), "weak_filling_agent");
|
||||
standardFillingAgent = registerItem(new StandardFillingAgent(), "standard_filling_agent");
|
||||
enhancedFillingAgent = registerItem(new EnhancedFillingAgent(), "enhanced_filling_agent");
|
||||
weakBindingAgent = registerItem(new WeakBindingAgent(), "weak_binding_agent");
|
||||
itemRitualDiviner = registerItem(new ItemRitualDiviner(), "ritual_diviner");
|
||||
sigilOfMagnetism = registerItem(new SigilOfMagnetism(), "sigil_of_magnetism");
|
||||
itemKeyOfDiablo = registerItem(new ItemDiabloKey(), "key_of_binding");
|
||||
energyBazooka = registerItem(new EnergyBazooka(), "energy_bazooka");
|
||||
itemBloodLightSigil = registerItem(new SigilBloodLight(), "blood_light_sigil");
|
||||
itemComplexSpellCrystal = registerItem(new ItemComplexSpellCrystal(), "complex_spell_crystal");
|
||||
bucketLife = registerItem(new LifeBucket(ModBlocks.blockLifeEssence), "bucket_life").setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc);
|
||||
itemSigilOfEnderSeverance = registerItem(new SigilOfEnderSeverance(), "sigil_of_ender_severance");
|
||||
baseItems = registerItem(new ItemComponents(), "base_items");
|
||||
baseAlchemyItems = registerItem(new ItemAlchemyBase(), "base_alchemy_items");
|
||||
itemSigilOfSupression = registerItem(new SigilOfSupression(), "sigil_of_suppression");
|
||||
itemFluidSigil = registerItem(new SigilFluid(), "fluid_sigil");
|
||||
itemSeerSigil = registerItem(new SigilSeer(), "sigil_of_sight");
|
||||
customTool = (ItemSpellMultiTool) registerItem(new ItemSpellMultiTool(), "multi_tool");
|
||||
|
||||
SpellParadigmTool.customTool = customTool;
|
||||
|
||||
itemCombinationalCatalyst = new CombinationalCatalyst().setUnlocalizedName("itemCombinationalCatalyst");
|
||||
itemAttunedCrystal = new ItemAttunedCrystal().setUnlocalizedName("itemAttunedCrystal");
|
||||
itemTankSegmenter = new ItemTankSegmenter().setUnlocalizedName("itemTankSegmenter");
|
||||
itemDestinationClearer = new ItemDestinationClearer().setUnlocalizedName("destinationClearer");
|
||||
itemCombinationalCatalyst = registerItem(new CombinationalCatalyst(), "combinational_catalyst");
|
||||
itemAttunedCrystal = registerItem(new ItemAttunedCrystal(), "attuned_crystal");
|
||||
itemTankSegmenter = registerItem(new ItemTankSegmenter(), "tank_segmenter");
|
||||
itemDestinationClearer = registerItem(new ItemDestinationClearer(), "destination_clearer");
|
||||
|
||||
dawnScribeTool = new DawnScribeTool().setUnlocalizedName("dawnScribeTool");
|
||||
dawnScribeTool = registerItem(new DawnScribeTool(), "dawn_scribe_tool");
|
||||
|
||||
itemBloodPack = new ItemBloodLetterPack().setUnlocalizedName("itemBloodPack");
|
||||
itemHarvestSigil = new SigilHarvest().setUnlocalizedName("itemHarvestSigil");
|
||||
itemCompressionSigil = new SigilPackRat().setUnlocalizedName("itemCompressionSigil");
|
||||
itemAssassinSigil = new SigilOfTheAssassin().setUnlocalizedName("itemAssassinSigil");
|
||||
itemBloodPack = registerItem(new ItemBloodLetterPack(), "blood_pack");
|
||||
itemHarvestSigil = registerItem(new SigilHarvest(), "harvest_sigil");
|
||||
itemCompressionSigil = registerItem(new SigilPackRat(), "compression_sigil");
|
||||
itemAssassinSigil = registerItem(new SigilOfTheAssassin(), "assassin_sigil");
|
||||
|
||||
boundHelmetWater = new OmegaArmourWater(0).setUnlocalizedName("boundHelmetWater");
|
||||
boundPlateWater = new OmegaArmourWater(1).setUnlocalizedName("boundPlateWater");
|
||||
boundLeggingsWater = new OmegaArmourWater(2).setUnlocalizedName("boundLeggingsWater");
|
||||
boundBootsWater = new OmegaArmourWater(3).setUnlocalizedName("boundBootsWater");
|
||||
boundHelmetWater = registerItem(new OmegaArmourWater(0), "bound_helmet_water");
|
||||
boundChestplateWater = registerItem(new OmegaArmourWater(1), "bound_chestplate_water");
|
||||
boundLeggingsWater = registerItem(new OmegaArmourWater(2), "bound_leggings_water");
|
||||
boundBootsWater = registerItem(new OmegaArmourWater(3), "bound_boots_water");
|
||||
|
||||
boundHelmetEarth = new OmegaArmourEarth(0).setUnlocalizedName("boundHelmetEarth");
|
||||
boundPlateEarth = new OmegaArmourEarth(1).setUnlocalizedName("boundPlateEarth");
|
||||
boundLeggingsEarth = new OmegaArmourEarth(2).setUnlocalizedName("boundLeggingsEarth");
|
||||
boundBootsEarth = new OmegaArmourEarth(3).setUnlocalizedName("boundBootsEarth");
|
||||
boundHelmetEarth = registerItem(new OmegaArmourEarth(0), "bound_helmet_earth");
|
||||
boundChestplateEarth = registerItem(new OmegaArmourEarth(1), "bound_chestplate_earth");
|
||||
boundLeggingsEarth = registerItem(new OmegaArmourEarth(2), "bound_leggings_earth");
|
||||
boundBootsEarth = registerItem(new OmegaArmourEarth(3), "bound_boots_earth");
|
||||
|
||||
boundHelmetWind = new OmegaArmourWind(0).setUnlocalizedName("boundHelmetWind");
|
||||
boundPlateWind = new OmegaArmourWind(1).setUnlocalizedName("boundPlateWind");
|
||||
boundLeggingsWind = new OmegaArmourWind(2).setUnlocalizedName("boundLeggingsWind");
|
||||
boundBootsWind = new OmegaArmourWind(3).setUnlocalizedName("boundBootsWind");
|
||||
boundHelmetWind = registerItem(new OmegaArmourWind(0), "bound_helmet_wind");
|
||||
boundChestplateWind = registerItem(new OmegaArmourWind(1), "bound_chestplate_wind");
|
||||
boundLeggingsWind = registerItem(new OmegaArmourWind(2), "bound_leggings_wind");
|
||||
boundBootsWind = registerItem(new OmegaArmourWind(3), "bound_boots_wind");
|
||||
|
||||
boundHelmetFire = new OmegaArmourFire(0).setUnlocalizedName("boundHelmetFire");
|
||||
boundPlateFire = new OmegaArmourFire(1).setUnlocalizedName("boundPlateFire");
|
||||
boundLeggingsFire = new OmegaArmourFire(2).setUnlocalizedName("boundLeggingsFire");
|
||||
boundBootsFire = new OmegaArmourFire(3).setUnlocalizedName("boundBootsFire");
|
||||
boundHelmetFire = registerItem(new OmegaArmourFire(0), "bound_helmet_fire");
|
||||
boundChestplateFire = registerItem(new OmegaArmourFire(1), "bound_chestplate_fire");
|
||||
boundLeggingsFire = registerItem(new OmegaArmourFire(2), "bound_leggings_fire");
|
||||
boundBootsFire = registerItem(new OmegaArmourFire(3), "bound_boots_fire");
|
||||
|
||||
inputRoutingFocus = new InputRoutingFocus().setUnlocalizedName("inputRoutingFocus");
|
||||
outputRoutingFocus = new OutputRoutingFocus().setUnlocalizedName("outputRoutingFocus");
|
||||
inputRoutingFocus = registerItem(new InputRoutingFocus(), "input_routing_focus");
|
||||
outputRoutingFocus = registerItem(new OutputRoutingFocus(), "output_routing_focus");
|
||||
|
||||
itemIncense = new ItemIncense().setUnlocalizedName("bloodMagicIncenseItem");
|
||||
itemIncense = registerItem(new ItemIncense(), "incense");
|
||||
|
||||
ritualDismantler = new ItemRitualDismantler().setUnlocalizedName("ritualDismantler");
|
||||
ritualDismantler = registerItem(new ItemRitualDismantler(), "ritual_dismantler");
|
||||
}
|
||||
|
||||
public static void registerItems()
|
||||
public static Item registerItem(Item item, String unlocalizedName)
|
||||
{
|
||||
GameRegistry.registerItem(ModItems.weakBloodOrb, "weakBloodOrb");
|
||||
GameRegistry.registerItem(ModItems.apprenticeBloodOrb, "apprenticeBloodOrb");
|
||||
GameRegistry.registerItem(ModItems.magicianBloodOrb, "magicianBloodOrb");
|
||||
GameRegistry.registerItem(ModItems.energyBlaster, "energyBlaster");
|
||||
item.setUnlocalizedName(unlocalizedName);
|
||||
item.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
itemsNotToBeRegistered.clear();
|
||||
|
||||
GameRegistry.registerItem(ModItems.energySword, "energySword");
|
||||
GameRegistry.registerItem(ModItems.lavaCrystal, "lavaCrystal");
|
||||
GameRegistry.registerItem(ModItems.waterSigil, "waterSigil");
|
||||
GameRegistry.registerItem(ModItems.lavaSigil, "lavaSigil");
|
||||
GameRegistry.registerItem(ModItems.voidSigil, "voidSigil");
|
||||
GameRegistry.registerItem(ModItems.blankSlate, "blankSlate");
|
||||
GameRegistry.registerItem(ModItems.reinforcedSlate, "reinforcedSlate");
|
||||
GameRegistry.registerItem(ModItems.sacrificialDagger, "sacrificialKnife");
|
||||
GameRegistry.registerItem(ModItems.daggerOfSacrifice, "daggerOfSacrifice");
|
||||
GameRegistry.registerItem(ModItems.airSigil, "airSigil");
|
||||
GameRegistry.registerItem(ModItems.sigilOfTheFastMiner, "sigilOfTheFastMiner");
|
||||
GameRegistry.registerItem(ModItems.sigilOfElementalAffinity, "sigilOfElementalAffinity");
|
||||
GameRegistry.registerItem(ModItems.sigilOfHaste, "sigilOfHaste");
|
||||
GameRegistry.registerItem(ModItems.sigilOfHolding, "sigilOfHolding");
|
||||
GameRegistry.registerItem(ModItems.divinationSigil, "divinationSigil");
|
||||
GameRegistry.registerItem(ModItems.waterScribeTool, "waterScribeTool");
|
||||
GameRegistry.registerItem(ModItems.fireScribeTool, "fireScribeTool");
|
||||
GameRegistry.registerItem(ModItems.earthScribeTool, "earthScribeTool");
|
||||
GameRegistry.registerItem(ModItems.airScribeTool, "airScribeTool");
|
||||
GameRegistry.registerItem(ModItems.activationCrystal, "activationCrystal");
|
||||
GameRegistry.registerItem(ModItems.boundPickaxe, "boundPickaxe");
|
||||
GameRegistry.registerItem(ModItems.boundAxe, "boundAxe");
|
||||
GameRegistry.registerItem(ModItems.boundShovel, "boundShovel");
|
||||
GameRegistry.registerItem(ModItems.boundHelmet, "boundHelmet");
|
||||
GameRegistry.registerItem(ModItems.boundPlate, "boundPlate");
|
||||
GameRegistry.registerItem(ModItems.boundLeggings, "boundLeggings");
|
||||
GameRegistry.registerItem(ModItems.boundBoots, "boundBoots");
|
||||
GameRegistry.registerItem(ModItems.weakBloodShard, "weakBloodShard");
|
||||
GameRegistry.registerItem(ModItems.growthSigil, "growthSigil");
|
||||
GameRegistry.registerItem(ModItems.blankSpell, "blankSpell");
|
||||
GameRegistry.registerItem(ModItems.masterBloodOrb, "masterBloodOrb");
|
||||
GameRegistry.registerItem(ModItems.alchemyFlask, "alchemyFlask");
|
||||
GameRegistry.registerItem(ModItems.standardBindingAgent, "standardBindingAgent");
|
||||
GameRegistry.registerItem(ModItems.mundanePowerCatalyst, "mundanePowerCatalyst");
|
||||
GameRegistry.registerItem(ModItems.averagePowerCatalyst, "averagePowerCatalyst");
|
||||
GameRegistry.registerItem(ModItems.greaterPowerCatalyst, "greaterPowerCatalyst");
|
||||
GameRegistry.registerItem(ModItems.mundaneLengtheningCatalyst, "mundaneLengtheningCatalyst");
|
||||
GameRegistry.registerItem(ModItems.averageLengtheningCatalyst, "averageLengtheningCatalyst");
|
||||
GameRegistry.registerItem(ModItems.greaterLengtheningCatalyst, "greaterLengtheningCatalyst");
|
||||
GameRegistry.registerItem(ModItems.incendium, "incendium");
|
||||
GameRegistry.registerItem(ModItems.magicales, "magicales");
|
||||
GameRegistry.registerItem(ModItems.sanctus, "sanctus");
|
||||
GameRegistry.registerItem(ModItems.aether, "aether");
|
||||
GameRegistry.registerItem(ModItems.simpleCatalyst, "simpleCatalyst");
|
||||
GameRegistry.registerItem(ModItems.crepitous, "crepitous");
|
||||
GameRegistry.registerItem(ModItems.crystallos, "crystallos");
|
||||
GameRegistry.registerItem(ModItems.terrae, "terrae");
|
||||
GameRegistry.registerItem(ModItems.aquasalus, "aquasalus");
|
||||
GameRegistry.registerItem(ModItems.tennebrae, "tennebrae");
|
||||
GameRegistry.registerItem(ModItems.demonBloodShard, "demonBloodShard");
|
||||
GameRegistry.registerItem(ModItems.archmageBloodOrb, "archmageBloodOrb");
|
||||
GameRegistry.registerItem(ModItems.transcendentBloodOrb, "transcendentBloodOrb");
|
||||
GameRegistry.registerItem(ModItems.sigilOfWind, "sigilOfWind");
|
||||
GameRegistry.registerItem(ModItems.telepositionFocus, "telepositionFocus");
|
||||
GameRegistry.registerItem(ModItems.enhancedTelepositionFocus, "enhancedTelepositionFocus");
|
||||
GameRegistry.registerItem(ModItems.reinforcedTelepositionFocus, "reinforcedTelepositionFocus");
|
||||
GameRegistry.registerItem(ModItems.demonicTelepositionFocus, "demonicTelepositionFocus");
|
||||
GameRegistry.registerItem(ModItems.imbuedSlate, "imbuedSlate");
|
||||
GameRegistry.registerItem(ModItems.demonicSlate, "demonicSlate");
|
||||
GameRegistry.registerItem(ModItems.duskScribeTool, "duskScribeTool");
|
||||
GameRegistry.registerItem(ModItems.sigilOfTheBridge, "sigilOfTheBridge");
|
||||
GameRegistry.registerItem(ModItems.armourInhibitor, "armourInhibitor");
|
||||
GameRegistry.registerItem(ModItems.creativeFiller, "creativeFiller");
|
||||
GameRegistry.registerItem(ModItems.demonPlacer, "demonPlacer");
|
||||
GameRegistry.registerItem(ModItems.creativeDagger, "creativeDagger");
|
||||
for (String unlocName : BloodMagicConfiguration.itemsToBeDisabled)
|
||||
{
|
||||
if (unlocName.equals(unlocalizedName))
|
||||
{
|
||||
itemsNotToBeRegistered.add(unlocName);
|
||||
}
|
||||
}
|
||||
|
||||
GameRegistry.registerItem(ModItems.weakFillingAgent, "weakFillingAgent");
|
||||
GameRegistry.registerItem(ModItems.standardFillingAgent, "standardFillingAgent");
|
||||
GameRegistry.registerItem(ModItems.enhancedFillingAgent, "enhancedFillingAgent");
|
||||
GameRegistry.registerItem(ModItems.weakBindingAgent, "weakBindingAgent");
|
||||
GameRegistry.registerItem(ModItems.itemRitualDiviner, "itemRitualDiviner");
|
||||
GameRegistry.registerItem(ModItems.sigilOfMagnetism, "sigilOfMagnetism");
|
||||
GameRegistry.registerItem(ModItems.itemKeyOfDiablo, "itemKeyOfDiablo");
|
||||
GameRegistry.registerItem(ModItems.energyBazooka, "energyBazooka");
|
||||
GameRegistry.registerItem(ModItems.itemBloodLightSigil, "itemBloodLightSigil");
|
||||
GameRegistry.registerItem(ModItems.itemComplexSpellCrystal, "itemComplexSpellCrystal");
|
||||
GameRegistry.registerItem(ModItems.itemSigilOfSupression, "sigilOfSupression");
|
||||
GameRegistry.registerItem(ModItems.itemSigilOfEnderSeverance, "sigilOfEnderSeverance");
|
||||
GameRegistry.registerItem(ModItems.itemFluidSigil, "fluidSigil");
|
||||
GameRegistry.registerItem(ModItems.itemSeerSigil, "seerSigil");
|
||||
if (!itemsNotToBeRegistered.contains(unlocalizedName))
|
||||
{
|
||||
GameRegistry.registerItem(item, unlocalizedName);
|
||||
}
|
||||
|
||||
GameRegistry.registerItem(ModItems.customTool, "customTool");
|
||||
|
||||
GameRegistry.registerItem(ModItems.bucketLife, "bucketLife");
|
||||
GameRegistry.registerItem(ModItems.itemCombinationalCatalyst, "itemCombinationalCatalyst");
|
||||
|
||||
GameRegistry.registerItem(ModItems.itemAttunedCrystal, "itemAttunedCrystal");
|
||||
GameRegistry.registerItem(ModItems.itemTankSegmenter, "itemTankSegmenter");
|
||||
GameRegistry.registerItem(ModItems.itemDestinationClearer, "itemDestinationClearer");
|
||||
|
||||
GameRegistry.registerItem(ModItems.baseItems, "bloodMagicBaseItems");
|
||||
GameRegistry.registerItem(ModItems.baseAlchemyItems, "bloodMagicBaseAlchemyItems");
|
||||
|
||||
GameRegistry.registerItem(ModItems.dawnScribeTool, "dawnScribeTool");
|
||||
|
||||
GameRegistry.registerItem(ModItems.itemBloodPack, "itemBloodPack");
|
||||
GameRegistry.registerItem(ModItems.itemHarvestSigil, "itemHarvestSigil");
|
||||
GameRegistry.registerItem(ModItems.itemCompressionSigil, "itemCompressionSigil");
|
||||
GameRegistry.registerItem(ModItems.itemAssassinSigil, "itemAssassinSigil");
|
||||
|
||||
GameRegistry.registerItem(ModItems.boundHelmetWater, "boundHelmetWater");
|
||||
GameRegistry.registerItem(ModItems.boundPlateWater, "boundPlateWater");
|
||||
GameRegistry.registerItem(ModItems.boundLeggingsWater, "boundLeggingsWater");
|
||||
GameRegistry.registerItem(ModItems.boundBootsWater, "boundBootsWater");
|
||||
|
||||
GameRegistry.registerItem(ModItems.boundHelmetEarth, "boundHelmetEarth");
|
||||
GameRegistry.registerItem(ModItems.boundPlateEarth, "boundPlateEarth");
|
||||
GameRegistry.registerItem(ModItems.boundLeggingsEarth, "boundLeggingsEarth");
|
||||
GameRegistry.registerItem(ModItems.boundBootsEarth, "boundBootsEarth");
|
||||
|
||||
GameRegistry.registerItem(ModItems.boundHelmetWind, "boundHelmetWind");
|
||||
GameRegistry.registerItem(ModItems.boundPlateWind, "boundPlateWind");
|
||||
GameRegistry.registerItem(ModItems.boundLeggingsWind, "boundLeggingsWind");
|
||||
GameRegistry.registerItem(ModItems.boundBootsWind, "boundBootsWind");
|
||||
|
||||
GameRegistry.registerItem(ModItems.boundHelmetFire, "boundHelmetFire");
|
||||
GameRegistry.registerItem(ModItems.boundPlateFire, "boundPlateFire");
|
||||
GameRegistry.registerItem(ModItems.boundLeggingsFire, "boundLeggingsFire");
|
||||
GameRegistry.registerItem(ModItems.boundBootsFire, "boundBootsFire");
|
||||
|
||||
GameRegistry.registerItem(ModItems.inputRoutingFocus, "inputRoutingFocus");
|
||||
GameRegistry.registerItem(ModItems.outputRoutingFocus, "outputRoutingFocus");
|
||||
|
||||
GameRegistry.registerItem(ModItems.itemIncense, "bloodMagicIncenseItem");
|
||||
GameRegistry.registerItem(ModItems.ritualDismantler, "ritualDismantler");
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,5 +2,5 @@ package WayofTime.alchemicalWizardry.api;
|
|||
|
||||
public interface ILimitingLogic
|
||||
{
|
||||
public int getRoutingLimit();
|
||||
int getRoutingLimit();
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry.api;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.BlockPos;
|
||||
|
||||
|
||||
public class Int3
|
||||
{
|
||||
public int xCoord;
|
||||
|
|
|
@ -7,9 +7,9 @@ import net.minecraft.item.ItemStack;
|
|||
|
||||
public class RoutingFocusParadigm
|
||||
{
|
||||
public List<RoutingFocusLogic> logicList = new LinkedList();
|
||||
public List<RoutingFocusLogic> logicList = new LinkedList<RoutingFocusLogic>();
|
||||
|
||||
public List<RoutingFocusPosAndFacing> locationList = new LinkedList();
|
||||
public List<RoutingFocusPosAndFacing> locationList = new LinkedList<RoutingFocusPosAndFacing>();
|
||||
|
||||
public int maximumAmount = 0;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.ArrayList;
|
|||
|
||||
public class AlchemicalPotionCreationHandler
|
||||
{
|
||||
public static ArrayList<AlchemyPotionHandlerComponent> registeredPotionEffects = new ArrayList();
|
||||
public static ArrayList<AlchemyPotionHandlerComponent> registeredPotionEffects = new ArrayList<AlchemyPotionHandlerComponent>();
|
||||
|
||||
public static void addPotion(ItemStack itemStack, int potionID, int tickDuration)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.List;
|
|||
|
||||
public class AlchemyRecipeRegistry
|
||||
{
|
||||
public static List<AlchemyRecipe> recipes = new ArrayList();
|
||||
public static List<AlchemyRecipe> recipes = new ArrayList<AlchemyRecipe>();
|
||||
|
||||
public static void registerRecipe(ItemStack output, int amountNeeded, ItemStack[] recipe, int bloodOrbLevel)
|
||||
{
|
||||
|
|
|
@ -9,8 +9,8 @@ import net.minecraft.item.ItemStack;
|
|||
|
||||
public class ReagentRegistry
|
||||
{
|
||||
public static Map<String, Reagent> reagentList = new HashMap();
|
||||
public static Map<ItemStack, ReagentStack> itemToReagentMap = new HashMap();
|
||||
public static Map<String, Reagent> reagentList = new HashMap<String, Reagent>();
|
||||
public static Map<ItemStack, ReagentStack> itemToReagentMap = new HashMap<ItemStack, ReagentStack>();
|
||||
|
||||
public static Reagent sanctusReagent;
|
||||
public static Reagent incendiumReagent;
|
||||
|
|
|
@ -28,9 +28,8 @@ public class ReagentStack
|
|||
}
|
||||
|
||||
int amount = tag.getInteger("amount");
|
||||
ReagentStack stack = new ReagentStack(reagent, amount);
|
||||
|
||||
return stack;
|
||||
return new ReagentStack(reagent, amount);
|
||||
}
|
||||
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound tag)
|
||||
|
|
|
@ -30,7 +30,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
|
|||
{
|
||||
super();
|
||||
|
||||
this.attunedTankMap = new HashMap();
|
||||
this.attunedTankMap = new HashMap<Reagent, Integer>();
|
||||
this.tanks = new ReagentContainer[numberOfTanks];
|
||||
for (int i = 0; i < numberOfTanks; i++)
|
||||
{
|
||||
|
@ -116,7 +116,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
|
|||
ReagentStack remainingStack = resource.copy();
|
||||
remainingStack.amount = maxFill - totalFill;
|
||||
|
||||
boolean doesReagentMatch = tanks[i].getReagent() == null ? false : tanks[i].getReagent().isReagentEqual(remainingStack);
|
||||
boolean doesReagentMatch = tanks[i].getReagent() != null && tanks[i].getReagent().isReagentEqual(remainingStack);
|
||||
|
||||
if (doesReagentMatch)
|
||||
{
|
||||
|
|
|
@ -9,8 +9,8 @@ import net.minecraft.item.ItemStack;
|
|||
|
||||
public class AltarRecipeRegistry
|
||||
{
|
||||
public static List<AltarRecipe> altarRecipes = new LinkedList();
|
||||
public static Map<Integer, ItemStack> orbMap = new HashMap();
|
||||
public static List<AltarRecipe> altarRecipes = new LinkedList<AltarRecipe>();
|
||||
public static Map<Integer, ItemStack> orbMap = new HashMap<Integer, ItemStack>();
|
||||
|
||||
public static void registerAltarRecipe(ItemStack result, ItemStack requiredItem, int minTier, int liquidRequired, int consumptionRate, int drainRate, boolean canBeFilled)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.List;
|
|||
|
||||
public class BindingRegistry
|
||||
{
|
||||
public static List<BindingRecipe> bindingRecipes = new LinkedList();
|
||||
public static List<BindingRecipe> bindingRecipes = new LinkedList<BindingRecipe>();
|
||||
|
||||
public static void registerRecipe(ItemStack output, ItemStack input)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.List;
|
|||
|
||||
public class UnbindingRegistry
|
||||
{
|
||||
public static List<UnbindingRecipe> unbindingRecipes = new LinkedList();
|
||||
public static List<UnbindingRecipe> unbindingRecipes = new LinkedList<UnbindingRecipe>();
|
||||
|
||||
public static void addAllUnbindingRecipesFromBinding()
|
||||
{
|
||||
|
|
|
@ -15,8 +15,8 @@ import net.minecraft.world.World;
|
|||
*/
|
||||
public class CompressionRegistry
|
||||
{
|
||||
public static List<CompressionHandler> compressionRegistry = new ArrayList();
|
||||
public static Map<ItemStack, Integer> thresholdMap = new HashMap();
|
||||
public static List<CompressionHandler> compressionRegistry = new ArrayList<CompressionHandler>();
|
||||
public static Map<ItemStack, Integer> thresholdMap = new HashMap<ItemStack, Integer>();
|
||||
|
||||
public static void registerHandler(CompressionHandler handler)
|
||||
{
|
||||
|
|
|
@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry.api.event;
|
|||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
|
||||
@Cancelable
|
||||
public class AddToNetworkEvent extends Event
|
||||
{
|
||||
|
|
|
@ -8,45 +8,43 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
|
||||
/** Fired when a teleposer attempts to transpose two blocks. Use this to perform special cleanup or compensation,
|
||||
or cancel it entirely to prevent the transposition. */
|
||||
@Cancelable
|
||||
public class TeleposeEvent extends Event
|
||||
{
|
||||
public final World initialWorld;
|
||||
public final BlockPos initialPos;
|
||||
|
||||
public final World initialWorld;
|
||||
public final BlockPos initialPos;
|
||||
public final Block initialBlock;
|
||||
public final IBlockState initialState;
|
||||
|
||||
public final Block initialBlock;
|
||||
public final IBlockState initialState;
|
||||
public final World finalWorld;
|
||||
public final BlockPos finalPos;
|
||||
|
||||
public final World finalWorld;
|
||||
public final BlockPos finalPos;
|
||||
public final Block finalBlock;
|
||||
public final IBlockState finalState;
|
||||
|
||||
public final Block finalBlock;
|
||||
public final IBlockState finalState;
|
||||
|
||||
public TeleposeEvent(World wi, BlockPos posi, IBlockState statei, World wf, BlockPos posf, IBlockState statef) {
|
||||
initialWorld = wi;
|
||||
initialPos = posi;
|
||||
public TeleposeEvent(World wi, BlockPos posi, IBlockState statei, World wf, BlockPos posf, IBlockState statef)
|
||||
{
|
||||
initialWorld = wi;
|
||||
initialPos = posi;
|
||||
|
||||
initialState = statei;
|
||||
initialBlock = initialState.getBlock();
|
||||
initialState = statei;
|
||||
initialBlock = initialState.getBlock();
|
||||
|
||||
finalWorld = wf;
|
||||
finalPos = posf;
|
||||
finalWorld = wf;
|
||||
finalPos = posf;
|
||||
|
||||
finalState = statef;
|
||||
finalBlock = finalState.getBlock();
|
||||
}
|
||||
finalState = statef;
|
||||
finalBlock = finalState.getBlock();
|
||||
}
|
||||
|
||||
public TileEntity getInitialTile() {
|
||||
public TileEntity getInitialTile() {
|
||||
return initialWorld.getTileEntity(initialPos);
|
||||
}
|
||||
|
||||
public TileEntity getFinalTile() {
|
||||
public TileEntity getFinalTile() {
|
||||
return finalWorld.getTileEntity(finalPos);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.world.World;
|
|||
|
||||
public class HarvestRegistry
|
||||
{
|
||||
public static List<IHarvestHandler> handlerList = new ArrayList();
|
||||
public static List<IHarvestHandler> handlerList = new ArrayList<IHarvestHandler>();
|
||||
|
||||
public static void registerHarvestHandler(IHarvestHandler handler)
|
||||
{
|
||||
|
|
|
@ -252,7 +252,7 @@ public class ItemSpellMultiTool extends Item
|
|||
|
||||
public Set<String> getToolClasses(ItemStack stack)
|
||||
{
|
||||
Set<String> set = new HashSet();
|
||||
Set<String> set = new HashSet<String>();
|
||||
|
||||
if (this.getHarvestLevel(stack, "pickaxe") > -1)
|
||||
{
|
||||
|
@ -369,7 +369,7 @@ public class ItemSpellMultiTool extends Item
|
|||
|
||||
MovingObjectPosition mop = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false);
|
||||
|
||||
int cost = 0;
|
||||
int cost;
|
||||
|
||||
if (mop != null && mop.typeOfHit.equals(MovingObjectPosition.MovingObjectType.BLOCK))
|
||||
{
|
||||
|
@ -549,10 +549,7 @@ public class ItemSpellMultiTool extends Item
|
|||
|
||||
public void setDuration(ItemStack container, World world, int duration)
|
||||
{
|
||||
if (world.isRemote)
|
||||
{
|
||||
return;
|
||||
} else
|
||||
if (!world.isRemote)
|
||||
{
|
||||
World overWorld = DimensionManager.getWorld(0);
|
||||
long worldtime = overWorld.getTotalWorldTime();
|
||||
|
@ -632,10 +629,10 @@ public class ItemSpellMultiTool extends Item
|
|||
|
||||
NBTTagList tagList = tagiest.getTagList("Effects", Constants.NBT.TAG_COMPOUND);
|
||||
|
||||
List<SpellEffect> spellEffectList = new LinkedList();
|
||||
List<SpellEffect> spellEffectList = new LinkedList<SpellEffect>();
|
||||
for (int i = 0; i < tagList.tagCount(); i++)
|
||||
{
|
||||
NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i);
|
||||
NBTTagCompound tag = tagList.getCompoundTagAt(i);
|
||||
|
||||
SpellEffect eff = SpellEffect.getEffectFromTag(tag);
|
||||
if (eff != null)
|
||||
|
@ -729,10 +726,10 @@ public class ItemSpellMultiTool extends Item
|
|||
|
||||
NBTTagList tagList = tagiest.getTagList("ToolTips", Constants.NBT.TAG_COMPOUND);
|
||||
|
||||
List<String> toolTipList = new LinkedList();
|
||||
List<String> toolTipList = new LinkedList<String>();
|
||||
for (int i = 0; i < tagList.tagCount(); i++)
|
||||
{
|
||||
NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i);
|
||||
NBTTagCompound tag = tagList.getCompoundTagAt(i);
|
||||
|
||||
String str = tag.getString("tip");
|
||||
if (str != null)
|
||||
|
|
|
@ -134,7 +134,7 @@ public class ShapelessBloodOrbRecipe implements IRecipe
|
|||
//If target is integer, then we should be check the blood orb value of the item instead
|
||||
if (next instanceof Integer)
|
||||
{
|
||||
if (slot != null && slot.getItem() instanceof IBloodOrb)
|
||||
if (slot.getItem() instanceof IBloodOrb)
|
||||
{
|
||||
IBloodOrb orb = (IBloodOrb) slot.getItem();
|
||||
if (orb.getOrbLevel() < (Integer) next)
|
||||
|
|
|
@ -2,13 +2,21 @@ package WayofTime.alchemicalWizardry.api.items.interfaces;
|
|||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IRitualDiviner {
|
||||
public interface IRitualDiviner
|
||||
{
|
||||
int cycleDirection(ItemStack stack);
|
||||
|
||||
String getCurrentRitual(ItemStack stack);
|
||||
|
||||
int getDirection(ItemStack stack);
|
||||
|
||||
int getMaxRuneDisplacement(ItemStack stack);
|
||||
|
||||
String getNameForDirection(int direction);
|
||||
|
||||
void setCurrentRitual(ItemStack stack, String ritualID);
|
||||
|
||||
void setDirection(ItemStack stack, int direction);
|
||||
|
||||
void setMaxRuneDisplacement(ItemStack stack, int displacement);
|
||||
}
|
||||
|
|
|
@ -17,10 +17,7 @@ public abstract class RitualEffect
|
|||
return true;
|
||||
}
|
||||
|
||||
public void onRitualBroken(IMasterRitualStone ritualStone, RitualBreakMethod method)
|
||||
{
|
||||
|
||||
}
|
||||
public void onRitualBroken(IMasterRitualStone ritualStone, RitualBreakMethod method) {}
|
||||
|
||||
public abstract int getCostPerRefresh();
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ public class Rituals
|
|||
|
||||
public final MRSRenderer customRenderer;
|
||||
|
||||
public static Map<String, Rituals> ritualMap = new HashMap();
|
||||
public static List<String> keyList = new LinkedList();
|
||||
public static Map<String, Rituals> ritualMap = new HashMap<String, Rituals>();
|
||||
public static List<String> keyList = new LinkedList<String>();
|
||||
|
||||
public Rituals(int crystalLevel, int actCost, RitualEffect effect, String name, MRSRenderer renderer)
|
||||
{
|
||||
|
|
|
@ -23,7 +23,7 @@ import com.google.gson.GsonBuilder;
|
|||
public class ComplexNetworkHandler
|
||||
{
|
||||
public static String fileName = "config/BloodMagic/soulnetworkKeys";
|
||||
static HashMap<UUID, String> keyMap = new HashMap();
|
||||
static HashMap<UUID, String> keyMap = new HashMap<UUID, String>();
|
||||
public static UUID getUUIDFromPlayer(EntityPlayer player)
|
||||
{
|
||||
return player.getPersistentID();
|
||||
|
@ -70,9 +70,8 @@ public class ComplexNetworkHandler
|
|||
try
|
||||
{
|
||||
br = new BufferedReader(new FileReader(save));
|
||||
HashMap schema = gson.fromJson(br, keyMap.getClass());
|
||||
|
||||
keyMap = schema;
|
||||
|
||||
keyMap = gson.fromJson(br, keyMap.getClass());
|
||||
|
||||
if(keyMap != null)
|
||||
{
|
||||
|
@ -86,7 +85,6 @@ public class ComplexNetworkHandler
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
keyMap = null;
|
||||
|
|
|
@ -45,10 +45,10 @@ public class EntitySpellProjectile extends Entity implements IProjectile
|
|||
//Custom variables
|
||||
private int maxRicochet = 0;
|
||||
private float damage = 1;
|
||||
public List<IProjectileImpactEffect> impactList = new ArrayList();
|
||||
public List<IProjectileImpactEffect> impactList = new ArrayList<IProjectileImpactEffect>();
|
||||
private boolean penetration = false;
|
||||
public List<IProjectileUpdateEffect> updateEffectList = new ArrayList();
|
||||
public List<SpellEffect> spellEffectList = new LinkedList();
|
||||
public List<IProjectileUpdateEffect> updateEffectList = new ArrayList<IProjectileUpdateEffect>();
|
||||
public List<SpellEffect> spellEffectList = new LinkedList<SpellEffect>();
|
||||
private int blocksBroken = 0;
|
||||
|
||||
public EntitySpellProjectile(World par1World)
|
||||
|
@ -323,7 +323,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
|
|||
|
||||
NBTTagList tagList = par1NBTTagCompound.getTagList("Effects", Constants.NBT.TAG_COMPOUND);
|
||||
|
||||
List<SpellEffect> spellEffectList = new LinkedList();
|
||||
List<SpellEffect> spellEffectList = new LinkedList<SpellEffect>();
|
||||
for (int i = 0; i < tagList.tagCount(); i++)
|
||||
{
|
||||
NBTTagCompound tag = tagList.getCompoundTagAt(i);
|
||||
|
|
|
@ -8,9 +8,9 @@ import java.util.Map.Entry;
|
|||
|
||||
public class SpellEffectRegistry
|
||||
{
|
||||
public static Map<Class<? extends SpellParadigm>, List<ComplexSpellEffect>> effectRegistry = new HashMap();
|
||||
public static Map<String, ComplexSpellType> typeRegistry = new HashMap();
|
||||
public static Map<String, ComplexSpellModifier> modifierRegistry = new HashMap();
|
||||
public static Map<Class<? extends SpellParadigm>, List<ComplexSpellEffect>> effectRegistry = new HashMap<Class<? extends SpellParadigm>, List<ComplexSpellEffect>>();
|
||||
public static Map<String, ComplexSpellType> typeRegistry = new HashMap<String, ComplexSpellType>();
|
||||
public static Map<String, ComplexSpellModifier> modifierRegistry = new HashMap<String, ComplexSpellModifier>();
|
||||
|
||||
public static void registerSpellEffect(Class<? extends SpellParadigm> paraClass, ComplexSpellEffect effect)
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ public class SpellEffectRegistry
|
|||
effectList.add(effect);
|
||||
}else
|
||||
{
|
||||
List<ComplexSpellEffect> effectList = new LinkedList();
|
||||
List<ComplexSpellEffect> effectList = new LinkedList<ComplexSpellEffect>();
|
||||
effectList.add(effect);
|
||||
effectRegistry.put(paraClass, effectList);
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.world.World;
|
|||
|
||||
public abstract class SpellParadigm
|
||||
{
|
||||
protected List<SpellEffect> bufferedEffectList = new LinkedList();
|
||||
protected List<SpellEffect> bufferedEffectList = new LinkedList<SpellEffect>();
|
||||
|
||||
public void addBufferedEffect(SpellEffect effect)
|
||||
{
|
||||
|
|
|
@ -15,15 +15,12 @@ public class SpellParadigmMelee extends SpellParadigm
|
|||
|
||||
public SpellParadigmMelee()
|
||||
{
|
||||
this.entityEffectList = new ArrayList();
|
||||
this.worldEffectList = new ArrayList();
|
||||
this.entityEffectList = new ArrayList<IMeleeSpellEntityEffect>();
|
||||
this.worldEffectList = new ArrayList<IMeleeSpellWorldEffect>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enhanceParadigm(SpellEnhancement enh)
|
||||
{
|
||||
|
||||
}
|
||||
public void enhanceParadigm(SpellEnhancement enh) {}
|
||||
|
||||
@Override
|
||||
public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack)
|
||||
|
|
|
@ -25,8 +25,8 @@ public class SpellParadigmProjectile extends SpellParadigm
|
|||
this.damageSource = DamageSource.generic;
|
||||
this.damage = 1;
|
||||
this.cost = 0;
|
||||
this.impactList = new ArrayList();
|
||||
this.updateEffectList = new ArrayList();
|
||||
this.impactList = new ArrayList<IProjectileImpactEffect>();
|
||||
this.updateEffectList = new ArrayList<IProjectileUpdateEffect>();
|
||||
this.penetration = false;
|
||||
this.ricochetMax = 0;
|
||||
this.isSilkTouch = false;
|
||||
|
|
|
@ -14,14 +14,11 @@ public class SpellParadigmSelf extends SpellParadigm
|
|||
|
||||
public SpellParadigmSelf()
|
||||
{
|
||||
selfSpellEffectList = new ArrayList();
|
||||
selfSpellEffectList = new ArrayList<ISelfSpellEffect>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enhanceParadigm(SpellEnhancement enh)
|
||||
{
|
||||
|
||||
}
|
||||
public void enhanceParadigm(SpellEnhancement enh) {}
|
||||
|
||||
@Override
|
||||
public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack)
|
||||
|
|
|
@ -49,31 +49,31 @@ public class SpellParadigmTool extends SpellParadigm
|
|||
|
||||
public SpellParadigmTool()
|
||||
{
|
||||
this.leftClickEffectList = new LinkedList();
|
||||
this.rightClickEffectList = new LinkedList();
|
||||
this.toolUpdateEffectList = new LinkedList();
|
||||
this.toolSummonEffectList = new LinkedList();
|
||||
this.toolBanishEffectList = new LinkedList();
|
||||
this.breakBlockEffectList = new LinkedList();
|
||||
this.itemManipulatorEffectList = new LinkedList();
|
||||
this.digAreaEffectList = new LinkedList();
|
||||
this.specialDamageEffectList = new LinkedList();
|
||||
this.durationHash = new HashMap();
|
||||
this.leftClickEffectList = new LinkedList<ILeftClickEffect>();
|
||||
this.rightClickEffectList = new LinkedList<IRightClickEffect>();
|
||||
this.toolUpdateEffectList = new LinkedList<IToolUpdateEffect>();
|
||||
this.toolSummonEffectList = new LinkedList<IOnSummonTool>();
|
||||
this.toolBanishEffectList = new LinkedList<IOnBanishTool>();
|
||||
this.breakBlockEffectList = new LinkedList<IOnBreakBlock>();
|
||||
this.itemManipulatorEffectList = new LinkedList<IItemManipulator>();
|
||||
this.digAreaEffectList = new LinkedList<IDigAreaEffect>();
|
||||
this.specialDamageEffectList = new LinkedList<ISpecialDamageEffect>();
|
||||
this.durationHash = new HashMap<String, Integer>();
|
||||
|
||||
this.toolInfoString = new HashMap();
|
||||
this.critChanceHash = new HashMap();
|
||||
this.toolInfoString = new HashMap<String, String>();
|
||||
this.critChanceHash = new HashMap<String, Float>();
|
||||
|
||||
this.harvestLevel = new HashMap();
|
||||
this.harvestLevel = new HashMap<String, Integer>();
|
||||
this.harvestLevel.put("pickaxe", -1);
|
||||
this.harvestLevel.put("shovel", -1);
|
||||
this.harvestLevel.put("axe", -1);
|
||||
|
||||
this.digSpeed = new HashMap();
|
||||
this.digSpeed = new HashMap<String, Float>();
|
||||
this.digSpeed.put("pickaxe", 1.0f);
|
||||
this.digSpeed.put("shovel", 1.0f);
|
||||
this.digSpeed.put("axe", 1.0f);
|
||||
|
||||
this.maxDamageHash = new HashMap();
|
||||
this.maxDamageHash = new HashMap<String, Float>();
|
||||
this.maxDamageHash.put("default", 5.0f);
|
||||
|
||||
this.fortuneLevel = 0;
|
||||
|
@ -356,8 +356,7 @@ public class SpellParadigmTool extends SpellParadigm
|
|||
|
||||
for (IItemManipulator eff : this.itemManipulatorEffectList)
|
||||
{
|
||||
List<ItemStack> newHeldList = eff.handleItemsOnBlockBroken(toolStack, heldList);
|
||||
heldList = newHeldList;
|
||||
heldList = eff.handleItemsOnBlockBroken(toolStack, heldList);
|
||||
}
|
||||
|
||||
return heldList;
|
||||
|
@ -465,7 +464,7 @@ public class SpellParadigmTool extends SpellParadigm
|
|||
|
||||
public float getAddedDamageForEntity(Entity entity)
|
||||
{
|
||||
HashMap<String, Float> hash = new HashMap();
|
||||
HashMap<String, Float> hash = new HashMap<String, Float>();
|
||||
|
||||
for (ISpecialDamageEffect effect : this.specialDamageEffectList)
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.util.List;
|
|||
|
||||
public class SummoningRegistry
|
||||
{
|
||||
public static List<SummoningRegistryComponent> summoningList = new ArrayList();
|
||||
public static List<SummoningRegistryComponent> summoningList = new ArrayList<SummoningRegistryComponent>();
|
||||
|
||||
public static void registerSummon(SummoningHelper s, ItemStack[] ring1, ItemStack[] ring2, ItemStack[] ring3, int amountUsed, int bloodOrbLevel)
|
||||
{
|
||||
|
|
|
@ -11,9 +11,4 @@ public class BlockRenderer
|
|||
{
|
||||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation("alchemicalwizardry:" + block.getUnlocalizedName().substring(5), "inventory"));
|
||||
}
|
||||
|
||||
public static void registerBlocks()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazooka
|
|||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityMeteor;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.holding.ScrollHelper;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderAlchemicCalcinator;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderAlchemicalCalcinator;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderConduit;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderCrystalBelljar;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderMasterStone;
|
||||
|
@ -52,9 +52,8 @@ import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellEffectBlock
|
|||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellEnhancementBlock;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellModifierBlock;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellParadigmBlock;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderWritingTable;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.ShaderHelper;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.TEAltarRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderChemistrySet;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderAltar;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAlchemicalCalcinatorItemRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAltarItemRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEBellJarItemRenderer;
|
||||
|
@ -149,10 +148,10 @@ public class ClientProxy extends CommonProxy
|
|||
|
||||
MinecraftForge.EVENT_BUS.register(new RitualDivinerRender());
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new TEAltarRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new RenderAltar());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEPedestal.class, new RenderPedestal());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEPlinth.class, new RenderPlinth());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEChemistrySet.class, new RenderWritingTable());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEChemistrySet.class, new RenderChemistrySet());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEConduit.class, new RenderConduit());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TESpellEffectBlock.class, new RenderSpellEffectBlock());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TESpellEnhancementBlock.class, new RenderSpellEnhancementBlock());
|
||||
|
@ -160,7 +159,7 @@ public class ClientProxy extends CommonProxy
|
|||
ClientRegistry.bindTileEntitySpecialRenderer(TESpellModifierBlock.class, new RenderSpellModifierBlock());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEReagentConduit.class, new RenderReagentConduit());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEMasterStone.class, new RenderMasterStone());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicalCalcinator.class, new RenderAlchemicCalcinator());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicalCalcinator.class, new RenderAlchemicalCalcinator());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEBelljar.class, new RenderCrystalBelljar());
|
||||
|
||||
//Item Renderer stuff
|
||||
|
@ -181,7 +180,7 @@ public class ClientProxy extends CommonProxy
|
|||
}
|
||||
|
||||
@Override
|
||||
public void InitRendering()
|
||||
public void initRendering()
|
||||
{
|
||||
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAltar), new TEAltarItemRenderer());
|
||||
}
|
||||
|
|
|
@ -9,9 +9,7 @@ import net.minecraftforge.fml.client.IModGuiFactory;
|
|||
public class ConfigGuiFactory implements IModGuiFactory {
|
||||
|
||||
@Override
|
||||
public void initialize(Minecraft minecraftInstance) {
|
||||
|
||||
}
|
||||
public void initialize(Minecraft minecraftInstance) {}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiScreen> mainConfigGuiClass() {
|
||||
|
|
|
@ -1,178 +1,178 @@
|
|||
//package WayofTime.alchemicalWizardry.client.nei;
|
||||
//
|
||||
//import static WayofTime.alchemicalWizardry.client.nei.NEIConfig.bloodOrbs;
|
||||
//
|
||||
//import java.awt.Rectangle;
|
||||
//import java.util.ArrayList;
|
||||
//import java.util.List;
|
||||
//
|
||||
//import net.minecraft.client.Minecraft;
|
||||
//import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
//import net.minecraft.item.Item;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import net.minecraft.util.ResourceLocation;
|
||||
//import net.minecraft.util.StatCollector;
|
||||
//import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe;
|
||||
//import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
//import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
//import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiWritingTable;
|
||||
//import codechicken.nei.ItemList;
|
||||
//import codechicken.nei.NEIServerUtils;
|
||||
//import codechicken.nei.PositionedStack;
|
||||
//import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
//
|
||||
///**
|
||||
// * NEI Alchemy Recipe Handler by joshie *
|
||||
// */
|
||||
//public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||
// public class CachedAlchemyRecipe extends CachedRecipe {
|
||||
// public class BloodOrbs {
|
||||
// public PositionedStack stack;
|
||||
//
|
||||
// public BloodOrbs(ItemStack orb) {
|
||||
// this.stack = new PositionedStack(orb, 136, 47, false);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// ArrayList<BloodOrbs> orbs;
|
||||
// PositionedStack output;
|
||||
// List<PositionedStack> inputs;
|
||||
// int lp;
|
||||
//
|
||||
// public CachedAlchemyRecipe(AlchemyRecipe recipe, ItemStack orb) {
|
||||
// this(recipe);
|
||||
// this.orbs = new ArrayList<BloodOrbs>();
|
||||
// orbs.add(new BloodOrbs(orb));
|
||||
// }
|
||||
//
|
||||
// public CachedAlchemyRecipe(AlchemyRecipe recipe) {
|
||||
// List<PositionedStack> inputs = new ArrayList<PositionedStack>();
|
||||
// ItemStack[] stacks = recipe.getRecipe();
|
||||
// if (stacks.length > 0) inputs.add(new PositionedStack(stacks[0], 76, 3));
|
||||
// if (stacks.length > 1) inputs.add(new PositionedStack(stacks[1], 51, 19));
|
||||
// if (stacks.length > 2) inputs.add(new PositionedStack(stacks[2], 101, 19));
|
||||
// if (stacks.length > 3) inputs.add(new PositionedStack(stacks[3], 64, 47));
|
||||
// if (stacks.length > 4) inputs.add(new PositionedStack(stacks[4], 88, 47));
|
||||
// this.inputs = inputs;
|
||||
// this.output = new PositionedStack(recipe.getResult(), 76, 25);
|
||||
// this.lp = recipe.getAmountNeeded() * 100;
|
||||
// this.orbs = new ArrayList<BloodOrbs>();
|
||||
// for (Item orb : bloodOrbs) {
|
||||
// if (((IBloodOrb) orb).getOrbLevel() >= recipe.getOrbLevel()) {
|
||||
// orbs.add(new BloodOrbs(new ItemStack(orb)));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public List<PositionedStack> getIngredients() {
|
||||
// return inputs;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public PositionedStack getResult() {
|
||||
// return output;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public PositionedStack getOtherStack() {
|
||||
// if (orbs == null || orbs.size() <= 0) return null;
|
||||
// return orbs.get((cycleticks / 48) % orbs.size()).stack;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public TemplateRecipeHandler newInstance() {
|
||||
// for (ItemStack item : ItemList.items) {
|
||||
// if (item != null && item.getItem() instanceof IBloodOrb) {
|
||||
// bloodOrbs.add(item.getItem());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return super.newInstance();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getOverlayIdentifier() {
|
||||
// return "alchemicalwizardry.alchemy";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadTransferRects() {
|
||||
// transferRects.add(new RecipeTransferRect(new Rectangle(134, 22, 16, 24), "alchemicalwizardry.alchemy"));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Class<? extends GuiContainer> getGuiClass() {
|
||||
// return GuiWritingTable.class;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
// if (outputId.equals("alchemicalwizardry.alchemy") && getClass() == NEIAlchemyRecipeHandler.class) {
|
||||
// for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) {
|
||||
// if (recipe.getResult() != null) arecipes.add(new CachedAlchemyRecipe(recipe));
|
||||
// }
|
||||
// } else {
|
||||
// super.loadCraftingRecipes(outputId, results);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadCraftingRecipes(ItemStack result) {
|
||||
// for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) {
|
||||
// if (recipe == null) continue;
|
||||
// if (NEIServerUtils.areStacksSameTypeCrafting(result, recipe.getResult())) {
|
||||
// arecipes.add(new CachedAlchemyRecipe(recipe));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadUsageRecipes(ItemStack ingredient) {
|
||||
// if (ingredient.getItem() instanceof IBloodOrb) {
|
||||
// for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) {
|
||||
// if (recipe == null) continue;
|
||||
// if (((IBloodOrb) ingredient.getItem()).getOrbLevel() >= recipe.getOrbLevel()) {
|
||||
// arecipes.add(new CachedAlchemyRecipe(recipe, ingredient));
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) {
|
||||
// if (recipe == null) continue;
|
||||
// ItemStack[] stacks = recipe.getRecipe();
|
||||
// for (ItemStack stack : stacks) {
|
||||
// if (NEIServerUtils.areStacksSameTypeCrafting(stack, ingredient)) {
|
||||
// arecipes.add(new CachedAlchemyRecipe(recipe));
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void drawExtras(int id) {
|
||||
// CachedAlchemyRecipe cache = (CachedAlchemyRecipe) arecipes.get(id);
|
||||
// Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + cache.lp + "LP", getLPX(cache.lp), 34, 0);
|
||||
// }
|
||||
//
|
||||
// public int getLPX(int lp) {
|
||||
// if (lp < 10) return 122;
|
||||
// else if (lp < 100) return 122;
|
||||
// else if (lp < 1000) return 130;
|
||||
// else if (lp < 10000) return 127;
|
||||
// else if (lp < 100000) return 124;
|
||||
// return 122;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getRecipeName() {
|
||||
// return StatCollector.translateToLocal("tile.blockWritingTable.name");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getGuiTexture() {
|
||||
// return new ResourceLocation("alchemicalwizardry", "gui/nei/alchemy.png").toString();
|
||||
// }
|
||||
//}
|
||||
package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.client.nei.NEIConfig.bloodOrbs;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiChemistrySet;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import codechicken.nei.ItemList;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
|
||||
/**
|
||||
* NEI Alchemy Recipe Handler by joshie *
|
||||
*/
|
||||
public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||
public class CachedAlchemyRecipe extends CachedRecipe {
|
||||
public class BloodOrbs {
|
||||
public PositionedStack stack;
|
||||
|
||||
public BloodOrbs(ItemStack orb) {
|
||||
this.stack = new PositionedStack(orb, 136, 47, false);
|
||||
}
|
||||
}
|
||||
|
||||
ArrayList<BloodOrbs> orbs;
|
||||
PositionedStack output;
|
||||
List<PositionedStack> inputs;
|
||||
int lp;
|
||||
|
||||
public CachedAlchemyRecipe(AlchemyRecipe recipe, ItemStack orb) {
|
||||
this(recipe);
|
||||
this.orbs = new ArrayList<BloodOrbs>();
|
||||
orbs.add(new BloodOrbs(orb));
|
||||
}
|
||||
|
||||
public CachedAlchemyRecipe(AlchemyRecipe recipe) {
|
||||
List<PositionedStack> inputs = new ArrayList<PositionedStack>();
|
||||
ItemStack[] stacks = recipe.getRecipe();
|
||||
if (stacks.length > 0) inputs.add(new PositionedStack(stacks[0], 76, 3));
|
||||
if (stacks.length > 1) inputs.add(new PositionedStack(stacks[1], 51, 19));
|
||||
if (stacks.length > 2) inputs.add(new PositionedStack(stacks[2], 101, 19));
|
||||
if (stacks.length > 3) inputs.add(new PositionedStack(stacks[3], 64, 47));
|
||||
if (stacks.length > 4) inputs.add(new PositionedStack(stacks[4], 88, 47));
|
||||
this.inputs = inputs;
|
||||
this.output = new PositionedStack(recipe.getResult(), 76, 25);
|
||||
this.lp = recipe.getAmountNeeded() * 100;
|
||||
this.orbs = new ArrayList<BloodOrbs>();
|
||||
for (Item orb : bloodOrbs) {
|
||||
if (((IBloodOrb) orb).getOrbLevel() >= recipe.getOrbLevel()) {
|
||||
orbs.add(new BloodOrbs(new ItemStack(orb)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients() {
|
||||
return inputs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionedStack getResult() {
|
||||
return output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionedStack getOtherStack() {
|
||||
if (orbs == null || orbs.size() <= 0) return null;
|
||||
return orbs.get((cycleticks / 48) % orbs.size()).stack;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemplateRecipeHandler newInstance() {
|
||||
for (ItemStack item : ItemList.items) {
|
||||
if (item != null && item.getItem() instanceof IBloodOrb) {
|
||||
bloodOrbs.add(item.getItem());
|
||||
}
|
||||
}
|
||||
|
||||
return super.newInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOverlayIdentifier() {
|
||||
return "alchemicalwizardry.alchemy";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(134, 22, 16, 24), "alchemicalwizardry.alchemy"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiChemistrySet.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if (outputId.equals("alchemicalwizardry.alchemy") && getClass() == NEIAlchemyRecipeHandler.class) {
|
||||
for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) {
|
||||
if (recipe.getResult() != null) arecipes.add(new CachedAlchemyRecipe(recipe));
|
||||
}
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) {
|
||||
if (recipe == null) continue;
|
||||
if (NEIServerUtils.areStacksSameTypeCrafting(result, recipe.getResult())) {
|
||||
arecipes.add(new CachedAlchemyRecipe(recipe));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
if (ingredient.getItem() instanceof IBloodOrb) {
|
||||
for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) {
|
||||
if (recipe == null) continue;
|
||||
if (((IBloodOrb) ingredient.getItem()).getOrbLevel() >= recipe.getOrbLevel()) {
|
||||
arecipes.add(new CachedAlchemyRecipe(recipe, ingredient));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) {
|
||||
if (recipe == null) continue;
|
||||
ItemStack[] stacks = recipe.getRecipe();
|
||||
for (ItemStack stack : stacks) {
|
||||
if (NEIServerUtils.areStacksSameTypeCrafting(stack, ingredient)) {
|
||||
arecipes.add(new CachedAlchemyRecipe(recipe));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(int id) {
|
||||
CachedAlchemyRecipe cache = (CachedAlchemyRecipe) arecipes.get(id);
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + cache.lp + "LP", getLPX(cache.lp), 34, 0);
|
||||
}
|
||||
|
||||
public int getLPX(int lp) {
|
||||
if (lp < 10) return 122;
|
||||
else if (lp < 100) return 122;
|
||||
else if (lp < 1000) return 130;
|
||||
else if (lp < 10000) return 127;
|
||||
else if (lp < 100000) return 124;
|
||||
return 122;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return StatCollector.translateToLocal("tile.blockWritingTable.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return new ResourceLocation("alchemicalwizardry", "gui/nei/alchemy.png").toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,187 +1,187 @@
|
|||
//package WayofTime.alchemicalWizardry.client.nei;
|
||||
//
|
||||
//import java.awt.Dimension;
|
||||
//import java.awt.Point;
|
||||
//import java.awt.Rectangle;
|
||||
//import java.lang.reflect.Field;
|
||||
//import java.util.List;
|
||||
//
|
||||
//import net.minecraft.client.Minecraft;
|
||||
//import net.minecraft.client.gui.ScaledResolution;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import net.minecraft.util.ResourceLocation;
|
||||
//import net.minecraft.util.StatCollector;
|
||||
//
|
||||
//import org.lwjgl.input.Mouse;
|
||||
//
|
||||
//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe;
|
||||
//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||
//import codechicken.nei.NEIServerUtils;
|
||||
//import codechicken.nei.PositionedStack;
|
||||
//import codechicken.nei.recipe.GuiRecipe;
|
||||
//import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
//
|
||||
///**
|
||||
// * NEI Altar Recipe Handler by joshie *
|
||||
// */
|
||||
//public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
|
||||
// public class CachedAltarRecipe extends CachedRecipe {
|
||||
// PositionedStack input;
|
||||
//// PositionedStack inputItems;
|
||||
// PositionedStack output;
|
||||
// int tier, lp_amount, consumption, drain;
|
||||
//
|
||||
// public CachedAltarRecipe(AltarRecipe recipe) {
|
||||
//// inputItems = new PositionedStack(recipe.input, 38, 2, false);
|
||||
// input = new PositionedStack(recipe.requiredItem, 38, 2, false);
|
||||
// output = new PositionedStack(recipe.result, 132, 32, false);
|
||||
// tier = recipe.minTier;
|
||||
// lp_amount = recipe.liquidRequired;
|
||||
// consumption = recipe.consumptionRate;
|
||||
// drain = recipe.drainRate;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public PositionedStack getIngredient() {
|
||||
// return input;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public PositionedStack getResult() {
|
||||
// return output;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
// if (outputId.equals("alchemicalwizardry.altar") && getClass() == NEIAltarRecipeHandler.class) {
|
||||
// for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) {
|
||||
// if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe));
|
||||
// }
|
||||
// } else {
|
||||
// super.loadCraftingRecipes(outputId, results);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadCraftingRecipes(ItemStack result) {
|
||||
// for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) {
|
||||
// if(NEIServerUtils.areStacksSameTypeCrafting(recipe.result, result)) {
|
||||
// if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadUsageRecipes(ItemStack ingredient) {
|
||||
// for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) {
|
||||
// if(NEIServerUtils.areStacksSameTypeCrafting(recipe.requiredItem, ingredient)) {
|
||||
// if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //Mouse Position helper
|
||||
// public Point getMouse(int width, int height) {
|
||||
// Point mousepos = getMousePosition();
|
||||
// int guiLeft = (width - 176) / 2;
|
||||
// int guiTop = (height - 166) / 2;
|
||||
// Point relMouse = new Point(mousepos.x - guiLeft, mousepos.y - guiTop);
|
||||
// return relMouse;
|
||||
// }
|
||||
//
|
||||
// //width helper, getting width normal way hates me on compile
|
||||
// public int getGuiWidth(GuiRecipe gui) {
|
||||
// try {
|
||||
// Field f = gui.getClass().getField("width");
|
||||
// return (Integer) f.get(gui);
|
||||
// } catch (NoSuchFieldException e) {
|
||||
// try {
|
||||
// Field f = gui.getClass().getField("field_146294_l");
|
||||
// return (Integer) f.get(gui);
|
||||
// } catch (Exception e2) {
|
||||
// return 0;
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// return 0;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //height helper, getting height normal way hates me on compile
|
||||
// public int getGuiHeight(GuiRecipe gui) {
|
||||
// try {
|
||||
// Field f = gui.getClass().getField("height");
|
||||
// return (Integer) f.get(gui);
|
||||
// } catch (NoSuchFieldException e) {
|
||||
// try {
|
||||
// Field f = gui.getClass().getField("field_146295_m");
|
||||
// return (Integer) f.get(gui);
|
||||
// } catch (Exception e2) {
|
||||
// return 0;
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// return 0;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void drawExtras(int id) {
|
||||
// CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id);
|
||||
// Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + StatCollector.translateToLocal("bm.string.tier") + ": " + recipe.tier, 78, 5, 0);
|
||||
// Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + "LP: " + recipe.lp_amount, 78, 15, 0);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public List<String> handleTooltip(GuiRecipe gui, List<String> currenttip, int id) {
|
||||
// currenttip = super.handleTooltip(gui, currenttip, id);
|
||||
// Point mouse = getMouse(getGuiWidth(gui), getGuiHeight(gui));
|
||||
// CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id);
|
||||
// int yLow = id % 2 == 0 ? 38 : 102;
|
||||
// int yHigh = id % 2 == 0 ? 72 : 136;
|
||||
// if(mouse.x >= 19 && mouse.x <= 80 && mouse.y >= yLow && mouse.y <= yHigh) {
|
||||
// currenttip.add(StatCollector.translateToLocal("bm.string.consume") + ": " + recipe.consumption + "LP/t");
|
||||
// currenttip.add(StatCollector.translateToLocal("bm.string.drain") + ": " + recipe.drain + "LP/t");
|
||||
// }
|
||||
//
|
||||
// return currenttip;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getOverlayIdentifier() {
|
||||
// return "altarrecipes";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadTransferRects() {
|
||||
// transferRects.add(new RecipeTransferRect(new Rectangle(90, 32, 22, 16), "alchemicalwizardry.altar"));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getRecipeName() {
|
||||
// return " " + StatCollector.translateToLocal("tile.bloodAltar.name");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getGuiTexture() {
|
||||
// return new ResourceLocation("alchemicalwizardry", "gui/nei/altar.png").toString();
|
||||
// }
|
||||
//
|
||||
// public static Point getMousePosition() {
|
||||
// Dimension size = displaySize();
|
||||
// Dimension res = displayRes();
|
||||
// return new Point(Mouse.getX() * size.width / res.width, size.height - Mouse.getY() * size.height / res.height - 1);
|
||||
// }
|
||||
//
|
||||
// public static Dimension displaySize() {
|
||||
// Minecraft mc = Minecraft.getMinecraft();
|
||||
// ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
|
||||
// return new Dimension(res.getScaledWidth(), res.getScaledHeight());
|
||||
// }
|
||||
//
|
||||
// public static Dimension displayRes() {
|
||||
// Minecraft mc = Minecraft.getMinecraft();
|
||||
// return new Dimension(mc.displayWidth, mc.displayHeight);
|
||||
// }
|
||||
//}
|
||||
package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.GuiRecipe;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
|
||||
/**
|
||||
* NEI Altar Recipe Handler by joshie *
|
||||
*/
|
||||
public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
|
||||
public class CachedAltarRecipe extends CachedRecipe {
|
||||
PositionedStack input;
|
||||
// PositionedStack inputItems;
|
||||
PositionedStack output;
|
||||
int tier, lp_amount, consumption, drain;
|
||||
|
||||
public CachedAltarRecipe(AltarRecipe recipe) {
|
||||
// inputItems = new PositionedStack(recipe.input, 38, 2, false);
|
||||
input = new PositionedStack(recipe.requiredItem, 38, 2, false);
|
||||
output = new PositionedStack(recipe.result, 132, 32, false);
|
||||
tier = recipe.minTier;
|
||||
lp_amount = recipe.liquidRequired;
|
||||
consumption = recipe.consumptionRate;
|
||||
drain = recipe.drainRate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionedStack getIngredient() {
|
||||
return input;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionedStack getResult() {
|
||||
return output;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if (outputId.equals("alchemicalwizardry.altar") && getClass() == NEIAltarRecipeHandler.class) {
|
||||
for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) {
|
||||
if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe));
|
||||
}
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) {
|
||||
if(NEIServerUtils.areStacksSameTypeCrafting(recipe.result, result)) {
|
||||
if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) {
|
||||
if(NEIServerUtils.areStacksSameTypeCrafting(recipe.requiredItem, ingredient)) {
|
||||
if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Mouse Position helper
|
||||
public Point getMouse(int width, int height) {
|
||||
Point mousepos = getMousePosition();
|
||||
int guiLeft = (width - 176) / 2;
|
||||
int guiTop = (height - 166) / 2;
|
||||
Point relMouse = new Point(mousepos.x - guiLeft, mousepos.y - guiTop);
|
||||
return relMouse;
|
||||
}
|
||||
|
||||
//width helper, getting width normal way hates me on compile
|
||||
public int getGuiWidth(GuiRecipe gui) {
|
||||
try {
|
||||
Field f = gui.getClass().getField("width");
|
||||
return (Integer) f.get(gui);
|
||||
} catch (NoSuchFieldException e) {
|
||||
try {
|
||||
Field f = gui.getClass().getField("field_146294_l");
|
||||
return (Integer) f.get(gui);
|
||||
} catch (Exception e2) {
|
||||
return 0;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
//height helper, getting height normal way hates me on compile
|
||||
public int getGuiHeight(GuiRecipe gui) {
|
||||
try {
|
||||
Field f = gui.getClass().getField("height");
|
||||
return (Integer) f.get(gui);
|
||||
} catch (NoSuchFieldException e) {
|
||||
try {
|
||||
Field f = gui.getClass().getField("field_146295_m");
|
||||
return (Integer) f.get(gui);
|
||||
} catch (Exception e2) {
|
||||
return 0;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(int id) {
|
||||
CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id);
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + StatCollector.translateToLocal("bm.string.tier") + ": " + recipe.tier, 78, 5, 0);
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + "LP: " + recipe.lp_amount, 78, 15, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> handleTooltip(GuiRecipe gui, List<String> currenttip, int id) {
|
||||
currenttip = super.handleTooltip(gui, currenttip, id);
|
||||
Point mouse = getMouse(getGuiWidth(gui), getGuiHeight(gui));
|
||||
CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id);
|
||||
int yLow = id % 2 == 0 ? 38 : 102;
|
||||
int yHigh = id % 2 == 0 ? 72 : 136;
|
||||
if(mouse.x >= 19 && mouse.x <= 80 && mouse.y >= yLow && mouse.y <= yHigh) {
|
||||
currenttip.add(StatCollector.translateToLocal("bm.string.consume") + ": " + recipe.consumption + "LP/t");
|
||||
currenttip.add(StatCollector.translateToLocal("bm.string.drain") + ": " + recipe.drain + "LP/t");
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOverlayIdentifier() {
|
||||
return "altarrecipes";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(90, 32, 22, 16), "alchemicalwizardry.altar"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return " " + StatCollector.translateToLocal("tile.bloodAltar.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return new ResourceLocation("alchemicalwizardry", "gui/nei/altar.png").toString();
|
||||
}
|
||||
|
||||
public static Point getMousePosition() {
|
||||
Dimension size = displaySize();
|
||||
Dimension res = displayRes();
|
||||
return new Point(Mouse.getX() * size.width / res.width, size.height - Mouse.getY() * size.height / res.height - 1);
|
||||
}
|
||||
|
||||
public static Dimension displaySize() {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
|
||||
return new Dimension(res.getScaledWidth(), res.getScaledHeight());
|
||||
}
|
||||
|
||||
public static Dimension displayRes() {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
return new Dimension(mc.displayWidth, mc.displayHeight);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,136 +1,136 @@
|
|||
//package WayofTime.alchemicalWizardry.client.nei;
|
||||
//
|
||||
//import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe;
|
||||
//import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
|
||||
//import codechicken.nei.NEIServerUtils;
|
||||
//import codechicken.nei.PositionedStack;
|
||||
//import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
//import net.minecraft.client.Minecraft;
|
||||
//import net.minecraft.client.gui.ScaledResolution;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import net.minecraft.util.ResourceLocation;
|
||||
//import org.lwjgl.input.Mouse;
|
||||
//
|
||||
//import java.awt.*;
|
||||
//
|
||||
///**
|
||||
// * Binding Ritual Handler by Arcaratus
|
||||
// */
|
||||
//public class NEIBindingRitualHandler extends TemplateRecipeHandler
|
||||
//{
|
||||
// public class CachedBindingRecipe extends CachedRecipe
|
||||
// {
|
||||
// PositionedStack input, output;
|
||||
//
|
||||
// public CachedBindingRecipe(BindingRecipe recipe)
|
||||
// {
|
||||
// input = new PositionedStack(recipe.requiredItem, 37, 21, false);
|
||||
// output = new PositionedStack(recipe.outputItem, 110, 21, false);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public PositionedStack getIngredient()
|
||||
// {
|
||||
// return input;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public PositionedStack getResult()
|
||||
// {
|
||||
// return output;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadCraftingRecipes(String outputId, Object... results)
|
||||
// {
|
||||
// if (outputId.equals("alchemicalwizardry.bindingritual") && getClass() == NEIBindingRitualHandler.class)
|
||||
// {
|
||||
// for (BindingRecipe recipe : BindingRegistry.bindingRecipes)
|
||||
// {
|
||||
// if (recipe != null && recipe.outputItem != null)
|
||||
// {
|
||||
// arecipes.add(new CachedBindingRecipe(recipe));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// super.loadCraftingRecipes(outputId, results);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadCraftingRecipes(ItemStack result)
|
||||
// {
|
||||
// for (BindingRecipe recipe: BindingRegistry.bindingRecipes)
|
||||
// {
|
||||
// if (NEIServerUtils.areStacksSameTypeCrafting(recipe.outputItem, result))
|
||||
// {
|
||||
// if (recipe != null && recipe.outputItem != null)
|
||||
// {
|
||||
// arecipes.add(new CachedBindingRecipe(recipe));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadUsageRecipes(ItemStack ingredient)
|
||||
// {
|
||||
// for (BindingRecipe recipe: BindingRegistry.bindingRecipes)
|
||||
// {
|
||||
// if (NEIServerUtils.areStacksSameTypeCrafting(recipe.requiredItem, ingredient))
|
||||
// {
|
||||
// if (recipe != null && recipe.outputItem != null)
|
||||
// {
|
||||
// arecipes.add(new CachedBindingRecipe(recipe));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getOverlayIdentifier()
|
||||
// {
|
||||
// return "alchemicalwizardry.bindingritual";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadTransferRects()
|
||||
// {
|
||||
// transferRects.add(new RecipeTransferRect(new Rectangle(68, 20, 22, 16), "alchemicalwizardry.bindingritual"));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getRecipeName()
|
||||
// {
|
||||
// return "Binding Ritual";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getGuiTexture()
|
||||
// {
|
||||
// return new ResourceLocation("alchemicalwizardry", "gui/nei/bindingRitual.png").toString();
|
||||
// }
|
||||
//
|
||||
// public static Point getMousePosition()
|
||||
// {
|
||||
// Dimension size = displaySize();
|
||||
// Dimension res = displayRes();
|
||||
// return new Point(Mouse.getX() * size.width / res.width, size.height - Mouse.getY() * size.height / res.height - 1);
|
||||
// }
|
||||
//
|
||||
// public static Dimension displaySize()
|
||||
// {
|
||||
// Minecraft mc = Minecraft.getMinecraft();
|
||||
// ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
|
||||
// return new Dimension(res.getScaledWidth(), res.getScaledHeight());
|
||||
// }
|
||||
//
|
||||
// public static Dimension displayRes()
|
||||
// {
|
||||
// Minecraft mc = Minecraft.getMinecraft();
|
||||
// return new Dimension(mc.displayWidth, mc.displayHeight);
|
||||
// }
|
||||
//}
|
||||
package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* Binding Ritual Handler by Arcaratus
|
||||
*/
|
||||
public class NEIBindingRitualHandler extends TemplateRecipeHandler
|
||||
{
|
||||
public class CachedBindingRecipe extends CachedRecipe
|
||||
{
|
||||
PositionedStack input, output;
|
||||
|
||||
public CachedBindingRecipe(BindingRecipe recipe)
|
||||
{
|
||||
input = new PositionedStack(recipe.requiredItem, 37, 21, false);
|
||||
output = new PositionedStack(recipe.outputItem, 110, 21, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionedStack getIngredient()
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionedStack getResult()
|
||||
{
|
||||
return output;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results)
|
||||
{
|
||||
if (outputId.equals("alchemicalwizardry.bindingritual") && getClass() == NEIBindingRitualHandler.class)
|
||||
{
|
||||
for (BindingRecipe recipe : BindingRegistry.bindingRecipes)
|
||||
{
|
||||
if (recipe != null && recipe.outputItem != null)
|
||||
{
|
||||
arecipes.add(new CachedBindingRecipe(recipe));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result)
|
||||
{
|
||||
for (BindingRecipe recipe: BindingRegistry.bindingRecipes)
|
||||
{
|
||||
if (NEIServerUtils.areStacksSameTypeCrafting(recipe.outputItem, result))
|
||||
{
|
||||
if (recipe != null && recipe.outputItem != null)
|
||||
{
|
||||
arecipes.add(new CachedBindingRecipe(recipe));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient)
|
||||
{
|
||||
for (BindingRecipe recipe: BindingRegistry.bindingRecipes)
|
||||
{
|
||||
if (NEIServerUtils.areStacksSameTypeCrafting(recipe.requiredItem, ingredient))
|
||||
{
|
||||
if (recipe != null && recipe.outputItem != null)
|
||||
{
|
||||
arecipes.add(new CachedBindingRecipe(recipe));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOverlayIdentifier()
|
||||
{
|
||||
return "alchemicalwizardry.bindingritual";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects()
|
||||
{
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(68, 20, 22, 16), "alchemicalwizardry.bindingritual"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName()
|
||||
{
|
||||
return "Binding Ritual";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture()
|
||||
{
|
||||
return new ResourceLocation("alchemicalwizardry", "gui/nei/bindingRitual.png").toString();
|
||||
}
|
||||
|
||||
public static Point getMousePosition()
|
||||
{
|
||||
Dimension size = displaySize();
|
||||
Dimension res = displayRes();
|
||||
return new Point(Mouse.getX() * size.width / res.width, size.height - Mouse.getY() * size.height / res.height - 1);
|
||||
}
|
||||
|
||||
public static Dimension displaySize()
|
||||
{
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
|
||||
return new Dimension(res.getScaledWidth(), res.getScaledHeight());
|
||||
}
|
||||
|
||||
public static Dimension displayRes()
|
||||
{
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
return new Dimension(mc.displayWidth, mc.displayHeight);
|
||||
}
|
||||
}
|
|
@ -1,142 +1,142 @@
|
|||
//package WayofTime.alchemicalWizardry.client.nei;
|
||||
//
|
||||
//import java.awt.Rectangle;
|
||||
//import java.util.ArrayList;
|
||||
//import java.util.List;
|
||||
//
|
||||
//import net.minecraft.item.Item;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import net.minecraft.item.crafting.CraftingManager;
|
||||
//import net.minecraft.item.crafting.IRecipe;
|
||||
//import net.minecraft.util.StatCollector;
|
||||
//import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe;
|
||||
//import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
//import codechicken.nei.NEIServerUtils;
|
||||
//import codechicken.nei.PositionedStack;
|
||||
//import codechicken.nei.recipe.ShapedRecipeHandler;
|
||||
//
|
||||
///**
|
||||
// * NEI Blood Orb Shaped Recipe Handler by joshie *
|
||||
// */
|
||||
//public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler {
|
||||
// public class CachedBloodOrbRecipe extends CachedShapedRecipe {
|
||||
// public CachedBloodOrbRecipe(int width, int height, Object[] items, ItemStack out) {
|
||||
// super(width, height, items, out);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void setIngredients(int width, int height, Object[] items) {
|
||||
// for (int x = 0; x < width; x++) {
|
||||
// for (int y = 0; y < height; y++) {
|
||||
// if (items[y * width + x] == null)
|
||||
// continue;
|
||||
//
|
||||
// Object o = items[y * width + x];
|
||||
// if (o instanceof ItemStack) {
|
||||
// PositionedStack stack = new PositionedStack(items[y * width + x], 25 + x * 18, 6 + y * 18, false);
|
||||
// stack.setMaxSize(1);
|
||||
// ingredients.add(stack);
|
||||
// } else if (o instanceof Integer) {
|
||||
// ArrayList<ItemStack> orbs = new ArrayList();
|
||||
// for (Item item : NEIConfig.bloodOrbs) {
|
||||
// if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) {
|
||||
// orbs.add(new ItemStack(item));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// PositionedStack stack = new PositionedStack(orbs, 25 + x * 18, 6 + y * 18, false);
|
||||
// stack.setMaxSize(1);
|
||||
// ingredients.add(stack);
|
||||
// }else if(o instanceof List)
|
||||
// {
|
||||
// PositionedStack stack = new PositionedStack(o, 25 + x * 18, 6 + y * 18, false);
|
||||
// stack.setMaxSize(1);
|
||||
// ingredients.add(stack);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
// if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapedHandler.class) {
|
||||
// for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
|
||||
// if (irecipe instanceof ShapedBloodOrbRecipe) {
|
||||
// CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe);
|
||||
// if (recipe == null)
|
||||
// continue;
|
||||
//
|
||||
// recipe.computeVisuals();
|
||||
// arecipes.add(recipe);
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// super.loadCraftingRecipes(outputId, results);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadCraftingRecipes(ItemStack result) {
|
||||
// for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
|
||||
// if (irecipe instanceof ShapedBloodOrbRecipe) {
|
||||
// CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe);
|
||||
// if (recipe == null || !NEIServerUtils.areStacksSameTypeCrafting(recipe.result.item, result))
|
||||
// continue;
|
||||
//
|
||||
// recipe.computeVisuals();
|
||||
// arecipes.add(recipe);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadUsageRecipes(ItemStack ingredient) {
|
||||
// for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
|
||||
// CachedShapedRecipe recipe = null;
|
||||
// if (irecipe instanceof ShapedBloodOrbRecipe)
|
||||
// recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe);
|
||||
//
|
||||
// if (recipe == null || !recipe.contains(recipe.ingredients, ingredient.getItem()))
|
||||
// continue;
|
||||
//
|
||||
// recipe.computeVisuals();
|
||||
// if (recipe.contains(recipe.ingredients, ingredient)) {
|
||||
// recipe.setIngredientPermutation(recipe.ingredients, ingredient);
|
||||
// arecipes.add(recipe);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private CachedBloodOrbRecipe forgeShapedRecipe(ShapedBloodOrbRecipe recipe) {
|
||||
// int width;
|
||||
// int height;
|
||||
// try {
|
||||
// width = recipe.width;
|
||||
// height = recipe.height;
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// Object[] items = recipe.getInput();
|
||||
// for (Object item : items)
|
||||
// if (item instanceof List && ((List<?>) item).isEmpty())// ore
|
||||
// // handler,
|
||||
// // no ores
|
||||
// return null;
|
||||
//
|
||||
// return new CachedBloodOrbRecipe(width, height, items, recipe.getRecipeOutput());
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadTransferRects() {
|
||||
// transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting"));
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @Override
|
||||
// public String getRecipeName() {
|
||||
// return StatCollector.translateToLocal("bm.string.crafting.orb.shaped");
|
||||
// }
|
||||
//}
|
||||
package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.ShapedRecipeHandler;
|
||||
|
||||
/**
|
||||
* NEI Blood Orb Shaped Recipe Handler by joshie *
|
||||
*/
|
||||
public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler {
|
||||
public class CachedBloodOrbRecipe extends CachedShapedRecipe {
|
||||
public CachedBloodOrbRecipe(int width, int height, Object[] items, ItemStack out) {
|
||||
super(width, height, items, out);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIngredients(int width, int height, Object[] items) {
|
||||
for (int x = 0; x < width; x++) {
|
||||
for (int y = 0; y < height; y++) {
|
||||
if (items[y * width + x] == null)
|
||||
continue;
|
||||
|
||||
Object o = items[y * width + x];
|
||||
if (o instanceof ItemStack) {
|
||||
PositionedStack stack = new PositionedStack(items[y * width + x], 25 + x * 18, 6 + y * 18, false);
|
||||
stack.setMaxSize(1);
|
||||
ingredients.add(stack);
|
||||
} else if (o instanceof Integer) {
|
||||
ArrayList<ItemStack> orbs = new ArrayList();
|
||||
for (Item item : NEIConfig.bloodOrbs) {
|
||||
if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) {
|
||||
orbs.add(new ItemStack(item));
|
||||
}
|
||||
}
|
||||
|
||||
PositionedStack stack = new PositionedStack(orbs, 25 + x * 18, 6 + y * 18, false);
|
||||
stack.setMaxSize(1);
|
||||
ingredients.add(stack);
|
||||
}else if(o instanceof List)
|
||||
{
|
||||
PositionedStack stack = new PositionedStack(o, 25 + x * 18, 6 + y * 18, false);
|
||||
stack.setMaxSize(1);
|
||||
ingredients.add(stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapedHandler.class) {
|
||||
for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
|
||||
if (irecipe instanceof ShapedBloodOrbRecipe) {
|
||||
CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe);
|
||||
if (recipe == null)
|
||||
continue;
|
||||
|
||||
recipe.computeVisuals();
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
|
||||
if (irecipe instanceof ShapedBloodOrbRecipe) {
|
||||
CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe);
|
||||
if (recipe == null || !NEIServerUtils.areStacksSameTypeCrafting(recipe.result.item, result))
|
||||
continue;
|
||||
|
||||
recipe.computeVisuals();
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
|
||||
CachedShapedRecipe recipe = null;
|
||||
if (irecipe instanceof ShapedBloodOrbRecipe)
|
||||
recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe);
|
||||
|
||||
if (recipe == null || !recipe.contains(recipe.ingredients, ingredient.getItem()))
|
||||
continue;
|
||||
|
||||
recipe.computeVisuals();
|
||||
if (recipe.contains(recipe.ingredients, ingredient)) {
|
||||
recipe.setIngredientPermutation(recipe.ingredients, ingredient);
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private CachedBloodOrbRecipe forgeShapedRecipe(ShapedBloodOrbRecipe recipe) {
|
||||
int width;
|
||||
int height;
|
||||
try {
|
||||
width = recipe.width;
|
||||
height = recipe.height;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
|
||||
Object[] items = recipe.getInput();
|
||||
for (Object item : items)
|
||||
if (item instanceof List && ((List<?>) item).isEmpty())// ore
|
||||
// handler,
|
||||
// no ores
|
||||
return null;
|
||||
|
||||
return new CachedBloodOrbRecipe(width, height, items, recipe.getRecipeOutput());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting"));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return StatCollector.translateToLocal("bm.string.crafting.orb.shaped");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,135 +1,135 @@
|
|||
//package WayofTime.alchemicalWizardry.client.nei;
|
||||
//
|
||||
//import java.awt.Rectangle;
|
||||
//import java.util.ArrayList;
|
||||
//import java.util.List;
|
||||
//
|
||||
//import net.minecraft.item.Item;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import net.minecraft.item.crafting.CraftingManager;
|
||||
//import net.minecraft.item.crafting.IRecipe;
|
||||
//import net.minecraft.util.StatCollector;
|
||||
//import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe;
|
||||
//import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
//import codechicken.nei.NEIServerUtils;
|
||||
//import codechicken.nei.PositionedStack;
|
||||
//import codechicken.nei.recipe.ShapelessRecipeHandler;
|
||||
//
|
||||
///**
|
||||
// * NEI Blood Orb Shapeless Recipe Handler by joshie *
|
||||
// */
|
||||
//public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler {
|
||||
// public class CachedBloodOrbRecipe extends CachedShapelessRecipe {
|
||||
// public CachedBloodOrbRecipe(ArrayList<Object> items, ItemStack recipeOutput) {
|
||||
// super(items, recipeOutput);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void setIngredients(List<?> items) {
|
||||
// ingredients.clear();
|
||||
// for (int ingred = 0; ingred < items.size(); ingred++) {
|
||||
// Object o = items.get(ingred);
|
||||
// if (o instanceof ItemStack) {
|
||||
// PositionedStack stack = new PositionedStack(items.get(ingred), 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18);
|
||||
// stack.setMaxSize(1);
|
||||
// ingredients.add(stack);
|
||||
// } else if (o instanceof Integer) {
|
||||
// ArrayList<ItemStack> orbs = new ArrayList();
|
||||
// for (Item item : NEIConfig.bloodOrbs) {
|
||||
// if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) {
|
||||
// orbs.add(new ItemStack(item));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// PositionedStack stack = new PositionedStack(orbs, 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18);
|
||||
// stack.setMaxSize(1);
|
||||
// ingredients.add(stack);
|
||||
// }else if(o instanceof List)
|
||||
// {
|
||||
// PositionedStack stack = new PositionedStack(o, 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18);
|
||||
// stack.setMaxSize(1);
|
||||
// ingredients.add(stack);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
// if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapelessHandler.class) {
|
||||
// List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
|
||||
// for (IRecipe irecipe : allrecipes) {
|
||||
// CachedBloodOrbRecipe recipe = null;
|
||||
// if (irecipe instanceof ShapelessBloodOrbRecipe)
|
||||
// recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe);
|
||||
//
|
||||
// if (recipe == null)
|
||||
// continue;
|
||||
//
|
||||
// arecipes.add(recipe);
|
||||
// }
|
||||
// } else {
|
||||
// super.loadCraftingRecipes(outputId, results);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadCraftingRecipes(ItemStack result) {
|
||||
// List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
|
||||
// for (IRecipe irecipe : allrecipes) {
|
||||
// if (NEIServerUtils.areStacksSameTypeCrafting(irecipe.getRecipeOutput(), result)) {
|
||||
// CachedBloodOrbRecipe recipe = null;
|
||||
// if (irecipe instanceof ShapelessBloodOrbRecipe)
|
||||
// recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe);
|
||||
//
|
||||
// if (recipe == null)
|
||||
// continue;
|
||||
//
|
||||
// arecipes.add(recipe);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadUsageRecipes(ItemStack ingredient) {
|
||||
// List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
|
||||
// for (IRecipe irecipe : allrecipes) {
|
||||
// CachedBloodOrbRecipe recipe = null;
|
||||
// if (irecipe instanceof ShapelessBloodOrbRecipe)
|
||||
// recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe);
|
||||
//
|
||||
// if (recipe == null)
|
||||
// continue;
|
||||
//
|
||||
// if (recipe.contains(recipe.ingredients, ingredient)) {
|
||||
// recipe.setIngredientPermutation(recipe.ingredients, ingredient);
|
||||
// arecipes.add(recipe);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public CachedBloodOrbRecipe forgeShapelessRecipe(ShapelessBloodOrbRecipe recipe) {
|
||||
// ArrayList<Object> items = recipe.getInput();
|
||||
//
|
||||
// for (Object item : items)
|
||||
// if (item instanceof List && ((List<?>) item).isEmpty())//ore handler, no ores
|
||||
// return null;
|
||||
//
|
||||
// return new CachedBloodOrbRecipe(items, recipe.getRecipeOutput());
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loadTransferRects() {
|
||||
// transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting"));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getOverlayIdentifier() {
|
||||
// return "crafting";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getRecipeName() {
|
||||
// return StatCollector.translateToLocal("bm.string.crafting.orb.shapeless");
|
||||
// }
|
||||
//}
|
||||
package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.ShapelessRecipeHandler;
|
||||
|
||||
/**
|
||||
* NEI Blood Orb Shapeless Recipe Handler by joshie *
|
||||
*/
|
||||
public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler {
|
||||
public class CachedBloodOrbRecipe extends CachedShapelessRecipe {
|
||||
public CachedBloodOrbRecipe(ArrayList<Object> items, ItemStack recipeOutput) {
|
||||
super(items, recipeOutput);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIngredients(List<?> items) {
|
||||
ingredients.clear();
|
||||
for (int ingred = 0; ingred < items.size(); ingred++) {
|
||||
Object o = items.get(ingred);
|
||||
if (o instanceof ItemStack) {
|
||||
PositionedStack stack = new PositionedStack(items.get(ingred), 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18);
|
||||
stack.setMaxSize(1);
|
||||
ingredients.add(stack);
|
||||
} else if (o instanceof Integer) {
|
||||
ArrayList<ItemStack> orbs = new ArrayList<ItemStack>();
|
||||
for (Item item : NEIConfig.bloodOrbs) {
|
||||
if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) {
|
||||
orbs.add(new ItemStack(item));
|
||||
}
|
||||
}
|
||||
|
||||
PositionedStack stack = new PositionedStack(orbs, 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18);
|
||||
stack.setMaxSize(1);
|
||||
ingredients.add(stack);
|
||||
}else if(o instanceof List)
|
||||
{
|
||||
PositionedStack stack = new PositionedStack(o, 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18);
|
||||
stack.setMaxSize(1);
|
||||
ingredients.add(stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapelessHandler.class) {
|
||||
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe irecipe : allrecipes) {
|
||||
CachedBloodOrbRecipe recipe = null;
|
||||
if (irecipe instanceof ShapelessBloodOrbRecipe)
|
||||
recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe);
|
||||
|
||||
if (recipe == null)
|
||||
continue;
|
||||
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe irecipe : allrecipes) {
|
||||
if (NEIServerUtils.areStacksSameTypeCrafting(irecipe.getRecipeOutput(), result)) {
|
||||
CachedBloodOrbRecipe recipe = null;
|
||||
if (irecipe instanceof ShapelessBloodOrbRecipe)
|
||||
recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe);
|
||||
|
||||
if (recipe == null)
|
||||
continue;
|
||||
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe irecipe : allrecipes) {
|
||||
CachedBloodOrbRecipe recipe = null;
|
||||
if (irecipe instanceof ShapelessBloodOrbRecipe)
|
||||
recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe);
|
||||
|
||||
if (recipe == null)
|
||||
continue;
|
||||
|
||||
if (recipe.contains(recipe.ingredients, ingredient)) {
|
||||
recipe.setIngredientPermutation(recipe.ingredients, ingredient);
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public CachedBloodOrbRecipe forgeShapelessRecipe(ShapelessBloodOrbRecipe recipe) {
|
||||
ArrayList<Object> items = recipe.getInput();
|
||||
|
||||
for (Object item : items)
|
||||
if (item instanceof List && ((List<?>) item).isEmpty())//ore handler, no ores
|
||||
return null;
|
||||
|
||||
return new CachedBloodOrbRecipe(items, recipe.getRecipeOutput());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOverlayIdentifier() {
|
||||
return "crafting";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return StatCollector.translateToLocal("bm.string.crafting.orb.shapeless");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,35 +1,36 @@
|
|||
//package WayofTime.alchemicalWizardry.client.nei;
|
||||
//
|
||||
//import java.util.ArrayList;
|
||||
//
|
||||
//import net.minecraft.item.Item;
|
||||
//import codechicken.nei.api.API;
|
||||
//import codechicken.nei.api.IConfigureNEI;
|
||||
//
|
||||
//public class NEIConfig implements IConfigureNEI {
|
||||
// public static ArrayList<Item> bloodOrbs = new ArrayList<Item>();
|
||||
//
|
||||
// @Override
|
||||
// public void loadConfig() {
|
||||
// API.registerRecipeHandler(new NEIAlchemyRecipeHandler());
|
||||
// API.registerUsageHandler(new NEIAlchemyRecipeHandler());
|
||||
// API.registerRecipeHandler(new NEIAltarRecipeHandler());
|
||||
// API.registerUsageHandler(new NEIAltarRecipeHandler());
|
||||
// API.registerRecipeHandler(new NEIBloodOrbShapedHandler());
|
||||
// API.registerUsageHandler(new NEIBloodOrbShapedHandler());
|
||||
// API.registerRecipeHandler(new NEIBloodOrbShapelessHandler());
|
||||
// API.registerUsageHandler(new NEIBloodOrbShapelessHandler());
|
||||
// API.registerRecipeHandler(new NEIBindingRitualHandler());
|
||||
// API.registerUsageHandler(new NEIBindingRitualHandler());
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getName() {
|
||||
// return "Blood Magic NEI";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getVersion() {
|
||||
// return "1.3";
|
||||
// }
|
||||
//}
|
||||
package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.IConfigureNEI;
|
||||
|
||||
public class NEIConfig implements IConfigureNEI {
|
||||
public static ArrayList<Item> bloodOrbs = new ArrayList<Item>();
|
||||
|
||||
@Override
|
||||
public void loadConfig() {
|
||||
API.registerRecipeHandler(new NEIAlchemyRecipeHandler());
|
||||
API.registerUsageHandler(new NEIAlchemyRecipeHandler());
|
||||
API.registerRecipeHandler(new NEIAltarRecipeHandler());
|
||||
API.registerUsageHandler(new NEIAltarRecipeHandler());
|
||||
API.registerRecipeHandler(new NEIBloodOrbShapedHandler());
|
||||
API.registerUsageHandler(new NEIBloodOrbShapedHandler());
|
||||
API.registerRecipeHandler(new NEIBloodOrbShapelessHandler());
|
||||
API.registerUsageHandler(new NEIBloodOrbShapelessHandler());
|
||||
API.registerRecipeHandler(new NEIBindingRitualHandler());
|
||||
API.registerUsageHandler(new NEIBindingRitualHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Blood Magic NEI";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return "1.3";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@ public class RenderHelper
|
|||
|
||||
private static List<HUDElement> getHUDElements(Minecraft mc)
|
||||
{
|
||||
List<HUDElement> elements = new ArrayList();
|
||||
List<HUDElement> elements = new ArrayList<HUDElement>();
|
||||
|
||||
MovingObjectPosition movingobjectposition = mc.objectMouseOver;
|
||||
World world = mc.theWorld;
|
||||
|
|
|
@ -21,8 +21,7 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
|||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner;
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* Created in Scala by Alex-Hawks
|
||||
* Translated and implemented by Arcaratus
|
||||
*/
|
||||
|
|
|
@ -49,7 +49,7 @@ import WayofTime.alchemicalWizardry.api.event.TeleposeEvent;
|
|||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergySword;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundBlade;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour;
|
||||
import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm;
|
||||
|
@ -84,7 +84,7 @@ public class AlchemicalWizardryEventHooks
|
|||
parad.onEmptyHandEntityInteract(player, event.target);
|
||||
}else
|
||||
{
|
||||
if(heldItem.getItem() instanceof EnergySword)
|
||||
if(heldItem.getItem() instanceof BoundBlade)
|
||||
{
|
||||
parad.onBoundSwordInteractWithEntity(player, event.target);
|
||||
}
|
||||
|
|
|
@ -33,38 +33,16 @@ public class CommonProxy
|
|||
// Nothing here as the server doesn't render graphics!
|
||||
}
|
||||
|
||||
public void registerPostSideObjects()
|
||||
{
|
||||
|
||||
}
|
||||
public void registerPostSideObjects() {}
|
||||
|
||||
public void registerEntities()
|
||||
{
|
||||
}
|
||||
public void registerEntities() {}
|
||||
|
||||
public World getClientWorld()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void registerActions()
|
||||
{
|
||||
}
|
||||
|
||||
public void registerEvents()
|
||||
{
|
||||
}
|
||||
|
||||
public void registerSoundHandler()
|
||||
{
|
||||
// Nothing here as this is a server side proxy
|
||||
}
|
||||
|
||||
public void registerTileEntities()
|
||||
{
|
||||
GameRegistry.registerTileEntity(TEAltar.class, "containerAltar");
|
||||
GameRegistry.registerTileEntity(TEMasterStone.class, "containerMasterStone");
|
||||
}
|
||||
public void registerEvents() {}
|
||||
|
||||
public void registerEntityTrackers()
|
||||
{
|
||||
|
@ -88,12 +66,5 @@ public class CommonProxy
|
|||
EntityRegistry.registerModEntity(BookEntityItem.class, "bookEntityItem", 17, AlchemicalWizardry.instance, 120, 3, true);
|
||||
}
|
||||
|
||||
public void registerTickHandlers()
|
||||
{
|
||||
}
|
||||
|
||||
public void InitRendering()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
public void initRendering() {}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.util.List;
|
|||
|
||||
public class AchievementsMod extends Achievement
|
||||
{
|
||||
public static List<Achievement> achievements = new ArrayList();
|
||||
public static List<Achievement> achievements = new ArrayList<Achievement>();
|
||||
|
||||
public AchievementsMod(String name, int x, int y, ItemStack icon, Achievement parent)
|
||||
{
|
||||
|
|
|
@ -10,8 +10,8 @@ import java.util.List;
|
|||
|
||||
public class AchievementsRegistry
|
||||
{
|
||||
public final static List<Item> craftinglist = new ArrayList();
|
||||
public final static List<Item> pickupList = new ArrayList();
|
||||
public final static List<Item> craftinglist = new ArrayList<Item>();
|
||||
public final static List<Item> pickupList = new ArrayList<Item>();
|
||||
|
||||
public static void init()
|
||||
{
|
||||
|
|
|
@ -11,7 +11,7 @@ import java.util.List;
|
|||
|
||||
public class CombinedPotionRegistry
|
||||
{
|
||||
public static List<CombinedPotionComponent> potionList = new ArrayList();
|
||||
public static List<CombinedPotionComponent> potionList = new ArrayList<CombinedPotionComponent>();
|
||||
|
||||
public static void registerCombinedPotionRecipe(Potion result, Potion pot1, Potion pot2)
|
||||
{
|
||||
|
|
|
@ -68,7 +68,7 @@ public class BlockArmourForge extends Block
|
|||
{
|
||||
case 0:
|
||||
list = plateList;
|
||||
armourPiece = new ItemStack(ModItems.boundPlate, 1, 0);
|
||||
armourPiece = new ItemStack(ModItems.boundChestplate, 1, 0);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
|
|
@ -14,11 +14,11 @@ import WayofTime.alchemicalWizardry.common.block.BlockBloodRune;
|
|||
|
||||
public class UpgradedAltars
|
||||
{
|
||||
public static List<AltarComponent> secondTierAltar = new ArrayList();
|
||||
public static List<AltarComponent> thirdTierAltar = new ArrayList();
|
||||
public static List<AltarComponent> fourthTierAltar = new ArrayList();
|
||||
public static List<AltarComponent> fifthTierAltar = new ArrayList();
|
||||
public static List<AltarComponent> sixthTierAltar = new ArrayList();
|
||||
public static List<AltarComponent> secondTierAltar = new ArrayList<AltarComponent>();
|
||||
public static List<AltarComponent> thirdTierAltar = new ArrayList<AltarComponent>();
|
||||
public static List<AltarComponent> fourthTierAltar = new ArrayList<AltarComponent>();
|
||||
public static List<AltarComponent> fifthTierAltar = new ArrayList<AltarComponent>();
|
||||
public static List<AltarComponent> sixthTierAltar = new ArrayList<AltarComponent>();
|
||||
public static int highestAltar = 6;
|
||||
|
||||
public static int isAltarValid(World world, BlockPos pos)
|
||||
|
|
|
@ -40,7 +40,7 @@ public class BlockSet
|
|||
{
|
||||
this.blockid = blockid;
|
||||
this.metadata = new int[4];
|
||||
positions = new ArrayList();
|
||||
positions = new ArrayList<Int3>();
|
||||
}
|
||||
|
||||
public BlockSet(Block block)
|
||||
|
|
|
@ -30,7 +30,7 @@ public class BuildingSchematic
|
|||
public BuildingSchematic(String name)
|
||||
{
|
||||
this.name = name;
|
||||
blockList = new ArrayList();
|
||||
blockList = new ArrayList<BlockSet>();
|
||||
this.doorX = 0;
|
||||
this.doorZ = 0;
|
||||
this.doorY = 0;
|
||||
|
@ -90,7 +90,7 @@ public class BuildingSchematic
|
|||
|
||||
public List<Int3> getGriddedPositions(EnumFacing dir)
|
||||
{
|
||||
List<Int3> positionList = new ArrayList();
|
||||
List<Int3> positionList = new ArrayList<Int3>();
|
||||
|
||||
for (BlockSet blockSet : blockList)
|
||||
{
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
package WayofTime.alchemicalWizardry.common.demonVillage;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class TileBlockSet extends BlockSet
|
||||
{
|
||||
public NBTTagCompound tag;
|
||||
}
|
|
@ -36,7 +36,7 @@ public class EntityDemonAIHurtByTarget extends EntityAIHurtByTarget
|
|||
|
||||
this.taskOwner.setAttackTarget(this.taskOwner.getAITarget());
|
||||
|
||||
if (this.entityCallsForHelp && this.taskOwner instanceof IHoardDemon)
|
||||
if (this.entityCallsForHelp)
|
||||
{
|
||||
|
||||
if(portal instanceof TEDemonPortal)
|
||||
|
|
|
@ -5,10 +5,7 @@ import net.minecraft.world.World;
|
|||
|
||||
public abstract class DemonHoardPacket
|
||||
{
|
||||
public DemonHoardPacket()
|
||||
{
|
||||
|
||||
}
|
||||
public DemonHoardPacket() {}
|
||||
|
||||
public abstract int summonDemons(TEDemonPortal teDemonPortal, World world, int x, int y, int z, DemonType type, int tier, boolean spawnGuardian);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.world.World;
|
|||
|
||||
public class DemonPacketRegistry
|
||||
{
|
||||
public static Map<String, DemonHoardPacket> packetMap = new HashMap();
|
||||
public static Map<String, DemonHoardPacket> packetMap = new HashMap<String, DemonHoardPacket>();
|
||||
|
||||
public static boolean registerDemonPacket(String string, DemonHoardPacket packet)
|
||||
{
|
||||
|
|
|
@ -513,6 +513,6 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan
|
|||
BlockPos position = demon.getPortalLocation();
|
||||
TileEntity portal = worldObj.getTileEntity(this.demonPortal);
|
||||
|
||||
return portal instanceof TEDemonPortal ? portal == worldObj.getTileEntity(position) : false;
|
||||
return portal instanceof TEDemonPortal && portal == worldObj.getTileEntity(position);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,10 @@ import net.minecraft.util.BlockPos;
|
|||
public interface IHoardDemon
|
||||
{
|
||||
void setPortalLocation(BlockPos position);
|
||||
|
||||
BlockPos getPortalLocation();
|
||||
|
||||
boolean thrallDemon(BlockPos location);
|
||||
|
||||
boolean isSamePortal(IHoardDemon demon);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import WayofTime.alchemicalWizardry.ModItems;
|
|||
|
||||
public class DemonVillageLootRegistry
|
||||
{
|
||||
public static ArrayList<WeightedRandomChestContent> list1 = new ArrayList();
|
||||
public static ArrayList<WeightedRandomChestContent> list1 = new ArrayList<WeightedRandomChestContent>();
|
||||
|
||||
public static void init()
|
||||
{
|
||||
|
|
|
@ -43,10 +43,7 @@ public class TEDemonChest extends TileEntityChest implements ITilePortalNode
|
|||
}
|
||||
|
||||
@Override
|
||||
public void checkForAdjacentChests()
|
||||
{
|
||||
|
||||
}
|
||||
public void checkForAdjacentChests() {}
|
||||
|
||||
@Override
|
||||
public void setPortalLocation(TEDemonPortal teDemonPortal)
|
||||
|
|
|
@ -66,9 +66,9 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
|
|||
|
||||
public static int[] tierCostList = new int[]{1500};
|
||||
|
||||
public Set<IHoardDemon> hoardList = new HashSet();
|
||||
public Set<IHoardDemon> hoardList = new HashSet<IHoardDemon>();
|
||||
|
||||
public static List<DemonBuilding> buildingList = new ArrayList();
|
||||
public static List<DemonBuilding> buildingList = new ArrayList<DemonBuilding>();
|
||||
public Random rand = new Random();
|
||||
private GridSpace[][] area;
|
||||
|
||||
|
@ -168,7 +168,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
|
|||
{
|
||||
float totalChance = 0;
|
||||
|
||||
Map<String, Float> map = new HashMap();
|
||||
Map<String, Float> map = new HashMap<String, Float>();
|
||||
map.put("roadChance", this.getRoadChance());
|
||||
map.put("houseChance", this.getHouseChance());
|
||||
map.put("demonPortalChance", this.getDemonPortalChance());
|
||||
|
@ -661,7 +661,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
|
|||
|
||||
public List<EnumFacing> findValidExtentionDirection(int x, int z)
|
||||
{
|
||||
List<EnumFacing> directions = new LinkedList();
|
||||
List<EnumFacing> directions = new LinkedList<EnumFacing>();
|
||||
|
||||
if (this.getGridSpace(x, z) == null || !this.getGridSpace(x, z).isRoadSegment())
|
||||
{
|
||||
|
@ -1197,7 +1197,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
|
|||
|
||||
// GridSpaceHolder grid = this.createGSH();
|
||||
|
||||
List<EnumFacing> directions = new ArrayList();
|
||||
List<EnumFacing> directions = new ArrayList<EnumFacing>();
|
||||
|
||||
for (int i = 2; i < 6; i++)
|
||||
{
|
||||
|
@ -1210,7 +1210,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
|
|||
return 0;
|
||||
}
|
||||
|
||||
HashMap<EnumFacing, List<DemonBuilding>> schemMap = new HashMap();
|
||||
HashMap<EnumFacing, List<DemonBuilding>> schemMap = new HashMap<EnumFacing, List<DemonBuilding>>();
|
||||
|
||||
for (EnumFacing nextDir : directions)
|
||||
{
|
||||
|
@ -1226,7 +1226,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
|
|||
schemMap.get(nextDir).add(build);
|
||||
} else
|
||||
{
|
||||
schemMap.put(nextDir, new ArrayList());
|
||||
schemMap.put(nextDir, new ArrayList<DemonBuilding>());
|
||||
schemMap.get(nextDir).add(build);
|
||||
}
|
||||
}
|
||||
|
@ -1353,7 +1353,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
|
|||
return 0;
|
||||
}
|
||||
|
||||
List<EnumFacing> directions = new ArrayList();
|
||||
List<EnumFacing> directions = new ArrayList<EnumFacing>();
|
||||
|
||||
for (int i = 2; i < 6; i++)
|
||||
{
|
||||
|
@ -1369,7 +1369,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
|
|||
return 0;
|
||||
}
|
||||
|
||||
HashMap<EnumFacing, List<DemonBuilding>> schemMap = new HashMap();
|
||||
HashMap<EnumFacing, List<DemonBuilding>> schemMap = new HashMap<EnumFacing, List<DemonBuilding>>();
|
||||
|
||||
for (EnumFacing nextDir : directions)
|
||||
{
|
||||
|
@ -1390,7 +1390,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
|
|||
schemMap.get(nextDir).add(build);
|
||||
} else
|
||||
{
|
||||
schemMap.put(nextDir, new ArrayList());
|
||||
schemMap.put(nextDir, new ArrayList<DemonBuilding>());
|
||||
schemMap.get(nextDir).add(build);
|
||||
}
|
||||
} else
|
||||
|
@ -1418,10 +1418,6 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
|
|||
build.setAllGridSpaces(x + xOff, z + zOff, yLevel, chosenDirection.getOpposite(), GridSpace.HOUSE, grid);
|
||||
this.loadGSH(grid);
|
||||
|
||||
DemonVillagePath path = new DemonVillagePath(pos.getX() + (x) * 5, yLevel, pos.getZ() + (z) * 5, chosenDirection, 2);
|
||||
|
||||
Int3AndBool temp = path.constructFullPath(this, worldObj, this.getRoadStepClearance());
|
||||
|
||||
return build.getNumberOfGridSpaces();
|
||||
}
|
||||
|
||||
|
@ -1451,11 +1447,6 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
|
|||
|
||||
public void createRoad(int xi, int yi, int zi, EnumFacing dir, int length, boolean doesNotDrop)
|
||||
{
|
||||
int curX = xi;
|
||||
int curY = yi;
|
||||
int curZ = zi;
|
||||
int roadRadius = this.getRoadRadius();
|
||||
|
||||
if (dir.getFrontOffsetY() != 0)
|
||||
{
|
||||
return;
|
||||
|
|
|
@ -17,8 +17,6 @@ import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
|||
|
||||
public class EntityBileDemon extends EntityDemon
|
||||
{
|
||||
|
||||
|
||||
public EntityBileDemon(World par1World)
|
||||
{
|
||||
super(par1World, AlchemicalWizardry.entityBileDemonID);
|
||||
|
|
|
@ -21,9 +21,6 @@ public class EntityBoulderFist extends EntityDemon
|
|||
{
|
||||
private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false);
|
||||
|
||||
private static float maxTamedHealth = 60.0F;
|
||||
private static float maxUntamedHealth = 50.0F;
|
||||
|
||||
public EntityBoulderFist(World par1World)
|
||||
{
|
||||
super(par1World, AlchemicalWizardry.entityBoulderFistID);
|
||||
|
@ -56,6 +53,8 @@ public class EntityBoulderFist extends EntityDemon
|
|||
super.applyEntityAttributes();
|
||||
//This line affects the speed of the monster
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D);
|
||||
float maxTamedHealth = 60.0F;
|
||||
float maxUntamedHealth = 50.0F;
|
||||
|
||||
//My guess is that this will alter the max health
|
||||
if (this.isTamed())
|
||||
|
|
|
@ -9,7 +9,6 @@ import net.minecraft.entity.monster.EntityGhast;
|
|||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.entity.passive.EntityTameable;
|
||||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.item.ItemFood;
|
||||
|
@ -183,6 +182,7 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* main AI tick function, replaces updateEntityActionState
|
||||
*/
|
||||
|
@ -191,6 +191,7 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
this.dataWatcher.updateObject(18, this.getHealth());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit()
|
||||
{
|
||||
super.entityInit();
|
||||
|
@ -207,6 +208,7 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
this.playSound("mob.zombie.step", 0.15F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* (abstract) Protected helper method to write subclass entity data to NBT.
|
||||
*/
|
||||
|
@ -217,6 +219,7 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
par1NBTTagCompound.setByte("attackTimer", (byte) attackTimer);
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* (abstract) Protected helper method to read subclass entity data from NBT.
|
||||
*/
|
||||
|
@ -228,6 +231,7 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
attackTimer = par1NBTTagCompound.getByte("attackTimer");
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Returns the sound this mob makes while it's alive.
|
||||
*/
|
||||
|
@ -236,6 +240,7 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
return "none";
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Returns the sound this mob makes when it is hurt.
|
||||
*/
|
||||
|
@ -244,6 +249,7 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
return "mob.irongolem.hit";
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Returns the sound this mob makes on death.
|
||||
*/
|
||||
|
@ -252,6 +258,7 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
return "mob.irongolem.death";
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Returns the volume for the sounds this mob makes.
|
||||
*/
|
||||
|
@ -273,6 +280,7 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
return attackTimer;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
|
@ -281,11 +289,13 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
super.onUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getEyeHeight()
|
||||
{
|
||||
return this.height * 0.8F;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently
|
||||
* use in wolves.
|
||||
|
@ -295,6 +305,7 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
return this.isSitting() ? 20 : super.getVerticalFaceSpeed();
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Called when the entity is attacked.
|
||||
*/
|
||||
|
@ -317,6 +328,7 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attackEntityAsMob(Entity par1Entity)
|
||||
{
|
||||
this.attackTimer = 10;
|
||||
|
@ -332,6 +344,7 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTamed(boolean par1)
|
||||
{
|
||||
super.setTamed(par1);
|
||||
|
@ -402,7 +415,7 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
|
||||
if (itemstack.stackSize <= 0)
|
||||
{
|
||||
par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null);
|
||||
par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null);
|
||||
}
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
|
@ -463,41 +476,7 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return this wolf's collar color.
|
||||
*/
|
||||
public int getCollarColor()
|
||||
{
|
||||
return this.dataWatcher.getWatchableObjectByte(20) & 15;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set this wolf's collar color.
|
||||
*/
|
||||
public void setCollarColor(int par1)
|
||||
{
|
||||
this.dataWatcher.updateObject(20, par1 & 15);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used when two same-species animals in 'love mode' breed to generate the new baby animal.
|
||||
*/
|
||||
public EntityWolf spawnBabyAnimal(EntityAgeable par1EntityAgeable)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void func_70918_i(boolean par1)
|
||||
{
|
||||
if (par1)
|
||||
{
|
||||
this.dataWatcher.updateObject(19, 1);
|
||||
} else
|
||||
{
|
||||
this.dataWatcher.updateObject(19, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Returns true if the mob is currently able to mate with the specified mob.
|
||||
*/
|
||||
|
@ -511,6 +490,7 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
return this.dataWatcher.getWatchableObjectByte(19) == 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Determines if an entity can be despawned, used on idle far away entities
|
||||
*/
|
||||
|
|
|
@ -45,19 +45,20 @@ public class EntityElemental extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
public int courseChangeCooldown;
|
||||
// public int courseChangeCooldown;
|
||||
public double waypointX;
|
||||
public double waypointY;
|
||||
public double waypointZ;
|
||||
private Entity targetedEntity;
|
||||
/* private Entity targetedEntity;
|
||||
|
||||
/**
|
||||
* Cooldown time between target loss and new target aquirement.
|
||||
*/
|
||||
|
||||
private int aggroCooldown;
|
||||
public int prevAttackCounter;
|
||||
public int attackCounter;
|
||||
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* The explosion radius of spawned fireballs.
|
||||
*/
|
||||
|
@ -69,18 +70,7 @@ public class EntityElemental extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
protected void fall(float par1)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance
|
||||
* and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround
|
||||
*/
|
||||
protected void updateFallState(double par1, boolean par3)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Moves the entity based on the specified heading. Args: strafe, forward
|
||||
*/
|
||||
|
@ -140,6 +130,7 @@ public class EntityElemental extends EntityDemon
|
|||
this.limbSwing += this.limbSwingAmount;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* returns true if this entity is by a ladder, false otherwise
|
||||
*/
|
||||
|
@ -177,6 +168,7 @@ public class EntityElemental extends EntityDemon
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Will return how many at most can spawn in a chunk at once.
|
||||
*/
|
||||
|
@ -185,6 +177,7 @@ public class EntityElemental extends EntityDemon
|
|||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* (abstract) Protected helper method to write subclass entity data to NBT.
|
||||
*/
|
||||
|
@ -193,6 +186,7 @@ public class EntityElemental extends EntityDemon
|
|||
super.writeEntityToNBT(par1NBTTagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* (abstract) Protected helper method to read subclass entity data from NBT.
|
||||
*/
|
||||
|
@ -221,6 +215,7 @@ public class EntityElemental extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Returns true if the newer Entity AI code should be run
|
||||
*/
|
||||
|
@ -229,6 +224,7 @@ public class EntityElemental extends EntityDemon
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Sets the active target the Task system uses for tracking
|
||||
*/
|
||||
|
@ -245,6 +241,7 @@ public class EntityElemental extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* main AI tick function, replaces updateEntityActionState
|
||||
*/
|
||||
|
@ -253,6 +250,7 @@ public class EntityElemental extends EntityDemon
|
|||
this.dataWatcher.updateObject(18, this.getHealth());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit()
|
||||
{
|
||||
super.entityInit();
|
||||
|
@ -261,6 +259,7 @@ public class EntityElemental extends EntityDemon
|
|||
this.dataWatcher.addObject(25, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Plays step sound at given x, y, z for the entity
|
||||
*/
|
||||
|
@ -269,6 +268,7 @@ public class EntityElemental extends EntityDemon
|
|||
this.playSound("mob.zombie.step", 0.15F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Returns the sound this mob makes while it's alive.
|
||||
*/
|
||||
|
@ -278,6 +278,7 @@ public class EntityElemental extends EntityDemon
|
|||
return "none";
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Returns the sound this mob makes when it is hurt.
|
||||
*/
|
||||
|
@ -286,6 +287,7 @@ public class EntityElemental extends EntityDemon
|
|||
return "none";
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Returns the sound this mob makes on death.
|
||||
*/
|
||||
|
@ -294,6 +296,7 @@ public class EntityElemental extends EntityDemon
|
|||
return "none";
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Returns the volume for the sounds this mob makes.
|
||||
*/
|
||||
|
@ -302,6 +305,7 @@ public class EntityElemental extends EntityDemon
|
|||
return 0.4F;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Returns the item ID for the item the mob drops on death.
|
||||
*/
|
||||
|
@ -310,6 +314,7 @@ public class EntityElemental extends EntityDemon
|
|||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
|
@ -323,11 +328,13 @@ public class EntityElemental extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getEyeHeight()
|
||||
{
|
||||
return this.height * 0.8F;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently
|
||||
* use in wolves.
|
||||
|
@ -337,6 +344,7 @@ public class EntityElemental extends EntityDemon
|
|||
return this.isSitting() ? 20 : super.getVerticalFaceSpeed();
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Called when the entity is attacked.
|
||||
*/
|
||||
|
@ -359,12 +367,14 @@ public class EntityElemental extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attackEntityAsMob(Entity par1Entity)
|
||||
{
|
||||
int i = this.isTamed() ? 6 : 7;
|
||||
return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTamed(boolean par1)
|
||||
{
|
||||
super.setTamed(par1);
|
||||
|
@ -378,10 +388,7 @@ public class EntityElemental extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
|
||||
*/
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on
|
||||
* the animal type)
|
||||
|
@ -391,6 +398,7 @@ public class EntityElemental extends EntityDemon
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Determines whether this wolf is angry or not.
|
||||
*/
|
||||
|
@ -399,6 +407,7 @@ public class EntityElemental extends EntityDemon
|
|||
return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Sets whether this wolf is angry or not.
|
||||
*/
|
||||
|
@ -426,6 +435,7 @@ public class EntityElemental extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Returns true if the mob is currently able to mate with the specified mob.
|
||||
*/
|
||||
|
@ -434,11 +444,13 @@ public class EntityElemental extends EntityDemon
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_70922_bv()
|
||||
{
|
||||
return this.dataWatcher.getWatchableObjectByte(19) == 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Determines if an entity can be despawned, used on idle far away entities
|
||||
*/
|
||||
|
|
|
@ -25,9 +25,6 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob
|
|||
private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 40, 40, 15.0F);
|
||||
private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false);
|
||||
|
||||
private static float maxTamedHealth = 50.0F;
|
||||
private static float maxUntamedHealth = 50.0F;
|
||||
|
||||
public EntityFallenAngel(World par1World)
|
||||
{
|
||||
super(par1World, AlchemicalWizardry.entityFallenAngelID);
|
||||
|
@ -60,6 +57,8 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob
|
|||
super.applyEntityAttributes();
|
||||
//This line affects the speed of the monster
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D);
|
||||
float maxTamedHealth = 50.0F;
|
||||
float maxUntamedHealth = 50.0F;
|
||||
|
||||
//My guess is that this will alter the max health
|
||||
if (this.isTamed())
|
||||
|
|
|
@ -15,6 +15,7 @@ public class EntityFireElemental extends EntityElemental implements IMob
|
|||
this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inflictEffectOnEntity(Entity target)
|
||||
{
|
||||
if (target instanceof EntityLivingBase)
|
||||
|
|
|
@ -16,6 +16,7 @@ public class EntityHolyElemental extends EntityElemental implements IMob
|
|||
super(world, AlchemicalWizardry.entityHolyElementalID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inflictEffectOnEntity(Entity target)
|
||||
{
|
||||
if (target instanceof EntityLivingBase)
|
||||
|
|
|
@ -24,9 +24,6 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 30, 50, 15.0F);
|
||||
private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false);
|
||||
|
||||
private static float maxTamedHealth = 50.0F;
|
||||
private static float maxUntamedHealth = 30.0F;
|
||||
|
||||
public EntityIceDemon(World par1World)
|
||||
{
|
||||
super(par1World, AlchemicalWizardry.entityIceDemonID);
|
||||
|
@ -56,6 +53,8 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
super.applyEntityAttributes();
|
||||
//This line affects the speed of the monster
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.40000001192092896D);
|
||||
float maxTamedHealth = 50.0F;
|
||||
float maxUntamedHealth = 30.0F;
|
||||
|
||||
//My guess is that this will alter the max health
|
||||
if (this.isTamed())
|
||||
|
@ -67,6 +66,7 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Attack the specified entity using a ranged attack.
|
||||
*/
|
||||
|
|
|
@ -19,10 +19,6 @@ import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
|||
|
||||
public class EntityLowerGuardian extends EntityDemon
|
||||
{
|
||||
private static float maxTamedHealth = 50.0F;
|
||||
private static float maxUntamedHealth = 30.0F;
|
||||
private int attackTimer;
|
||||
|
||||
public EntityLowerGuardian(World par1World)
|
||||
{
|
||||
super(par1World, AlchemicalWizardry.entityLowerGuardianID);
|
||||
|
@ -41,7 +37,6 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false));
|
||||
this.setAggro(false);
|
||||
this.setTamed(false);
|
||||
attackTimer = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -50,6 +45,8 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
super.applyEntityAttributes();
|
||||
//This line affects the speed of the monster
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D);
|
||||
float maxTamedHealth = 50.0F;
|
||||
float maxUntamedHealth = 30.0F;
|
||||
|
||||
//My guess is that this will alter the max health
|
||||
if (this.isTamed())
|
||||
|
@ -61,8 +58,10 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
public EntityAgeable createChild(EntityAgeable par1EntityAgeable)
|
||||
/* public EntityAgeable createChild(EntityAgeable par1EntityAgeable)
|
||||
{
|
||||
return this.spawnBabyAnimal(par1EntityAgeable);
|
||||
}
|
||||
I don't know what this method changed to
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -22,9 +22,6 @@ public class EntityShade extends EntityDemon
|
|||
{
|
||||
private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false);
|
||||
|
||||
private static float maxTamedHealth = 50.0F;
|
||||
private static float maxUntamedHealth = 100.0F;
|
||||
|
||||
public EntityShade(World par1World)
|
||||
{
|
||||
super(par1World, AlchemicalWizardry.entityShadeID);
|
||||
|
@ -56,6 +53,8 @@ public class EntityShade extends EntityDemon
|
|||
super.applyEntityAttributes();
|
||||
//This line affects the speed of the monster
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D);
|
||||
float maxTamedHealth = 50.0F;
|
||||
float maxUntamedHealth = 100.0F;
|
||||
|
||||
//My guess is that this will alter the max health
|
||||
if (this.isTamed())
|
||||
|
|
|
@ -15,6 +15,7 @@ public class EntityShadeElemental extends EntityElemental implements IMob
|
|||
super(world, AlchemicalWizardry.entityShadeElementalID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inflictEffectOnEntity(Entity target)
|
||||
{
|
||||
if (target instanceof EntityLivingBase)
|
||||
|
|
|
@ -25,9 +25,6 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
|
|||
private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 25, 25, 15.0F);
|
||||
private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false);
|
||||
|
||||
private static float maxTamedHealth = 20.0F;
|
||||
private static float maxUntamedHealth = 10.0F;
|
||||
|
||||
public EntitySmallEarthGolem(World par1World)
|
||||
{
|
||||
super(par1World, AlchemicalWizardry.entitySmallEarthGolemID);
|
||||
|
@ -58,6 +55,8 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
|
|||
super.applyEntityAttributes();
|
||||
//This line affects the speed of the monster
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.40000001192092896D);
|
||||
float maxTamedHealth = 20.0F;
|
||||
float maxUntamedHealth = 10.0F;
|
||||
|
||||
//My guess is that this will alter the max health
|
||||
if (this.isTamed())
|
||||
|
@ -68,7 +67,8 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
|
|||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Attack the specified entity using a ranged attack.
|
||||
*/
|
||||
|
|
|
@ -14,6 +14,7 @@ public class EntityWaterElemental extends EntityElemental implements IMob
|
|||
super(world, AlchemicalWizardry.entityWaterElementalID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inflictEffectOnEntity(Entity target)
|
||||
{
|
||||
if (target instanceof EntityLivingBase)
|
||||
|
|
|
@ -25,9 +25,6 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM
|
|||
private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 40, 40, 15.0F);
|
||||
private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false);
|
||||
|
||||
private static float maxTamedHealth = 100.0F;
|
||||
private static float maxUntamedHealth = 200.0F;
|
||||
|
||||
public EntityWingedFireDemon(World par1World)
|
||||
{
|
||||
super(par1World, AlchemicalWizardry.entityWingedFireDemonID);
|
||||
|
@ -60,6 +57,8 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM
|
|||
super.applyEntityAttributes();
|
||||
//This line affects the speed of the monster
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D);
|
||||
float maxTamedHealth = 100.0F;
|
||||
float maxUntamedHealth = 200.0F;
|
||||
|
||||
//My guess is that this will alter the max health
|
||||
if (this.isTamed())
|
||||
|
@ -73,6 +72,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM
|
|||
//this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D);
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Attack the specified entity using a ranged attack.
|
||||
*/
|
||||
|
|
|
@ -24,7 +24,7 @@ import net.minecraftforge.fml.common.registry.IThrowableEntity;
|
|||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
//Shamelessly ripped off from x3n0ph0b3
|
||||
//Shamelessly ripped off from x3n0ph0b3 //Shame!
|
||||
public class EnergyBlastProjectile extends Entity implements IProjectile, IThrowableEntity
|
||||
{
|
||||
protected int xTile = -1;
|
||||
|
@ -39,8 +39,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
|
|||
public EntityLivingBase shootingEntity;
|
||||
protected int ticksInAir = 0;
|
||||
protected int maxTicksInAir = 600;
|
||||
private int ricochetCounter = 0;
|
||||
private boolean scheduledForDeath = false;
|
||||
protected int projectileDamage;
|
||||
|
||||
public EnergyBlastProjectile(World par1World)
|
||||
|
@ -114,7 +112,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
|
|||
double d4 = d0 / d3;
|
||||
double d5 = d2 / d3;
|
||||
this.setLocationAndAngles(par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3);
|
||||
float f4 = (float) d3 * 0.2F;
|
||||
this.setThrowableHeading(d0, d1, d2, par4, par5);
|
||||
}
|
||||
|
||||
|
@ -261,6 +258,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
|
|||
double var7 = 0.0D;
|
||||
Iterator var9 = var6.iterator();
|
||||
float var11;
|
||||
boolean scheduledForDeath = false;
|
||||
|
||||
while (var9.hasNext())
|
||||
{
|
||||
|
@ -358,13 +356,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the amount of knockback the arrow applies when it hits a mob.
|
||||
*/
|
||||
public void setKnockbackStrength(int par1)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* If returns false, the item will not inflict any damage against entities.
|
||||
*/
|
||||
|
@ -483,6 +474,5 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
|
|||
{
|
||||
if (entity instanceof EntityLivingBase)
|
||||
this.shootingEntity = (EntityLivingBase) entity;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityBeamParticle extends EntityFX
|
||||
{
|
||||
|
||||
protected EntityBeamParticle(World p_i1218_1_, double p_i1218_2_,
|
||||
double p_i1218_4_, double p_i1218_6_)
|
||||
{
|
||||
super(p_i1218_1_, p_i1218_2_, p_i1218_4_, p_i1218_6_);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
|
@ -11,7 +11,6 @@ import net.minecraft.util.MovingObjectPosition;
|
|||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
|
||||
|
||||
public class EntityBloodLightProjectile extends EnergyBlastProjectile
|
||||
{
|
||||
public EntityBloodLightProjectile(World par1World)
|
||||
|
|
|
@ -53,7 +53,7 @@ public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile
|
|||
this.onImpact(mop.entityHit);
|
||||
} else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, (float) (5.0f), false);
|
||||
worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, 5.0f, false);
|
||||
this.spawnSecondaryProjectiles();
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile
|
|||
spawnSecondaryProjectiles();
|
||||
}
|
||||
|
||||
worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, (float) (5.0f), false);
|
||||
worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, 5.0f, false);
|
||||
}
|
||||
|
||||
spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8);
|
||||
|
|
|
@ -302,13 +302,6 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the amount of knockback the arrow applies when it hits a mob.
|
||||
*/
|
||||
public void setKnockbackStrength(int par1)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* If returns false, the item will not inflict any damage against entities.
|
||||
*/
|
||||
|
@ -318,6 +311,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Whether the arrow has a stream of critical hit particles flying behind
|
||||
* it.
|
||||
|
@ -335,6 +329,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Whether the arrow has a stream of critical hit particles flying behind
|
||||
* it.
|
||||
|
@ -345,6 +340,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil
|
|||
return (var1 & 1) != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact(MovingObjectPosition mop)
|
||||
{
|
||||
if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null)
|
||||
|
@ -362,6 +358,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact(Entity mop)
|
||||
{
|
||||
if (mop == shootingEntity && ticksInAir > 3)
|
||||
|
@ -383,6 +380,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil
|
|||
return rand.nextInt(6) + 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void spawnHitParticles(EnumParticleTypes type, int i)
|
||||
{
|
||||
for (int particles = 0; particles < i; particles++)
|
||||
|
@ -391,11 +389,13 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doDamage(int i, Entity mop)
|
||||
{
|
||||
mop.attackEntityFrom(this.getDamageSource(), i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DamageSource getDamageSource()
|
||||
{
|
||||
return DamageSource.causeMobDamage(shootingEntity);
|
||||
|
@ -406,11 +406,13 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil
|
|||
this.ricochet(sideHit);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double smallGauss(double d)
|
||||
{
|
||||
return (worldObj.rand.nextFloat() - 0.5D) * d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double gaussian(double d)
|
||||
{
|
||||
return d + d * ((rand.nextFloat() - 0.5D) / 4);
|
||||
|
|
|
@ -34,7 +34,6 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl
|
|||
public EntityLivingBase shootingEntity;
|
||||
protected int ticksInAir = 0;
|
||||
protected int maxTicksInAir = 600;
|
||||
private int ricochetCounter = 0;
|
||||
private boolean scheduledForDeath = false;
|
||||
protected int projectileDamage;
|
||||
|
||||
|
@ -109,7 +108,6 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl
|
|||
double d4 = d0 / d3;
|
||||
double d5 = d2 / d3;
|
||||
this.setLocationAndAngles(par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3);
|
||||
float f4 = (float) d3 * 0.2F;
|
||||
this.setThrowableHeading(d0, d1, d2, par4, par5);
|
||||
}
|
||||
|
||||
|
|
|
@ -86,12 +86,12 @@ public class FireProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
((EntityLivingBase) mop).setFire(10 * this.projectileDamage);
|
||||
mop.setFire(10 * this.projectileDamage);
|
||||
((EntityLivingBase) mop).setRevengeTarget(shootingEntity);
|
||||
|
||||
if (((EntityLivingBase) mop).isPotionActive(Potion.fireResistance) || ((EntityLivingBase) mop).isImmuneToFire())
|
||||
if (((EntityLivingBase) mop).isPotionActive(Potion.fireResistance) || mop.isImmuneToFire())
|
||||
{
|
||||
((EntityLivingBase) mop).attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1);
|
||||
mop.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1);
|
||||
} else
|
||||
{
|
||||
doDamage(projectileDamage, mop);
|
||||
|
|
|
@ -52,7 +52,7 @@ public class HolyProjectile extends EnergyBlastProjectile
|
|||
}
|
||||
|
||||
this.onImpact(mop.entityHit);
|
||||
} else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
} //else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ public class HolyProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
if (((EntityLivingBase) mop).isEntityUndead())
|
||||
{
|
||||
doDamage((int) (projectileDamage * 2), mop);
|
||||
doDamage(projectileDamage * 2, mop);
|
||||
} else
|
||||
{
|
||||
doDamage(projectileDamage, mop);
|
||||
|
|
|
@ -54,7 +54,7 @@ public class IceProjectile extends EnergyBlastProjectile
|
|||
}
|
||||
|
||||
this.onImpact(mop.entityHit);
|
||||
} else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
}// else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
}
|
||||
this.setDead();
|
||||
|
@ -71,9 +71,9 @@ public class IceProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
if (((EntityLivingBase) mop).isImmuneToFire())
|
||||
if (mop.isImmuneToFire())
|
||||
{
|
||||
doDamage((int) (projectileDamage * 2), mop);
|
||||
doDamage(projectileDamage * 2, mop);
|
||||
((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 2));
|
||||
} else
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@ public class MudProjectile extends EnergyBlastProjectile
|
|||
}
|
||||
|
||||
this.onImpact(mop.entityHit);
|
||||
} else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
}// else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ public class TeleportProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
if (shootingEntity.isRiding())
|
||||
{
|
||||
shootingEntity.mountEntity((Entity) null);
|
||||
shootingEntity.mountEntity(null);
|
||||
}
|
||||
shootingEntity.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ);
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ public class TeleportProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
if (shootingEntity.isRiding())
|
||||
{
|
||||
shootingEntity.mountEntity((Entity) null);
|
||||
shootingEntity.mountEntity(null);
|
||||
}
|
||||
|
||||
shootingEntity.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ);
|
||||
|
|
|
@ -49,7 +49,7 @@ public class WaterProjectile extends EnergyBlastProjectile
|
|||
}
|
||||
|
||||
this.onImpact(mop.entityHit);
|
||||
} else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
}// else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ public class WaterProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
if (((EntityLivingBase) mop).isImmuneToFire())
|
||||
if (mop.isImmuneToFire())
|
||||
{
|
||||
doDamage(projectileDamage * 2, mop);
|
||||
((EntityLivingBase) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 80, 1));
|
||||
|
|
|
@ -52,7 +52,7 @@ public class WindGustProjectile extends EnergyBlastProjectile
|
|||
}
|
||||
|
||||
this.onImpact(mop.entityHit);
|
||||
} else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
}// else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -20,14 +20,13 @@ import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
|||
|
||||
public class ActivationCrystal extends EnergyItems
|
||||
{
|
||||
private static final String[] ACTIVATION_CRYSTAL_NAMES = new String[]{"Weak", "Awakened", "Creative"};
|
||||
private static final String[] ACTIVATION_CRYSTAL_NAMES = new String[]{"weak", "awakened", "creative"};
|
||||
|
||||
public ActivationCrystal()
|
||||
{
|
||||
super();
|
||||
this.maxStackSize = 1;
|
||||
setEnergyUsed(100);
|
||||
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.hasSubtypes = true;
|
||||
}
|
||||
|
||||
|
@ -101,7 +100,7 @@ public class ActivationCrystal extends EnergyItems
|
|||
{
|
||||
//This is what will do all the localisation things on the alchemy components so you dont have to set it :D
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ACTIVATION_CRYSTAL_NAMES.length - 1);
|
||||
return ("" + "item.activationCrystal" + ACTIVATION_CRYSTAL_NAMES[meta]);
|
||||
return (getUnlocalizedName() + "_" + ACTIVATION_CRYSTAL_NAMES[meta]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,11 +19,11 @@ import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
|||
import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm;
|
||||
import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry;
|
||||
|
||||
public class EnergySword extends ItemSword
|
||||
public class BoundBlade extends ItemSword
|
||||
{
|
||||
private int energyUsed;
|
||||
|
||||
public EnergySword()
|
||||
public BoundBlade()
|
||||
{
|
||||
super(AlchemicalWizardry.bloodBoundToolMaterial);
|
||||
this.maxStackSize = 1;
|
|
@ -209,7 +209,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
|
|||
return 3;
|
||||
}
|
||||
|
||||
if (armor.getItem() == ModItems.boundPlate)
|
||||
if (armor.getItem() == ModItems.boundChestplate)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
|
|||
{
|
||||
if (this.getIsInvisible(stack))
|
||||
{
|
||||
if (this == ModItems.boundHelmet || this == ModItems.boundPlate || this == ModItems.boundBoots)
|
||||
if (this == ModItems.boundHelmet || this == ModItems.boundChestplate || this == ModItems.boundBoots)
|
||||
{
|
||||
return "alchemicalwizardry:models/armor/boundArmour_invisible_layer_1.png";
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
|
|||
}
|
||||
}
|
||||
|
||||
if (this == ModItems.boundHelmet || this == ModItems.boundPlate || this == ModItems.boundBoots)
|
||||
if (this == ModItems.boundHelmet || this == ModItems.boundChestplate || this == ModItems.boundBoots)
|
||||
{
|
||||
return "alchemicalwizardry:models/armor/boundArmour_layer_1.png";
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import net.minecraft.world.World;
|
|||
|
||||
public interface IEnchantmentGlyph extends IStabilityGlyph
|
||||
{
|
||||
public int getEnchantability(World world, BlockPos pos, int meta);
|
||||
public int getEnchantmentLevel(World world, BlockPos pos, int meta);
|
||||
int getEnchantability(World world, BlockPos pos, int meta);
|
||||
|
||||
int getEnchantmentLevel(World world, BlockPos pos, int meta);
|
||||
}
|
||||
|
|
|
@ -5,5 +5,5 @@ import net.minecraft.world.World;
|
|||
|
||||
public interface IStabilityGlyph
|
||||
{
|
||||
public int getAdditionalStabilityForFaceCount(World world, BlockPos pos, int meta, int faceCount);
|
||||
int getAdditionalStabilityForFaceCount(World world, BlockPos pos, int meta, int faceCount);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ public class OmegaParadigm
|
|||
ItemStack leggingsStack = armours[1];
|
||||
ItemStack bootsStack = armours[0];
|
||||
|
||||
if(helmetStack != null && helmetStack.getItem() == ModItems.boundHelmet && chestStack != null && chestStack.getItem() == ModItems.boundPlate && leggingsStack != null && leggingsStack.getItem() == ModItems.boundLeggings && bootsStack != null && bootsStack.getItem() == ModItems.boundBoots)
|
||||
if(helmetStack != null && helmetStack.getItem() == ModItems.boundHelmet && chestStack != null && chestStack.getItem() == ModItems.boundChestplate && leggingsStack != null && leggingsStack.getItem() == ModItems.boundLeggings && bootsStack != null && bootsStack.getItem() == ModItems.boundBoots)
|
||||
{
|
||||
long worldSeed = player.worldObj.getSeed();
|
||||
Random rand = new Random(worldSeed + stability * (affinity + 7) * 94 + 84321*x - 17423*y + 76*z - 1623451*enchantability + 2 * enchantmentLevel);
|
||||
|
|
|
@ -9,7 +9,7 @@ import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour;
|
|||
|
||||
public class OmegaRegistry
|
||||
{
|
||||
public static HashMap<Reagent, OmegaParadigm> omegaList = new HashMap();
|
||||
public static HashMap<Reagent, OmegaParadigm> omegaList = new HashMap<Reagent, OmegaParadigm>();
|
||||
|
||||
public static void registerParadigm(Reagent reagent, OmegaParadigm parad)
|
||||
{
|
||||
|
|
|
@ -2,7 +2,6 @@ package WayofTime.alchemicalWizardry.common.renderer;
|
|||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
@ -48,15 +47,12 @@ public class AlchemyCircleRenderer extends MRSRenderer
|
|||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f1 = 1.0f;
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
this.bindTexture(resourceLocation);
|
||||
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F);
|
||||
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
float f2 = 0;
|
||||
float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F);
|
||||
// GL11.glEnable(GL11.GL_BLEND);
|
||||
// GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
|
|
|
@ -1,150 +0,0 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.ColourAndCoords;
|
||||
|
||||
public class BeamRenderer
|
||||
{
|
||||
private static final ResourceLocation field_110629_a = new ResourceLocation("textures/entity/beacon_beam.png");
|
||||
|
||||
public int xInit;
|
||||
public int yInit;
|
||||
public int zInit;
|
||||
|
||||
public int xFinal;
|
||||
public int yFinal;
|
||||
public int zFinal;
|
||||
|
||||
public int colourRed;
|
||||
public int colourGreen;
|
||||
public int colourBlue;
|
||||
public int colourIntensity;
|
||||
|
||||
public double size;
|
||||
|
||||
public void setInitialPosition(int x, int y, int z)
|
||||
{
|
||||
this.xInit = x;
|
||||
this.yInit = y;
|
||||
this.zInit = z;
|
||||
}
|
||||
|
||||
public void setColourAndFinalPosition(ColourAndCoords col)
|
||||
{
|
||||
this.colourRed = col.colourRed;
|
||||
this.colourGreen = col.colourGreen;
|
||||
this.colourBlue = col.colourBlue;
|
||||
this.colourIntensity = col.colourIntensity;
|
||||
|
||||
this.xFinal = col.xCoord;
|
||||
this.yFinal = col.yCoord;
|
||||
this.zFinal = col.zCoord;
|
||||
}
|
||||
|
||||
public void setSize(double size)
|
||||
{
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
protected static void bindTexture(ResourceLocation p_147499_1_)
|
||||
{
|
||||
TextureManager texturemanager = TileEntityRendererDispatcher.instance.renderEngine;
|
||||
|
||||
if (texturemanager != null)
|
||||
{
|
||||
texturemanager.bindTexture(p_147499_1_);
|
||||
}
|
||||
}
|
||||
|
||||
public void render(double d0, double d1, double d2)
|
||||
{
|
||||
int xDiff = this.xFinal - this.xInit;
|
||||
int yDiff = this.yFinal - this.yInit;
|
||||
int zDiff = this.zFinal - this.zInit;
|
||||
|
||||
float planarAngle = (float) (Math.atan2(-zDiff, xDiff) * 180d / Math.PI); //Radians
|
||||
float verticalAngle = (float) (Math.atan2(yDiff, Math.sqrt(xDiff * xDiff + zDiff + zDiff)) * 180d / Math.PI);
|
||||
|
||||
float distance = (float) Math.sqrt(xDiff * xDiff + yDiff * yDiff + zDiff * zDiff); //Total distance
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f1 = 1.0f;
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
BeamRenderer.bindTexture(field_110629_a);
|
||||
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F);
|
||||
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
float f2 = 0;
|
||||
float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
WorldRenderer wr = tessellator.getWorldRenderer();
|
||||
|
||||
wr.startDrawingQuads();
|
||||
wr.func_178961_b(colourRed, colourGreen, colourBlue, colourIntensity);
|
||||
|
||||
double inside = -(this.size / 2d);
|
||||
double outside = 1.0d - (0.50d - this.size / 2d) - 0.5d;
|
||||
|
||||
double d18 = inside;
|
||||
double d19 = inside;
|
||||
double d20 = outside;
|
||||
double d21 = inside;
|
||||
double d22 = inside;
|
||||
double d23 = outside;
|
||||
double d24 = outside;
|
||||
double d25 = outside;
|
||||
double d26 = (double) (distance * f1);// + 0.2;
|
||||
double d27 = 0.0D;
|
||||
double d28 = 1.0D;
|
||||
double d29 = (double) (-1.0F + f3);
|
||||
double d30 = (double) (distance * f1) + d29;
|
||||
|
||||
GL11.glTranslated(d0 + 0.5, d1 + 0.5, d2 + 0.5);
|
||||
|
||||
GL11.glRotatef(planarAngle, 0F, 1F, 0F); //Rotate on planar axis
|
||||
GL11.glRotatef(verticalAngle, 0F, 0F, 1F); //Rotate vertical axis
|
||||
//GL11.glRotatef(tileAltar.getWorldObj().getWorldTime()*2f, 1F, 0F, 0F); //Rotate cylindrically
|
||||
|
||||
double offset = 0;
|
||||
|
||||
// tessellator.setBrightness(240);
|
||||
float s = 1F / 16F;
|
||||
wr.addVertexWithUV(d26, d18, d19, d28, d30);
|
||||
wr.addVertexWithUV(offset, d18, d19, d28, d29);
|
||||
wr.addVertexWithUV(offset, d20, d21, d27, d29);
|
||||
wr.addVertexWithUV(d26, d20, d21, d27, d30);
|
||||
wr.addVertexWithUV(d26, d24, d25, d28, d30);
|
||||
wr.addVertexWithUV(offset, d24, d25, d28, d29);
|
||||
wr.addVertexWithUV(offset, d22, d23, d27, d29);
|
||||
wr.addVertexWithUV(d26, d22, d23, d27, d30);
|
||||
wr.addVertexWithUV(d26, d20, d21, d28, d30);
|
||||
wr.addVertexWithUV(offset, d20, d21, d28, d29);
|
||||
wr.addVertexWithUV(offset, d24, d25, d27, d29);
|
||||
wr.addVertexWithUV(d26, d24, d25, d27, d30);
|
||||
wr.addVertexWithUV(d26, d22, d23, d28, d30);
|
||||
wr.addVertexWithUV(offset, d22, d23, d28, d29);
|
||||
wr.addVertexWithUV(offset, d18, d19, d27, d29);
|
||||
wr.addVertexWithUV(d26, d18, d19, d27, d30);
|
||||
|
||||
tessellator.draw();
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
|
@ -19,16 +20,15 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
|||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator;
|
||||
|
||||
public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer
|
||||
public class RenderAlchemicalCalcinator extends TileEntitySpecialRenderer
|
||||
{
|
||||
private final RenderItem customRenderItem;
|
||||
private ModelAlchemicalCalcinator modelConduit = new ModelAlchemicalCalcinator();
|
||||
|
||||
private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png");
|
||||
|
||||
public RenderAlchemicCalcinator()
|
||||
public RenderAlchemicalCalcinator()
|
||||
{
|
||||
customRenderItem = Minecraft.getMinecraft().getRenderItem();
|
||||
}
|
||||
|
@ -36,9 +36,9 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer
|
|||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i)
|
||||
{
|
||||
if (tileEntity instanceof TEAlchemicCalcinator)
|
||||
if (tileEntity instanceof TEAlchemicalCalcinator)
|
||||
{
|
||||
TEAlchemicCalcinator tileAltar = (TEAlchemicCalcinator) tileEntity;
|
||||
TEAlchemicalCalcinator tileAltar = (TEAlchemicalCalcinator) tileEntity;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
|
@ -0,0 +1,80 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
|
||||
public class RenderAltar extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelBloodAltar modelBloodAltar = new ModelBloodAltar();
|
||||
private final RenderItem customRenderItem;
|
||||
|
||||
public RenderAltar()
|
||||
{
|
||||
customRenderItem = Minecraft.getMinecraft().getRenderItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i)
|
||||
{
|
||||
modelBloodAltar.renderBloodAltar((TEAltar) tileEntity, d0, d1, d2);
|
||||
modelBloodAltar.renderBloodLevel((TEAltar) tileEntity, d0, d1, d2);
|
||||
|
||||
if (tileEntity instanceof TEAltar)
|
||||
{
|
||||
TEAltar tileAltar = (TEAltar) tileEntity;
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (tileAltar.getStackInSlot(0) != null)
|
||||
{
|
||||
float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0));
|
||||
float rotationAngle = Minecraft.getMinecraft().gameSettings.fancyGraphics ? (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL) : 0;
|
||||
EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld());
|
||||
ghostEntityItem.hoverStart = 0.0F;
|
||||
ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0));
|
||||
float displacement = 0.2F;
|
||||
|
||||
if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)
|
||||
{
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.7F, (float) d2 + 0.5F);
|
||||
} else
|
||||
{
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.6F, (float) d2 + 0.5F);
|
||||
}
|
||||
GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
|
||||
GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F);
|
||||
customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
private float getGhostItemScaleFactor(ItemStack itemStack)
|
||||
{
|
||||
float scaleFactor = 1.0F;
|
||||
|
||||
if (itemStack != null)
|
||||
{
|
||||
if (itemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
return 0.9f;
|
||||
} else
|
||||
{
|
||||
return 0.65f;
|
||||
}
|
||||
}
|
||||
|
||||
return scaleFactor;
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
|
@ -7,21 +8,19 @@ import net.minecraft.entity.item.EntityItem;
|
|||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelChemistrySet;
|
||||
|
||||
public class RenderWritingTable extends TileEntitySpecialRenderer
|
||||
public class RenderChemistrySet extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelWritingTable modelWritingTable = new ModelWritingTable();
|
||||
private ModelChemistrySet modelChemistrySet = new ModelChemistrySet();
|
||||
private final RenderItem customRenderItem;
|
||||
|
||||
public RenderWritingTable()
|
||||
public RenderChemistrySet()
|
||||
{
|
||||
customRenderItem = Minecraft.getMinecraft().getRenderItem();
|
||||
}
|
||||
|
@ -29,9 +28,9 @@ public class RenderWritingTable extends TileEntitySpecialRenderer
|
|||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int a)
|
||||
{
|
||||
if (tileEntity instanceof TEWritingTable)
|
||||
if (tileEntity instanceof TEChemistrySet)
|
||||
{
|
||||
TEWritingTable tileAltar = (TEWritingTable) tileEntity;
|
||||
TEChemistrySet tileAltar = (TEChemistrySet) tileEntity;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
|
@ -39,7 +38,7 @@ public class RenderWritingTable extends TileEntitySpecialRenderer
|
|||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
this.modelWritingTable.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
this.modelChemistrySet.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
@ -164,102 +163,4 @@ public class RenderWritingTable extends TileEntitySpecialRenderer
|
|||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, EnumFacing forgeDirection)
|
||||
{
|
||||
if (ghostItemStack != null)
|
||||
{
|
||||
if (ghostItemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
switch (forgeDirection)
|
||||
{
|
||||
case DOWN:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UP:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case NORTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F);
|
||||
return;
|
||||
}
|
||||
|
||||
case SOUTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F);
|
||||
return;
|
||||
}
|
||||
|
||||
case EAST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case WEST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
switch (forgeDirection)
|
||||
{
|
||||
case DOWN:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UP:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case NORTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F);
|
||||
return;
|
||||
}
|
||||
|
||||
case SOUTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F);
|
||||
return;
|
||||
}
|
||||
|
||||
case EAST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case WEST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
|
@ -27,7 +26,7 @@ public class RenderConduit extends TileEntitySpecialRenderer
|
|||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
this.modelConduit.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileConduit.getInputDirection(), tileConduit.getOutputDirection());
|
||||
this.modelConduit.render(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileConduit.getInputDirection(), tileConduit.getOutputDirection());
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue