Archived
119 lines
6.7 KiB
Java
119 lines
6.7 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* cpw.mods.fml.common.Mod
|
|
* cpw.mods.fml.common.Mod$EventHandler
|
|
* cpw.mods.fml.common.event.FMLPreInitializationEvent
|
|
* cpw.mods.fml.common.eventhandler.SubscribeEvent
|
|
* cpw.mods.fml.common.registry.GameRegistry
|
|
* mods.flammpfeil.slashblade.ItemSlashBlade
|
|
* mods.flammpfeil.slashblade.ItemSlashBladeNamed
|
|
* mods.flammpfeil.slashblade.RecipeAwakeBlade
|
|
* mods.flammpfeil.slashblade.SlashBlade
|
|
* mods.flammpfeil.slashblade.named.event.LoadEvent$InitEvent
|
|
* mods.flammpfeil.slashblade.named.event.LoadEvent$PostInitEvent
|
|
* net.minecraft.enchantment.Enchantment
|
|
* net.minecraft.init.Blocks
|
|
* net.minecraft.init.Items
|
|
* net.minecraft.item.Item
|
|
* net.minecraft.item.Item$ToolMaterial
|
|
* net.minecraft.item.ItemStack
|
|
* net.minecraft.item.crafting.IRecipe
|
|
* net.minecraft.nbt.NBTTagCompound
|
|
*/
|
|
package mods.flammpfeil.slashblade.frostwolf;
|
|
|
|
import cpw.mods.fml.common.Mod;
|
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
|
import cpw.mods.fml.common.registry.GameRegistry;
|
|
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
|
import mods.flammpfeil.slashblade.ItemSlashBladeNamed;
|
|
import mods.flammpfeil.slashblade.RecipeAwakeBlade;
|
|
import mods.flammpfeil.slashblade.SlashBlade;
|
|
import mods.flammpfeil.slashblade.named.event.LoadEvent;
|
|
import net.minecraft.enchantment.Enchantment;
|
|
import net.minecraft.init.Blocks;
|
|
import net.minecraft.init.Items;
|
|
import net.minecraft.item.Item;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.item.crafting.IRecipe;
|
|
import net.minecraft.nbt.NBTTagCompound;
|
|
|
|
@Mod(name="FrostWolf", modid="flammpfeil.frostwolf", version="mc1.7.2-r1", dependencies="required-after:flammpfeil.slashblade")
|
|
public class FrostWolf {
|
|
public static final String modname = "FrostWolf";
|
|
public static final String modid = "flammpfeil.frostwolf";
|
|
public static final String version = "mc1.7.2-r1";
|
|
public static final int RapidPhantomSwordsID = 30;
|
|
public static final int GalePhantomSwordsID = 32;
|
|
String nameA = "flammpfeil.slashblade.named.frostwolfa";
|
|
String nameB = "flammpfeil.slashblade.named.frostwolfb";
|
|
|
|
@Mod.EventHandler
|
|
public void preInit(FMLPreInitializationEvent evt) {
|
|
SlashBlade.InitEventBus.register(this);
|
|
}
|
|
|
|
@SubscribeEvent
|
|
public void init(LoadEvent.InitEvent event) {
|
|
String name = this.nameA;
|
|
ItemStack customblade = new ItemStack((Item)SlashBlade.bladeNamed, 1, 0);
|
|
NBTTagCompound tag = new NBTTagCompound();
|
|
customblade.setTagCompound(tag);
|
|
ItemSlashBladeNamed.CurrentItemName.set(tag, name);
|
|
ItemSlashBladeNamed.CustomMaxDamage.set(tag, Integer.valueOf(50));
|
|
ItemSlashBlade.setBaseAttackModifier((NBTTagCompound)tag, (float)(4.0f + Item.ToolMaterial.EMERALD.getDamageVsEntity()));
|
|
ItemSlashBlade.TextureName.set(tag, "named/frostwolf/frostwolfa");
|
|
ItemSlashBlade.ModelName.set(tag, "named/frostwolf/frostwolfa");
|
|
ItemSlashBlade.SpecialAttackType.set(tag, Integer.valueOf(30));
|
|
ItemSlashBlade.StandbyRenderType.set(tag, Integer.valueOf(2));
|
|
GameRegistry.registerCustomItemStack((String)name, (ItemStack)customblade);
|
|
ItemSlashBladeNamed.NamedBlades.add("flammpfeil.slashblade:" + name);
|
|
name = this.nameB;
|
|
customblade = new ItemStack((Item)SlashBlade.bladeNamed, 1, 0);
|
|
tag = new NBTTagCompound();
|
|
customblade.setTagCompound(tag);
|
|
ItemSlashBladeNamed.CurrentItemName.set(tag, name);
|
|
ItemSlashBladeNamed.CustomMaxDamage.set(tag, Integer.valueOf(50));
|
|
ItemSlashBlade.setBaseAttackModifier((NBTTagCompound)tag, (float)(4.0f + Item.ToolMaterial.EMERALD.getDamageVsEntity()));
|
|
ItemSlashBlade.TextureName.set(tag, "named/frostwolf/frostwolfb");
|
|
ItemSlashBlade.ModelName.set(tag, "named/frostwolf/frostwolfb");
|
|
ItemSlashBlade.SpecialAttackType.set(tag, Integer.valueOf(32));
|
|
ItemSlashBlade.StandbyRenderType.set(tag, Integer.valueOf(2));
|
|
GameRegistry.registerCustomItemStack((String)name, (ItemStack)customblade);
|
|
ItemSlashBladeNamed.NamedBlades.add("flammpfeil.slashblade:" + name);
|
|
}
|
|
|
|
@SubscribeEvent
|
|
public void postinit(LoadEvent.PostInitEvent event) {
|
|
ItemStack sphere = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"sphere_bladesoul", (int)1);
|
|
String name = this.nameA;
|
|
ItemStack blade = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)name, (int)1);
|
|
ItemStack reqiredBlade = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"flammpfeil.slashblade.named.doutanuki", (int)1);
|
|
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)reqiredBlade);
|
|
ItemSlashBlade.RepairCount.set(tag, Integer.valueOf(10));
|
|
reqiredBlade.addEnchantment(Enchantment.fireProtection, 1);
|
|
GameRegistry.registerCustomItemStack((String)(name + ".reqired"), (ItemStack)reqiredBlade);
|
|
ItemSlashBladeNamed.NamedBlades.add("flammpfeil.slashblade:" + name + ".reqired");
|
|
reqiredBlade = reqiredBlade.copy();
|
|
reqiredBlade.setItemDamage(Short.MAX_VALUE);
|
|
RecipeAwakeBlade recipe = new RecipeAwakeBlade(blade, reqiredBlade, new Object[]{" IL", "CS ", "BQ ", Character.valueOf('L'), new ItemStack(Items.dye, 4), Character.valueOf('S'), sphere, Character.valueOf('B'), reqiredBlade, Character.valueOf('Q'), new ItemStack(Items.quartz), Character.valueOf('I'), new ItemStack(Blocks.ice), Character.valueOf('C'), new ItemStack(Blocks.snow)});
|
|
GameRegistry.addRecipe((IRecipe)recipe);
|
|
name = this.nameB;
|
|
blade = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)name, (int)1);
|
|
reqiredBlade = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"flammpfeil.slashblade.named.muramasa", (int)1);
|
|
tag = ItemSlashBlade.getItemTagCompound((ItemStack)reqiredBlade);
|
|
ItemSlashBlade.RepairCount.set(tag, Integer.valueOf(25));
|
|
reqiredBlade.addEnchantment(Enchantment.fireProtection, 1);
|
|
GameRegistry.registerCustomItemStack((String)(name + ".reqired"), (ItemStack)reqiredBlade);
|
|
ItemSlashBladeNamed.NamedBlades.add("flammpfeil.slashblade:" + name + ".reqired");
|
|
reqiredBlade = reqiredBlade.copy();
|
|
reqiredBlade.setItemDamage(Short.MAX_VALUE);
|
|
recipe = new RecipeAwakeBlade(blade, reqiredBlade, new Object[]{" IG", "CS ", "BQ ", Character.valueOf('S'), sphere, Character.valueOf('G'), new ItemStack(Items.gold_nugget), Character.valueOf('B'), reqiredBlade, Character.valueOf('Q'), new ItemStack(Items.quartz), Character.valueOf('I'), new ItemStack(Blocks.ice), Character.valueOf('C'), new ItemStack(Blocks.snow)});
|
|
GameRegistry.addRecipe((IRecipe)recipe);
|
|
}
|
|
}
|
|
|