Attempt to fix repository

This commit is contained in:
WayofTime 2015-07-31 12:09:09 -04:00
parent e242207d50
commit 1aac4686db
932 changed files with 39272 additions and 11544 deletions

View file

@ -11,7 +11,7 @@ import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import WayofTime.alchemicalWizardry.common.potion.*;
import WayofTime.alchemicalWizardry.common.thread.CommandDownloadGAPI;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
@ -28,20 +28,6 @@ import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.ModContainer;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLInterModComms;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.registry.EntityRegistry;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.RecipeSorter;
import net.minecraftforge.oredict.RecipeSorter.Category;
@ -50,10 +36,10 @@ import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
//import thaumcraft.api.ItemApi;
//import thaumcraft.api.ThaumcraftApi;
//import thaumcraft.api.aspects.Aspect;
//import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.ItemApi;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler;
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
@ -66,6 +52,7 @@ import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry;
import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe;
import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe;
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler;
import WayofTime.alchemicalWizardry.api.soulNetwork.ComplexNetworkHandler;
import WayofTime.alchemicalWizardry.api.spell.SpellEffectRegistry;
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee;
@ -83,8 +70,12 @@ import WayofTime.alchemicalWizardry.common.ModLivingDropsEvent;
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
import WayofTime.alchemicalWizardry.common.achievements.ModAchievements;
import WayofTime.alchemicalWizardry.common.alchemy.CombinedPotionRegistry;
import WayofTime.alchemicalWizardry.common.block.BlockArmourForge;
import WayofTime.alchemicalWizardry.common.block.ArmourForge;
import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars;
import WayofTime.alchemicalWizardry.common.book.BloodMagicGuide;
import WayofTime.alchemicalWizardry.common.commands.CommandBind;
import WayofTime.alchemicalWizardry.common.commands.CommandSN;
import WayofTime.alchemicalWizardry.common.commands.CommandUnbind;
import WayofTime.alchemicalWizardry.common.compress.AdvancedCompressionHandler;
import WayofTime.alchemicalWizardry.common.compress.BaseCompressionHandler;
import WayofTime.alchemicalWizardry.common.compress.StorageBlockCraftingManager;
@ -117,19 +108,41 @@ import WayofTime.alchemicalWizardry.common.entity.mob.EntityShadeElemental;
import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem;
import WayofTime.alchemicalWizardry.common.entity.mob.EntityWaterElemental;
import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon;
import WayofTime.alchemicalWizardry.common.guide.RecipeHolder;
import WayofTime.alchemicalWizardry.common.harvest.AgriCraftCropHarvestHandler;
import WayofTime.alchemicalWizardry.common.harvest.BloodMagicHarvestHandler;
import WayofTime.alchemicalWizardry.common.harvest.CactusReedHarvestHandler;
import WayofTime.alchemicalWizardry.common.harvest.GourdHarvestHandler;
import WayofTime.alchemicalWizardry.common.harvest.PamHarvestCompatRegistry;
import WayofTime.alchemicalWizardry.common.items.ItemIncense;
import WayofTime.alchemicalWizardry.common.items.ItemMailOrderCatalogue;
import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner;
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour;
//import WayofTime.alchemicalWizardry.common.items.forestry.ItemBloodFrame;
import WayofTime.alchemicalWizardry.common.items.forestry.ItemBloodFrame;
import WayofTime.alchemicalWizardry.common.items.sigil.holding.HoldingPacketHandler;
import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour;
import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmEarth;
import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmFire;
import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmWater;
import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmWind;
import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry;
import WayofTime.alchemicalWizardry.common.potion.PotionAmphibian;
import WayofTime.alchemicalWizardry.common.potion.PotionBoost;
import WayofTime.alchemicalWizardry.common.potion.PotionDeaf;
import WayofTime.alchemicalWizardry.common.potion.PotionDemonCloak;
import WayofTime.alchemicalWizardry.common.potion.PotionDrowning;
import WayofTime.alchemicalWizardry.common.potion.PotionFeatherFall;
import WayofTime.alchemicalWizardry.common.potion.PotionFireFuse;
import WayofTime.alchemicalWizardry.common.potion.PotionFlameCloak;
import WayofTime.alchemicalWizardry.common.potion.PotionFlight;
import WayofTime.alchemicalWizardry.common.potion.PotionHeavyHeart;
import WayofTime.alchemicalWizardry.common.potion.PotionIceCloak;
import WayofTime.alchemicalWizardry.common.potion.PotionInhibit;
import WayofTime.alchemicalWizardry.common.potion.PotionPlanarBinding;
import WayofTime.alchemicalWizardry.common.potion.PotionProjectileProtect;
import WayofTime.alchemicalWizardry.common.potion.PotionReciprocation;
import WayofTime.alchemicalWizardry.common.potion.PotionSoulFray;
import WayofTime.alchemicalWizardry.common.potion.PotionSoulHarden;
import WayofTime.alchemicalWizardry.common.renderer.AlchemyCircleRenderer;
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAnimalGrowth;
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAutoAlchemy;
@ -243,12 +256,12 @@ import WayofTime.alchemicalWizardry.common.spell.simple.SpellWateryGrave;
import WayofTime.alchemicalWizardry.common.spell.simple.SpellWindGust;
import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW;
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator;
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator;
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar;
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit;
import WayofTime.alchemicalWizardry.common.tileEntity.TECrucible;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellTable;
import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart;
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable;
@ -264,16 +277,29 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet;
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler;
//import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration;
import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
@Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.3.3", guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory")
public class AlchemicalWizardry
{
public static String MODID = "AWWayofTime"; //Temporary
public static boolean parseTextFiles = false;
public static boolean doMeteorsDestroyBlocks = true;
@ -361,6 +387,8 @@ public class AlchemicalWizardry
public static boolean ritualDisabledPhantomHands;
public static boolean ritualDisabledSphereIsland;
public static boolean displayRitualAnimation;
public static boolean potionDisableRegen;
public static boolean potionDisableNightVision;
public static boolean potionDisableFireResistance;
@ -399,6 +427,7 @@ public class AlchemicalWizardry
public static boolean lockdownAltar;
public static boolean causeHungerWithRegen;
public static boolean causeHungerChatMessage = true;
public static boolean disableBoundToolsRightClick;
public static List<Class> wellBlacklist;
@ -419,7 +448,7 @@ public class AlchemicalWizardry
};
public static ToolMaterial bloodBoundToolMaterial = EnumHelper.addToolMaterial("BoundBlood", 4, 1000, 12.0f, 8.0f, 50);
public static ArmorMaterial sanguineArmourArmourMaterial = EnumHelper.addArmorMaterial("SanguineArmour", "test", 33, new int[]{3, 8, 6, 3}, 30);
public static ArmorMaterial sanguineArmourArmourMaterial = EnumHelper.addArmorMaterial("SanguineArmour", 33, new int[]{3, 8, 6, 3}, 30);
//Dungeon loot chances
public static int standardBindingAgentDungeonChance;
@ -546,7 +575,9 @@ public class AlchemicalWizardry
FluidRegistry.registerFluid(lifeEssenceFluid);
ModBlocks.init();
ModBlocks.registerBlocksInPre();
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");
@ -565,7 +596,7 @@ public class AlchemicalWizardry
{
int craftingConstant = OreDictionary.WILDCARD_VALUE;
ModBlocks.init();
ModBlocks.registerBlocksInInit();
//blocks
proxy.registerRenderers();
@ -640,7 +671,7 @@ public class AlchemicalWizardry
ItemStack largeBloodStoneBrickStack = new ItemStack(ModBlocks.largeBloodStoneBrick);
ItemStack bloodStoneBrickStackCrafted = new ItemStack(ModBlocks.bloodStoneBrick, 4);
ItemStack growthSigilStack = new ItemStack(ModItems.growthSigil);
ItemStack blockHomHeartStack = new ItemStack(ModBlocks.blockSpellTable);
ItemStack blockHomHeartStack = new ItemStack(ModBlocks.blockHomHeart);
ItemStack redWoolStack = new ItemStack(Blocks.wool, 1, 14);
ItemStack simpleCatalystStack = new ItemStack(ModItems.simpleCatalyst);
ItemStack duskRitualDivinerStack = new ItemStack(ModItems.itemRitualDiviner);
@ -715,23 +746,24 @@ public class AlchemicalWizardry
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.itemBloodLightSigil), "btb", "sss", "bob", 'o', magicianBloodOrbStack, 'b', glowstoneBlockStack, 't', new ItemStack(Blocks.torch), 's', imbuedSlateStack));
GameRegistry.addRecipe(new ItemStack(ModItems.itemKeyOfDiablo), " gw", "gdg", "wg ", 'w', weakBloodShardStack, 'g', goldIngotStack, 'd', diamondStack);
GameRegistry.addRecipe(new ItemStack(ModItems.itemBloodPack), "gbg","flf","gsg",'s', blankSlateStack,'g', glassStack,'f',new ItemStack(Items.flint,1,craftingConstant),'b', emptyBucketStack, 'l', new ItemStack(Items.leather_chestplate));
customPotionDrowning = (new PotionBloodMagic(customPotionDrowningID, true, 0)).setIconIndex(0, 0).setPotionName("Drowning");
customPotionBoost = (new PotionBloodMagic(customPotionBoostID, false, 0)).setIconIndex(0, 0).setPotionName("Boost");
customPotionProjProt = (new PotionBloodMagic(customPotionProjProtID, false, 0)).setIconIndex(0, 0).setPotionName("Whirlwind");
customPotionInhibit = (new PotionBloodMagic(customPotionInhibitID, false, 0)).setIconIndex(0, 0).setPotionName("Inhibit");
customPotionFlight = (new PotionBloodMagic(customPotionFlightID, false, 0)).setIconIndex(0, 0).setPotionName("Flight");
customPotionReciprocation = (new PotionBloodMagic(customPotionReciprocationID, false, 0xFFFFFF)).setIconIndex(0, 0).setPotionName("Reciprocation");
customPotionFlameCloak = (new PotionBloodMagic(customPotionFlameCloakID, false, 0).setIconIndex(0, 0).setPotionName("Flame Cloak"));
customPotionIceCloak = (new PotionBloodMagic(customPotionIceCloakID, false, 0).setIconIndex(0, 0).setPotionName("Ice Cloak"));
customPotionHeavyHeart = (new PotionBloodMagic(customPotionHeavyHeartID, true, 0).setIconIndex(0, 0).setPotionName("Heavy Heart"));
customPotionFireFuse = (new PotionBloodMagic(customPotionFireFuseID, true, 0).setIconIndex(0, 0).setPotionName("Fire Fuse"));
customPotionPlanarBinding = (new PotionBloodMagic(customPotionPlanarBindingID, true, 0).setIconIndex(0, 0).setPotionName("Planar Binding"));
customPotionSoulFray = (new PotionBloodMagic(customPotionSoulFrayID, true, 0).setIconIndex(0, 0).setPotionName("Soul Fray"));
customPotionSoulHarden = (new PotionBloodMagic(customPotionSoulHardenID, false, 0).setIconIndex(0, 0).setPotionName("Soul Harden"));
customPotionDeaf = (new PotionBloodMagic(customPotionDeafID, true, 0).setIconIndex(0, 0).setPotionName("Deafness"));
customPotionFeatherFall = (new PotionBloodMagic(customPotionFeatherFallID, false, 0).setIconIndex(0, 0).setPotionName("Feather Fall"));
customPotionDemonCloak = (new PotionBloodMagic(customPotionDemonCloakID, false, 0).setIconIndex(0, 0).setPotionName("Demon Cloaking"));
customPotionAmphibian = (new PotionBloodMagic(customPotionAmphibianID, false, 0).setIconIndex(0, 0).setPotionName("Amphibian"));
customPotionDrowning = (new PotionDrowning(customPotionDrowningID, true, 0)).setIconIndex(0, 0).setPotionName("Drowning");
customPotionBoost = (new PotionBoost(customPotionBoostID, false, 0)).setIconIndex(0, 0).setPotionName("Boost");
customPotionProjProt = (new PotionProjectileProtect(customPotionProjProtID, false, 0)).setIconIndex(0, 0).setPotionName("Whirlwind");
customPotionInhibit = (new PotionInhibit(customPotionInhibitID, false, 0)).setIconIndex(0, 0).setPotionName("Inhibit");
customPotionFlight = (new PotionFlight(customPotionFlightID, false, 0)).setIconIndex(0, 0).setPotionName("Flight");
customPotionReciprocation = (new PotionReciprocation(customPotionReciprocationID, false, 0xFFFFFF)).setIconIndex(0, 0).setPotionName("Reciprocation");
customPotionFlameCloak = (new PotionFlameCloak(customPotionFlameCloakID, false, 0).setIconIndex(0, 0).setPotionName("Flame Cloak"));
customPotionIceCloak = (new PotionIceCloak(customPotionIceCloakID, false, 0).setIconIndex(0, 0).setPotionName("Ice Cloak"));
customPotionHeavyHeart = (new PotionHeavyHeart(customPotionHeavyHeartID, true, 0).setIconIndex(0, 0).setPotionName("Heavy Heart"));
customPotionFireFuse = (new PotionFireFuse(customPotionFireFuseID, true, 0).setIconIndex(0, 0).setPotionName("Fire Fuse"));
customPotionPlanarBinding = (new PotionPlanarBinding(customPotionPlanarBindingID, true, 0).setIconIndex(0, 0).setPotionName("Planar Binding"));
customPotionSoulFray = (new PotionSoulFray(customPotionSoulFrayID, true, 0).setIconIndex(0, 0).setPotionName("Soul Fray"));
PlayerSacrificeHandler.soulFrayId = customPotionSoulFray;
customPotionSoulHarden = (new PotionSoulHarden(customPotionSoulHardenID, false, 0).setIconIndex(0, 0).setPotionName("Soul Harden"));
customPotionDeaf = (new PotionDeaf(customPotionDeafID, true, 0).setIconIndex(0, 0).setPotionName("Deafness"));
customPotionFeatherFall = (new PotionFeatherFall(customPotionFeatherFallID, false, 0).setIconIndex(0, 0).setPotionName("Feather Fall"));
customPotionDemonCloak = (new PotionDemonCloak(customPotionDemonCloakID, false, 0).setIconIndex(0, 0).setPotionName("Demon Cloaking"));
customPotionAmphibian = (new PotionAmphibian(customPotionAmphibianID, false, 0).setIconIndex(0, 0).setPotionName("Amphibian"));
ItemStack masterBloodOrbStack = new ItemStack(ModItems.masterBloodOrb);
ItemStack transcendentBloodOrbStack = new ItemStack(ModItems.transcendentBloodOrb);
@ -744,8 +776,8 @@ public class AlchemicalWizardry
GameRegistry.registerTileEntity(TEAltar.class, "containerAltar");
GameRegistry.registerTileEntity(TEMasterStone.class, "containerMasterStone");
GameRegistry.registerTileEntity(TESocket.class, "containerSocket");
GameRegistry.registerTileEntity(TEChemistrySet.class, "containerWritingTable");
GameRegistry.registerTileEntity(TESpellTable.class, "containerHomHeart");
GameRegistry.registerTileEntity(TEWritingTable.class, "containerWritingTable");
GameRegistry.registerTileEntity(TEHomHeart.class, "containerHomHeart");
GameRegistry.registerTileEntity(TEPedestal.class, "containerPedestal");
GameRegistry.registerTileEntity(TEPlinth.class, "containerPlinth");
GameRegistry.registerTileEntity(TETeleposer.class, "containerTeleposer");
@ -760,8 +792,8 @@ public class AlchemicalWizardry
GameRegistry.registerTileEntity(TESchematicSaver.class, "containerSchematicSaver");
GameRegistry.registerTileEntity(TESpectralBlock.class, "containerSpectralBlock");
GameRegistry.registerTileEntity(TEReagentConduit.class, "containerReagentConduit");
GameRegistry.registerTileEntity(TEBelljar.class, "containerBellJar");
GameRegistry.registerTileEntity(TEAlchemicalCalcinator.class, "containerAlchemicCalcinator");
GameRegistry.registerTileEntity(TEBellJar.class, "containerBellJar");
GameRegistry.registerTileEntity(TEAlchemicCalcinator.class, "containerAlchemicCalcinator");
GameRegistry.registerTileEntity(TEDemonChest.class, "containerDemonChest");
GameRegistry.registerTileEntity(TEMimicBlock.class, "containerMimic");
GameRegistry.registerTileEntity(TECrucible.class, "containerCrucible");
@ -779,7 +811,7 @@ public class AlchemicalWizardry
ModBlocks.bloodStoneBrick.setHarvestLevel("pickaxe", 0);
ModBlocks.largeBloodStoneBrick.setHarvestLevel("pickaxe", 0);
ModBlocks.blockWritingTable.setHarvestLevel("pickaxe", 1);
ModBlocks.blockSpellTable.setHarvestLevel("pickaxe", 1);
ModBlocks.blockHomHeart.setHarvestLevel("pickaxe", 1);
ModBlocks.blockPedestal.setHarvestLevel("pickaxe", 2);
ModBlocks.blockPlinth.setHarvestLevel("pickaxe", 2);
ModBlocks.blockTeleposer.setHarvestLevel("pickaxe", 2);
@ -789,7 +821,7 @@ public class AlchemicalWizardry
//Gui registration
UpgradedAltars.loadAltars();
BlockArmourForge.initializeRecipes();
ArmourForge.initializeRecipes();
TEPlinth.initialize();
initAlchemyPotionRecipes();
@ -811,7 +843,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);
@ -827,6 +859,7 @@ public class AlchemicalWizardry
ItemStack strengthenedCatalystStackCrafted = new ItemStack(ModItems.baseAlchemyItems, 2, 3);
ItemStack fracturedBoneStackCrafted = new ItemStack(ModItems.baseAlchemyItems, 4, 5);
//TODO NEW RECIPES!
AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.weakBindingAgent), 10, new ItemStack[]{simpleCatalystStack, simpleCatalystStack, new ItemStack(Items.clay_ball)}, 2);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.standardBindingAgent), 15, new ItemStack[]{new ItemStack(ModItems.weakBindingAgent), sanctusStack, new ItemStack(ModItems.crystallos)}, 3);
@ -865,6 +898,7 @@ public class AlchemicalWizardry
AlchemyRecipeRegistry.registerRecipe(reductusStack, 20, new ItemStack[]{redstoneStack, goldIngotStack, strengthenedCatalystStack, new ItemStack(Blocks.soul_sand), new ItemStack(Items.carrot)}, 3);
AlchemyRecipeRegistry.registerRecipe(potentiaStack, 20, new ItemStack[]{glowstoneDustStack, strengthenedCatalystStack, lapisStack, lapisStack, new ItemStack(Items.quartz)}, 3);
HomSpellRegistry.registerBasicSpell(new ItemStack(Items.flint_and_steel), new SpellFireBurst());
HomSpellRegistry.registerBasicSpell(new ItemStack(Blocks.ice), new SpellFrozenWater());
HomSpellRegistry.registerBasicSpell(new ItemStack(Blocks.tnt), new SpellExplosions());
@ -916,6 +950,8 @@ public class AlchemicalWizardry
EntityRegistry.registerModEntity(EntityMinorDemonGruntGuardianIce.class, "MinorDemonGruntGuardianIce", 42, this, 80, 3, true);
EntityRegistry.registerModEntity(EntityMinorDemonGruntGuardianEarth.class, "MinorDemonGruntGuardianEarth", 43, this, 80, 3, true);
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.standardBindingAgent), 1, 3, this.standardBindingAgentDungeonChance / 5));
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.mundanePowerCatalyst), 1, 1, this.mundanePowerCatalystDungeonChance / 5));
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.mundaneLengtheningCatalyst), 1, 1, this.mundaneLengtheningCatalystDungeonChance / 5));
@ -1052,7 +1088,7 @@ public class AlchemicalWizardry
GameRegistry.addRecipe(new ItemStack(ModItems.itemTankSegmenter), "gqi", " rq", "q g", 'q', quartzRodStack, 'i', ironIngotStack, 'r', strengthenedCatalystStack, 'g', goldIngotStack);
GameRegistry.addRecipe(new ItemStack(ModItems.itemDestinationClearer), "qcq", "c c", "qcq", 'q', quartzRodStack, 'c', simpleCatalystStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockAlchemicalCalcinator), "pgp", "gsg", "ccc", 'p', crackedRunicPlateStack, 'g', glassStack, 's', strengthenedCatalystStack, 'c', cobblestoneStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockAlchemicCalcinator), "pgp", "gsg", "ccc", 'p', crackedRunicPlateStack, 'g', glassStack, 's', strengthenedCatalystStack, 'c', cobblestoneStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockCrystalBelljar), "GGG", "GcG", "www", 'G', glassStack, 'c', concentratedCatalystStack, 'w', new ItemStack(Blocks.wooden_slab, 1, craftingConstant));
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockReagentConduit), "isi", "scs", "isi", 'c', concentratedCatalystStack, 's', stringStack, 'i', ironIngotStack);
@ -1108,7 +1144,7 @@ public class AlchemicalWizardry
{
proxy.registerPostSideObjects();
//TODO Thaumcraft Integration
/* if (Loader.isModLoaded("Thaumcraft"))
if (Loader.isModLoaded("Thaumcraft"))
{
isThaumcraftLoaded = true;
@ -1137,6 +1173,7 @@ public class AlchemicalWizardry
ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguinePants), aspectList);
ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineBoots), aspectList);
if (itemGoggles != null)
{
BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineHelmet), itemGoggles);
@ -1188,11 +1225,11 @@ public class AlchemicalWizardry
ModItems.itemBloodFrame = new ItemBloodFrame().setUnlocalizedName("bloodFrame");
Item provenFrame = GameRegistry.findItem("Forestry", "frameImpregnated");
ItemStack provenFrame = GameRegistry.findItemStack("Forestry", "frameImpregnated", 1);
if(provenFrame !=null)
{
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.itemBloodFrame), new ItemStack(provenFrame, 1), 3, 30000, 20, 20, false);
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.itemBloodFrame), provenFrame, 3, 30000, 20, 20, false);
}
} else
{
@ -1211,13 +1248,12 @@ public class AlchemicalWizardry
AlchemicalWizardry.logger.info("Loaded MineTweaker 3 Integration");
}
// if(Loader.isModLoaded("AgriCraft"))
// {
// HarvestRegistry.registerHarvestHandler(new AgriCraftCropHarvestHandler());
// AlchemicalWizardry.logger.info("Loaded AgriCraft Handlers!");
// }
*/
isThaumcraftLoaded = Loader.isModLoaded("Thaumcraft"); //this is temp.
if(Loader.isModLoaded("AgriCraft"))
{
HarvestRegistry.registerHarvestHandler(new AgriCraftCropHarvestHandler());
AlchemicalWizardry.logger.info("Loaded AgriCraft Handlers!");
}
isBotaniaLoaded = Loader.isModLoaded("Botania");
isPneumaticCraftLoaded = Loader.isModLoaded("PneumaticCraft");
isFMPLoaded = Loader.isModLoaded("ForgeMultipart");
@ -1236,12 +1272,12 @@ public class AlchemicalWizardry
// this.createItemTextureFiles();
}
/* @Optional.Method(modid = "guideapi")
@Optional.Method(modid = "guideapi")
public static void registerBMBook()
{
BloodMagicGuide.registerGuide();
}
*/
public static void blacklistAccelerators()
{
if (Loader.isModLoaded("Torcherino"))
@ -1365,13 +1401,13 @@ public class AlchemicalWizardry
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.diamond), Potion.resistance.id, 2 * 60 * 20);
if(!AlchemicalWizardry.potionDisableSaturation)
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.poisonous_potato), Potion.saturation.id, 2); //saturation
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.poisonous_potato), Potion.field_76443_y.id, 2); //saturation
if(!AlchemicalWizardry.potionDisableHealthBoost)
AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.demonBloodShard), Potion.field_180152_w.id, 4 * 60 * 20); //health boost
AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.demonBloodShard), Potion.field_76434_w.id, 4 * 60 * 20); //health boost
if(!AlchemicalWizardry.potionDisableAbsorption)
AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.weakBloodShard), Potion.absorption.id, 4 * 60 * 20); //Absorption
AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.weakBloodShard), Potion.field_76444_x.id, 4 * 60 * 20); //Absorption
if(!AlchemicalWizardry.potionDisableBoost)
AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.terrae), AlchemicalWizardry.customPotionBoost.id, 60 * 20);
@ -1518,10 +1554,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.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));
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));
}
@ -1694,7 +1730,7 @@ public class AlchemicalWizardry
//
// InputStream input = AlchemicalWizardry.class.getResourceAsStream("/assets/alchemicalwizardryBooks/books/book.txt");
//
// Minecraft.getMinecraft().fontRendererObj.setUnicodeFlag(true);
// Minecraft.getMinecraft().fontRenderer.setUnicodeFlag(true);
//
// if(input != null)
// {
@ -1770,9 +1806,9 @@ public class AlchemicalWizardry
//
// strLine = strLine.replace('”', '"').replace('“','"').replace("…", "...").replace('’', '\'').replace('–', '-');
//
// if(Minecraft.getMinecraft() != null && Minecraft.getMinecraft().fontRendererObj != null)
// if(Minecraft.getMinecraft() != null && Minecraft.getMinecraft().fontRenderer != null)
// {
// List list = Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(strLine, 110);
// List list = Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(strLine, 110);
// if(list != null)
// {
// System.out.println("Number of lines: " + list.size());
@ -1786,7 +1822,7 @@ public class AlchemicalWizardry
// boolean changePage = false;
// int length = word.length();
// word = word.replace('\t', ' ');
// List list = Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(strings[currentPage] + " " + word, 110);
// List list = Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(strings[currentPage] + " " + word, 110);
//
// if(list.size() > maxLines)
// {
@ -1817,8 +1853,8 @@ public class AlchemicalWizardry
// }
// }
//
// int currentLines = Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(strings[currentPage], 110).size();
// while(Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(strings[currentPage] + " ", 110).size() <= currentLines)
// int currentLines = Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(strings[currentPage], 110).size();
// while(Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(strings[currentPage] + " ", 110).size() <= currentLines)
// {
// {
// strings[currentPage] = strings[currentPage] + " ";
@ -1853,7 +1889,7 @@ public class AlchemicalWizardry
////
// }
//
// Minecraft.getMinecraft().fontRendererObj.setUnicodeFlag(false);
// Minecraft.getMinecraft().fontRenderer.setUnicodeFlag(false);
//
// } catch (FileNotFoundException e) {
// // TODO Auto-generated catch block
@ -1865,12 +1901,12 @@ public class AlchemicalWizardry
// }
// }
// @Mod.EventHandler
// public void initCommands(FMLServerStartingEvent event)
// {
// event.registerServerCommand(new CommandBind());
// event.registerServerCommand(new CommandUnbind());
// event.registerServerCommand(new CommandSN());
// event.registerServerCommand(new CommandDownloadGAPI());
// }
@Mod.EventHandler
public void initCommands(FMLServerStartingEvent event)
{
event.registerServerCommand(new CommandBind());
event.registerServerCommand(new CommandUnbind());
event.registerServerCommand(new CommandSN());
event.registerServerCommand(new CommandDownloadGAPI());
}
}

View file

@ -9,8 +9,6 @@ import java.util.Map.Entry;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityLivingBase;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.relauncher.Side;
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
import WayofTime.alchemicalWizardry.client.renderer.ColourThreshold;
import WayofTime.alchemicalWizardry.client.renderer.RenderHelper;
@ -18,6 +16,8 @@ import WayofTime.alchemicalWizardry.common.demonVillage.DemonVillagePath;
import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal;
import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour;
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
/**
* Created with IntelliJ IDEA.
@ -32,8 +32,6 @@ public class BloodMagicConfiguration
public static Configuration config;
public static String[] blocksToBeDisabled;
public static String[] itemsToBeDisabled;
public static String[] teleposerBlacklist;
public static String[] blacklist = {};
@ -108,6 +106,7 @@ public class BloodMagicConfiguration
AlchemicalWizardry.causeHungerChatMessage = config.get("WimpySettings", "causeHungerChatMessage", true).getBoolean();
// AlchemicalWizardry.lockdownAltar = config.get("WimpySettings", "LockdownAltarWithRegen", true).getBoolean();
AlchemicalWizardry.lockdownAltar = false;
AlchemicalWizardry.disableBoundToolsRightClick = config.get("WimpySettings", "disableBoundToolsRightClick", false).getBoolean(false);
AlchemicalWizardry.ritualDisabledWater = config.get("Ritual Blacklist", "Ritual of the Full Spring", false).getBoolean(false);
AlchemicalWizardry.ritualDisabledLava = config.get("Ritual Blacklist", "Serenade of the Nether", false).getBoolean(false);
@ -145,7 +144,7 @@ public class BloodMagicConfiguration
AlchemicalWizardry.ritualDisabledCrafting = config.get("Ritual Blacklist", "Rhythm of the Beating Anvil", false).getBoolean(false);
AlchemicalWizardry.ritualDisabledPhantomHands = config.get("Ritual Blacklist", "Orchestra of the Phantom Hands", false).getBoolean(false);
AlchemicalWizardry.ritualDisabledSphereIsland = config.get("Ritual Blacklist", "Birth of the Bastion", false).getBoolean(false);
AlchemicalWizardry.potionDisableRegen = config.get("Alchemy Potion Blacklist", "Regeneration", false).getBoolean(false);
AlchemicalWizardry.potionDisableNightVision = config.get("Alchemy Potion Blacklist", "Night Vision", false).getBoolean(false);
AlchemicalWizardry.potionDisableFireResistance = config.get("Alchemy Potion Blacklist", "Fire Resistance", false).getBoolean(false);
@ -195,9 +194,6 @@ public class BloodMagicConfiguration
AlchemicalWizardry.isDemonRitualCreativeOnly = config.get(tempDemonConfigs, "IsDemonRitualCreativeOnly", false).getBoolean();
BoundArmour.tryComplexRendering = config.get("WimpySettings", "UseFancyBoundArmour", true).getBoolean(true);
blocksToBeDisabled = config.getStringList("Disable blocks here", "WimpySettings", new String[]{""}, "Type in the unlocalized name of the block you want disabled here (separate them using ENTER)");
itemsToBeDisabled = config.getStringList("Disable items here", "WimpySettings", new String[]{""}, "Type in the unlocalized name of the item you want disabled (separate them using ENTER)");
// ItemIncense.itemDuration = config.get("TestIncenseSettings", "ItemDuration", 100).getInt();
// ItemIncense.minValue = config.get("TestIncenseSettings", "MinValue", 0).getInt();
@ -205,7 +201,6 @@ public class BloodMagicConfiguration
// PlayerSacrificeHandler.scalingOfSacrifice = (float) config.get("TestIncenseSettings", "ScalingFactor", 0.0025f).getDouble();
// PlayerSacrificeHandler.soulFrayDuration = config.get("TestIncenseSettings", "SoulFrayDuration", 400).getInt();
Side side = FMLCommonHandler.instance().getSide();
if (side == Side.CLIENT)
{
@ -213,6 +208,7 @@ public class BloodMagicConfiguration
RenderHelper.yOffset = config.get("ClientSettings", "AlchemyHUDyOffset", 2).getInt();
RenderHelper.lpBarX = config.get("ClientSettings", "LPHUDxOffset", 12).getInt();
RenderHelper.lpBarY = config.get("ClientSettings", "LPHUDyOffset", 75).getInt();
AlchemicalWizardry.displayRitualAnimation = config.get("ClientSettings", "Display Ritual Animation", true).getBoolean(true);
}
config.save();
@ -220,7 +216,6 @@ public class BloodMagicConfiguration
public static void set(String categoryName, String propertyName, String newValue)
{
config.load();
if (config.getCategoryNames().contains(categoryName))
{
@ -230,8 +225,6 @@ public class BloodMagicConfiguration
}
}
config.save();
}
public static void loadBlacklist()
@ -253,49 +246,49 @@ public class BloodMagicConfiguration
config.save();
}
public static void blacklistRituals()
{
if (AlchemicalWizardry.ritualDisabledWater) r("AW001Water");
if (AlchemicalWizardry.ritualDisabledLava) r("AW002Lava");
if (AlchemicalWizardry.ritualDisabledGreenGrove) r("AW003GreenGrove");
if (AlchemicalWizardry.ritualDisabledInterdiction) r("AW004Interdiction");
if (AlchemicalWizardry.ritualDisabledContainment) r("AW005Containment");
if (AlchemicalWizardry.ritualDisabledBinding) r("AW006Binding");
if (AlchemicalWizardry.ritualDisabledUnbinding) r("AW007Unbinding"); // "A medium dry martini, lemon peel. Shaken, not stirred."
if (AlchemicalWizardry.ritualDisabledHighJump) r("AW008HighJump");
if (AlchemicalWizardry.ritualDisabledMagnetism) r("AW009Magnetism");
if (AlchemicalWizardry.ritualDisabledCrusher) r("AW010Crusher");
if (AlchemicalWizardry.ritualDisabledSpeed) r("AW011Speed");
if (AlchemicalWizardry.ritualDisabledAnimalGrowth) r("AW012AnimalGrowth");
if (AlchemicalWizardry.ritualDisabledSuffering) r("AW013Suffering");
if (AlchemicalWizardry.ritualDisabledRegen) r("AW014Regen");
if (AlchemicalWizardry.ritualDisabledFeatheredKnife) r("AW015FeatheredKnife");
if (AlchemicalWizardry.ritualDisabledFeatheredEarth) r("AW016FeatheredEarth");
if (AlchemicalWizardry.ritualDisabledGaia) r("AW017Gaia");
if (AlchemicalWizardry.ritualDisabledCondor) r("AW018Condor");
if (AlchemicalWizardry.ritualDisabledFallingTower) r("AW019FallingTower");
if (AlchemicalWizardry.ritualDisabledBalladOfAlchemy) r("AW020BalladOfAlchemy");
if (AlchemicalWizardry.ritualDisabledExpulsion) r("AW021Expulsion");
if (AlchemicalWizardry.ritualDisabledSuppression) r("AW022Suppression");
if (AlchemicalWizardry.ritualDisabledZephyr) r("AW023Zephyr");
if (AlchemicalWizardry.ritualDisabledHarvest) r("AW024Harvest");
if (AlchemicalWizardry.ritualDisabledConduit) r("AW025Conduit");
if (AlchemicalWizardry.ritualDisabledEllipsoid) r("AW026Ellipsoid");
if (AlchemicalWizardry.ritualDisabledEvaporation) r("AW027Evaporation");
if (AlchemicalWizardry.ritualDisabledSpawnWard) r("AW028SpawnWard");
if (AlchemicalWizardry.ritualDisabledVeilOfEvil) r("AW029VeilOfEvil");
if (AlchemicalWizardry.ritualDisabledFullStomach) r("AW030FullStomach");
if (AlchemicalWizardry.ritualDisabledConvocation) r("AW031Convocation");
if (AlchemicalWizardry.ritualDisabledSymmetry) r("AW032Symmetry");
if (AlchemicalWizardry.ritualDisabledStalling) r("AW033Stalling");
if (AlchemicalWizardry.ritualDisabledCrafting) r("AW034Crafting");
if (AlchemicalWizardry.ritualDisabledPhantomHands) r("AW035PhantomHands");
if (AlchemicalWizardry.ritualDisabledSphereIsland) r("AW036SphereIsland");
}
public static void blacklistRituals()
{
if (AlchemicalWizardry.ritualDisabledWater) r("AW001Water");
if (AlchemicalWizardry.ritualDisabledLava) r("AW002Lava");
if (AlchemicalWizardry.ritualDisabledGreenGrove) r("AW003GreenGrove");
if (AlchemicalWizardry.ritualDisabledInterdiction) r("AW004Interdiction");
if (AlchemicalWizardry.ritualDisabledContainment) r("AW005Containment");
if (AlchemicalWizardry.ritualDisabledBinding) r("AW006Binding");
if (AlchemicalWizardry.ritualDisabledUnbinding) r("AW007Unbinding"); // "A medium dry martini, lemon peel. Shaken, not stirred."
if (AlchemicalWizardry.ritualDisabledHighJump) r("AW008HighJump");
if (AlchemicalWizardry.ritualDisabledMagnetism) r("AW009Magnetism");
if (AlchemicalWizardry.ritualDisabledCrusher) r("AW010Crusher");
if (AlchemicalWizardry.ritualDisabledSpeed) r("AW011Speed");
if (AlchemicalWizardry.ritualDisabledAnimalGrowth) r("AW012AnimalGrowth");
if (AlchemicalWizardry.ritualDisabledSuffering) r("AW013Suffering");
if (AlchemicalWizardry.ritualDisabledRegen) r("AW014Regen");
if (AlchemicalWizardry.ritualDisabledFeatheredKnife) r("AW015FeatheredKnife");
if (AlchemicalWizardry.ritualDisabledFeatheredEarth) r("AW016FeatheredEarth");
if (AlchemicalWizardry.ritualDisabledGaia) r("AW017Gaia");
if (AlchemicalWizardry.ritualDisabledCondor) r("AW018Condor");
if (AlchemicalWizardry.ritualDisabledFallingTower) r("AW019FallingTower");
if (AlchemicalWizardry.ritualDisabledBalladOfAlchemy) r("AW020BalladOfAlchemy");
if (AlchemicalWizardry.ritualDisabledExpulsion) r("AW021Expulsion");
if (AlchemicalWizardry.ritualDisabledSuppression) r("AW022Suppression");
if (AlchemicalWizardry.ritualDisabledZephyr) r("AW023Zephyr");
if (AlchemicalWizardry.ritualDisabledHarvest) r("AW024Harvest");
if (AlchemicalWizardry.ritualDisabledConduit) r("AW025Conduit");
if (AlchemicalWizardry.ritualDisabledEllipsoid) r("AW026Ellipsoid");
if (AlchemicalWizardry.ritualDisabledEvaporation) r("AW027Evaporation");
if (AlchemicalWizardry.ritualDisabledSpawnWard) r("AW028SpawnWard");
if (AlchemicalWizardry.ritualDisabledVeilOfEvil) r("AW029VeilOfEvil");
if (AlchemicalWizardry.ritualDisabledFullStomach) r("AW030FullStomach");
if (AlchemicalWizardry.ritualDisabledConvocation) r("AW031Convocation");
if (AlchemicalWizardry.ritualDisabledSymmetry) r("AW032Symmetry");
if (AlchemicalWizardry.ritualDisabledStalling) r("AW033Stalling");
if (AlchemicalWizardry.ritualDisabledCrafting) r("AW034Crafting");
if (AlchemicalWizardry.ritualDisabledPhantomHands) r("AW035PhantomHands");
if (AlchemicalWizardry.ritualDisabledSphereIsland) r("AW036SphereIsland");
}
private static void r(String ritualID)
{
Rituals.ritualMap.remove(ritualID);
Rituals.keyList.remove(ritualID);
}
private static void r(String ritualID)
{
Rituals.ritualMap.remove(ritualID);
Rituals.keyList.remove(ritualID);
}
}

View file

@ -1,26 +1,23 @@
package WayofTime.alchemicalWizardry;
import WayofTime.alchemicalWizardry.client.BlockRenderer;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.fml.common.registry.GameRegistry;
import WayofTime.alchemicalWizardry.common.block.BlockArmourForge;
import WayofTime.alchemicalWizardry.common.block.BlockAlchemicalCalcinator;
import WayofTime.alchemicalWizardry.common.block.ArmourForge;
import WayofTime.alchemicalWizardry.common.block.BlockAlchemicCalcinator;
import WayofTime.alchemicalWizardry.common.block.BlockAltar;
import WayofTime.alchemicalWizardry.common.block.BlockBelljar;
import WayofTime.alchemicalWizardry.common.block.BlockBloodLightSource;
import WayofTime.alchemicalWizardry.common.block.BlockConduit;
import WayofTime.alchemicalWizardry.common.block.BlockIncenseCrucible;
import WayofTime.alchemicalWizardry.common.block.BlockCrucible;
import WayofTime.alchemicalWizardry.common.block.BlockCrystal;
import WayofTime.alchemicalWizardry.common.block.BlockDemonPortal;
import WayofTime.alchemicalWizardry.common.block.BlockEnchantmentGlyph;
import WayofTime.alchemicalWizardry.common.block.BlockSpellTable;
import WayofTime.alchemicalWizardry.common.block.BlockHomHeart;
import WayofTime.alchemicalWizardry.common.block.BlockMasterStone;
import WayofTime.alchemicalWizardry.common.block.BlockPedestal;
import WayofTime.alchemicalWizardry.common.block.BlockPlinth;
import WayofTime.alchemicalWizardry.common.block.BlockReagentConduit;
import WayofTime.alchemicalWizardry.common.block.BlockSchematicSaver;
import WayofTime.alchemicalWizardry.common.block.BlockFilledSocket;
import WayofTime.alchemicalWizardry.common.block.BlockSocket;
import WayofTime.alchemicalWizardry.common.block.BlockSpectralContainer;
import WayofTime.alchemicalWizardry.common.block.BlockSpellEffect;
import WayofTime.alchemicalWizardry.common.block.BlockSpellEnhancement;
@ -28,20 +25,20 @@ import WayofTime.alchemicalWizardry.common.block.BlockSpellModifier;
import WayofTime.alchemicalWizardry.common.block.BlockSpellParadigm;
import WayofTime.alchemicalWizardry.common.block.BlockStabilityGlyph;
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
import WayofTime.alchemicalWizardry.common.block.BlockChemistrySet;
import WayofTime.alchemicalWizardry.common.block.BlockBloodRune;
import WayofTime.alchemicalWizardry.common.block.BlockBloodStoneBrick;
import WayofTime.alchemicalWizardry.common.block.BlockEfficiencyRune;
import WayofTime.alchemicalWizardry.common.block.BlockEmptySocket;
import WayofTime.alchemicalWizardry.common.block.BlockImperfectRitualStone;
import WayofTime.alchemicalWizardry.common.block.BlockLargeBloodStoneBrick;
import WayofTime.alchemicalWizardry.common.block.BlockLifeEssence;
import WayofTime.alchemicalWizardry.common.block.BlockMimic;
import WayofTime.alchemicalWizardry.common.block.BlockRitualStone;
import WayofTime.alchemicalWizardry.common.block.BlockRuneOfSacrifice;
import WayofTime.alchemicalWizardry.common.block.BlockRuneOfSelfSacrifice;
import WayofTime.alchemicalWizardry.common.block.BlockSpectral;
import WayofTime.alchemicalWizardry.common.block.BlockSpeedRune;
import WayofTime.alchemicalWizardry.common.block.BlockWritingTable;
import WayofTime.alchemicalWizardry.common.block.BloodRune;
import WayofTime.alchemicalWizardry.common.block.BloodStoneBrick;
import WayofTime.alchemicalWizardry.common.block.EfficiencyRune;
import WayofTime.alchemicalWizardry.common.block.EmptySocket;
import WayofTime.alchemicalWizardry.common.block.ImperfectRitualStone;
import WayofTime.alchemicalWizardry.common.block.LargeBloodStoneBrick;
import WayofTime.alchemicalWizardry.common.block.LifeEssenceBlock;
import WayofTime.alchemicalWizardry.common.block.MimicBlock;
import WayofTime.alchemicalWizardry.common.block.RitualStone;
import WayofTime.alchemicalWizardry.common.block.RuneOfSacrifice;
import WayofTime.alchemicalWizardry.common.block.RuneOfSelfSacrifice;
import WayofTime.alchemicalWizardry.common.block.SpectralBlock;
import WayofTime.alchemicalWizardry.common.block.SpeedRune;
import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.BlockDemonChest;
import WayofTime.alchemicalWizardry.common.items.ItemBlockCrystalBelljar;
import WayofTime.alchemicalWizardry.common.items.ItemBloodRuneBlock;
@ -52,8 +49,7 @@ import WayofTime.alchemicalWizardry.common.items.ItemSpellEnhancementBlock;
import WayofTime.alchemicalWizardry.common.items.ItemSpellModifierBlock;
import WayofTime.alchemicalWizardry.common.items.ItemSpellParadigmBlock;
import WayofTime.alchemicalWizardry.common.items.ItemStabilityGlyphBlock;
import java.util.ArrayList;
import cpw.mods.fml.common.registry.GameRegistry;
/**
* Created with IntelliJ IDEA.
@ -66,11 +62,11 @@ public class ModBlocks
public static Block bloodStoneBrick;
public static Block largeBloodStoneBrick;
public static BlockAltar blockAltar;
public static BlockBloodRune bloodRune;
public static BlockSpeedRune speedRune;
public static BlockEfficiencyRune efficiencyRune;
public static BlockRuneOfSacrifice runeOfSacrifice;
public static BlockRuneOfSelfSacrifice runeOfSelfSacrifice;
public static BloodRune bloodRune;
public static SpeedRune speedRune;
public static EfficiencyRune efficiencyRune;
public static RuneOfSacrifice runeOfSacrifice;
public static RuneOfSelfSacrifice runeOfSelfSacrifice;
public static Block blockMasterStone;
public static Block ritualStone;
public static Block imperfectRitualStone;
@ -78,7 +74,7 @@ public class ModBlocks
public static Block emptySocket;
public static Block armourForge;
public static Block blockWritingTable;
public static Block blockSpellTable;
public static Block blockHomHeart;
public static Block blockPedestal;
public static Block blockPlinth;
public static Block blockLifeEssence;
@ -94,7 +90,7 @@ public class ModBlocks
public static Block blockBuildingSchematicSaver;
public static Block blockDemonPortal;
public static Block blockReagentConduit;
public static Block blockAlchemicalCalcinator;
public static Block blockAlchemicCalcinator;
public static Block blockCrystalBelljar;
public static Block blockDemonChest;
public static Block blockCrystal;
@ -103,99 +99,98 @@ public class ModBlocks
public static Block blockStabilityGlyph;
public static Block blockCrucible;
public static ArrayList<String> blocksNotToBeRegistered = new ArrayList<String>();
public static void init()
{
/* blockAltar = (BlockAltar) registerBlock(new BlockAltar(), "altar");
bloodRune = (BlockBloodRune) registerBlock(new BlockBloodRune(), ItemBloodRuneBlock.class, "base_rune");
speedRune = (BlockSpeedRune) registerBlock(new BlockSpeedRune(), "speed_rune");
efficiencyRune = (BlockEfficiencyRune) registerBlock(new BlockEfficiencyRune(), "efficiency_rune");
runeOfSacrifice = (BlockRuneOfSacrifice) registerBlock(new BlockRuneOfSacrifice(), "sacrifice_rune");
runeOfSelfSacrifice = (BlockRuneOfSelfSacrifice) registerBlock(new BlockRuneOfSelfSacrifice(), "self_sacrifice_rune");
*/ blockTeleposer = registerBlock(new BlockTeleposer(), "teleposer");
spectralBlock = registerBlock(new BlockSpectral(), "spectral_block");
ritualStone = registerBlock(new BlockRitualStone(), "ritual_stone");
blockMasterStone = registerBlock(new BlockMasterStone(), "master_ritual_stone");
imperfectRitualStone = registerBlock(new BlockImperfectRitualStone(), "imperfect_ritual_stone");
emptySocket = registerBlock(new BlockEmptySocket(), "empty_socket");
bloodSocket = registerBlock(new BlockFilledSocket(), "filled_socket");
armourForge = registerBlock(new BlockArmourForge(), "soul_armour_forge");
largeBloodStoneBrick = registerBlock(new BlockLargeBloodStoneBrick(), "large_bloodstone_brick");
bloodStoneBrick = registerBlock(new BlockBloodStoneBrick(), "bloodstone_brick");
blockWritingTable = registerBlock(new BlockChemistrySet(), "chemistry_set");
blockSpellTable = registerBlock(new BlockSpellTable(), "spell_table");
blockPedestal = registerBlock(new BlockPedestal(), "pedestal");
blockPlinth = registerBlock(new BlockPlinth(), "plinth");
blockConduit = registerBlock(new BlockConduit(), "spell_conduit");
blockBloodLight = registerBlock(new BlockBloodLightSource(), "blood_light");
blockSpellEffect = registerBlock(new BlockSpellEffect(), "spell_effect");
blockSpellParadigm = registerBlock(new BlockSpellParadigm(), ItemSpellParadigmBlock.class, "spell_paradigm");
blockSpellModifier = registerBlock(new BlockSpellModifier(), ItemSpellEnhancementBlock.class, "spell_modifier");
blockSpellEnhancement = registerBlock(new BlockSpellEnhancement(), ItemSpellModifierBlock.class, "spell_enhancement");
blockSpectralContainer = registerBlock(new BlockSpectralContainer(), ItemSpellEffectBlock.class, "spectral_container");
blockDemonPortal = registerBlock(new BlockDemonPortal(), "demon_portal");
blockBuildingSchematicSaver = registerBlock(new BlockSchematicSaver(), "schematic_saver");
blockReagentConduit = registerBlock(new BlockReagentConduit(), "reagent_conduit");
blockAlchemicalCalcinator = registerBlock(new BlockAlchemicalCalcinator(), "alchemical_calcinator");
blockCrystalBelljar = registerBlock(new BlockBelljar(), ItemBlockCrystalBelljar.class, "belljar");
blockDemonChest = registerBlock(new BlockDemonChest(), "demon_chest");
blockCrystal = registerBlock(new BlockCrystal(), ItemCrystalBlock.class, "crystal_block");
blockMimic = registerBlock(new BlockMimic(), "mimic_block");
blockAltar = new BlockAltar();
bloodRune = new BloodRune();
speedRune = new SpeedRune();
efficiencyRune = new EfficiencyRune();
runeOfSacrifice = new RuneOfSacrifice();
runeOfSelfSacrifice = new RuneOfSelfSacrifice();
blockTeleposer = new BlockTeleposer();
spectralBlock = new SpectralBlock();
ritualStone = new RitualStone();
blockMasterStone = new BlockMasterStone();
imperfectRitualStone = new ImperfectRitualStone();
bloodSocket = new BlockSocket();
armourForge = new ArmourForge();
emptySocket = new EmptySocket();
largeBloodStoneBrick = new LargeBloodStoneBrick();
bloodStoneBrick = new BloodStoneBrick();
blockWritingTable = new BlockWritingTable();
blockHomHeart = new BlockHomHeart();
blockPedestal = new BlockPedestal();
blockPlinth = new BlockPlinth();
blockConduit = new BlockConduit();
blockBloodLight = new BlockBloodLightSource();
blockSpellEffect = new BlockSpellEffect();
blockSpellParadigm = new BlockSpellParadigm();
blockSpellModifier = new BlockSpellModifier();
blockSpellEnhancement = new BlockSpellEnhancement();
blockSpectralContainer = new BlockSpectralContainer();
blockDemonPortal = new BlockDemonPortal();
blockBuildingSchematicSaver = new BlockSchematicSaver();
blockReagentConduit = new BlockReagentConduit();
blockAlchemicCalcinator = new BlockAlchemicCalcinator();
blockCrystalBelljar = new BlockBelljar();
blockDemonChest = new BlockDemonChest();
blockCrystal = new BlockCrystal();
blockMimic = new MimicBlock();
blockLifeEssence = registerBlock(new BlockLifeEssence(), "life_essence");
blockEnchantmentGlyph = registerBlock(new BlockEnchantmentGlyph(), ItemEnchantmentGlyphBlock.class, "enchantment_glyph");
blockStabilityGlyph = registerBlock(new BlockStabilityGlyph(), ItemStabilityGlyphBlock.class, "stability_glyph");
blockCrucible = registerBlock(new BlockIncenseCrucible(), "incense_crucible");
blockLifeEssence = new LifeEssenceBlock();
blockEnchantmentGlyph = new BlockEnchantmentGlyph();
blockStabilityGlyph = new BlockStabilityGlyph();
blockCrucible = new BlockCrucible();
}
public static Block registerBlock(Block block, String unlocalizedName)
public static void registerBlocksInPre()
{
//TODO Insert Model Code here
block.setUnlocalizedName(unlocalizedName);
GameRegistry.registerBlock(ModBlocks.blockAltar, "Altar");
GameRegistry.registerBlock(ModBlocks.bloodRune, ItemBloodRuneBlock.class, "AlchemicalWizardry" + (ModBlocks.bloodRune.getUnlocalizedName().substring(5)));
GameRegistry.registerBlock(ModBlocks.blockLifeEssence, "lifeEssence");
GameRegistry.registerBlock(ModBlocks.speedRune, "speedRune");
GameRegistry.registerBlock(ModBlocks.efficiencyRune, "efficiencyRune");
GameRegistry.registerBlock(ModBlocks.runeOfSacrifice, "runeOfSacrifice");
GameRegistry.registerBlock(ModBlocks.runeOfSelfSacrifice, "runeOfSelfSacrifice");
GameRegistry.registerBlock(ModBlocks.ritualStone, "ritualStone");
GameRegistry.registerBlock(ModBlocks.blockMasterStone, "masterStone");
GameRegistry.registerBlock(ModBlocks.bloodSocket, "bloodSocket");
GameRegistry.registerBlock(ModBlocks.imperfectRitualStone, "imperfectRitualStone");
// if (!) //creative tab blacklist
{
block.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
}
GameRegistry.registerBlock(ModBlocks.armourForge, "armourForge");
GameRegistry.registerBlock(ModBlocks.emptySocket, "emptySocket");
GameRegistry.registerBlock(ModBlocks.bloodStoneBrick, "bloodStoneBrick");
GameRegistry.registerBlock(ModBlocks.largeBloodStoneBrick, "largeBloodStoneBrick");
GameRegistry.registerBlock(ModBlocks.blockWritingTable, "blockWritingTable");
GameRegistry.registerBlock(ModBlocks.blockHomHeart, "blockHomHeart");
GameRegistry.registerBlock(ModBlocks.blockPedestal, "blockPedestal");
GameRegistry.registerBlock(ModBlocks.blockPlinth, "blockPlinth");
GameRegistry.registerBlock(ModBlocks.blockTeleposer, "blockTeleposer");
GameRegistry.registerBlock(ModBlocks.spectralBlock, "spectralBlock");
GameRegistry.registerBlock(ModBlocks.blockBloodLight, "bloodLight");
// blocksNotToBeRegistered.clear();
// for (String unlocName : BloodMagicConfiguration.blocksToBeDisabled)
{
// if (unlocName.equals(unlocalizedName))
{
// blocksNotToBeRegistered.add(unlocName);
}
}
// if (!blocksNotToBeRegistered.contains(unlocalizedName))
{
// GameRegistry.registerBlock(block, unlocalizedName);
}
GameRegistry.registerBlock(ModBlocks.blockConduit, "blockConduit");
GameRegistry.registerBlock(ModBlocks.blockSpellParadigm, ItemSpellParadigmBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellParadigm.getUnlocalizedName()));
GameRegistry.registerBlock(ModBlocks.blockSpellEnhancement, ItemSpellEnhancementBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellEnhancement.getUnlocalizedName()));
GameRegistry.registerBlock(ModBlocks.blockSpellModifier, ItemSpellModifierBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellModifier.getUnlocalizedName()));
GameRegistry.registerBlock(ModBlocks.blockSpellEffect, ItemSpellEffectBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellEffect.getUnlocalizedName()));
// BlockRenderer.registerBlock(block);
GameRegistry.registerBlock(block, unlocalizedName);
return block;
GameRegistry.registerBlock(ModBlocks.blockSpectralContainer, "spectralContainer");
GameRegistry.registerBlock(ModBlocks.blockDemonPortal, "demonPortalMain");
GameRegistry.registerBlock(ModBlocks.blockBuildingSchematicSaver, "blockSchemSaver");
GameRegistry.registerBlock(ModBlocks.blockReagentConduit, "blockReagentConduit");
GameRegistry.registerBlock(ModBlocks.blockAlchemicCalcinator, "blockAlchemicCalcinator");
GameRegistry.registerBlock(ModBlocks.blockCrystalBelljar, ItemBlockCrystalBelljar.class, "blockCrystalBelljar");
GameRegistry.registerBlock(ModBlocks.blockDemonChest, "blockDemonChest");
GameRegistry.registerBlock(ModBlocks.blockCrystal, ItemCrystalBlock.class, "blockCrystal");
GameRegistry.registerBlock(ModBlocks.blockMimic, "blockMimic");
GameRegistry.registerBlock(ModBlocks.blockEnchantmentGlyph, ItemEnchantmentGlyphBlock.class, "blockEnchantmentGlyph");
GameRegistry.registerBlock(ModBlocks.blockStabilityGlyph, ItemStabilityGlyphBlock.class, "blockStabilityGlyph");
GameRegistry.registerBlock(ModBlocks.blockCrucible, "blockCrucible");
}
public static Block registerBlock(Block block, Class<? extends ItemBlock> itemBlockClass, String unlocalizedName)
public static void registerBlocksInInit()
{
block.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
// for (String unlocName : BloodMagicConfiguration.blocksToBeDisabled)
{
// if (unlocName.equals(unlocalizedName))
{
// blocksNotToBeRegistered.add(unlocName);
}
}
// if (!blocksNotToBeRegistered.contains(unlocalizedName))
{
GameRegistry.registerBlock(block, itemBlockClass, unlocalizedName);
}
// BlockRenderer.registerBlock(block);
return block;
}
}

View file

@ -1,61 +1,19 @@
package WayofTime.alchemicalWizardry;
import WayofTime.alchemicalWizardry.common.items.*;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;
import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool;
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool;
import WayofTime.alchemicalWizardry.common.items.BaseItems;
import WayofTime.alchemicalWizardry.common.items.ActivationCrystal;
import WayofTime.alchemicalWizardry.common.items.AirScribeTool;
import WayofTime.alchemicalWizardry.common.items.ApprenticeBloodOrb;
import WayofTime.alchemicalWizardry.common.items.ArchmageBloodOrb;
import WayofTime.alchemicalWizardry.common.items.ArmourInhibitor;
import WayofTime.alchemicalWizardry.common.items.BlankSpell;
import WayofTime.alchemicalWizardry.common.items.BloodShard;
import WayofTime.alchemicalWizardry.common.items.BoundAxe;
import WayofTime.alchemicalWizardry.common.items.BoundPickaxe;
import WayofTime.alchemicalWizardry.common.items.BoundShovel;
import WayofTime.alchemicalWizardry.common.items.CreativeOrb;
import WayofTime.alchemicalWizardry.common.items.CreativeDagger;
import WayofTime.alchemicalWizardry.common.items.DaggerOfSacrifice;
import WayofTime.alchemicalWizardry.common.items.DawnScribeTool;
import WayofTime.alchemicalWizardry.common.items.DemonCrystal;
import WayofTime.alchemicalWizardry.common.items.DemonicTelepositionFocus;
import WayofTime.alchemicalWizardry.common.items.DuskScribeTool;
import WayofTime.alchemicalWizardry.common.items.EarthScribeTool;
import WayofTime.alchemicalWizardry.common.items.Orb;
import WayofTime.alchemicalWizardry.common.items.EnergyBazooka;
import WayofTime.alchemicalWizardry.common.items.EnergyBlaster;
import WayofTime.alchemicalWizardry.common.items.BoundBlade;
import WayofTime.alchemicalWizardry.common.items.EnhancedTelepositionFocus;
import WayofTime.alchemicalWizardry.common.items.FireScribeTool;
import WayofTime.alchemicalWizardry.common.items.ItemAlchemyBase;
import WayofTime.alchemicalWizardry.common.items.ItemBloodLetterPack;
import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal;
import WayofTime.alchemicalWizardry.common.items.ItemComponents;
import WayofTime.alchemicalWizardry.common.items.KeyOfBinding;
import WayofTime.alchemicalWizardry.common.items.ItemIncense;
import WayofTime.alchemicalWizardry.common.items.ItemRitualDismantler;
import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner;
import WayofTime.alchemicalWizardry.common.items.LavaCrystal;
import WayofTime.alchemicalWizardry.common.items.LifeBucket;
import WayofTime.alchemicalWizardry.common.items.MagicianBloodOrb;
import WayofTime.alchemicalWizardry.common.items.MasterBloodOrb;
import WayofTime.alchemicalWizardry.common.items.ReinforcedTelepositionFocus;
import WayofTime.alchemicalWizardry.common.items.SacrificialDagger;
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
import WayofTime.alchemicalWizardry.common.items.TranscendentBloodOrb;
import WayofTime.alchemicalWizardry.common.items.WaterScribeTool;
import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour;
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourEarth;
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourFire;
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourWater;
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourWind;
import WayofTime.alchemicalWizardry.common.items.energy.AlchemicalRouter;
import WayofTime.alchemicalWizardry.common.items.energy.AlchemicalCleanser;
import WayofTime.alchemicalWizardry.common.items.energy.AlchemicalSegmenter;
import WayofTime.alchemicalWizardry.common.items.energy.ItemAttunedCrystal;
import WayofTime.alchemicalWizardry.common.items.energy.ItemDestinationClearer;
import WayofTime.alchemicalWizardry.common.items.energy.ItemTankSegmenter;
import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask;
import WayofTime.alchemicalWizardry.common.items.potion.AlchemyReagent;
import WayofTime.alchemicalWizardry.common.items.potion.AverageLengtheningCatalyst;
@ -88,13 +46,12 @@ import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheAssassin;
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheBridge;
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheFastMiner;
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfWind;
import WayofTime.alchemicalWizardry.common.items.sigil.SigilCompress;
import WayofTime.alchemicalWizardry.common.items.sigil.SigilPackRat;
import WayofTime.alchemicalWizardry.common.items.sigil.SigilSeer;
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;
import cpw.mods.fml.common.registry.GameRegistry;
/**
* Created with IntelliJ IDEA.
@ -133,7 +90,7 @@ public class ModItems
public static Item boundAxe;
public static Item boundShovel;
public static Item boundHelmet;
public static Item boundChestplate;
public static Item boundPlate;
public static Item boundLeggings;
public static Item boundBoots;
public static Item weakBloodShard;
@ -201,7 +158,7 @@ public class ModItems
public static Item itemSeerSigil;
public static Item itemCombinationalCatalyst;
public static ItemSpellMultiTool customTool;
public static Item customTool;
public static Item itemAttunedCrystal;
public static Item itemTankSegmenter;
@ -218,22 +175,22 @@ public class ModItems
public static Item itemAssassinSigil;
public static Item boundHelmetWater;
public static Item boundChestplateWater;
public static Item boundPlateWater;
public static Item boundLeggingsWater;
public static Item boundBootsWater;
public static Item boundHelmetEarth;
public static Item boundChestplateEarth;
public static Item boundPlateEarth;
public static Item boundLeggingsEarth;
public static Item boundBootsEarth;
public static Item boundHelmetWind;
public static Item boundChestplateWind;
public static Item boundPlateWind;
public static Item boundLeggingsWind;
public static Item boundBootsWind;
public static Item boundHelmetFire;
public static Item boundChestplateFire;
public static Item boundPlateFire;
public static Item boundLeggingsFire;
public static Item boundBootsFire;
@ -246,159 +203,269 @@ public class ModItems
public static Item ritualDismantler;
public static ArrayList<String> itemsNotToBeRegistered = new ArrayList<String>();
public static void init()
{
weakBloodOrb = registerItem(new Orb(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 EnergyBlaster(), "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 BaseItems(), "blank_slate");
reinforcedSlate = registerItem(new BaseItems(), "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 BaseItems(), "imbued_slate");
demonicSlate = registerItem(new BaseItems(), "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 CreativeOrb(), "creative_orb");
demonPlacer = registerItem(new DemonCrystal(), "demon_crystal");
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 KeyOfBinding(), "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");
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 = new ItemSpellMultiTool().setUnlocalizedName("multiTool");
SpellParadigmTool.customTool = customTool;
itemCombinationalCatalyst = registerItem(new CombinationalCatalyst(), "combinational_catalyst");
itemAttunedCrystal = registerItem(new AlchemicalRouter(), "alchemical_router");
itemTankSegmenter = registerItem(new AlchemicalSegmenter(), "alchemical_segmenter");
itemDestinationClearer = registerItem(new AlchemicalCleanser(), "alchemical_cleanser");
itemCombinationalCatalyst = new CombinationalCatalyst().setUnlocalizedName("itemCombinationalCatalyst");
itemAttunedCrystal = new ItemAttunedCrystal().setUnlocalizedName("itemAttunedCrystal");
itemTankSegmenter = new ItemTankSegmenter().setUnlocalizedName("itemTankSegmenter");
itemDestinationClearer = new ItemDestinationClearer().setUnlocalizedName("destinationClearer");
dawnScribeTool = registerItem(new DawnScribeTool(), "dawn_scribe_tool");
dawnScribeTool = new DawnScribeTool().setUnlocalizedName("dawnScribeTool");
itemBloodPack = registerItem(new ItemBloodLetterPack(), "blood_pack");
itemHarvestSigil = registerItem(new SigilHarvest(), "harvest_sigil");
itemCompressionSigil = registerItem(new SigilCompress(), "compression_sigil");
itemAssassinSigil = registerItem(new SigilOfTheAssassin(), "assassin_sigil");
itemBloodPack = new ItemBloodLetterPack().setUnlocalizedName("itemBloodPack");
itemHarvestSigil = new SigilHarvest().setUnlocalizedName("itemHarvestSigil");
itemCompressionSigil = new SigilPackRat().setUnlocalizedName("itemCompressionSigil");
itemAssassinSigil = new SigilOfTheAssassin().setUnlocalizedName("itemAssassinSigil");
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");
boundHelmetWater = new OmegaArmourWater(0).setUnlocalizedName("boundHelmetWater");
boundPlateWater = new OmegaArmourWater(1).setUnlocalizedName("boundPlateWater");
boundLeggingsWater = new OmegaArmourWater(2).setUnlocalizedName("boundLeggingsWater");
boundBootsWater = new OmegaArmourWater(3).setUnlocalizedName("boundBootsWater");
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");
boundHelmetEarth = new OmegaArmourEarth(0).setUnlocalizedName("boundHelmetEarth");
boundPlateEarth = new OmegaArmourEarth(1).setUnlocalizedName("boundPlateEarth");
boundLeggingsEarth = new OmegaArmourEarth(2).setUnlocalizedName("boundLeggingsEarth");
boundBootsEarth = new OmegaArmourEarth(3).setUnlocalizedName("boundBootsEarth");
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");
boundHelmetWind = new OmegaArmourWind(0).setUnlocalizedName("boundHelmetWind");
boundPlateWind = new OmegaArmourWind(1).setUnlocalizedName("boundPlateWind");
boundLeggingsWind = new OmegaArmourWind(2).setUnlocalizedName("boundLeggingsWind");
boundBootsWind = new OmegaArmourWind(3).setUnlocalizedName("boundBootsWind");
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");
boundHelmetFire = new OmegaArmourFire(0).setUnlocalizedName("boundHelmetFire");
boundPlateFire = new OmegaArmourFire(1).setUnlocalizedName("boundPlateFire");
boundLeggingsFire = new OmegaArmourFire(2).setUnlocalizedName("boundLeggingsFire");
boundBootsFire = new OmegaArmourFire(3).setUnlocalizedName("boundBootsFire");
inputRoutingFocus = registerItem(new InputRoutingFocus(), "input_routing_focus");
outputRoutingFocus = registerItem(new OutputRoutingFocus(), "output_routing_focus");
inputRoutingFocus = new InputRoutingFocus().setUnlocalizedName("inputRoutingFocus");
outputRoutingFocus = new OutputRoutingFocus().setUnlocalizedName("outputRoutingFocus");
itemIncense = registerItem(new ItemIncense(), "incense");
itemIncense = new ItemIncense().setUnlocalizedName("bloodMagicIncenseItem");
ritualDismantler = registerItem(new ItemRitualDismantler(), "ritual_dismantler");
ritualDismantler = new ItemRitualDismantler().setUnlocalizedName("ritualDismantler");
}
public static Item registerItem(Item item, String unlocalizedName)
public static void registerItems()
{
item.setUnlocalizedName(unlocalizedName);
item.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
// itemsNotToBeRegistered.clear();
GameRegistry.registerItem(ModItems.weakBloodOrb, "weakBloodOrb");
GameRegistry.registerItem(ModItems.apprenticeBloodOrb, "apprenticeBloodOrb");
GameRegistry.registerItem(ModItems.magicianBloodOrb, "magicianBloodOrb");
GameRegistry.registerItem(ModItems.energyBlaster, "energyBlaster");
// for (String unlocName : BloodMagicConfiguration.itemsToBeDisabled)
{
// if (unlocName.equals(unlocalizedName))
{
// itemsNotToBeRegistered.add(unlocName);
}
}
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");
// if (!itemsNotToBeRegistered.contains(unlocalizedName))
{
GameRegistry.registerItem(item, unlocalizedName);
}
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");
return item;
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");
}
}

View file

@ -2,5 +2,5 @@ package WayofTime.alchemicalWizardry.api;
public interface ILimitingLogic
{
int getRoutingLimit();
public int getRoutingLimit();
}

View file

@ -1,7 +1,7 @@
package WayofTime.alchemicalWizardry.api;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.BlockPos;
public class Int3
{
@ -9,11 +9,6 @@ public class Int3
public int yCoord;
public int zCoord;
public Int3(BlockPos pos)
{
this(pos.getX(), pos.getY(), pos.getZ());
}
public Int3(int xCoord, int yCoord, int zCoord)
{
this.xCoord = xCoord;

View file

@ -7,9 +7,9 @@ import net.minecraft.item.ItemStack;
public class RoutingFocusParadigm
{
public List<RoutingFocusLogic> logicList = new LinkedList<RoutingFocusLogic>();
public List<RoutingFocusLogic> logicList = new LinkedList();
public List<RoutingFocusPosAndFacing> locationList = new LinkedList<RoutingFocusPosAndFacing>();
public List<RoutingFocusPosAndFacing> locationList = new LinkedList();
public int maximumAmount = 0;

View file

@ -1,13 +1,13 @@
package WayofTime.alchemicalWizardry.api;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.ForgeDirection;
public class RoutingFocusPosAndFacing
{
public Int3 location;
public EnumFacing facing;
public ForgeDirection facing;
public RoutingFocusPosAndFacing(Int3 location, EnumFacing facing)
public RoutingFocusPosAndFacing(Int3 location, ForgeDirection facing)
{
this.location = location;
this.facing = facing;

View file

@ -6,7 +6,7 @@ import java.util.ArrayList;
public class AlchemicalPotionCreationHandler
{
public static ArrayList<AlchemyPotionHandlerComponent> registeredPotionEffects = new ArrayList<AlchemyPotionHandlerComponent>();
public static ArrayList<AlchemyPotionHandlerComponent> registeredPotionEffects = new ArrayList();
public static void addPotion(ItemStack itemStack, int potionID, int tickDuration)
{

View file

@ -8,7 +8,7 @@ import java.util.List;
public class AlchemyRecipeRegistry
{
public static List<AlchemyRecipe> recipes = new ArrayList<AlchemyRecipe>();
public static List<AlchemyRecipe> recipes = new ArrayList();
public static void registerRecipe(ItemStack output, int amountNeeded, ItemStack[] recipe, int bloodOrbLevel)
{

View file

@ -1,18 +1,18 @@
package WayofTime.alchemicalWizardry.api.alchemy.energy;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.ForgeDirection;
public interface IReagentHandler
{
int fill(EnumFacing from, ReagentStack resource, boolean doFill);
int fill(ForgeDirection from, ReagentStack resource, boolean doFill);
ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain);
ReagentStack drain(ForgeDirection from, ReagentStack resource, boolean doDrain);
ReagentStack drain(EnumFacing from, int maxDrain, boolean doDrain);
ReagentStack drain(ForgeDirection from, int maxDrain, boolean doDrain);
boolean canFill(EnumFacing from, Reagent reagent);
boolean canFill(ForgeDirection from, Reagent reagent);
boolean canDrain(EnumFacing from, Reagent reagent);
boolean canDrain(ForgeDirection from, Reagent reagent);
ReagentContainerInfo[] getContainerInfo(EnumFacing from);
ReagentContainerInfo[] getContainerInfo(ForgeDirection from);
}

View file

@ -9,8 +9,8 @@ import net.minecraft.item.ItemStack;
public class ReagentRegistry
{
public static Map<String, Reagent> reagentList = new HashMap<String, Reagent>();
public static Map<ItemStack, ReagentStack> itemToReagentMap = new HashMap<ItemStack, ReagentStack>();
public static Map<String, Reagent> reagentList = new HashMap();
public static Map<ItemStack, ReagentStack> itemToReagentMap = new HashMap();
public static Reagent sanctusReagent;
public static Reagent incendiumReagent;

View file

@ -28,8 +28,9 @@ public class ReagentStack
}
int amount = tag.getInteger("amount");
ReagentStack stack = new ReagentStack(reagent, amount);
return new ReagentStack(reagent, amount);
return stack;
}
public NBTTagCompound writeToNBT(NBTTagCompound tag)

View file

@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.ForgeDirection;
public class TileReagentHandler extends TileEntity implements IReagentHandler
{
@ -25,13 +25,13 @@ public class TileReagentHandler extends TileEntity implements IReagentHandler
/* IReagentHandler */
@Override
public int fill(EnumFacing from, ReagentStack resource, boolean doFill)
public int fill(ForgeDirection from, ReagentStack resource, boolean doFill)
{
return tank.fill(resource, doFill);
}
@Override
public ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain)
public ReagentStack drain(ForgeDirection from, ReagentStack resource, boolean doDrain)
{
if (resource == null || !resource.isReagentEqual(tank.getReagent()))
{
@ -41,25 +41,25 @@ public class TileReagentHandler extends TileEntity implements IReagentHandler
}
@Override
public ReagentStack drain(EnumFacing from, int maxDrain, boolean doDrain)
public ReagentStack drain(ForgeDirection from, int maxDrain, boolean doDrain)
{
return tank.drain(maxDrain, doDrain);
}
@Override
public boolean canFill(EnumFacing from, Reagent reagent)
public boolean canFill(ForgeDirection from, Reagent reagent)
{
return true;
}
@Override
public boolean canDrain(EnumFacing from, Reagent reagent)
public boolean canDrain(ForgeDirection from, Reagent reagent)
{
return true;
}
@Override
public ReagentContainerInfo[] getContainerInfo(EnumFacing from)
public ReagentContainerInfo[] getContainerInfo(ForgeDirection from)
{
return new ReagentContainerInfo[]{tank.getInfo()};
}

View file

@ -1,15 +1,15 @@
package WayofTime.alchemicalWizardry.api.alchemy.energy;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.Constants;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
public class TileSegmentedReagentHandler extends TileEntity implements ISegmentedReagentHandler
{
@ -30,7 +30,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
{
super();
this.attunedTankMap = new HashMap<Reagent, Integer>();
this.attunedTankMap = new HashMap();
this.tanks = new ReagentContainer[numberOfTanks];
for (int i = 0; i < numberOfTanks; i++)
{
@ -98,7 +98,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
/* ISegmentedReagentHandler */
@Override
public int fill(EnumFacing from, ReagentStack resource, boolean doFill)
public int fill(ForgeDirection from, ReagentStack resource, boolean doFill)
{
int totalFill = 0;
@ -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 && tanks[i].getReagent().isReagentEqual(remainingStack);
boolean doesReagentMatch = tanks[i].getReagent() == null ? false : tanks[i].getReagent().isReagentEqual(remainingStack);
if (doesReagentMatch)
{
@ -164,7 +164,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
}
@Override
public ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain)
public ReagentStack drain(ForgeDirection from, ReagentStack resource, boolean doDrain)
{
if (resource == null)
{
@ -197,7 +197,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
/* Only returns the amount from the first available tank */
@Override
public ReagentStack drain(EnumFacing from, int maxDrain, boolean doDrain)
public ReagentStack drain(ForgeDirection from, int maxDrain, boolean doDrain)
{
for (int i = 0; i < tanks.length; i++)
{
@ -212,19 +212,19 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
}
@Override
public boolean canFill(EnumFacing from, Reagent reagent)
public boolean canFill(ForgeDirection from, Reagent reagent)
{
return true;
}
@Override
public boolean canDrain(EnumFacing from, Reagent reagent)
public boolean canDrain(ForgeDirection from, Reagent reagent)
{
return true;
}
@Override
public ReagentContainerInfo[] getContainerInfo(EnumFacing from)
public ReagentContainerInfo[] getContainerInfo(ForgeDirection from)
{
ReagentContainerInfo[] info = new ReagentContainerInfo[this.getNumberOfTanks()];
for (int i = 0; i < this.getNumberOfTanks(); i++)

View file

@ -76,7 +76,7 @@ public class AltarRecipe
protected boolean areTagsEqual(NBTTagCompound tag, NBTTagCompound comparedTag)
{
Set set = tag.getKeySet();
Set set = tag.func_150296_c();
for(Object obj : set)
{

View file

@ -9,8 +9,8 @@ import net.minecraft.item.ItemStack;
public class AltarRecipeRegistry
{
public static List<AltarRecipe> altarRecipes = new LinkedList<AltarRecipe>();
public static Map<Integer, ItemStack> orbMap = new HashMap<Integer, ItemStack>();
public static List<AltarRecipe> altarRecipes = new LinkedList();
public static Map<Integer, ItemStack> orbMap = new HashMap();
public static void registerAltarRecipe(ItemStack result, ItemStack requiredItem, int minTier, int liquidRequired, int consumptionRate, int drainRate, boolean canBeFilled)
{

View file

@ -7,7 +7,7 @@ import java.util.List;
public class BindingRegistry
{
public static List<BindingRecipe> bindingRecipes = new LinkedList<BindingRecipe>();
public static List<BindingRecipe> bindingRecipes = new LinkedList();
public static void registerRecipe(ItemStack output, ItemStack input)
{

View file

@ -7,7 +7,7 @@ import java.util.List;
public class UnbindingRegistry
{
public static List<UnbindingRecipe> unbindingRecipes = new LinkedList<UnbindingRecipe>();
public static List<UnbindingRecipe> unbindingRecipes = new LinkedList();
public static void addAllUnbindingRecipesFromBinding()
{

View file

@ -15,8 +15,8 @@ import net.minecraft.world.World;
*/
public class CompressionRegistry
{
public static List<CompressionHandler> compressionRegistry = new ArrayList<CompressionHandler>();
public static Map<ItemStack, Integer> thresholdMap = new HashMap<ItemStack, Integer>();
public static List<CompressionHandler> compressionRegistry = new ArrayList();
public static Map<ItemStack, Integer> thresholdMap = new HashMap();
public static void registerHandler(CompressionHandler handler)
{

View file

@ -1,7 +1,7 @@
package WayofTime.alchemicalWizardry.api.event;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import cpw.mods.fml.common.eventhandler.Event;
@Cancelable
public class AddToNetworkEvent extends Event

View file

@ -1,9 +1,9 @@
package WayofTime.alchemicalWizardry.api.event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
import cpw.mods.fml.common.eventhandler.Event;
@Cancelable
public class ItemBindEvent extends Event

View file

@ -1,7 +1,7 @@
package WayofTime.alchemicalWizardry.api.event;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import cpw.mods.fml.common.eventhandler.Cancelable;
@Cancelable
public class ItemDrainInContainerEvent extends SoulNetworkEvent

View file

@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.api.event;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import cpw.mods.fml.common.eventhandler.Cancelable;
@Cancelable
public class ItemDrainNetworkEvent extends PlayerDrainNetworkEvent

View file

@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.api.event;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import cpw.mods.fml.common.eventhandler.Cancelable;
@Cancelable
public class PlayerAddToNetworkEvent extends AddToNetworkEvent

View file

@ -1,7 +1,7 @@
package WayofTime.alchemicalWizardry.api.event;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import cpw.mods.fml.common.eventhandler.Cancelable;
@Cancelable
public class PlayerDrainNetworkEvent extends SoulNetworkEvent

View file

@ -2,8 +2,8 @@ package WayofTime.alchemicalWizardry.api.event;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
import cpw.mods.fml.common.eventhandler.Cancelable;
@Cancelable
public class RitualActivatedEvent extends RitualEvent

View file

@ -1,7 +1,7 @@
package WayofTime.alchemicalWizardry.api.event;
import net.minecraftforge.fml.common.eventhandler.Event;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
import cpw.mods.fml.common.eventhandler.Event;
public class RitualEvent extends Event
{

View file

@ -1,13 +1,16 @@
package WayofTime.alchemicalWizardry.api.event;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
import cpw.mods.fml.common.eventhandler.Cancelable;
@Cancelable
public class RitualRunEvent extends RitualEvent
{
public RitualRunEvent(IMasterRitualStone mrs, String ownerKey, String ritualKey)
{
super(mrs, ownerKey, ritualKey);
}
}

View file

@ -1,8 +1,8 @@
package WayofTime.alchemicalWizardry.api.event;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import cpw.mods.fml.common.eventhandler.Event;
@Cancelable
public class SacrificeKnifeUsedEvent extends Event

View file

@ -1,7 +1,6 @@
package WayofTime.alchemicalWizardry.api.event;
import net.minecraftforge.fml.common.eventhandler.Event;
import cpw.mods.fml.common.eventhandler.Event;
public class SoulNetworkEvent extends Event
{

View file

@ -1,50 +1,56 @@
package WayofTime.alchemicalWizardry.api.event;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import cpw.mods.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 class TeleposeEvent extends Event {
public final Block initialBlock;
public final IBlockState initialState;
public final World initialWorld;
public final int initialX;
public final int initialY;
public final int initialZ;
public final World finalWorld;
public final BlockPos finalPos;
public final Block initialBlock;
public final int initialMetadata;
public final Block finalBlock;
public final IBlockState finalState;
public final World finalWorld;
public final int finalX;
public final int finalY;
public final int finalZ;
public TeleposeEvent(World wi, BlockPos posi, IBlockState statei, World wf, BlockPos posf, IBlockState statef)
{
initialWorld = wi;
initialPos = posi;
public final Block finalBlock;
public final int finalMetadata;
public TeleposeEvent(World wi, int xi, int yi, int zi, Block bi, int mi, World wf, int xf, int yf, int zf, Block bf, int mf) {
initialWorld = wi;
initialX = xi;
initialY = yi;
initialZ = zi;
initialState = statei;
initialBlock = initialState.getBlock();
initialBlock = bi;
initialMetadata = mi;
finalWorld = wf;
finalX = xf;
finalY = yf;
finalZ = zf;
finalBlock = bf;
finalMetadata = mf;
}
public TileEntity getInitialTile() {
return initialWorld.getTileEntity(initialX, initialY, initialZ);
}
public TileEntity getFinalTile() {
return finalWorld.getTileEntity(finalX, finalY, finalZ);
}
finalWorld = wf;
finalPos = posf;
finalState = statef;
finalBlock = finalState.getBlock();
}
public TileEntity getInitialTile() {
return initialWorld.getTileEntity(initialPos);
}
public TileEntity getFinalTile() {
return finalWorld.getTileEntity(finalPos);
}
}

View file

@ -1,135 +1,135 @@
//package WayofTime.alchemicalWizardry.api.guide;
//
//import java.util.ArrayList;
//import java.util.List;
//
//import net.minecraft.client.Minecraft;
//import net.minecraft.client.gui.FontRenderer;
//import net.minecraft.item.ItemStack;
//import net.minecraft.item.crafting.IRecipe;
//import net.minecraft.util.ResourceLocation;
//import net.minecraft.util.StatCollector;
//import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe;
//import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe;
//import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
//import amerifrance.guideapi.ModInformation;
//import amerifrance.guideapi.api.abstraction.CategoryAbstract;
//import amerifrance.guideapi.api.abstraction.EntryAbstract;
//import amerifrance.guideapi.api.abstraction.IRecipeRenderer;
//import amerifrance.guideapi.api.base.Book;
//import amerifrance.guideapi.api.util.GuiHelper;
//import amerifrance.guideapi.gui.GuiBase;
//import cpw.mods.fml.relauncher.ReflectionHelper;
//
//public class OrbRecipeRenderer implements IRecipeRenderer
//{
// public IRecipe recipe;
//
// public OrbRecipeRenderer(IRecipe recipe)
// {
// this.recipe = recipe;
// }
//
// @Override
// public void draw(Book book, CategoryAbstract category, EntryAbstract entry,
// int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase,
// FontRenderer fontRenderer) {
// Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation(ModInformation.GUITEXLOC + "recipe_elements.png"));
// guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 105, 65);
//
// guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.recipe.shapedOrb"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
// if(recipe instanceof ShapelessBloodOrbRecipe)
// {
// ShapelessBloodOrbRecipe shapelessBloodOrbRecipe = (ShapelessBloodOrbRecipe) recipe;
// List<Object> list = shapelessBloodOrbRecipe.getInput();
//
// int width = 3;
// int height = 3;
// for (int y = 0; y < height; y++) {
// for (int x = 0; x < width; x++) {
// if(list.size() - 1 < y * width + x)
// {
// continue;
// }
//
// int stackX = (x + 1) * 18 + (guiLeft + guiBase.xSize / 7);
// int stackY = (y + 1) * 18 + (guiTop + guiBase.ySize / 5);
//
// Object component = list.get(y * width + x);
// if (component != null) {
// if (component instanceof ItemStack) {
// GuiHelper.drawItemStack((ItemStack) component, stackX, stackY);
// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
// guiBase.renderToolTip((ItemStack) component, stackX, stackY);
// }
// } else if (component instanceof Integer) {
// GuiHelper.drawItemStack(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY);
// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
// guiBase.renderToolTip(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY);
// }
// } else {
// if (((ArrayList<ItemStack>) component).isEmpty()) return;
// GuiHelper.drawItemStack(((ArrayList<ItemStack>) component).get(0), stackX, stackY);
// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
// guiBase.renderToolTip(((ArrayList<ItemStack>) component).get(0), stackX, stackY);
// }
// }
// }
// }
// }
// int outputX = (5 * 18) + (guiLeft + guiBase.xSize / 7);
// int outputY = (2 * 18) + (guiTop + guiBase.xSize / 5);
// GuiHelper.drawItemStack(shapelessBloodOrbRecipe.getRecipeOutput(), outputX, outputY);
// if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) {
// guiBase.renderToolTip(shapelessBloodOrbRecipe.getRecipeOutput(), outputX, outputY);
// }
// }else
// {
// ShapedBloodOrbRecipe shapedBloodOrbRecipe = (ShapedBloodOrbRecipe) recipe;
// int width = ReflectionHelper.getPrivateValue(ShapedBloodOrbRecipe.class, shapedBloodOrbRecipe, 4);
// int height = ReflectionHelper.getPrivateValue(ShapedBloodOrbRecipe.class, shapedBloodOrbRecipe, 5);
// for (int y = 0; y < height; y++) {
// for (int x = 0; x < width; x++) {
// int stackX = (x + 1) * 18 + (guiLeft + guiBase.xSize / 7);
// int stackY = (y + 1) * 18 + (guiTop + guiBase.ySize / 5);
// Object component = shapedBloodOrbRecipe.getInput()[y * width + x];
// if (component != null) {
// if (component instanceof ItemStack) {
// GuiHelper.drawItemStack((ItemStack) component, stackX, stackY);
// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
// guiBase.renderToolTip((ItemStack) component, stackX, stackY);
// }
// } else if (component instanceof Integer) {
// GuiHelper.drawItemStack(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY);
// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
// guiBase.renderToolTip(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY);
// }
// } else {
// if (((ArrayList<ItemStack>) component).isEmpty()) return;
// GuiHelper.drawItemStack(((ArrayList<ItemStack>) component).get(0), stackX, stackY);
// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
// guiBase.renderToolTip(((ArrayList<ItemStack>) component).get(0), stackX, stackY);
// }
// }
// }
// }
// }
// int outputX = (5 * 18) + (guiLeft + guiBase.xSize / 7);
// int outputY = (2 * 18) + (guiTop + guiBase.xSize / 5);
// GuiHelper.drawItemStack(shapedBloodOrbRecipe.getRecipeOutput(), outputX, outputY);
// if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) {
// guiBase.renderToolTip(shapedBloodOrbRecipe.getRecipeOutput(), outputX, outputY);
// }
// }
//
// }
//
// @Override
// public void drawExtras(Book book, CategoryAbstract category,
// EntryAbstract entry, int guiLeft, int guiTop, int mouseX,
// int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
// // TODO Auto-generated method stub
//
// }
//
//}
package WayofTime.alchemicalWizardry.api.guide;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe;
import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe;
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
import amerifrance.guideapi.ModInformation;
import amerifrance.guideapi.api.abstraction.CategoryAbstract;
import amerifrance.guideapi.api.abstraction.EntryAbstract;
import amerifrance.guideapi.api.abstraction.IRecipeRenderer;
import amerifrance.guideapi.api.base.Book;
import amerifrance.guideapi.api.util.GuiHelper;
import amerifrance.guideapi.gui.GuiBase;
import cpw.mods.fml.relauncher.ReflectionHelper;
public class OrbRecipeRenderer implements IRecipeRenderer
{
public IRecipe recipe;
public OrbRecipeRenderer(IRecipe recipe)
{
this.recipe = recipe;
}
@Override
public void draw(Book book, CategoryAbstract category, EntryAbstract entry,
int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase,
FontRenderer fontRenderer) {
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation(ModInformation.GUITEXLOC + "recipe_elements.png"));
guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 105, 65);
guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.recipe.shapedOrb"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
if(recipe instanceof ShapelessBloodOrbRecipe)
{
ShapelessBloodOrbRecipe shapelessBloodOrbRecipe = (ShapelessBloodOrbRecipe) recipe;
List<Object> list = shapelessBloodOrbRecipe.getInput();
int width = 3;
int height = 3;
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
if(list.size() - 1 < y * width + x)
{
continue;
}
int stackX = (x + 1) * 18 + (guiLeft + guiBase.xSize / 7);
int stackY = (y + 1) * 18 + (guiTop + guiBase.ySize / 5);
Object component = list.get(y * width + x);
if (component != null) {
if (component instanceof ItemStack) {
GuiHelper.drawItemStack((ItemStack) component, stackX, stackY);
if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
guiBase.renderToolTip((ItemStack) component, stackX, stackY);
}
} else if (component instanceof Integer) {
GuiHelper.drawItemStack(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY);
if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
guiBase.renderToolTip(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY);
}
} else {
if (((ArrayList<ItemStack>) component).isEmpty()) return;
GuiHelper.drawItemStack(((ArrayList<ItemStack>) component).get(0), stackX, stackY);
if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
guiBase.renderToolTip(((ArrayList<ItemStack>) component).get(0), stackX, stackY);
}
}
}
}
}
int outputX = (5 * 18) + (guiLeft + guiBase.xSize / 7);
int outputY = (2 * 18) + (guiTop + guiBase.xSize / 5);
GuiHelper.drawItemStack(shapelessBloodOrbRecipe.getRecipeOutput(), outputX, outputY);
if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) {
guiBase.renderToolTip(shapelessBloodOrbRecipe.getRecipeOutput(), outputX, outputY);
}
}else
{
ShapedBloodOrbRecipe shapedBloodOrbRecipe = (ShapedBloodOrbRecipe) recipe;
int width = ReflectionHelper.getPrivateValue(ShapedBloodOrbRecipe.class, shapedBloodOrbRecipe, 4);
int height = ReflectionHelper.getPrivateValue(ShapedBloodOrbRecipe.class, shapedBloodOrbRecipe, 5);
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
int stackX = (x + 1) * 18 + (guiLeft + guiBase.xSize / 7);
int stackY = (y + 1) * 18 + (guiTop + guiBase.ySize / 5);
Object component = shapedBloodOrbRecipe.getInput()[y * width + x];
if (component != null) {
if (component instanceof ItemStack) {
GuiHelper.drawItemStack((ItemStack) component, stackX, stackY);
if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
guiBase.renderToolTip((ItemStack) component, stackX, stackY);
}
} else if (component instanceof Integer) {
GuiHelper.drawItemStack(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY);
if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
guiBase.renderToolTip(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY);
}
} else {
if (((ArrayList<ItemStack>) component).isEmpty()) return;
GuiHelper.drawItemStack(((ArrayList<ItemStack>) component).get(0), stackX, stackY);
if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
guiBase.renderToolTip(((ArrayList<ItemStack>) component).get(0), stackX, stackY);
}
}
}
}
}
int outputX = (5 * 18) + (guiLeft + guiBase.xSize / 7);
int outputY = (2 * 18) + (guiTop + guiBase.xSize / 5);
GuiHelper.drawItemStack(shapedBloodOrbRecipe.getRecipeOutput(), outputX, outputY);
if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) {
guiBase.renderToolTip(shapedBloodOrbRecipe.getRecipeOutput(), outputX, outputY);
}
}
}
@Override
public void drawExtras(Book book, CategoryAbstract category,
EntryAbstract entry, int guiLeft, int guiTop, int mouseX,
int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
// TODO Auto-generated method stub
}
}

View file

@ -1,69 +1,69 @@
//package WayofTime.alchemicalWizardry.api.guide;
//
//
//import net.minecraft.client.Minecraft;
//import net.minecraft.client.gui.FontRenderer;
//import net.minecraft.init.Blocks;
//import net.minecraft.item.Item;
//import net.minecraft.item.ItemStack;
//import net.minecraft.util.ResourceLocation;
//import net.minecraft.util.StatCollector;
//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe;
//import amerifrance.guideapi.api.abstraction.CategoryAbstract;
//import amerifrance.guideapi.api.abstraction.EntryAbstract;
//import amerifrance.guideapi.api.base.Book;
//import amerifrance.guideapi.api.base.PageBase;
//import amerifrance.guideapi.api.util.GuiHelper;
//import amerifrance.guideapi.gui.GuiBase;
//import cpw.mods.fml.relauncher.Side;
//import cpw.mods.fml.relauncher.SideOnly;
//
//public class PageAltarRecipe extends PageBase {
//
// public ItemStack input;
// public ItemStack output;
// public int tier;
// public int bloodRequired;
//
// public PageAltarRecipe(AltarRecipe recipe) {
// this.input = recipe.getRequiredItem();
// this.output = recipe.getResult();
// this.tier = recipe.getMinTier();
// this.bloodRequired = recipe.getLiquidRequired();
// }
//
// @Override
// @SideOnly(Side.CLIENT)
// public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
//
// Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("alchemicalwizardry" + ":textures/gui/guide/altar.png"));
// guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 87, 146, 104);
//
// guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.recipe.altar"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
//
// int inputX = (1 + 1) * 20 + (guiLeft + guiBase.xSize / 7);
// int inputY = (20) + (guiTop + guiBase.ySize / 5); //1 * 20
// GuiHelper.drawItemStack(input, inputX, inputY);
// if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15)) {
// guiBase.renderToolTip(input, mouseX, mouseY);
// }
//
// if (output == null) {
// output = new ItemStack(Blocks.fire);
// }
// int outputX = (5 * 20) + (guiLeft + guiBase.xSize / 7);
// int outputY = (20) + (guiTop + guiBase.xSize / 5); // 1 * 20
// GuiHelper.drawItemStack(output, outputX, outputY);
// if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) {
// guiBase.renderToolTip(output, outputX, outputY);
// }
//
// if (output.getItem() == Item.getItemFromBlock(Blocks.fire)) {
// guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.furnace.error"), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0xED073D);
// guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("bm.string.tier") + ": " + String.valueOf(tier), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0);
// guiBase.drawCenteredString(fontRenderer, "LP: " + String.valueOf(bloodRequired), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 30, 0);
// }
// guiBase.drawCenteredString(fontRenderer, String.format(StatCollector.translateToLocal("text.recipe.altar.tier"), String.valueOf(tier)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0);
// guiBase.drawCenteredString(fontRenderer, String.format(StatCollector.translateToLocal("text.recipe.altar.bloodRequired"), String.valueOf(bloodRequired)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0);
// }
//}
package WayofTime.alchemicalWizardry.api.guide;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe;
import amerifrance.guideapi.api.abstraction.CategoryAbstract;
import amerifrance.guideapi.api.abstraction.EntryAbstract;
import amerifrance.guideapi.api.base.Book;
import amerifrance.guideapi.api.base.PageBase;
import amerifrance.guideapi.api.util.GuiHelper;
import amerifrance.guideapi.gui.GuiBase;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class PageAltarRecipe extends PageBase {
public ItemStack input;
public ItemStack output;
public int tier;
public int bloodRequired;
public PageAltarRecipe(AltarRecipe recipe) {
this.input = recipe.getRequiredItem();
this.output = recipe.getResult();
this.tier = recipe.getMinTier();
this.bloodRequired = recipe.getLiquidRequired();
}
@Override
@SideOnly(Side.CLIENT)
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("alchemicalwizardry" + ":textures/gui/guide/altar.png"));
guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 87, 146, 104);
guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.recipe.altar"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
int inputX = (1 + 1) * 20 + (guiLeft + guiBase.xSize / 7) + 1;
int inputY = (20) + (guiTop + guiBase.ySize / 5) - 1; //1 * 20
GuiHelper.drawItemStack(input, inputX, inputY);
if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15)) {
guiBase.renderToolTip(input, mouseX, mouseY);
}
if (output == null) {
output = new ItemStack(Blocks.fire);
}
int outputX = (5 * 20) + (guiLeft + guiBase.xSize / 7) + 1;
int outputY = (20) + (guiTop + guiBase.xSize / 5) - 1; // 1 * 20
GuiHelper.drawItemStack(output, outputX, outputY);
if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) {
guiBase.renderToolTip(output, outputX, outputY);
}
if (output.getItem() == Item.getItemFromBlock(Blocks.fire)) {
guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.furnace.error"), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0xED073D);
guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("bm.string.tier") + ": " + String.valueOf(tier), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0);
guiBase.drawCenteredString(fontRenderer, "LP: " + String.valueOf(bloodRequired), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 30, 0);
}
guiBase.drawCenteredString(fontRenderer, String.format(StatCollector.translateToLocal("text.recipe.altar.tier"), String.valueOf(tier)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0);
guiBase.drawCenteredString(fontRenderer, String.format(StatCollector.translateToLocal("text.recipe.altar.bloodRequired"), String.valueOf(bloodRequired)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0);
}
}

View file

@ -1,145 +1,145 @@
//package WayofTime.alchemicalWizardry.api.guide;
//
//import net.minecraft.client.Minecraft;
//import net.minecraft.client.gui.FontRenderer;
//import net.minecraft.client.renderer.RenderHelper;
//import net.minecraft.client.renderer.entity.RenderItem;
//import net.minecraft.item.ItemStack;
//
//import org.lwjgl.opengl.GL11;
//import org.lwjgl.opengl.GL12;
//
//import amerifrance.guideapi.api.abstraction.CategoryAbstract;
//import amerifrance.guideapi.api.abstraction.EntryAbstract;
//import amerifrance.guideapi.api.base.Book;
//import amerifrance.guideapi.api.base.PageBase;
//import amerifrance.guideapi.gui.GuiBase;
//import cpw.mods.fml.relauncher.Side;
//import cpw.mods.fml.relauncher.SideOnly;
//
//public class PageMultiBlock extends PageBase
//{
// ItemStack[][][] structure;
// boolean canTick = false;
// int tick = 0;
// int showLayer = -1;
// float scaleFactor = 1;
//
// boolean renderMouseOver = true;
//
// public PageMultiBlock(ItemStack[][][] structure)
// {
// this.structure = structure;
// initPage(structure);
// }
//
// int blockCount=0;
// int[] countPerLevel;
// int structureHeight = 0;
// int structureLength = 0;
// int structureWidth = 0;
//
// public void initPage(ItemStack[][][] structure)
// {
// structureHeight = structure.length;
// structureWidth=0;
// structureLength=0;
// countPerLevel = new int[structureHeight];
// blockCount=0;
// for(int h=0; h<structure.length; h++)
// {
// if(structure[h].length-1>structureLength)
// structureLength = structure[h].length-1;
// int perLvl=0;
// for(int l=0; l<structure[h].length; l++)
// {
// if(structure[h][l].length-1>structureWidth)
// structureWidth = structure[h][l].length-1;
// for(ItemStack ss : structure[h][l])
// if(ss!=null)
// perLvl++;
// }
// countPerLevel[h] = perLvl;
// blockCount += perLvl;
// }
// tick= (showLayer==-1?blockCount:countPerLevel[showLayer])*40;
//// int yOff = (structureHeight-1)*12+structureWidth*5+structureLength*5+16;
//// pageButtons.add(new GuiButtonManualNavigation(gui, 100, x+4,y+yOff/2-5, 10,10, 4));
//// pageButtons.add(new GuiButtonManualNavigation(gui, 101, x+4,y+yOff/2-8-16, 10,16, 3));
//// pageButtons.add(new GuiButtonManualNavigation(gui, 102, x+4,y+yOff/2+8, 10,16, 2));
// }
//
// @Override
// @SideOnly(Side.CLIENT)
// public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer)
// {
//// if(multiblock.getStructureManual()!=null)
// Minecraft mc = Minecraft.getMinecraft();
//
// int x = guiLeft + 32;
// int y = guiTop + 30;
// {
// if(canTick)
// tick++;
//
// int prevLayers = 0;
// if(showLayer!=-1)
// for(int ll=0; ll<showLayer; ll++)
// prevLayers+=countPerLevel[ll];
// int limiter = prevLayers+ (tick/40)% ((showLayer==-1?blockCount:countPerLevel[showLayer])+4);
//
// int xHalf = (structureWidth*5 - structureLength*5);
// int yOffPartial = (structureHeight-1)*12+structureWidth*5+structureLength*5;
//// int yOffTotal = yOffPartial+16;
//
// GL11.glDisable(GL11.GL_DEPTH_TEST);
//
// GL11.glPushMatrix();
// GL11.glTranslatef((1-scaleFactor)*(guiLeft + 64), (1-scaleFactor)*(guiTop+60), 0);
// GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
// GL11.glEnable(GL12.GL_RESCALE_NORMAL);
// RenderHelper.enableGUIStandardItemLighting();
// RenderItem.getInstance().renderWithColor=true;
// int i=0;
// ItemStack highlighted = null;
// for(int h=0; h<structure.length; h++)
// if(showLayer==-1 || h<=showLayer)
// {
// ItemStack[][] level = structure[h];
// for(int l=level.length-1; l>=0; l--)
// {
// ItemStack[] row = level[l];
// for(int w=row.length-1; w>=0; w--)
// {
// int xx = 60 +xHalf -10*w +10*l -7;
// int yy = yOffPartial - 5*w - 5*l -12*h;
// GL11.glTranslated(0, 0, 1);
// if(row[w]!=null && i<=limiter)
// {
// i++;
// RenderItem.getInstance().renderItemIntoGUI(mc.fontRendererObj, mc.renderEngine, row[w], x+xx, y+yy);
// if(mouseX>=x+xx&&mouseX<x+xx+16 && mouseY>=y+yy&&mouseY<y+yy+16)
// highlighted = row[w];
// }
// }
// }
// }
// GL11.glTranslated(0, 0, -i);
// RenderHelper.disableStandardItemLighting();
// GL11.glDisable(GL12.GL_RESCALE_NORMAL);
// GL11.glPopMatrix();
//
// GL11.glEnable(GL11.GL_BLEND);
// GL11.glEnable(GL11.GL_DEPTH_TEST);
//
// mc.fontRendererObj.setUnicodeFlag(false);
// if(highlighted!=null && renderMouseOver)
// guiBase.renderToolTip(highlighted, mouseX, mouseY);
// RenderHelper.disableStandardItemLighting();
//
//// mc.fontRendererObj.setUnicodeFlag(true);
//// if(localizedText!=null&&!localizedText.isEmpty())
//// manual.fontRendererObj.drawSplitString(localizedText, x,y+yOffTotal, 120, manual.getTextColour());
// }
// }
//}
package WayofTime.alchemicalWizardry.api.guide;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.item.ItemStack;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import amerifrance.guideapi.api.abstraction.CategoryAbstract;
import amerifrance.guideapi.api.abstraction.EntryAbstract;
import amerifrance.guideapi.api.base.Book;
import amerifrance.guideapi.api.base.PageBase;
import amerifrance.guideapi.gui.GuiBase;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class PageMultiBlock extends PageBase
{
ItemStack[][][] structure;
boolean canTick = false;
int tick = 0;
int showLayer = -1;
float scaleFactor = 1;
boolean renderMouseOver = true;
public PageMultiBlock(ItemStack[][][] structure)
{
this.structure = structure;
initPage(structure);
}
int blockCount=0;
int[] countPerLevel;
int structureHeight = 0;
int structureLength = 0;
int structureWidth = 0;
public void initPage(ItemStack[][][] structure)
{
structureHeight = structure.length;
structureWidth=0;
structureLength=0;
countPerLevel = new int[structureHeight];
blockCount=0;
for(int h=0; h<structure.length; h++)
{
if(structure[h].length-1>structureLength)
structureLength = structure[h].length-1;
int perLvl=0;
for(int l=0; l<structure[h].length; l++)
{
if(structure[h][l].length-1>structureWidth)
structureWidth = structure[h][l].length-1;
for(ItemStack ss : structure[h][l])
if(ss!=null)
perLvl++;
}
countPerLevel[h] = perLvl;
blockCount += perLvl;
}
tick= (showLayer==-1?blockCount:countPerLevel[showLayer])*40;
// int yOff = (structureHeight-1)*12+structureWidth*5+structureLength*5+16;
// pageButtons.add(new GuiButtonManualNavigation(gui, 100, x+4,y+yOff/2-5, 10,10, 4));
// pageButtons.add(new GuiButtonManualNavigation(gui, 101, x+4,y+yOff/2-8-16, 10,16, 3));
// pageButtons.add(new GuiButtonManualNavigation(gui, 102, x+4,y+yOff/2+8, 10,16, 2));
}
@Override
@SideOnly(Side.CLIENT)
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer)
{
// if(multiblock.getStructureManual()!=null)
Minecraft mc = Minecraft.getMinecraft();
int x = guiLeft + 32;
int y = guiTop + 30;
{
if(canTick)
tick++;
int prevLayers = 0;
if(showLayer!=-1)
for(int ll=0; ll<showLayer; ll++)
prevLayers+=countPerLevel[ll];
int limiter = prevLayers+ (tick/40)% ((showLayer==-1?blockCount:countPerLevel[showLayer])+4);
int xHalf = (structureWidth*5 - structureLength*5);
int yOffPartial = (structureHeight-1)*12+structureWidth*5+structureLength*5;
// int yOffTotal = yOffPartial+16;
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glPushMatrix();
GL11.glTranslatef((1-scaleFactor)*(guiLeft + 64), (1-scaleFactor)*(guiTop+60), 0);
GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
RenderHelper.enableGUIStandardItemLighting();
RenderItem.getInstance().renderWithColor=true;
int i=0;
ItemStack highlighted = null;
for(int h=0; h<structure.length; h++)
if(showLayer==-1 || h<=showLayer)
{
ItemStack[][] level = structure[h];
for(int l=level.length-1; l>=0; l--)
{
ItemStack[] row = level[l];
for(int w=row.length-1; w>=0; w--)
{
int xx = 60 +xHalf -10*w +10*l -7;
int yy = yOffPartial - 5*w - 5*l -12*h;
GL11.glTranslated(0, 0, 1);
if(row[w]!=null && i<=limiter)
{
i++;
RenderItem.getInstance().renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, row[w], x+xx, y+yy);
if(mouseX>=x+xx&&mouseX<x+xx+16 && mouseY>=y+yy&&mouseY<y+yy+16)
highlighted = row[w];
}
}
}
}
GL11.glTranslated(0, 0, -i);
RenderHelper.disableStandardItemLighting();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
GL11.glEnable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_DEPTH_TEST);
mc.fontRenderer.setUnicodeFlag(false);
if(highlighted!=null && renderMouseOver)
guiBase.renderToolTip(highlighted, mouseX, mouseY);
RenderHelper.disableStandardItemLighting();
// mc.fontRenderer.setUnicodeFlag(true);
// if(localizedText!=null&&!localizedText.isEmpty())
// manual.fontRenderer.drawSplitString(localizedText, x,y+yOffTotal, 120, manual.getTextColour());
}
}
}

View file

@ -1,23 +1,22 @@
//package WayofTime.alchemicalWizardry.api.guide;
//
//import java.util.List;
//
//import net.minecraft.item.ItemStack;
//import WayofTime.alchemicalWizardry.ModBlocks;
//import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
//import WayofTime.alchemicalWizardry.api.rituals.Rituals;
//
//public class PageRitualMultiBlock extends PageMultiBlock
//{
// private static ItemStack blankStone;
// private static ItemStack waterStone;
// private static ItemStack fireStone;
// private static ItemStack earthStone;
// private static ItemStack airStone;
// private static ItemStack duskStone;
// private static ItemStack dawnStone;
// static
// {
package WayofTime.alchemicalWizardry.api.guide;
import java.util.List;
import net.minecraft.item.ItemStack;
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
public class PageRitualMultiBlock extends PageMultiBlock
{
private static ItemStack blankStone;
private static ItemStack waterStone;
private static ItemStack fireStone;
private static ItemStack earthStone;
private static ItemStack airStone;
private static ItemStack duskStone;
private static ItemStack dawnStone;
static
{
// blankStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.BLANK);
// waterStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.WATER);
// fireStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.FIRE);
@ -25,72 +24,72 @@
// airStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.AIR);
// duskStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DUSK);
// dawnStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DAWN);
// }
//
// private PageRitualMultiBlock(ItemStack[][][] structure)
// {
// super(structure);
// }
//
// public static PageRitualMultiBlock getPageForRitual(String ritualID)
// {
// return getPageForRitual(Rituals.getRitualList(ritualID));
// }
//
// public static PageRitualMultiBlock getPageForRitual(List<RitualComponent> ritualComponents)
// {
// int minX = 0;
// int minY = 0;
// int minZ = 0;
//
// int maxX = 0;
// int maxY = 0;
// int maxZ = 0;
//
// for(RitualComponent comp : ritualComponents)
// {
// minX = Math.min(comp.getX(), minX);
// minY = Math.min(comp.getY(), minY);
// minZ = Math.min(comp.getZ(), minZ);
//
// maxX = Math.max(comp.getX(), maxX);
// maxY = Math.max(comp.getY(), maxY);
// maxZ = Math.max(comp.getZ(), maxZ);
// }
//
// System.out.println("Min: (" + minX + ", " + minY + ", " + minZ + "), Max: (" + maxX + ", " + maxY + ", " + maxZ + ")");
//
// ItemStack[][][] tempStructure = new ItemStack[maxY-minY+1][maxX-minX+1][maxZ-minZ+1]; //First value is vertical, second is down to the left, third is down to the right
//
// for(RitualComponent comp : ritualComponents)
// {
// tempStructure[comp.getY() - minY][comp.getX() - minX][comp.getZ() - minZ] = getStackForRitualStone(comp.getStoneType());
// }
//
}
private PageRitualMultiBlock(ItemStack[][][] structure)
{
super(structure);
}
public static PageRitualMultiBlock getPageForRitual(String ritualID)
{
return getPageForRitual(Rituals.getRitualList(ritualID));
}
public static PageRitualMultiBlock getPageForRitual(List<RitualComponent> ritualComponents)
{
int minX = 0;
int minY = 0;
int minZ = 0;
int maxX = 0;
int maxY = 0;
int maxZ = 0;
for(RitualComponent comp : ritualComponents)
{
minX = Math.min(comp.getX(), minX);
minY = Math.min(comp.getY(), minY);
minZ = Math.min(comp.getZ(), minZ);
maxX = Math.max(comp.getX(), maxX);
maxY = Math.max(comp.getY(), maxY);
maxZ = Math.max(comp.getZ(), maxZ);
}
System.out.println("Min: (" + minX + ", " + minY + ", " + minZ + "), Max: (" + maxX + ", " + maxY + ", " + maxZ + ")");
ItemStack[][][] tempStructure = new ItemStack[maxY-minY+1][maxX-minX+1][maxZ-minZ+1]; //First value is vertical, second is down to the left, third is down to the right
for(RitualComponent comp : ritualComponents)
{
tempStructure[comp.getY() - minY][comp.getX() - minX][comp.getZ() - minZ] = getStackForRitualStone(comp.getStoneType());
}
// tempStructure[-minY][-minX][-minZ] = new ItemStack(ModBlocks.blockMasterStone);
//
// return new PageRitualMultiBlock(tempStructure);
// }
//
// private static ItemStack getStackForRitualStone(int type)
// {
// switch(type)
// {
// case RitualComponent.BLANK:
// return blankStone;
// case RitualComponent.WATER:
// return waterStone;
// case RitualComponent.FIRE:
// return fireStone;
// case RitualComponent.EARTH:
// return earthStone;
// case RitualComponent.AIR:
// return airStone;
// case RitualComponent.DUSK:
// return duskStone;
// case RitualComponent.DAWN:
// return dawnStone;
// }
// return blankStone;
// }
//}
return new PageRitualMultiBlock(tempStructure);
}
private static ItemStack getStackForRitualStone(int type)
{
switch(type)
{
case RitualComponent.BLANK:
return blankStone;
case RitualComponent.WATER:
return waterStone;
case RitualComponent.FIRE:
return fireStone;
case RitualComponent.EARTH:
return earthStone;
case RitualComponent.AIR:
return airStone;
case RitualComponent.DUSK:
return duskStone;
case RitualComponent.DAWN:
return dawnStone;
}
return blankStone;
}
}

View file

@ -1,30 +1,28 @@
package WayofTime.alchemicalWizardry.api.harvest;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
public class HarvestRegistry
{
public static List<IHarvestHandler> handlerList = new ArrayList<IHarvestHandler>();
public static List<IHarvestHandler> handlerList = new ArrayList();
public static void registerHarvestHandler(IHarvestHandler handler)
{
handlerList.add(handler);
}
public static boolean harvestBlock(World world, BlockPos pos)
public static boolean harvestBlock(World world, int xCoord, int yCoord, int zCoord)
{
IBlockState state = world.getBlockState(pos);
Block block = state.getBlock();
Block block = world.getBlock(xCoord, yCoord, zCoord);
int meta = world.getBlockMetadata(xCoord, yCoord, zCoord);
for (IHarvestHandler handler : handlerList)
{
if (handler.harvestAndPlant(world, pos, block, state))
if (handler.harvestAndPlant(world, xCoord, yCoord, zCoord, block, meta))
{
return true;
}

View file

@ -1,8 +1,6 @@
package WayofTime.alchemicalWizardry.api.harvest;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
public interface IHarvestHandler
@ -11,8 +9,12 @@ public interface IHarvestHandler
* A handler that is used to harvest and replant the block at the specified location
*
* @param world
* @param xCoord
* @param yCoord
* @param zCoord
* @param block block at this given location
* @param meta meta at this given location
* @return true if successfully harvested, false if not
*/
boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state);
boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta);
}

View file

@ -8,7 +8,7 @@ import java.util.Set;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
@ -18,12 +18,12 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.BlockPos;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.util.Constants;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
import WayofTime.alchemicalWizardry.api.spell.SpellEffect;
@ -43,6 +43,12 @@ public class ItemSpellMultiTool extends Item
this.setMaxStackSize(1);
this.setFull3D();
}
@Override
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundTool");
}
@Override
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase)
@ -92,7 +98,7 @@ public class ItemSpellMultiTool extends Item
}
@Override
public boolean onBlockStartBreak(ItemStack stack, BlockPos pos, EntityPlayer player)
public boolean onBlockStartBreak(ItemStack stack, int x, int y, int z, EntityPlayer player)
{
if (player.worldObj.isRemote)
{
@ -103,23 +109,23 @@ public class ItemSpellMultiTool extends Item
return false;
World world = player.worldObj;
IBlockState state = world.getBlockState(pos);
Block block = state.getBlock();
Block block = player.worldObj.getBlock(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
if (block == null || block == Blocks.air)
return false;
int hlvl = -1;
float blockHardness = block.getBlockHardness(world, pos);
float blockHardness = block.getBlockHardness(world, x, y, z);
MovingObjectPosition mop = APISpellHelper.raytraceFromEntity(world, player, true, 5.0D);
IBlockState localState = world.getBlockState(pos);
Block localBlock = state.getBlock();
String toolClass = block.getHarvestTool(state);
Block localBlock = world.getBlock(x, y, z);
int localMeta = world.getBlockMetadata(x, y, z);
String toolClass = block.getHarvestTool(meta);
if (toolClass != null && this.getHarvestLevel(stack, toolClass) != -1)
hlvl = block.getHarvestLevel(state);
hlvl = block.getHarvestLevel(meta);
int toolLevel = this.getHarvestLevel(stack, toolClass);
float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.getBlockHardness(world, pos);
float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.getBlockHardness(world, x, y, z);
if (hlvl <= toolLevel && localHardness - 1.5 <= blockHardness)
{
@ -133,7 +139,7 @@ public class ItemSpellMultiTool extends Item
String localToolClass = this.getToolClassForMaterial(localBlock.getMaterial());
if (localToolClass != null && this.getHarvestLevel(stack, toolClass) >= localBlock.getHarvestLevel(localState))
if (localToolClass != null && this.getHarvestLevel(stack, toolClass) >= localBlock.getHarvestLevel(localMeta))
{
isEffective = true;
}
@ -148,31 +154,31 @@ public class ItemSpellMultiTool extends Item
{
if (isEffective)
{
if (localBlock.removedByPlayer(world, pos, player, true))
if (localBlock.removedByPlayer(world, player, x, y, z, true))
{
localBlock.onBlockDestroyedByPlayer(world, pos, localState);
localBlock.onBlockDestroyedByPlayer(world, x, y, z, localMeta);
}
localBlock.onBlockHarvested(world, pos, localState, player);
localBlock.onBlockHarvested(world, x, y, z, localMeta, player);
if (blockHardness > 0f)
onBlockDestroyed(stack, world, localBlock, pos, player);
onBlockDestroyed(stack, world, localBlock, x, y, z, player);
List<ItemStack> items = APISpellHelper.getItemsFromBlock(world, pos, localBlock, localState, this.getSilkTouch(stack), this.getFortuneLevel(stack));
List<ItemStack> items = APISpellHelper.getItemsFromBlock(world, localBlock, x, y, z, localMeta, this.getSilkTouch(stack), this.getFortuneLevel(stack));
SpellParadigmTool parad = this.loadParadigmFromStack(stack);
List<ItemStack> newItems = parad.handleItemList(stack, items);
if (!world.isRemote)
{
APISpellHelper.spawnItemListInWorld(newItems, world, pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f);
APISpellHelper.spawnItemListInWorld(newItems, world, x + 0.5f, y + 0.5f, z + 0.5f);
}
world.markBlockForUpdate(pos);
world.func_147479_m(x, y, z);
int cost = 0;
cost += parad.digSurroundingArea(stack, world, player, mop, localToolClass, localHardness, toolLevel, this);
cost += parad.onBreakBlock(stack, world, player, localBlock, localState, pos, mop.field_178784_b);
cost += parad.onBreakBlock(stack, world, player, localBlock, localMeta, x, y, z, ForgeDirection.getOrientation(mop.sideHit));
if (cost > 0)
{
@ -180,14 +186,14 @@ public class ItemSpellMultiTool extends Item
}
} else
{
world.setBlockToAir(pos);
world.markBlockForUpdate(pos);
world.setBlockToAir(x, y, z);
world.func_147479_m(x, y, z);
}
} else
{
world.setBlockToAir(pos);
world.markBlockForUpdate(pos);
world.setBlockToAir(x, y, z);
world.func_147479_m(x, y, z);
}
}
}
@ -252,7 +258,7 @@ public class ItemSpellMultiTool extends Item
public Set<String> getToolClasses(ItemStack stack)
{
Set<String> set = new HashSet<String>();
Set<String> set = new HashSet();
if (this.getHarvestLevel(stack, "pickaxe") > -1)
{
@ -273,14 +279,18 @@ public class ItemSpellMultiTool extends Item
}
@Override
public float getDigSpeed(ItemStack stack, IBlockState state)
public float getDigSpeed(ItemStack stack, Block block, int meta)
{
Block block = state.getBlock();
String toolClass = block.getHarvestTool(state);
String toolClass = block.getHarvestTool(meta);
if (toolClass == null || toolClass.equals(""))
{
return 1.0f;
toolClass = getToolClassOfMaterial(block.getMaterial());
if(toolClass == "")
{
return 1.0f;
}
}
{
if (stack.hasTagCompound())
@ -296,6 +306,26 @@ public class ItemSpellMultiTool extends Item
return 1.0f;
}
public String getToolClassOfMaterial(Material mat)
{
if(mat == Material.iron || mat == Material.anvil || mat == Material.rock)
{
return "pickaxe";
}
if(mat == Material.wood || mat == Material.plants || mat == Material.vine)
{
return "axe";
}
if(mat == Material.ground || mat == Material.grass)
{
return "shovel";
}
return "";
}
@Override
public int getHarvestLevel(ItemStack stack, String toolClass)
@ -369,7 +399,7 @@ public class ItemSpellMultiTool extends Item
MovingObjectPosition mop = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false);
int cost;
int cost = 0;
if (mop != null && mop.typeOfHit.equals(MovingObjectPosition.MovingObjectType.BLOCK))
{
@ -549,7 +579,10 @@ public class ItemSpellMultiTool extends Item
public void setDuration(ItemStack container, World world, int duration)
{
if (!world.isRemote)
if (world.isRemote)
{
return;
} else
{
World overWorld = DimensionManager.getWorld(0);
long worldtime = overWorld.getTotalWorldTime();
@ -629,10 +662,10 @@ public class ItemSpellMultiTool extends Item
NBTTagList tagList = tagiest.getTagList("Effects", Constants.NBT.TAG_COMPOUND);
List<SpellEffect> spellEffectList = new LinkedList<SpellEffect>();
List<SpellEffect> spellEffectList = new LinkedList();
for (int i = 0; i < tagList.tagCount(); i++)
{
NBTTagCompound tag = tagList.getCompoundTagAt(i);
NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i);
SpellEffect eff = SpellEffect.getEffectFromTag(tag);
if (eff != null)
@ -726,10 +759,10 @@ public class ItemSpellMultiTool extends Item
NBTTagList tagList = tagiest.getTagList("ToolTips", Constants.NBT.TAG_COMPOUND);
List<String> toolTipList = new LinkedList<String>();
List<String> toolTipList = new LinkedList();
for (int i = 0; i < tagList.tagCount(); i++)
{
NBTTagCompound tag = tagList.getCompoundTagAt(i);
NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i);
String str = tag.getString("tip");
if (str != null)

View file

@ -1,11 +1,6 @@
package WayofTime.alchemicalWizardry.api.items;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
import net.minecraft.block.Block;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.Item;
@ -14,7 +9,12 @@ import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.ShapedRecipes;
import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
/**
* Shaped Blood Orb Recipe Handler by joshie *
@ -278,10 +278,4 @@ public class ShapedBloodOrbRecipe implements IRecipe
{
return this.input;
}
@Override
public ItemStack[] func_179532_b(InventoryCrafting inventory)
{
return new ItemStack[1];
}
}

View file

@ -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.getItem() instanceof IBloodOrb)
if (slot != null && slot.getItem() instanceof IBloodOrb)
{
IBloodOrb orb = (IBloodOrb) slot.getItem();
if (orb.getOrbLevel() < (Integer) next)
@ -177,10 +177,4 @@ public class ShapelessBloodOrbRecipe implements IRecipe
{
return this.input;
}
@Override
public ItemStack[] func_179532_b(InventoryCrafting inventory)
{
return new ItemStack[1];
}
}

View file

@ -2,21 +2,13 @@ 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);
}

View file

@ -1,6 +1,7 @@
package WayofTime.alchemicalWizardry.api.renderer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.util.ResourceLocation;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
@ -8,8 +9,13 @@ public abstract class MRSRenderer
{
public abstract void renderAt(IMasterRitualStone tile, double x, double y, double z);
protected void bindTexture(ResourceLocation location)
protected void bindTexture(ResourceLocation p_147499_1_)
{
Minecraft.getMinecraft().getTextureManager().bindTexture(location);
TextureManager texturemanager = TileEntityRendererDispatcher.instance.field_147553_e;
if (texturemanager != null)
{
texturemanager.bindTexture(p_147499_1_);
}
}
}

View file

@ -1,13 +1,12 @@
package WayofTime.alchemicalWizardry.api.rituals;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public interface IMasterRitualStone extends ISegmentedReagentHandler
{
void performRitual(World world, BlockPos pos, String ritualID);
void performRitual(World world, int x, int y, int z, String ritualID);
String getOwner();
@ -23,9 +22,13 @@ public interface IMasterRitualStone extends ISegmentedReagentHandler
int getDirection();
World getWorldObj();
World getWorld();
BlockPos getPosition();
int getXCoord();
int getYCoord();
int getZCoord();
NBTTagCompound getCustomRitualTag();

View file

@ -1,7 +1,5 @@
package WayofTime.alchemicalWizardry.api.rituals;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
public interface IRitualStone
@ -9,10 +7,12 @@ public interface IRitualStone
/**
* x, y, and z give the position of the Ritual Stone
* @param world
* @param pos
* @param state
* @param x
* @param y
* @param z
* @param meta
* @param runeType
* @return
*/
boolean isRuneType(World world, BlockPos pos, IBlockState state, int runeType);
boolean isRuneType(World world, int x, int y, int z, int meta, int runeType);
}

View file

@ -1,7 +1,7 @@
package WayofTime.alchemicalWizardry.api.rituals;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.BlockPos;
import WayofTime.alchemicalWizardry.api.Int3;
/**
* This class is used to pass ritual-specific data into the RitualEffect from the containing Master Ritual Stone. This is basically used as auxillarary storage,
@ -10,27 +10,33 @@ import net.minecraft.util.BlockPos;
*/
public class LocalRitualStorage
{
public BlockPos coords;
public int xCoord;
public int yCoord;
public int zCoord;
public void writeToNBT(NBTTagCompound tag)
{
tag.setInteger("xCoord", coords.getX());
tag.setInteger("yCoord", coords.getY());
tag.setInteger("zCoord", coords.getZ());
tag.setInteger("xCoord", xCoord);
tag.setInteger("yCoord", yCoord);
tag.setInteger("zCoord", zCoord);
}
public void readFromNBT(NBTTagCompound tag)
{
this.coords = new BlockPos(tag.getInteger("xCoord"), tag.getInteger("yCoord"), tag.getInteger("zCoord"));
this.xCoord = tag.getInteger("xCoord");
this.yCoord = tag.getInteger("yCoord");
this.zCoord = tag.getInteger("zCoord");
}
public BlockPos getLocation()
public Int3 getLocation()
{
return coords;
return new Int3(xCoord, yCoord, zCoord);
}
public void setLocation(BlockPos location)
public void setLocation(Int3 location)
{
this.coords = location;
this.xCoord = location.xCoord;
this.yCoord = location.yCoord;
this.zCoord = location.zCoord;
}
}

View file

@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
@ -17,7 +17,10 @@ public abstract class RitualEffect
return true;
}
public void onRitualBroken(IMasterRitualStone ritualStone, RitualBreakMethod method) {}
public void onRitualBroken(IMasterRitualStone ritualStone, RitualBreakMethod method)
{
}
public abstract int getCostPerRefresh();
@ -37,13 +40,13 @@ public abstract class RitualEffect
ReagentStack reagentStack = new ReagentStack(reagent, amount);
ReagentStack stack = ritualStone.drain(EnumFacing.UP, reagentStack, false);
ReagentStack stack = ritualStone.drain(ForgeDirection.UNKNOWN, reagentStack, false);
if (stack != null && stack.amount >= amount)
{
if (doDrain)
{
ritualStone.drain(EnumFacing.UP, reagentStack, true);
ritualStone.drain(ForgeDirection.UNKNOWN, reagentStack, true);
}
return true;

View file

@ -6,16 +6,14 @@ import java.util.List;
import java.util.Map;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.eventhandler.Event;
import WayofTime.alchemicalWizardry.api.event.RitualRunEvent;
import WayofTime.alchemicalWizardry.api.event.RitualStopEvent;
import WayofTime.alchemicalWizardry.api.renderer.MRSRenderer;
import cpw.mods.fml.common.eventhandler.Event;
public class Rituals
{
@ -26,8 +24,8 @@ public class Rituals
public final MRSRenderer customRenderer;
public static Map<String, Rituals> ritualMap = new HashMap<String, Rituals>();
public static List<String> keyList = new LinkedList<String>();
public static Map<String, Rituals> ritualMap = new HashMap();
public static List<String> keyList = new LinkedList();
public Rituals(int crystalLevel, int actCost, RitualEffect effect, String name, MRSRenderer renderer)
{
@ -97,11 +95,11 @@ public class Rituals
}
}
public static String checkValidRitual(World world, BlockPos pos)
public static String checkValidRitual(World world, int x, int y, int z)
{
for (String key : ritualMap.keySet())
{
if (checkRitualIsValid(world, pos, key))
if (checkRitualIsValid(world, x, y, z, key))
{
return key;
}
@ -124,9 +122,9 @@ public class Rituals
return false;
}
public static boolean checkRitualIsValid(World world, BlockPos pos, String ritualID)
public static boolean checkRitualIsValid(World world, int x, int y, int z, String ritualID)
{
int direction = Rituals.getDirectionOfRitual(world, pos, ritualID);
int direction = Rituals.getDirectionOfRitual(world, x, y, z, ritualID);
return direction != -1;
}
@ -137,7 +135,7 @@ public class Rituals
* 3 - SOUTH
* 4 - WEST
*/
public static boolean checkDirectionOfRitualValid(World world, BlockPos pos, String ritualID, int direction)
public static boolean checkDirectionOfRitualValid(World world, int x, int y, int z, String ritualID, int direction)
{
List<RitualComponent> ritual = Rituals.getRitualList(ritualID);
@ -146,18 +144,15 @@ public class Rituals
return false;
}
IBlockState testState;
Block test;
TileEntity te;
for (RitualComponent rc : ritual)
{
BlockPos newPos = pos.add(rc.getX(direction), rc.getY(), rc.getZ(direction));
testState = world.getBlockState(newPos);
test = testState.getBlock();
te = world.getTileEntity(newPos);
test = world.getBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction));
te = world.getTileEntity(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction));
if (!(test instanceof IRitualStone && ((IRitualStone)test).isRuneType(world, newPos, testState, rc.getStoneType()))
if (!(test instanceof IRitualStone && ((IRitualStone)test).isRuneType(world, x + rc.getX(direction), y, z+ rc.getZ(direction), world.getBlockMetadata(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)), rc.getStoneType()))
&& !(te instanceof ITileRitualStone && ((ITileRitualStone)te).isRuneType(rc.getStoneType())))
{
return false;
@ -167,11 +162,11 @@ public class Rituals
return true;
}
public static int getDirectionOfRitual(World world, BlockPos pos, String ritualID)
public static int getDirectionOfRitual(World world, int x, int y, int z, String ritualID)
{
for (int i = 1; i <= 4; i++)
{
if (Rituals.checkDirectionOfRitualValid(world, pos, ritualID, i))
if (Rituals.checkDirectionOfRitualValid(world, x, y, z, ritualID, i))
{
return i;
}

View file

@ -1,11 +1,10 @@
package WayofTime.alchemicalWizardry.api.sacrifice;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
@ -13,6 +12,7 @@ public class PlayerSacrificeHandler
{
public static float scalingOfSacrifice = 0.001f;
public static int soulFrayDuration = 400;
public static Potion soulFrayId;
public static float getPlayerIncense(EntityPlayer player)
{
return APISpellHelper.getCurrentIncense(player);
@ -41,7 +41,7 @@ public class PlayerSacrificeHandler
public static boolean sacrificePlayerHealth(EntityPlayer player)
{
if(player.isPotionActive(AlchemicalWizardry.customPotionSoulFray))
if(player.isPotionActive(soulFrayId))
{
return false;
}
@ -61,7 +61,7 @@ public class PlayerSacrificeHandler
{
player.setHealth(maxHealth/10.0f);
setPlayerIncense(player, 0);
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionSoulFray.id, soulFrayDuration));
player.addPotionEffect(new PotionEffect(soulFrayId.id, soulFrayDuration));
return true;
}
@ -78,7 +78,10 @@ public class PlayerSacrificeHandler
public static boolean findAndFillAltar(World world, EntityPlayer player, int amount)
{
IBloodAltar altarEntity = getAltar(world, player.getPosition());
int posX = (int) Math.round(player.posX - 0.5f);
int posY = (int) player.posY;
int posZ = (int) Math.round(player.posZ - 0.5f);
IBloodAltar altarEntity = getAltar(world, posX, posY, posZ);
if (altarEntity == null)
{
@ -91,7 +94,7 @@ public class PlayerSacrificeHandler
return true;
}
public static IBloodAltar getAltar(World world, BlockPos pos)
public static IBloodAltar getAltar(World world, int x, int y, int z)
{
TileEntity tileEntity;
@ -101,7 +104,7 @@ public class PlayerSacrificeHandler
{
for (int k = -2; k <= 1; k++)
{
tileEntity = world.getTileEntity(pos.add(i, j, k));
tileEntity = world.getTileEntity(i + x, k + y, j + z);
if(tileEntity instanceof IBloodAltar)
{

View file

@ -12,9 +12,11 @@ import java.util.Map.Entry;
import java.util.UUID;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.server.MinecraftServer;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mojang.authlib.GameProfile;
/**
@ -23,17 +25,46 @@ import com.google.gson.GsonBuilder;
public class ComplexNetworkHandler
{
public static String fileName = "config/BloodMagic/soulnetworkKeys";
static HashMap<UUID, String> keyMap = new HashMap<UUID, String>();
static HashMap<UUID, String> keyMap = new HashMap();
public static UUID getUUIDFromPlayer(EntityPlayer player)
{
return player.getPersistentID();
}
public static EntityPlayer getPlayerFromUUID(UUID uuid)
{
MinecraftServer server = MinecraftServer.getServer();
GameProfile gameProfile;
gameProfile = server.func_152358_ax().func_152652_a(uuid);
String str = uuid.toString();
//TODO ServerConfigurationManager d.createPlayerForUser
UUID.fromString(str);
return null;
}
public static String getKeyForPlayer(EntityPlayer player)
{
return "";
}
public static UUID getUUIDForKey(String key)
{
// if (MinecraftServer.getServer() == null)
// {
// return null;
// }
//
// World world = MinecraftServer.getServer().worldServers[0];
// UUIDKeyMap data = (UUIDKeyMap) world.loadItemData(UUIDKeyMap.class, key);
//
// if (data == null)
// {
// data = new UUIDKeyMap(key);
// world.setItemData(key, data);
// }
return null;
}
public static String assignKeyToPlayer(EntityPlayer player)
{
return "";
@ -70,8 +101,9 @@ public class ComplexNetworkHandler
try
{
br = new BufferedReader(new FileReader(save));
keyMap = gson.fromJson(br, keyMap.getClass());
HashMap schema = gson.fromJson(br, keyMap.getClass());
keyMap = schema;
if(keyMap != null)
{
@ -85,6 +117,7 @@ public class ComplexNetworkHandler
e.printStackTrace();
}
}
else
{
keyMap = null;

View file

@ -9,42 +9,16 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraftforge.fml.common.eventhandler.Event.Result;
import WayofTime.alchemicalWizardry.api.event.AddToNetworkEvent;
import WayofTime.alchemicalWizardry.api.event.ItemBindEvent;
import WayofTime.alchemicalWizardry.api.event.ItemDrainInContainerEvent;
import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent;
import cpw.mods.fml.common.eventhandler.Event;
import cpw.mods.fml.common.eventhandler.Event.Result;
public class SoulNetworkHandler
{
public static boolean canSyphonInContainer(ItemStack ist, int damageToBeDone)
{
if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals("")))
{
String ownerName = ist.getTagCompound().getString("ownerName");
if (MinecraftServer.getServer() == null)
{
return false;
}
World world = MinecraftServer.getServer().worldServers[0];
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
if (data == null)
{
data = new LifeEssenceNetwork(ownerName);
world.setItemData(ownerName, data);
}
return data.currentEssence >= damageToBeDone;
}
return false;
}
public static boolean syphonFromNetworkWhileInContainer(ItemStack ist, int damageToBeDone)
{
String ownerName = "";
@ -422,7 +396,7 @@ public class SoulNetworkHandler
public static String getUsername(EntityPlayer player)
{
return player.getName();
return player.getCommandSenderName();
}
public static EntityPlayer getPlayerForUsername(String str)
@ -431,7 +405,7 @@ public class SoulNetworkHandler
{
return null;
}
return MinecraftServer.getServer().getConfigurationManager().getPlayerByUsername(str);
return MinecraftServer.getServer().getConfigurationManager().func_152612_a(str);
}
public static void causeNauseaToPlayer(ItemStack stack)

View file

@ -4,7 +4,6 @@ import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
@ -14,15 +13,14 @@ import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.BlockPos;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.registry.GameRegistry;
import WayofTime.alchemicalWizardry.ModItems;
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
public class APISpellHelper
{
@ -232,7 +230,7 @@ public class APISpellHelper
if (!world.isRemote && player instanceof EntityPlayer)
d1 += 1.62D;
double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f;
Vec3 vec3 = new Vec3(d0, d1, d2);
Vec3 vec3 = APISpellHelper.createVec3(d0, d1, d2);
float f3 = MathHelper.cos(-f2 * 0.017453292F - (float) Math.PI);
float f4 = MathHelper.sin(-f2 * 0.017453292F - (float) Math.PI);
float f5 = -MathHelper.cos(-f1 * 0.017453292F);
@ -244,33 +242,56 @@ public class APISpellHelper
// d3 = ((EntityPlayerMP) player).theItemInWorldManager.getBlockReachDistance();
}
Vec3 vec31 = vec3.addVector((double) f7 * range, (double) f6 * range, (double) f8 * range);
return world.rayTraceBlocks(vec3, vec31, par3, !par3, par3);
return world.func_147447_a(vec3, vec31, par3, !par3, par3);
}
public static List<ItemStack> getItemsFromBlock(World world, BlockPos pos, Block block, IBlockState state, boolean silkTouch, int fortune)
public static Vec3 createVec3(double x, double y, double z)
{
return Vec3.createVectorHelper(x, y, z);
}
public static List<ItemStack> getItemsFromBlock(World world, Block block, int x, int y, int z, int meta, boolean silkTouch, int fortune)
{
boolean canSilk = block.canSilkHarvest(world, pos, state, null); //Null player
boolean canSilk = block.canSilkHarvest(world, null, x, y, z, meta);
if (canSilk && silkTouch)
{
ArrayList<ItemStack> items = new ArrayList<ItemStack>();
ItemStack item = new ItemStack(block, 1, block.getMetaFromState(state));
ItemStack item = createStackedBlock(block, meta);
items.add(item);
return items;
} else
{
return block.getDrops(world, pos, state, fortune);
return block.getDrops(world, x, y, z, meta, fortune);
}
}
public static ItemStack createStackedBlock(Block block, int meta)
{
int j = 0;
if(block == Blocks.lit_redstone_ore)
{
block = Blocks.redstone_ore;
}
Item item = Item.getItemFromBlock(block);
if (item != null && item.getHasSubtypes())
{
j = meta;
}
return new ItemStack(item, 1, j);
}
public static void spawnItemListInWorld(List<ItemStack> items, World world, float x, float y, float z)
{
for (ItemStack stack : items)
{
EntityItem itemEntity = new EntityItem(world, x, y, z, stack);
itemEntity.setDefaultPickupDelay();
itemEntity.delayBeforeCanPickup = 10;
world.spawnEntityInWorld(itemEntity);
}
}

View file

@ -6,24 +6,20 @@ import java.util.LinkedList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.IProjectile;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.util.Constants;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class EntitySpellProjectile extends Entity implements IProjectile
{
@ -45,10 +41,10 @@ public class EntitySpellProjectile extends Entity implements IProjectile
//Custom variables
private int maxRicochet = 0;
private float damage = 1;
public List<IProjectileImpactEffect> impactList = new ArrayList<IProjectileImpactEffect>();
public List<IProjectileImpactEffect> impactList = new ArrayList();
private boolean penetration = false;
public List<IProjectileUpdateEffect> updateEffectList = new ArrayList<IProjectileUpdateEffect>();
public List<SpellEffect> spellEffectList = new LinkedList<SpellEffect>();
public List<IProjectileUpdateEffect> updateEffectList = new ArrayList();
public List<SpellEffect> spellEffectList = new LinkedList();
private int blocksBroken = 0;
public EntitySpellProjectile(World par1World)
@ -62,6 +58,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
super(par1World);
this.setSize(0.5F, 0.5F);
this.setPosition(par2, par4, par6);
yOffset = 0.0F;
}
public EntitySpellProjectile(World par1World, EntityPlayer par2EntityPlayer)
@ -75,6 +72,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
posY -= 0.2D;
posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F;
this.setPosition(posX, posY, posZ);
yOffset = 0.0F;
motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI);
motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI);
motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI);
@ -113,6 +111,18 @@ public class EntitySpellProjectile extends Entity implements IProjectile
prevRotationPitch = rotationPitch = (float) (Math.atan2(var3, var10) * 180.0D / Math.PI);
}
@Override
@SideOnly(Side.CLIENT)
/**
* Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX,
* posY, posZ, yaw, pitch
*/
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9)
{
this.setPosition(par1, par3, par5);
this.setRotation(par7, par8);
}
@Override
@SideOnly(Side.CLIENT)
/**
@ -148,7 +158,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
}
if (shootingEntity == null)
{
List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1));
List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1));
Iterator i = players.iterator();
double closestDistance = Double.MAX_VALUE;
EntityPlayer closestPlayer = null;
@ -172,15 +182,14 @@ public class EntitySpellProjectile extends Entity implements IProjectile
prevRotationYaw = rotationYaw = (float) (Math.atan2(motionX, motionZ) * 180.0D / Math.PI);
prevRotationPitch = rotationPitch = (float) (Math.atan2(motionY, var1) * 180.0D / Math.PI);
}
IBlockState state = worldObj.getBlockState(new BlockPos(xTile, yTile, zTile));
Block var16 = state.getBlock();
Block var16 = worldObj.getBlock(xTile, yTile, zTile);
if (var16 != null)
{
var16.setBlockBoundsBasedOnState(worldObj, new BlockPos(xTile, yTile, zTile));
AxisAlignedBB var2 = var16.getCollisionBoundingBox(worldObj, new BlockPos(xTile, yTile, zTile), state);
var16.setBlockBoundsBasedOnState(worldObj, xTile, yTile, zTile);
AxisAlignedBB var2 = var16.getCollisionBoundingBoxFromPool(worldObj, xTile, yTile, zTile);
if (var2 != null && var2.isVecInside(new Vec3(posX, posY, posZ)))
if (var2 != null && var2.isVecInside(APISpellHelper.createVec3(posX, posY, posZ)))
{
inGround = true;
}
@ -188,7 +197,14 @@ public class EntitySpellProjectile extends Entity implements IProjectile
if (inGround)
{
Block var18 = worldObj.getBlock(xTile, yTile, zTile);
int var19 = worldObj.getBlockMetadata(xTile, yTile, zTile);
// if (var18.equals(Block.getBlockById(inTile)) && var19 == inData)
{
// this.groundImpact();
// this.setDead();
}
} else
{
++ticksInAir;
@ -202,19 +218,19 @@ public class EntitySpellProjectile extends Entity implements IProjectile
}
}
Vec3 var17 = new Vec3(posX, posY, posZ);
Vec3 var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ);
MovingObjectPosition var4 = worldObj.rayTraceBlocks(var17, var3, true, false, false);
var17 = new Vec3(posX, posY, posZ);
var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ);
Vec3 var17 = APISpellHelper.createVec3(posX, posY, posZ);
Vec3 var3 = APISpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ);
MovingObjectPosition var4 = worldObj.func_147447_a(var17, var3, true, false, false);
var17 = APISpellHelper.createVec3(posX, posY, posZ);
var3 = APISpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ);
if (var4 != null)
{
var3 = new Vec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord);
var3 = APISpellHelper.createVec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord);
}
Entity var5 = null;
List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, getBoundingBox().addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D));
List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D));
double var7 = 0.0D;
Iterator var9 = var6.iterator();
float var11;
@ -226,7 +242,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
if (var10.canBeCollidedWith() && (var10 != shootingEntity || ticksInAir >= 5))
{
var11 = 0.3F;
AxisAlignedBB var12 = var10.getBoundingBox().expand(var11, var11, var11);
AxisAlignedBB var12 = var10.boundingBox.expand(var11, var11, var11);
MovingObjectPosition var13 = var12.calculateIntercept(var17, var3);
if (var13 != null)
@ -271,14 +287,14 @@ public class EntitySpellProjectile extends Entity implements IProjectile
if (ticksInAir % 3 == 0)
{
double gauss = gaussian(1.0F);
worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB, posX, posY, posZ, gauss, gauss, 0.0F);
worldObj.spawnParticle("mobSpell", posX, posY, posZ, gauss, gauss, 0.0F);
}
}
private void doFiringParticles()
{
worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D);
worldObj.spawnParticle(EnumParticleTypes.FLAME, posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ));
worldObj.spawnParticle("mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D);
worldObj.spawnParticle("flame", posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ));
}
/**
@ -301,6 +317,17 @@ public class EntitySpellProjectile extends Entity implements IProjectile
effectList.appendTag(eff.getTag());
}
// for (String str : this.effectList)
// {
// if (str != null)
// {
// NBTTagCompound tag = new NBTTagCompound();
//
// tag.setString("Class", str);
// effectList.appendTag(tag);
// }
// }
par1NBTTagCompound.setTag("Effects", effectList);
par1NBTTagCompound.setInteger("blocksBroken", blocksBroken);
par1NBTTagCompound.setBoolean("isSilkTouch", isSilkTouch);
@ -323,7 +350,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
NBTTagList tagList = par1NBTTagCompound.getTagList("Effects", Constants.NBT.TAG_COMPOUND);
List<SpellEffect> spellEffectList = new LinkedList<SpellEffect>();
List<SpellEffect> spellEffectList = new LinkedList();
for (int i = 0; i < tagList.tagCount(); i++)
{
NBTTagCompound tag = tagList.getCompoundTagAt(i);
@ -361,6 +388,13 @@ public class EntitySpellProjectile extends Entity implements IProjectile
return false;
}
@Override
@SideOnly(Side.CLIENT)
public float getShadowSize()
{
return 0.0F;
}
/**
* Sets the amount of knockback the arrow applies when it hits a mob.
*/
@ -414,7 +448,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
{
if (!this.penetration)
{
this.groundImpact(mop.field_178784_b);
this.groundImpact(mop.sideHit);
this.performTileImpactEffects(mop);
}
}
@ -439,7 +473,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
{
for (int particles = 0; particles < i; particles++)
{
worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), posGauss(1.0F), posGauss(1.0F), 0.0F);
worldObj.spawnParticle("mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), posGauss(1.0F), posGauss(1.0F), 0.0F);
}
}
@ -453,7 +487,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
return DamageSource.causePlayerDamage(shootingEntity);
}
private void groundImpact(EnumFacing sideHit)
private void groundImpact(int sideHit)
{
this.ricochet(sideHit);
}
@ -473,22 +507,22 @@ public class EntitySpellProjectile extends Entity implements IProjectile
return d + d * ((rand.nextFloat() - 0.5D) / 4);
}
private void ricochet(EnumFacing sideHit)
private void ricochet(int sideHit)
{
switch (sideHit)
{
case UP:
case DOWN:
case 0:
case 1:
// topHit, bottomHit, reflect Y
motionY = motionY * -1;
break;
case WEST:
case EAST:
case 2:
case 3:
// westHit, eastHit, reflect Z
motionZ = motionZ * -1;
break;
case SOUTH:
case NORTH:
case 4:
case 5:
// southHit, northHit, reflect X
motionX = motionX * -1;
break;
@ -501,23 +535,23 @@ public class EntitySpellProjectile extends Entity implements IProjectile
{
switch (sideHit)
{
case UP:
worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), -gaussian(0.1D), gaussian(0.1D));
case 0:
worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), -gaussian(0.1D), gaussian(0.1D));
break;
case DOWN:
worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D));
case 1:
worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D));
break;
case NORTH:
worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), -gaussian(0.1D));
case 2:
worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), -gaussian(0.1D));
break;
case SOUTH:
worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D));
case 3:
worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D));
break;
case WEST:
worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, -gaussian(0.1D), gaussian(0.1D), gaussian(0.1D));
case 4:
worldObj.spawnParticle("smoke", posX, posY, posZ, -gaussian(0.1D), gaussian(0.1D), gaussian(0.1D));
break;
case EAST:
worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D));
case 5:
worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D));
break;
}
}

View file

@ -35,7 +35,7 @@ public abstract class ExtrapolatedMeleeEntityEffect implements IMeleeSpellEntity
double y = entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord;
double z = entityPlayer.posZ + lookVec.zCoord;
List<Entity> entities = world.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(x - 0.5f, y - 0.5f, z - 0.5f, x + 0.5f, y + 0.5f, z + 0.5f).expand(radius, radius, radius));
List<Entity> entities = world.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(x - 0.5f, y - 0.5f, z - 0.5f, x + 0.5f, y + 0.5f, z + 0.5f).expand(radius, radius, radius));
int hit = 0;
if (entities != null)

View file

@ -1,14 +1,12 @@
package WayofTime.alchemicalWizardry.api.spell;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public interface IOnBreakBlock
{
int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, IBlockState state, BlockPos pos, EnumFacing sideBroken);
int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, int z, ForgeDirection sideBroken);
}

View file

@ -1,8 +1,6 @@
package WayofTime.alchemicalWizardry.api.spell;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.BlockPos;
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
@ -19,12 +17,11 @@ public abstract class MeleeSpellCenteredWorldEffect extends MeleeSpellWorldEffec
public void onWorldEffect(World world, EntityPlayer entityPlayer)
{
Vec3 lookVec = entityPlayer.getLook(range).normalize();
int x = MathHelper.floor_double(entityPlayer.posX + lookVec.xCoord * range);
int y = MathHelper.floor_double(entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord * range);
int z = MathHelper.floor_double(entityPlayer.posZ + lookVec.zCoord * range);
int x = (int) (entityPlayer.posX + lookVec.xCoord * range);
int y = (int) (entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord * range);
int z = (int) (entityPlayer.posZ + lookVec.zCoord * range);
this.onCenteredWorldEffect(entityPlayer, world, new BlockPos(x, y, z));
this.onCenteredWorldEffect(entityPlayer, world, x, y, z);
}
public void setRange(float range)
@ -32,5 +29,5 @@ public abstract class MeleeSpellCenteredWorldEffect extends MeleeSpellWorldEffec
this.range = range;
}
public abstract void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos);
public abstract void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ);
}

View file

@ -8,9 +8,9 @@ import java.util.Map.Entry;
public class SpellEffectRegistry
{
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 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 void registerSpellEffect(Class<? extends SpellParadigm> paraClass, ComplexSpellEffect effect)
{
@ -43,7 +43,7 @@ public class SpellEffectRegistry
effectList.add(effect);
}else
{
List<ComplexSpellEffect> effectList = new LinkedList<ComplexSpellEffect>();
List<ComplexSpellEffect> effectList = new LinkedList();
effectList.add(effect);
effectRegistry.put(paraClass, effectList);
}

View file

@ -9,7 +9,7 @@ import net.minecraft.world.World;
public abstract class SpellParadigm
{
protected List<SpellEffect> bufferedEffectList = new LinkedList<SpellEffect>();
protected List<SpellEffect> bufferedEffectList = new LinkedList();
public void addBufferedEffect(SpellEffect effect)
{

View file

@ -15,12 +15,15 @@ public class SpellParadigmMelee extends SpellParadigm
public SpellParadigmMelee()
{
this.entityEffectList = new ArrayList<IMeleeSpellEntityEffect>();
this.worldEffectList = new ArrayList<IMeleeSpellWorldEffect>();
this.entityEffectList = new ArrayList();
this.worldEffectList = new ArrayList();
}
@Override
public void enhanceParadigm(SpellEnhancement enh) {}
public void enhanceParadigm(SpellEnhancement enh)
{
}
@Override
public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack)

View file

@ -25,8 +25,8 @@ public class SpellParadigmProjectile extends SpellParadigm
this.damageSource = DamageSource.generic;
this.damage = 1;
this.cost = 0;
this.impactList = new ArrayList<IProjectileImpactEffect>();
this.updateEffectList = new ArrayList<IProjectileUpdateEffect>();
this.impactList = new ArrayList();
this.updateEffectList = new ArrayList();
this.penetration = false;
this.ricochetMax = 0;
this.isSilkTouch = false;

View file

@ -14,11 +14,14 @@ public class SpellParadigmSelf extends SpellParadigm
public SpellParadigmSelf()
{
selfSpellEffectList = new ArrayList<ISelfSpellEffect>();
selfSpellEffectList = new ArrayList();
}
@Override
public void enhanceParadigm(SpellEnhancement enh) {}
public void enhanceParadigm(SpellEnhancement enh)
{
}
@Override
public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack)

View file

@ -7,16 +7,14 @@ import java.util.Map.Entry;
import java.util.Set;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
@ -49,31 +47,31 @@ public class SpellParadigmTool extends SpellParadigm
public SpellParadigmTool()
{
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.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.toolInfoString = new HashMap<String, String>();
this.critChanceHash = new HashMap<String, Float>();
this.toolInfoString = new HashMap();
this.critChanceHash = new HashMap();
this.harvestLevel = new HashMap<String, Integer>();
this.harvestLevel = new HashMap();
this.harvestLevel.put("pickaxe", -1);
this.harvestLevel.put("shovel", -1);
this.harvestLevel.put("axe", -1);
this.digSpeed = new HashMap<String, Float>();
this.digSpeed = new HashMap();
this.digSpeed.put("pickaxe", 1.0f);
this.digSpeed.put("shovel", 1.0f);
this.digSpeed.put("axe", 1.0f);
this.maxDamageHash = new HashMap<String, Float>();
this.maxDamageHash = new HashMap();
this.maxDamageHash.put("default", 5.0f);
this.fortuneLevel = 0;
@ -339,12 +337,12 @@ public class SpellParadigmTool extends SpellParadigm
return total;
}
public int onBreakBlock(ItemStack container, World world, EntityPlayer player, Block block, IBlockState state, BlockPos pos, EnumFacing sideBroken)
public int onBreakBlock(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, int z, ForgeDirection sideBroken)
{
int total = 0;
for (IOnBreakBlock effect : this.breakBlockEffectList)
{
total += effect.onBlockBroken(container, world, player, block, state, pos, sideBroken);
total += effect.onBlockBroken(container, world, player, block, meta, x, y, z, sideBroken);
}
return total;
@ -356,7 +354,8 @@ public class SpellParadigmTool extends SpellParadigm
for (IItemManipulator eff : this.itemManipulatorEffectList)
{
heldList = eff.handleItemsOnBlockBroken(toolStack, heldList);
List<ItemStack> newHeldList = eff.handleItemsOnBlockBroken(toolStack, heldList);
heldList = newHeldList;
}
return heldList;
@ -464,7 +463,7 @@ public class SpellParadigmTool extends SpellParadigm
public float getAddedDamageForEntity(Entity entity)
{
HashMap<String, Float> hash = new HashMap<String, Float>();
HashMap<String, Float> hash = new HashMap();
for (ISpecialDamageEffect effect : this.specialDamageEffectList)
{

View file

@ -9,7 +9,7 @@ import java.util.List;
public class SummoningRegistry
{
public static List<SummoningRegistryComponent> summoningList = new ArrayList<SummoningRegistryComponent>();
public static List<SummoningRegistryComponent> summoningList = new ArrayList();
public static void registerSummon(SummoningHelper s, ItemStack[] ring1, ItemStack[] ring2, ItemStack[] ring3, int amountUsed, int bloodOrbLevel)
{

View file

@ -1,11 +1,11 @@
package WayofTime.alchemicalWizardry.api.tile;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.api.spell.SpellParadigm;
public interface ISpellTile
{
void modifySpellParadigm(SpellParadigm parad);
boolean canInputRecieveOutput(EnumFacing output);
boolean canInputRecieveOutput(ForgeDirection output);
}

View file

@ -1,14 +0,0 @@
package WayofTime.alchemicalWizardry.client;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;
public class BlockRenderer
{
public static void registerBlock(Block block)
{
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation("alchemicalwizardry:" + block.getUnlocalizedName().substring(5), "inventory"));
}
}

View file

@ -1,23 +1,55 @@
package WayofTime.alchemicalWizardry.client;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderBlockOverlayEvent;
import net.minecraftforge.client.event.RenderHandEvent;
import net.minecraftforge.client.event.sound.SoundEvent;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.common.eventhandler.Event.Result;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent.Phase;
import net.minecraftforge.fml.common.gameevent.TickEvent.RenderTickEvent;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.ModBlocks;
import WayofTime.alchemicalWizardry.client.renderer.RenderHelper;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.InputEvent;
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
import cpw.mods.fml.common.gameevent.TickEvent.RenderTickEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ClientEventHandler
{
private Minecraft mcClient = FMLClientHandler.instance().getClient();
private Minecraft mc = FMLClientHandler.instance().getClient();
public static ResourceLocation currentPlayerTexture = null;
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void renderPOVArmour(RenderHandEvent event)
{
if (this.mc.thePlayer.worldObj.isRemote && this.mc.gameSettings.thirdPersonView == 0 && !this.mc.renderViewEntity.isPlayerSleeping() && !this.mc.gameSettings.hideGUI && !this.mc.playerController.enableEverythingIsScrewedUpMode())
{
currentPlayerTexture = ((AbstractClientPlayer) mc.thePlayer).getLocationSkin();
ClientUtils.renderPlayerArmourInPOV(mc.thePlayer, event.partialTicks);
event.setCanceled(true);
}
}
// @SubscribeEvent(priority = EventPriority.LOWEST)
// public void onPlayerRenderTick(RenderPlayerEvent.Pre event)
// {
// ModelBiped model = ((BoundArmour)ModItems.boundPlate).getArmorModel(event.entityPlayer, new ItemStack(ModItems.boundPlate), 2);
// String texture = ((BoundArmour)ModItems.boundPlate).getArmorTexture(new ItemStack(ModItems.boundPlate), event.entityPlayer, 2, "");
//
// ResourceLocation resourcelocation = new ResourceLocation(texture);
// event.renderer.modelBipedMain.bipedBody.addChild(model.bipedBody);
// Minecraft.getMinecraft().renderEngine.bindTexture(resourcelocation);
//
// }
@SubscribeEvent
public void onKeyInput(InputEvent.KeyInputEvent event)
{
@ -66,7 +98,7 @@ public class ClientEventHandler
if (event.phase.equals(Phase.START))
return;
// if (!RenderHelper.onTickInGame(mcClient))
if (!RenderHelper.onTickInGame(mc))
{
}

View file

@ -4,10 +4,7 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.world.World;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
import net.minecraftforge.fml.common.FMLCommonHandler;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.ModBlocks;
import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile;
import WayofTime.alchemicalWizardry.client.renderer.RitualDivinerRender;
@ -41,9 +38,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.RenderAlchemicalCalcinator;
import WayofTime.alchemicalWizardry.common.renderer.block.RenderAltar;
import WayofTime.alchemicalWizardry.common.renderer.block.RenderChemistrySet;
import WayofTime.alchemicalWizardry.common.renderer.block.RenderAlchemicCalcinator;
import WayofTime.alchemicalWizardry.common.renderer.block.RenderConduit;
import WayofTime.alchemicalWizardry.common.renderer.block.RenderCrystalBelljar;
import WayofTime.alchemicalWizardry.common.renderer.block.RenderMasterStone;
@ -54,6 +49,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.TEAltarRenderer;
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAlchemicalCalcinatorItemRenderer;
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAltarItemRenderer;
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEBellJarItemRenderer;
@ -88,10 +85,9 @@ import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBazoo
import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBlastProjectile;
import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderMeteor;
import WayofTime.alchemicalWizardry.common.thread.GAPIChecker;
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator;
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator;
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar;
import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet;
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit;
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal;
@ -101,6 +97,11 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.FMLCommonHandler;
public class ClientProxy extends CommonProxy
{
@ -148,19 +149,22 @@ public class ClientProxy extends CommonProxy
MinecraftForge.EVENT_BUS.register(new RitualDivinerRender());
ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new RenderAltar());
ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new TEAltarRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TEPedestal.class, new RenderPedestal());
ClientRegistry.bindTileEntitySpecialRenderer(TEPlinth.class, new RenderPlinth());
ClientRegistry.bindTileEntitySpecialRenderer(TEChemistrySet.class, new RenderChemistrySet());
ClientRegistry.bindTileEntitySpecialRenderer(TEWritingTable.class, new RenderWritingTable());
ClientRegistry.bindTileEntitySpecialRenderer(TEConduit.class, new RenderConduit());
ClientRegistry.bindTileEntitySpecialRenderer(TESpellEffectBlock.class, new RenderSpellEffectBlock());
ClientRegistry.bindTileEntitySpecialRenderer(TESpellEnhancementBlock.class, new RenderSpellEnhancementBlock());
ClientRegistry.bindTileEntitySpecialRenderer(TESpellParadigmBlock.class, new RenderSpellParadigmBlock());
ClientRegistry.bindTileEntitySpecialRenderer(TESpellModifierBlock.class, new RenderSpellModifierBlock());
ClientRegistry.bindTileEntitySpecialRenderer(TEReagentConduit.class, new RenderReagentConduit());
ClientRegistry.bindTileEntitySpecialRenderer(TEMasterStone.class, new RenderMasterStone());
ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicalCalcinator.class, new RenderAlchemicalCalcinator());
ClientRegistry.bindTileEntitySpecialRenderer(TEBelljar.class, new RenderCrystalBelljar());
if (AlchemicalWizardry.displayRitualAnimation)
{
ClientRegistry.bindTileEntitySpecialRenderer(TEMasterStone.class, new RenderMasterStone());
}
ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicCalcinator.class, new RenderAlchemicCalcinator());
ClientRegistry.bindTileEntitySpecialRenderer(TEBellJar.class, new RenderCrystalBelljar());
//Item Renderer stuff
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockConduit), new TEConduitItemRenderer());
@ -168,7 +172,7 @@ public class ClientProxy extends CommonProxy
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellEnhancement), new TESpellEnhancementBlockItemRenderer());
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellParadigm), new TESpellParadigmBlockItemRenderer());
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellModifier), new TESpellModifierBlockItemRenderer());
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAlchemicalCalcinator), new TEAlchemicalCalcinatorItemRenderer());
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAlchemicCalcinator), new TEAlchemicalCalcinatorItemRenderer());
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockCrystalBelljar), new TEBellJarItemRenderer());
}
@ -179,7 +183,7 @@ public class ClientProxy extends CommonProxy
}
@Override
public void initRendering()
public void InitRendering()
{
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAltar), new TEAltarItemRenderer());
}

View file

@ -0,0 +1,348 @@
package WayofTime.alchemicalWizardry.client;
import static net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON;
import static net.minecraftforge.client.IItemRenderer.ItemRenderType.FIRST_PERSON_MAP;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemCloth;
import net.minecraft.item.ItemMap;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.storage.MapData;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.MinecraftForgeClient;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
public class ClientUtils
{
public static Minecraft mc = Minecraft.getMinecraft();
private static final ResourceLocation RES_MAP_BACKGROUND = new ResourceLocation("textures/map/map_background.png");
public static void renderPlayerArmourInPOV(EntityPlayer player, float partialTickTime)
{
GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT);
float f1 = 1.0f;//this.prevEquippedProgress + (this.equippedProgress - this.prevEquippedProgress) * partialTickTime;
EntityClientPlayerMP entityclientplayermp = mc.thePlayer;
float f2 = entityclientplayermp.prevRotationPitch + (entityclientplayermp.rotationPitch - entityclientplayermp.prevRotationPitch) * partialTickTime;
// GL11.glPushMatrix();
GL11.glRotatef(180 - (entityclientplayermp.prevRotationYaw + (entityclientplayermp.rotationYaw - entityclientplayermp.prevRotationYaw) * partialTickTime), 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-f2, 1.0F, 0.0F, 0.0F);
RenderHelper.enableStandardItemLighting();
// GL11.glPopMatrix();
EntityPlayerSP entityplayersp = (EntityPlayerSP)entityclientplayermp;
float f3 = entityplayersp.prevRenderArmPitch + (entityplayersp.renderArmPitch - entityplayersp.prevRenderArmPitch) * partialTickTime;
float f4 = entityplayersp.prevRenderArmYaw + (entityplayersp.renderArmYaw - entityplayersp.prevRenderArmYaw) * partialTickTime;
GL11.glRotatef((entityclientplayermp.rotationPitch - f3) * 0.1F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef((entityclientplayermp.rotationYaw - f4) * 0.1F, 0.0F, 1.0F, 0.0F);
ItemStack itemstack = player.getCurrentEquippedItem();
if (itemstack != null && itemstack.getItem() instanceof ItemCloth)
{
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
}
int i = mc.theWorld.getLightBrightnessForSkyBlocks(MathHelper.floor_double(entityclientplayermp.posX), MathHelper.floor_double(entityclientplayermp.posY), MathHelper.floor_double(entityclientplayermp.posZ), 0);
int j = i % 65536;
int k = i / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
float f5;
float f6;
float f7;
if (itemstack != null)
{
int l = itemstack.getItem().getColorFromItemStack(itemstack, 0);
f5 = (float)(l >> 16 & 255) / 255.0F;
f6 = (float)(l >> 8 & 255) / 255.0F;
f7 = (float)(l & 255) / 255.0F;
GL11.glColor4f(f5, f6, f7, 1.0F);
}
else
{
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
float f8;
float f9;
float f10;
float f13;
Render render;
RenderPlayer renderplayer;
if (itemstack != null && itemstack.getItem() instanceof ItemMap)
{
GL11.glPushMatrix();
f13 = 0.8F;
f5 = entityclientplayermp.getSwingProgress(partialTickTime);
f6 = MathHelper.sin(f5 * (float)Math.PI);
f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI);
GL11.glTranslatef(-f7 * 0.4F, MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI * 2.0F) * 0.2F, -f6 * 0.2F);
f5 = 1.0F - f2 / 45.0F + 0.1F;
if (f5 < 0.0F)
{
f5 = 0.0F;
}
if (f5 > 1.0F)
{
f5 = 1.0F;
}
f5 = -MathHelper.cos(f5 * (float)Math.PI) * 0.5F + 0.5F;
GL11.glTranslatef(0.0F, 0.0F * f13 - (1.0F - f1) * 1.2F - f5 * 0.5F + 0.04F, -0.9F * f13);
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(f5 * -85.0F, 0.0F, 0.0F, 1.0F);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
mc.getTextureManager().bindTexture(entityclientplayermp.getLocationSkin());
for (int i1 = 0; i1 < 2; ++i1)
{
int j1 = i1 * 2 - 1;
GL11.glPushMatrix();
GL11.glTranslatef(-0.0F, -0.6F, 1.1F * (float)j1);
GL11.glRotatef((float)(-45 * j1), 1.0F, 0.0F, 0.0F);
GL11.glRotatef(-90.0F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(59.0F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef((float)(-65 * j1), 0.0F, 1.0F, 0.0F);
render = RenderManager.instance.getEntityRenderObject(mc.thePlayer);
renderplayer = (RenderPlayer)render;
f10 = 1.0F;
GL11.glScalef(f10, f10, f10);
renderFirstPersonArm(renderplayer, mc.thePlayer);
GL11.glPopMatrix();
}
f6 = entityclientplayermp.getSwingProgress(partialTickTime);
f7 = MathHelper.sin(f6 * f6 * (float)Math.PI);
f8 = MathHelper.sin(MathHelper.sqrt_float(f6) * (float)Math.PI);
GL11.glRotatef(-f7 * 20.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-f8 * 20.0F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(-f8 * 80.0F, 1.0F, 0.0F, 0.0F);
f9 = 0.38F;
GL11.glScalef(f9, f9, f9);
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(-1.0F, -1.0F, 0.0F);
f10 = 0.015625F;
GL11.glScalef(f10, f10, f10);
mc.getTextureManager().bindTexture(RES_MAP_BACKGROUND);
Tessellator tessellator = Tessellator.instance;
GL11.glNormal3f(0.0F, 0.0F, -1.0F);
tessellator.startDrawingQuads();
byte b0 = 7;
tessellator.addVertexWithUV((double)(0 - b0), (double)(128 + b0), 0.0D, 0.0D, 1.0D);
tessellator.addVertexWithUV((double)(128 + b0), (double)(128 + b0), 0.0D, 1.0D, 1.0D);
tessellator.addVertexWithUV((double)(128 + b0), (double)(0 - b0), 0.0D, 1.0D, 0.0D);
tessellator.addVertexWithUV((double)(0 - b0), (double)(0 - b0), 0.0D, 0.0D, 0.0D);
tessellator.draw();
IItemRenderer custom = MinecraftForgeClient.getItemRenderer(itemstack, FIRST_PERSON_MAP);
MapData mapdata = ((ItemMap)itemstack.getItem()).getMapData(itemstack, mc.theWorld);
if (custom == null)
{
if (mapdata != null)
{
mc.entityRenderer.getMapItemRenderer().func_148250_a(mapdata, false);
}
}
else
{
custom.renderItem(FIRST_PERSON_MAP, itemstack, mc.thePlayer, mc.getTextureManager(), mapdata);
}
GL11.glPopMatrix();
}
else if (itemstack != null)
{
GL11.glPushMatrix();
f13 = 0.8F;
if (entityclientplayermp.getItemInUseCount() > 0)
{
EnumAction enumaction = itemstack.getItemUseAction();
if (enumaction == EnumAction.eat || enumaction == EnumAction.drink)
{
f6 = (float)entityclientplayermp.getItemInUseCount() - partialTickTime + 1.0F;
f7 = 1.0F - f6 / (float)itemstack.getMaxItemUseDuration();
f8 = 1.0F - f7;
f8 = f8 * f8 * f8;
f8 = f8 * f8 * f8;
f8 = f8 * f8 * f8;
f9 = 1.0F - f8;
GL11.glTranslatef(0.0F, MathHelper.abs(MathHelper.cos(f6 / 4.0F * (float)Math.PI) * 0.1F) * (float)((double)f7 > 0.2D ? 1 : 0), 0.0F);
GL11.glTranslatef(f9 * 0.6F, -f9 * 0.5F, 0.0F);
GL11.glRotatef(f9 * 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(f9 * 10.0F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(f9 * 30.0F, 0.0F, 0.0F, 1.0F);
}
}
else
{
f5 = entityclientplayermp.getSwingProgress(partialTickTime);
f6 = MathHelper.sin(f5 * (float)Math.PI);
f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI);
GL11.glTranslatef(-f7 * 0.4F, MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI * 2.0F) * 0.2F, -f6 * 0.2F);
}
GL11.glTranslatef(0.7F * f13, -0.65F * f13 - (1.0F - f1) * 0.6F, -0.9F * f13);
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
f5 = entityclientplayermp.getSwingProgress(partialTickTime);
f6 = MathHelper.sin(f5 * f5 * (float)Math.PI);
f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI);
GL11.glRotatef(-f6 * 20.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-f7 * 20.0F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(-f7 * 80.0F, 1.0F, 0.0F, 0.0F);
f8 = 0.4F;
GL11.glScalef(f8, f8, f8);
float f11;
float f12;
if (entityclientplayermp.getItemInUseCount() > 0)
{
EnumAction enumaction1 = itemstack.getItemUseAction();
if (enumaction1 == EnumAction.block)
{
GL11.glTranslatef(-0.5F, 0.2F, 0.0F);
GL11.glRotatef(30.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-80.0F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(60.0F, 0.0F, 1.0F, 0.0F);
}
else if (enumaction1 == EnumAction.bow)
{
GL11.glRotatef(-18.0F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(-12.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-8.0F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(-0.9F, 0.2F, 0.0F);
f10 = (float)itemstack.getMaxItemUseDuration() - ((float)entityclientplayermp.getItemInUseCount() - partialTickTime + 1.0F);
f11 = f10 / 20.0F;
f11 = (f11 * f11 + f11 * 2.0F) / 3.0F;
if (f11 > 1.0F)
{
f11 = 1.0F;
}
if (f11 > 0.1F)
{
GL11.glTranslatef(0.0F, MathHelper.sin((f10 - 0.1F) * 1.3F) * 0.01F * (f11 - 0.1F), 0.0F);
}
GL11.glTranslatef(0.0F, 0.0F, f11 * 0.1F);
GL11.glRotatef(-335.0F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(-50.0F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(0.0F, 0.5F, 0.0F);
f12 = 1.0F + f11 * 0.2F;
GL11.glScalef(1.0F, 1.0F, f12);
GL11.glTranslatef(0.0F, -0.5F, 0.0F);
GL11.glRotatef(50.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(335.0F, 0.0F, 0.0F, 1.0F);
}
}
if (itemstack.getItem().shouldRotateAroundWhenRendering())
{
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
}
if (itemstack.getItem().requiresMultipleRenderPasses())
{
RenderManager.instance.itemRenderer.renderItem(entityclientplayermp, itemstack, 0, EQUIPPED_FIRST_PERSON);
for (int x = 1; x < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); x++)
{
int k1 = itemstack.getItem().getColorFromItemStack(itemstack, x);
f10 = (float)(k1 >> 16 & 255) / 255.0F;
f11 = (float)(k1 >> 8 & 255) / 255.0F;
f12 = (float)(k1 & 255) / 255.0F;
GL11.glColor4f(1.0F * f10, 1.0F * f11, 1.0F * f12, 1.0F);
RenderManager.instance.itemRenderer.renderItem(entityclientplayermp, itemstack, x, EQUIPPED_FIRST_PERSON);
}
}
else
{
RenderManager.instance.itemRenderer.renderItem(entityclientplayermp, itemstack, 0, EQUIPPED_FIRST_PERSON);
}
GL11.glPopMatrix();
}
else if (!entityclientplayermp.isInvisible())
{
GL11.glPushMatrix();
f13 = 0.8F;
f5 = entityclientplayermp.getSwingProgress(partialTickTime);
f6 = MathHelper.sin(f5 * (float)Math.PI);
f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI);
GL11.glTranslatef(-f7 * 0.3F, MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI * 2.0F) * 0.4F, -f6 * 0.4F);
GL11.glTranslatef(0.8F * f13, -0.75F * f13 - (1.0F - f1) * 0.6F, -0.9F * f13);
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
f5 = entityclientplayermp.getSwingProgress(partialTickTime);
f6 = MathHelper.sin(f5 * f5 * (float)Math.PI);
f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI);
GL11.glRotatef(f7 * 70.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-f6 * 20.0F, 0.0F, 0.0F, 1.0F);
mc.getTextureManager().bindTexture(entityclientplayermp.getLocationSkin());
GL11.glTranslatef(-1.0F, 3.6F, 3.5F);
GL11.glRotatef(120.0F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(200.0F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
GL11.glScalef(1.0F, 1.0F, 1.0F);
GL11.glTranslatef(5.6F, 0.0F, 0.0F);
render = RenderManager.instance.getEntityRenderObject(mc.thePlayer);
renderplayer = (RenderPlayer)render;
f10 = 1.0F;
GL11.glScalef(f10, f10, f10);
renderFirstPersonArm(renderplayer, mc.thePlayer);
GL11.glPopMatrix();
}
if (itemstack != null && itemstack.getItem() instanceof ItemCloth)
{
GL11.glDisable(GL11.GL_BLEND);
}
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
RenderHelper.disableStandardItemLighting();
}
public static void renderFirstPersonArm(RenderPlayer renderer, EntityPlayer player)
{
float f = 1.0F;
GL11.glColor3f(f, f, f);
GL11.glPushMatrix();
ModelRenderer mRenderer = new POVArmourModelWrapper(renderer.modelBipedMain);
renderer.modelBipedMain.onGround = 0.0F;
renderer.modelBipedMain.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, player);
renderer.modelBipedMain.bipedRightArm.render(0.0625F);
GL11.glPushMatrix();
mRenderer.rotateAngleX = renderer.modelBipedMain.bipedRightArm.rotateAngleX;
mRenderer.rotateAngleY = renderer.modelBipedMain.bipedRightArm.rotateAngleY;
mRenderer.rotateAngleZ = renderer.modelBipedMain.bipedRightArm.rotateAngleZ;
mRenderer.render(0.0625F);
GL11.glPopMatrix();
GL11.glPopMatrix();
}
}

View file

@ -0,0 +1,47 @@
package WayofTime.alchemicalWizardry.client;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import WayofTime.alchemicalWizardry.ModItems;
import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class POVArmourModelWrapper extends ModelRenderer
{
private final ModelRenderer armModel;
private final ResourceLocation resource;
public POVArmourModelWrapper(ModelBase model)
{
super(model);
ItemStack plateStack = new ItemStack(ModItems.boundPlateFire);
ModelBiped bipedModel = ((BoundArmour)ModItems.boundPlateFire).getArmorModel(Minecraft.getMinecraft().thePlayer, plateStack, 1);
armModel = bipedModel.bipedRightArm;
resource = new ResourceLocation(((BoundArmour)ModItems.boundPlateFire).getArmorTexture(plateStack, Minecraft.getMinecraft().thePlayer, 1, "POV"));
addBox(0, 0, 0, 0, 0, 0); //Adds in a blank box as it's required in certain cases such as rendering arrows in entities
}
@Override
public void render(float partialTicks)
{
GL11.glPushMatrix();
// GL11.glTranslated(0.3, -.1, 0);
Minecraft.getMinecraft().renderEngine.bindTexture(resource);
armModel.rotateAngleX = this.rotateAngleX;
armModel.rotateAngleY = this.rotateAngleY;
armModel.rotateAngleZ = this.rotateAngleZ;
armModel.render(partialTicks);
GL11.glPopMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(ClientEventHandler.currentPlayerTexture);
}
}

View file

@ -1,15 +1,15 @@
package WayofTime.alchemicalWizardry.client.gui;
import static WayofTime.alchemicalWizardry.BloodMagicConfiguration.config;
import cpw.mods.fml.client.config.GuiConfig;
import cpw.mods.fml.client.config.IConfigElement;
import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.common.config.ConfigCategory;
import net.minecraftforge.common.config.ConfigElement;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.common.config.ConfigElement;
import net.minecraftforge.fml.client.config.GuiConfig;
import net.minecraftforge.fml.client.config.IConfigElement;
import static WayofTime.alchemicalWizardry.BloodMagicConfiguration.config;
public class ConfigGui extends GuiConfig {
@ -22,16 +22,16 @@ public class ConfigGui extends GuiConfig {
List<IConfigElement> list = new ArrayList<IConfigElement>();
// adds sections declared in ConfigHandler. toLowerCase() is used because the configuration class automatically does this, so must we.
list.add(new ConfigElement(config.getCategory("clientsettings".toLowerCase())));
list.add(new ConfigElement(config.getCategory("dungeon loot chances".toLowerCase())));
list.add(new ConfigElement(config.getCategory("meteor".toLowerCase())));
list.add(new ConfigElement(config.getCategory("orecrushing".toLowerCase())));
list.add(new ConfigElement(config.getCategory("potion id".toLowerCase())));
list.add(new ConfigElement(config.getCategory("wellofsufferingblacklist".toLowerCase())));
list.add(new ConfigElement(config.getCategory("wimpysettings".toLowerCase())));
list.add(new ConfigElement(config.getCategory("ritual blacklist".toLowerCase())));
list.add(new ConfigElement(config.getCategory("teleposer blacklist".toLowerCase())));
list.add(new ConfigElement(config.getCategory("demon configs".toLowerCase())));
list.add(new ConfigElement<ConfigCategory>(config.getCategory("clientsettings".toLowerCase())));
list.add(new ConfigElement<ConfigCategory>(config.getCategory("dungeon loot chances".toLowerCase())));
list.add(new ConfigElement<ConfigCategory>(config.getCategory("meteor".toLowerCase())));
list.add(new ConfigElement<ConfigCategory>(config.getCategory("orecrushing".toLowerCase())));
list.add(new ConfigElement<ConfigCategory>(config.getCategory("potion id".toLowerCase())));
list.add(new ConfigElement<ConfigCategory>(config.getCategory("wellofsufferingblacklist".toLowerCase())));
list.add(new ConfigElement<ConfigCategory>(config.getCategory("wimpysettings".toLowerCase())));
list.add(new ConfigElement<ConfigCategory>(config.getCategory("ritual blacklist".toLowerCase())));
list.add(new ConfigElement<ConfigCategory>(config.getCategory("teleposer blacklist".toLowerCase())));
list.add(new ConfigElement<ConfigCategory>(config.getCategory("demon configs".toLowerCase())));
return list;
}

View file

@ -1,15 +1,17 @@
package WayofTime.alchemicalWizardry.client.gui;
import java.util.Set;
import cpw.mods.fml.client.IModGuiFactory;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.fml.client.IModGuiFactory;
import java.util.Set;
public class ConfigGuiFactory implements IModGuiFactory {
@Override
public void initialize(Minecraft minecraftInstance) {}
public void initialize(Minecraft minecraftInstance) {
}
@Override
public Class<? extends GuiScreen> mainConfigGuiClass() {

View file

@ -6,7 +6,6 @@ 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;
@ -16,6 +15,7 @@ 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;
@ -104,7 +104,7 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
@Override
public Class<? extends GuiContainer> getGuiClass() {
return GuiChemistrySet.class;
return GuiWritingTable.class;
}
@Override
@ -154,7 +154,7 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
@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);
Minecraft.getMinecraft().fontRenderer.drawString("\u00a77" + cache.lp + "LP", getLPX(cache.lp), 34, 0);
}
public int getLPX(int lp) {

View file

@ -30,7 +30,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
// 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);
@ -40,18 +40,18 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
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) {
@ -62,7 +62,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
super.loadCraftingRecipes(outputId, results);
}
}
@Override
public void loadCraftingRecipes(ItemStack result) {
for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) {
@ -71,7 +71,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
}
}
}
@Override
public void loadUsageRecipes(ItemStack ingredient) {
for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) {
@ -80,7 +80,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
}
}
}
//Mouse Position helper
public Point getMouse(int width, int height) {
Point mousepos = getMousePosition();
@ -89,7 +89,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
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 {
@ -104,10 +104,10 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
}
} catch (Exception e) {
e.printStackTrace();
return 0;
return 0;
}
}
//height helper, getting height normal way hates me on compile
public int getGuiHeight(GuiRecipe gui) {
try {
@ -122,17 +122,17 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
}
} catch (Exception e) {
e.printStackTrace();
return 0;
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);
Minecraft.getMinecraft().fontRenderer.drawString("\u00a77" + StatCollector.translateToLocal("bm.string.tier") + ": " + recipe.tier, 78, 5, 0);
Minecraft.getMinecraft().fontRenderer.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);
@ -144,20 +144,20 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
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");
@ -167,7 +167,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
public String getGuiTexture() {
return new ResourceLocation("alchemicalwizardry", "gui/nei/altar.png").toString();
}
public static Point getMousePosition() {
Dimension size = displaySize();
Dimension res = displayRes();

View file

@ -128,7 +128,7 @@ public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler {
return new CachedBloodOrbRecipe(width, height, items, recipe.getRecipeOutput());
}
@Override
public void loadTransferRects() {
transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting"));

View file

@ -34,7 +34,7 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler {
stack.setMaxSize(1);
ingredients.add(stack);
} else if (o instanceof Integer) {
ArrayList<ItemStack> orbs = new ArrayList<ItemStack>();
ArrayList<ItemStack> orbs = new ArrayList();
for (Item item : NEIConfig.bloodOrbs) {
if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) {
orbs.add(new ItemStack(item));
@ -53,7 +53,7 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler {
}
}
}
@Override
public void loadCraftingRecipes(String outputId, Object... results) {
if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapelessHandler.class) {
@ -72,7 +72,7 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler {
super.loadCraftingRecipes(outputId, results);
}
}
@Override
public void loadCraftingRecipes(ItemStack result) {
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
@ -89,7 +89,7 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler {
}
}
}
@Override
public void loadUsageRecipes(ItemStack ingredient) {
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
@ -107,7 +107,7 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler {
}
}
}
public CachedBloodOrbRecipe forgeShapelessRecipe(ShapelessBloodOrbRecipe recipe) {
ArrayList<Object> items = recipe.getInput();
@ -117,7 +117,7 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler {
return new CachedBloodOrbRecipe(items, recipe.getRecipeOutput());
}
@Override
public void loadTransferRects() {
transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting"));

View file

@ -1,15 +1,14 @@
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 class NEIConfig implements IConfigureNEI {
public static ArrayList<Item> bloodOrbs = new ArrayList<Item>();
@Override
public void loadConfig() {
API.registerRecipeHandler(new NEIAlchemyRecipeHandler());

View file

@ -29,7 +29,7 @@ public class HUDElement
public boolean showDamageOverlay = false;
public boolean showItemCount = false;
static RenderItem itemRenderer = Minecraft.getMinecraft().getRenderItem();
static RenderItem itemRenderer = new RenderItem();
public HUDElement(ItemStack itemStack, int iconW, int iconH, int padW, int value)
{
@ -54,8 +54,8 @@ public class HUDElement
private void initSize()
{
elementH = enableItemName ? Math.max(Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT * 2, iconH) :
Math.max(mc.fontRendererObj.FONT_HEIGHT, iconH);
elementH = enableItemName ? Math.max(Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT * 2, iconH) :
Math.max(mc.fontRenderer.FONT_HEIGHT, iconH);
if (itemStack != null)
{
@ -65,7 +65,7 @@ public class HUDElement
if (showValue)
{
maxDamage = itemStack.getMaxDamage() + 1;
damage = maxDamage - itemStack.getItemDamage();
damage = maxDamage - itemStack.getItemDamageForDisplay();
boolean showSpecialValue = true;
boolean showValue = false;
@ -88,17 +88,17 @@ public class HUDElement
(damage * 100 / maxDamage) + "%";
}
itemDamageW = mc.fontRendererObj.getStringWidth(HUDUtils.stripCtrl(itemDamage));
itemDamageW = mc.fontRenderer.getStringWidth(HUDUtils.stripCtrl(itemDamage));
elementW = padW + iconW + padW + itemDamageW + offset;
if (enableItemName)
{
itemName = itemStack.getDisplayName();
elementW = padW + iconW + padW +
Math.max(mc.fontRendererObj.getStringWidth(HUDUtils.stripCtrl(itemName)), itemDamageW);
Math.max(mc.fontRenderer.getStringWidth(HUDUtils.stripCtrl(itemName)), itemDamageW);
}
itemNameW = mc.fontRendererObj.getStringWidth(HUDUtils.stripCtrl(itemName));
itemNameW = mc.fontRenderer.getStringWidth(HUDUtils.stripCtrl(itemName));
}
}
@ -114,27 +114,27 @@ public class HUDElement
boolean toRight = true;
if (toRight)
{
itemRenderer.func_180450_b(itemStack, x - (iconW + padW), y);
HUDUtils.renderItemOverlayIntoGUI(mc.fontRendererObj, itemStack, x - (iconW + padW), y, showDamageOverlay, showItemCount);
itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), itemStack, x - (iconW + padW), y);
HUDUtils.renderItemOverlayIntoGUI(mc.fontRenderer, itemStack, x - (iconW + padW), y, showDamageOverlay, showItemCount);
RenderHelper.disableStandardItemLighting();
GL11.glDisable(32826 /* GL_RESCALE_NORMAL_EXT */);
GL11.glDisable(GL11.GL_BLEND);
mc.fontRendererObj.drawString(itemName + "\247r", x - (padW + iconW + padW) - itemNameW, y, 0xffffff);
mc.fontRendererObj.drawString(itemDamage + "\247r", x - (padW + iconW + padW) - itemDamageW,
mc.fontRenderer.drawStringWithShadow(itemName + "\247r", x - (padW + iconW + padW) - itemNameW, y, 0xffffff);
mc.fontRenderer.drawStringWithShadow(itemDamage + "\247r", x - (padW + iconW + padW) - itemDamageW,
y + (enableItemName ? elementH / 2 : elementH / 4), 0xffffff);
} else
{
itemRenderer.func_180450_b(itemStack, x, y);
HUDUtils.renderItemOverlayIntoGUI(mc.fontRendererObj, itemStack, x, y, showDamageOverlay, showItemCount);
itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), itemStack, x, y);
HUDUtils.renderItemOverlayIntoGUI(mc.fontRenderer, itemStack, x, y, showDamageOverlay, showItemCount);
RenderHelper.disableStandardItemLighting();
GL11.glDisable(32826 /* GL_RESCALE_NORMAL_EXT */);
GL11.glDisable(GL11.GL_BLEND);
mc.fontRendererObj.drawString(itemName + "\247r", x + iconW + padW, y, 0xffffff);
mc.fontRendererObj.drawString(itemDamage + "\247r", x + iconW + padW,
mc.fontRenderer.drawStringWithShadow(itemName + "\247r", x + iconW + padW, y, 0xffffff);
mc.fontRenderer.drawStringWithShadow(itemDamage + "\247r", x + iconW + padW,
y + (enableItemName ? elementH / 2 : elementH / 4), 0xffffff);
}
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

View file

@ -4,13 +4,11 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
/**
@ -171,13 +169,12 @@ public final class HUDUtils
{
float var7 = 0.00390625F;
float var8 = 0.00390625F;
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer wr = tessellator.getWorldRenderer();
wr.startDrawingQuads();
wr.addVertexWithUV((x + 0), (y + height), zLevel, ((u + 0) * var7), ((v + height) * var8));
wr.addVertexWithUV((x + width), (y + height), zLevel, ((u + width) * var7), ((v + height) * var8));
wr.addVertexWithUV((x + width), (y + 0), zLevel, ((u + width) * var7), ((v + 0) * var8));
wr.addVertexWithUV((x + 0), (y + 0), zLevel, ((u + 0) * var7), ((v + 0) * var8));
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV((x + 0), (y + height), zLevel, ((u + 0) * var7), ((v + height) * var8));
tessellator.addVertexWithUV((x + width), (y + height), zLevel, ((u + width) * var7), ((v + height) * var8));
tessellator.addVertexWithUV((x + width), (y + 0), zLevel, ((u + width) * var7), ((v + 0) * var8));
tessellator.addVertexWithUV((x + 0), (y + 0), zLevel, ((u + 0) * var7), ((v + 0) * var8));
tessellator.draw();
}
@ -198,12 +195,12 @@ public final class HUDUtils
{
if (itemStack.isItemDamaged() && showDamageBar)
{
int var11 = (int) Math.round(13.0D - itemStack.getItemDamage() * 13.0D / itemStack.getMaxDamage());
int var7 = (int) Math.round(255.0D - itemStack.getItemDamage() * 255.0D / itemStack.getMaxDamage());
int var11 = (int) Math.round(13.0D - itemStack.getItemDamageForDisplay() * 13.0D / itemStack.getMaxDamage());
int var7 = (int) Math.round(255.0D - itemStack.getItemDamageForDisplay() * 255.0D / itemStack.getMaxDamage());
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_TEXTURE_2D);
Tessellator var8 = Tessellator.getInstance();
Tessellator var8 = Tessellator.instance;
int var9 = 255 - var7 << 16 | var7 << 8;
int var10 = (255 - var7) / 4 << 16 | 16128;
renderQuad(var8, x + 2, y + 13, 13, 2, 0);
@ -229,7 +226,7 @@ public final class HUDUtils
String var6 = "" + count;
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_DEPTH_TEST);
fontRenderer.drawString(var6, x + 19 - 2 - fontRenderer.getStringWidth(var6), y + 6 + 3, 16777215);
fontRenderer.drawStringWithShadow(var6, x + 19 - 2 - fontRenderer.getStringWidth(var6), y + 6 + 3, 16777215);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_DEPTH_TEST);
}
@ -243,13 +240,12 @@ public final class HUDUtils
*/
public static void renderQuad(Tessellator tessellator, int x, int y, int width, int height, int color)
{
WorldRenderer wr = tessellator.getWorldRenderer();
wr.startDrawingQuads();
// wr.setColorOpaque_I(color);
wr.addVertex((x + 0), (y + 0), 0.0D);
wr.addVertex((x + 0), (y + height), 0.0D);
wr.addVertex((x + width), (y + height), 0.0D);
wr.addVertex((x + width), (y + 0), 0.0D);
tessellator.startDrawingQuads();
tessellator.setColorOpaque_I(color);
tessellator.addVertex((x + 0), (y + 0), 0.0D);
tessellator.addVertex((x + 0), (y + height), 0.0D);
tessellator.addVertex((x + width), (y + height), 0.0D);
tessellator.addVertex((x + width), (y + 0), 0.0D);
tessellator.draw();
}

View file

@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.client.renderer;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
/*
@ -16,11 +16,10 @@ public class RenderFakeBlocks
double maxX = minX + 1;
double maxY = minY + 1;
double maxZ = minZ + 1;
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer wr = tessellator.getWorldRenderer();
Tessellator tessellator = Tessellator.instance;
wr.startDrawingQuads();
// wr.setColorRGBA(255, 255, 255, 200);
tessellator.startDrawingQuads();
tessellator.setColorRGBA(255, 255, 255, 200);
float texMinU, texMaxU, texMinV, texMaxV;
@ -28,76 +27,80 @@ public class RenderFakeBlocks
texMaxU = getMaxU(block, meta, 0);
texMinV = getMinV(block, meta, 0);
texMaxV = getMaxV(block, meta, 0);
wr.addVertexWithUV(minX, minY, minZ, texMinU, texMinV);
wr.addVertexWithUV(maxX, minY, minZ, texMaxU, texMinV);
wr.addVertexWithUV(maxX, minY, maxZ, texMaxU, texMaxV);
wr.addVertexWithUV(minX, minY, maxZ, texMinU, texMaxV);
tessellator.addVertexWithUV(minX, minY, minZ, texMinU, texMinV);
tessellator.addVertexWithUV(maxX, minY, minZ, texMaxU, texMinV);
tessellator.addVertexWithUV(maxX, minY, maxZ, texMaxU, texMaxV);
tessellator.addVertexWithUV(minX, minY, maxZ, texMinU, texMaxV);
texMinU = getMinU(block, meta, 1);
texMaxU = getMaxU(block, meta, 1);
texMinV = getMinV(block, meta, 1);
texMaxV = getMaxV(block, meta, 1);
wr.addVertexWithUV(minX, maxY, maxZ, texMinU, texMaxV);
wr.addVertexWithUV(maxX, maxY, maxZ, texMaxU, texMaxV);
wr.addVertexWithUV(maxX, maxY, minZ, texMaxU, texMinV);
wr.addVertexWithUV(minX, maxY, minZ, texMinU, texMinV);
tessellator.addVertexWithUV(minX, maxY, maxZ, texMinU, texMaxV);
tessellator.addVertexWithUV(maxX, maxY, maxZ, texMaxU, texMaxV);
tessellator.addVertexWithUV(maxX, maxY, minZ, texMaxU, texMinV);
tessellator.addVertexWithUV(minX, maxY, minZ, texMinU, texMinV);
texMinU = getMinU(block, meta, 2);
texMaxU = getMaxU(block, meta, 2);
texMinV = getMinV(block, meta, 2);
texMaxV = getMaxV(block, meta, 2);
wr.addVertexWithUV(maxX, minY, minZ, texMinU, texMaxV);
wr.addVertexWithUV(minX, minY, minZ, texMaxU, texMaxV);
wr.addVertexWithUV(minX, maxY, minZ, texMaxU, texMinV);
wr.addVertexWithUV(maxX, maxY, minZ, texMinU, texMinV);
tessellator.addVertexWithUV(maxX, minY, minZ, texMinU, texMaxV);
tessellator.addVertexWithUV(minX, minY, minZ, texMaxU, texMaxV);
tessellator.addVertexWithUV(minX, maxY, minZ, texMaxU, texMinV);
tessellator.addVertexWithUV(maxX, maxY, minZ, texMinU, texMinV);
texMinU = getMinU(block, meta, 3);
texMaxU = getMaxU(block, meta, 3);
texMinV = getMinV(block, meta, 3);
texMaxV = getMaxV(block, meta, 3);
wr.addVertexWithUV(minX, minY, maxZ, texMinU, texMaxV);
wr.addVertexWithUV(maxX, minY, maxZ, texMaxU, texMaxV);
wr.addVertexWithUV(maxX, maxY, maxZ, texMaxU, texMinV);
wr.addVertexWithUV(minX, maxY, maxZ, texMinU, texMinV);
tessellator.addVertexWithUV(minX, minY, maxZ, texMinU, texMaxV);
tessellator.addVertexWithUV(maxX, minY, maxZ, texMaxU, texMaxV);
tessellator.addVertexWithUV(maxX, maxY, maxZ, texMaxU, texMinV);
tessellator.addVertexWithUV(minX, maxY, maxZ, texMinU, texMinV);
texMinU = getMinU(block, meta, 4);
texMaxU = getMaxU(block, meta, 4);
texMinV = getMinV(block, meta, 4);
texMaxV = getMaxV(block, meta, 4);
wr.addVertexWithUV(minX, minY, minZ, texMinU, texMaxV);
wr.addVertexWithUV(minX, minY, maxZ, texMaxU, texMaxV);
wr.addVertexWithUV(minX, maxY, maxZ, texMaxU, texMinV);
wr.addVertexWithUV(minX, maxY, minZ, texMinU, texMinV);
tessellator.addVertexWithUV(minX, minY, minZ, texMinU, texMaxV);
tessellator.addVertexWithUV(minX, minY, maxZ, texMaxU, texMaxV);
tessellator.addVertexWithUV(minX, maxY, maxZ, texMaxU, texMinV);
tessellator.addVertexWithUV(minX, maxY, minZ, texMinU, texMinV);
texMinU = getMinU(block, meta, 5);
texMaxU = getMaxU(block, meta, 5);
texMinV = getMinV(block, meta, 5);
texMaxV = getMaxV(block, meta, 5);
wr.addVertexWithUV(maxX, minY, maxZ, texMinU, texMaxV);
wr.addVertexWithUV(maxX, minY, minZ, texMaxU, texMaxV);
wr.addVertexWithUV(maxX, maxY, minZ, texMaxU, texMinV);
wr.addVertexWithUV(maxX, maxY, maxZ, texMinU, texMinV);
tessellator.addVertexWithUV(maxX, minY, maxZ, texMinU, texMaxV);
tessellator.addVertexWithUV(maxX, minY, minZ, texMaxU, texMaxV);
tessellator.addVertexWithUV(maxX, maxY, minZ, texMaxU, texMinV);
tessellator.addVertexWithUV(maxX, maxY, maxZ, texMinU, texMinV);
tessellator.draw();
}
private static float getMinU(Block block, int meta, int side)
{
return 0;
IIcon icon = block.getIcon(side, meta);
return icon.getMinU();
}
private static float getMaxU(Block block, int meta, int side)
{
return 256;
IIcon icon = block.getIcon(side, meta);
return icon.getMaxU();
}
private static float getMinV(Block block, int meta, int side)
{
return 0;
IIcon icon = block.getIcon(side, meta);
return icon.getMinV();
}
private static float getMaxV(Block block, int meta, int side)
{
return 256;
IIcon icon = block.getIcon(side, meta);
return icon.getMaxV();
}
}

View file

@ -7,14 +7,14 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiChat;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
@ -167,7 +167,7 @@ public class RenderHelper
private static List<HUDElement> getHUDElements(Minecraft mc)
{
List<HUDElement> elements = new ArrayList<HUDElement>();
List<HUDElement> elements = new ArrayList();
MovingObjectPosition movingobjectposition = mc.objectMouseOver;
World world = mc.theWorld;
@ -179,9 +179,11 @@ public class RenderHelper
{
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
{
BlockPos pos = movingobjectposition.func_178782_a();
int x = movingobjectposition.blockX;
int y = movingobjectposition.blockY;
int z = movingobjectposition.blockZ;
TileEntity tile = world.getTileEntity(pos);
TileEntity tile = world.getTileEntity(x, y, z);
if (!(tile instanceof IReagentHandler))
{
@ -190,7 +192,7 @@ public class RenderHelper
IReagentHandler relay = (IReagentHandler) tile;
ReagentContainerInfo[] infos = relay.getContainerInfo(movingobjectposition.field_178784_b);
ReagentContainerInfo[] infos = relay.getContainerInfo(ForgeDirection.getOrientation(movingobjectposition.sideHit));
if (infos != null)
{
@ -248,13 +250,12 @@ public class RenderHelper
{
float f = 0.00390625F;
float f1 = 0.00390625F;
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer wr = tessellator.getWorldRenderer();
wr.startDrawingQuads();
wr.addVertexWithUV((double)p_73729_1_, p_73729_2_ + p_73729_6_, (double)zLevel, (p_73729_3_ * f), (p_73729_4_ + p_73729_6_) * f1);
wr.addVertexWithUV(p_73729_1_ + p_73729_5_, p_73729_2_ + p_73729_6_, (double)zLevel, (p_73729_3_ + p_73729_5_) * f, (p_73729_4_ + p_73729_6_) * f1);
wr.addVertexWithUV(p_73729_1_ + p_73729_5_, (double)p_73729_2_, (double)zLevel, (p_73729_3_ + p_73729_5_) * f, p_73729_4_ * f1);
wr.addVertexWithUV((double)p_73729_1_, (double)p_73729_2_, (double)zLevel, (double)(p_73729_3_ * f), p_73729_4_ * f1);
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV((double)p_73729_1_, p_73729_2_ + p_73729_6_, (double)zLevel, (p_73729_3_ * f), (p_73729_4_ + p_73729_6_) * f1);
tessellator.addVertexWithUV(p_73729_1_ + p_73729_5_, p_73729_2_ + p_73729_6_, (double)zLevel, (p_73729_3_ + p_73729_5_) * f, (p_73729_4_ + p_73729_6_) * f1);
tessellator.addVertexWithUV(p_73729_1_ + p_73729_5_, (double)p_73729_2_, (double)zLevel, (p_73729_3_ + p_73729_5_) * f, p_73729_4_ * f1);
tessellator.addVertexWithUV((double)p_73729_1_, (double)p_73729_2_, (double)zLevel, (double)(p_73729_3_ * f), p_73729_4_ * f1);
tessellator.draw();
}
@ -287,6 +288,17 @@ public class RenderHelper
GL11.glPopMatrix();
}
public static void renderIcon(int p_94149_1_, int p_94149_2_, IIcon p_94149_3_, int p_94149_4_, int p_94149_5_)
{
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV((double)p_94149_1_, (double)(p_94149_2_ + p_94149_5_), (double)zLevel, (double)p_94149_3_.getMinU(), (double)p_94149_3_.getMaxV());
tessellator.addVertexWithUV((double)(p_94149_1_ + p_94149_4_), (double)(p_94149_2_ + p_94149_5_), (double)zLevel, (double)p_94149_3_.getMaxU(), (double)p_94149_3_.getMaxV());
tessellator.addVertexWithUV((double)(p_94149_1_ + p_94149_4_), (double)p_94149_2_, (double)zLevel, (double)p_94149_3_.getMaxU(), (double)p_94149_3_.getMinV());
tessellator.addVertexWithUV((double)p_94149_1_, (double)p_94149_2_, (double)zLevel, (double)p_94149_3_.getMinU(), (double)p_94149_3_.getMinV());
tessellator.draw();
}
private static void displayArmorStatus(Minecraft mc)
{

View file

@ -1,16 +1,7 @@
package WayofTime.alchemicalWizardry.client.renderer;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.ModBlocks;
@ -20,8 +11,15 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderWorldLastEvent;
/**
/*
* Created in Scala by Alex-Hawks
* Translated and implemented by Arcaratus
*/
@ -32,24 +30,22 @@ public class RitualDivinerRender
public void render(RenderWorldLastEvent event)
{
Minecraft minecraft = Minecraft.getMinecraft();
EntityPlayer player = minecraft.thePlayer;
EntityClientPlayerMP player = minecraft.thePlayer;
World world = player.worldObj;
if (minecraft.objectMouseOver == null || minecraft.objectMouseOver.typeOfHit != MovingObjectPosition.MovingObjectType.BLOCK)
{
return;
}
BlockPos pos = minecraft.objectMouseOver.func_178782_a();
TileEntity tileEntity = world.getTileEntity(pos);
TileEntity tileEntity = world.getTileEntity(minecraft.objectMouseOver.blockX, minecraft.objectMouseOver.blockY, minecraft.objectMouseOver.blockZ);
if (!(tileEntity instanceof IMasterRitualStone))
{
return;
}
Vector3 vec3 = new Vector3(pos.getX(), pos.getY(), pos.getZ());
Vector3 vec3 = new Vector3(minecraft.objectMouseOver.blockX, minecraft.objectMouseOver.blockY, minecraft.objectMouseOver.blockZ);
double posX = player.lastTickPosX + (player.posX - player.lastTickPosX) * event.partialTicks;
double posY = player.lastTickPosY + (player.posY - player.lastTickPosY) * event.partialTicks;
double posZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * event.partialTicks;
@ -75,7 +71,7 @@ public class RitualDivinerRender
double minY = vX.y - posY;
double minZ = vX.z - posZ;
if (!world.getBlockState(new BlockPos(vX.x, vX.y, vX.z)).getBlock().isOpaqueCube())
if (!world.getBlock(vX.x, vX.y, vX.z).isOpaqueCube())
{
RenderFakeBlocks.drawFakeBlock(vX, ModBlocks.ritualStone, ritualComponent.getStoneType(), minX, minY, minZ, world);
}

View file

@ -7,6 +7,8 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
import WayofTime.alchemicalWizardry.common.achievements.ModAchievements;
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@ -22,26 +24,20 @@ import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.Vec3;
import net.minecraftforge.common.ISpecialArmor.ArmorProperties;
import net.minecraftforge.event.AnvilUpdateEvent;
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
import net.minecraftforge.event.entity.living.LivingAttackEvent;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent;
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn;
import net.minecraftforge.event.entity.player.EntityInteractEvent;
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
import net.minecraftforge.fml.common.Optional;
import net.minecraftforge.fml.common.eventhandler.Event.Result;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
import vazkii.botania.api.internal.IManaBurst;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.BloodMagicConfiguration;
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
@ -49,7 +45,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.BoundBlade;
import WayofTime.alchemicalWizardry.common.items.EnergySword;
import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour;
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour;
import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm;
@ -57,14 +53,21 @@ import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry;
import WayofTime.alchemicalWizardry.common.omega.ReagentRegenConfiguration;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent;
import cpw.mods.fml.common.registry.GameRegistry;
public class AlchemicalWizardryEventHooks
{
public static Map<String, Boolean> playerFlightBuff = new HashMap<String, Boolean>();
public static List<String> playersWith1Step = new ArrayList<String>();
public static Map<String, Boolean> playerFlightBuff = new HashMap();
public static List<String> playersWith1Step = new ArrayList();
public static Map<Integer, List<CoordAndRange>> respawnMap = new HashMap<Integer, List<CoordAndRange>>();
public static Map<Integer, List<CoordAndRange>> forceSpawnMap = new HashMap<Integer, List<CoordAndRange>>();
public static Map<Integer, List<CoordAndRange>> respawnMap = new HashMap();
public static Map<Integer, List<CoordAndRange>> forceSpawnMap = new HashMap();
public static Random rand = new Random();
@ -83,7 +86,7 @@ public class AlchemicalWizardryEventHooks
parad.onEmptyHandEntityInteract(player, event.target);
}else
{
if(heldItem.getItem() instanceof BoundBlade)
if(heldItem.getItem() instanceof EnergySword)
{
parad.onBoundSwordInteractWithEntity(player, event.target);
}
@ -114,7 +117,7 @@ public class AlchemicalWizardryEventHooks
float prevHp = APISpellHelper.getCurrentAdditionalHP((EntityPlayer)event.entityLiving);
if(prevHp > 0)
{
float recalculatedAmount = ArmorProperties.applyArmor(player, player.inventory.armorInventory, event.source, event.ammount);
float recalculatedAmount = ArmorProperties.ApplyArmor(player, player.inventory.armorInventory, event.source, event.ammount);
if (recalculatedAmount <= 0) return;
recalculatedAmount = SpellHelper.applyPotionDamageCalculations(player, event.source, recalculatedAmount); //Recalculated damage
@ -332,7 +335,7 @@ public class AlchemicalWizardryEventHooks
String respawnRitual = "AW028SpawnWard";
int dimension = event.world.provider.getDimensionId();
int dimension = event.world.provider.dimensionId;
if (respawnMap.containsKey(dimension))
{
List<CoordAndRange> list = respawnMap.get(dimension);
@ -341,7 +344,7 @@ public class AlchemicalWizardryEventHooks
{
for (CoordAndRange coords : list)
{
TileEntity tile = event.world.getTileEntity(coords.getPos());
TileEntity tile = event.world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord);
if (tile instanceof TEMasterStone && ((TEMasterStone) tile).isRunning && ((TEMasterStone) tile).getCurrentRitual().equals(respawnRitual))
{
@ -385,7 +388,7 @@ public class AlchemicalWizardryEventHooks
{
for (CoordAndRange coords : list)
{
TileEntity tile = event.world.getTileEntity(coords.getPos());
TileEntity tile = event.world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord);
if (tile instanceof TEMasterStone && ((TEMasterStone) tile).isRunning && ((TEMasterStone) tile).getCurrentRitual().equals(forceSpawnRitual))
{
@ -505,10 +508,10 @@ public class AlchemicalWizardryEventHooks
double y = entityLiving.posY;
double z = entityLiving.posZ;
BlockPos blockVector = entityLiving.getPosition();
int xPos = blockVector.getX();
int yPos = blockVector.getY();
int zPos = blockVector.getZ();
Vec3 blockVector = SpellHelper.getEntityBlockVector(entityLiving);
int xPos = (int) (blockVector.xCoord);
int yPos = (int) (blockVector.yCoord);
int zPos = (int) (blockVector.zCoord);
if (entityLiving instanceof EntityPlayer)
{
@ -589,7 +592,7 @@ public class AlchemicalWizardryEventHooks
int posY = (int) Math.round(entity.posY);
int posZ = (int) Math.round(entity.posZ - 0.5f);
int d0 = (int) ((i + 1) * 2.5);
AxisAlignedBB axisalignedbb = new AxisAlignedBB(posX - 0.5, posY - 0.5, posZ - 0.5, posX + 0.5, posY + 0.5, posZ + 0.5).expand(d0, d0, d0);
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(posX - 0.5, posY - 0.5, posZ - 0.5, posX + 0.5, posY + 0.5, posZ + 0.5).expand(d0, d0, d0);
List list = event.entityLiving.worldObj.getEntitiesWithinAABB(Entity.class, axisalignedbb);
Iterator iterator = list.iterator();
@ -694,7 +697,7 @@ public class AlchemicalWizardryEventHooks
if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionFlameCloak))
{
entityLiving.worldObj.spawnParticle(EnumParticleTypes.FLAME, x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0);
entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0);
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFlameCloak).getAmplifier();
double range = i * 0.5;
@ -715,7 +718,7 @@ public class AlchemicalWizardryEventHooks
if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionIceCloak))
{
if (entityLiving.worldObj.getWorldTime() % 2 == 0)
entityLiving.worldObj.spawnParticle(EnumParticleTypes.REDSTONE, x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0x74, 0xbb, 0xfb);
entityLiving.worldObj.spawnParticle("reddust", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0x74, 0xbb, 0xfb);
int r = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionIceCloak).getAmplifier();
int horizRange = r + 1;
@ -729,7 +732,7 @@ public class AlchemicalWizardryEventHooks
{
for (int j = -vertRange - 1; j <= vertRange - 1; j++)
{
SpellHelper.freezeWaterBlock(entityLiving.worldObj, new BlockPos(xPos + i, yPos + j, zPos + k));
SpellHelper.freezeWaterBlock(entityLiving.worldObj, xPos + i, yPos + j, zPos + k);
}
}
}
@ -738,7 +741,7 @@ public class AlchemicalWizardryEventHooks
if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionHeavyHeart))
{
entityLiving.worldObj.spawnParticle(EnumParticleTypes.FLAME, x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0);
entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0);
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionHeavyHeart).getAmplifier();
double decrease = 0.025 * (i + 1);
@ -756,7 +759,7 @@ public class AlchemicalWizardryEventHooks
if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionFireFuse))
{
entityLiving.worldObj.spawnParticle(EnumParticleTypes.FLAME, x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0);
entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0);
int r = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse).getAmplifier();
int radius = r + 1;
@ -788,7 +791,7 @@ public class AlchemicalWizardryEventHooks
meta = 0;
if (block != null)
if ((block == event.initialBlock || block == event.finalBlock) && (meta == event.initialBlock.getMetaFromState(event.initialState) || meta == event.finalBlock.getMetaFromState(event.finalState) || meta == OreDictionary.WILDCARD_VALUE))
if (( block == event.initialBlock || block == event.finalBlock) && (meta == event.initialMetadata || meta == event.finalMetadata || meta == OreDictionary.WILDCARD_VALUE))
event.setCanceled(true);
// If the block uses shorthand syntax: modid:blockname
@ -798,12 +801,31 @@ public class AlchemicalWizardryEventHooks
int meta = 0;
if (block != null)
if (( block == event.initialBlock || block == event.finalBlock) && (meta == event.initialBlock.getMetaFromState(event.initialState) || meta == event.finalBlock.getMetaFromState(event.finalState) || meta == OreDictionary.WILDCARD_VALUE))
if (( block == event.initialBlock || block == event.finalBlock) && (meta == event.initialMetadata || meta == event.finalMetadata || meta == OreDictionary.WILDCARD_VALUE))
event.setCanceled(true);
}
}
}
@SubscribeEvent
public void onEntityDeath(LivingDeathEvent event)
{
EntityLivingBase entityLiving = event.entityLiving;
if (entityLiving instanceof IDemon && event.source.getEntity() instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) event.source.getEntity();
player.addStat(ModAchievements.demonSpawn, 1);
}
if (entityLiving instanceof IHoardDemon && event.source.getEntity() instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) event.source.getEntity();
player.addStat(ModAchievements.demons, 1);
}
}
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
if (event.modID.equals("AWWayofTime")) {
@ -815,11 +837,11 @@ public class AlchemicalWizardryEventHooks
@Optional.Method(modid = "Botania")
private boolean isManaBurst(Entity entity)
{
// if(entity instanceof IManaBurst) {
// ItemStack lens = ((IManaBurst)entity).getSourceLens();
// return !(lens.getItemDamage()!=8 && lens.getItemDamage()!=11);
// }
// else
if(entity instanceof IManaBurst) {
ItemStack lens = ((IManaBurst)entity).getSourceLens();
return !(lens.getItemDamage()!=8 && lens.getItemDamage()!=11);
}
else
return false;
}
}

View file

@ -1,5 +1,9 @@
package WayofTime.alchemicalWizardry.common;
import WayofTime.alchemicalWizardry.ModItems;
import WayofTime.alchemicalWizardry.common.items.LavaCrystal;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import cpw.mods.fml.common.IFuelHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@ -7,10 +11,6 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.server.MinecraftServer;
import net.minecraftforge.fml.common.IFuelHandler;
import WayofTime.alchemicalWizardry.ModItems;
import WayofTime.alchemicalWizardry.common.items.LavaCrystal;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
public class AlchemicalWizardryFuelHandler implements IFuelHandler
{

View file

@ -1,8 +1,8 @@
package WayofTime.alchemicalWizardry.common;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import net.minecraftforge.fml.relauncher.Side;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import cpw.mods.fml.relauncher.Side;
public class ClientToServerPacketHandler
{

View file

@ -1,7 +1,6 @@
package WayofTime.alchemicalWizardry.common;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.registry.EntityRegistry;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile;
import WayofTime.alchemicalWizardry.common.entity.mob.BookEntityItem;
@ -21,6 +20,10 @@ import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile;
import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile;
import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile;
import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile;
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
public class CommonProxy
{
@ -30,16 +33,38 @@ 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 registerEvents() {}
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 registerEntityTrackers()
{
@ -63,5 +88,12 @@ public class CommonProxy
EntityRegistry.registerModEntity(BookEntityItem.class, "bookEntityItem", 17, AlchemicalWizardry.instance, 120, 3, true);
}
public void initRendering() {}
public void registerTickHandlers()
{
}
public void InitRendering()
{
// TODO Auto-generated method stub
}
}

View file

@ -1,7 +1,5 @@
package WayofTime.alchemicalWizardry.common;
import net.minecraft.util.BlockPos;
public class CoordAndRange
{
public int xCoord;
@ -10,11 +8,6 @@ public class CoordAndRange
public int horizRadius;
public int vertRadius;
public CoordAndRange(BlockPos pos, int horiz, int vert)
{
this(pos.getX(), pos.getY(), pos.getZ(), horiz, vert);
}
public CoordAndRange(int x, int y, int z, int horiz, int vert)
{
this.xCoord = x;
@ -23,11 +16,6 @@ public class CoordAndRange
this.horizRadius = horiz;
this.vertRadius = vert;
}
public BlockPos getPos()
{
return new BlockPos(xCoord, yCoord, zCoord);
}
@Override
public boolean equals(Object o)

View file

@ -9,7 +9,7 @@ public class EntityAITargetAggro extends EntityAINearestAttackableTarget
public EntityAITargetAggro(EntityDemon par1EntityDemon, Class par2Class, int par3, boolean par4)
{
super(par1EntityDemon, par2Class, par4);
super(par1EntityDemon, par2Class, par3, par4);
this.theCreature = par1EntityDemon;
}

View file

@ -53,7 +53,7 @@ public class ItemType
public ItemStack createStack(int count)
{
ItemStack result = new ItemStack(item, count, meta);
result.setTagCompound(nbtTag);
result.stackTagCompound = nbtTag;
return result;
}
@ -87,7 +87,7 @@ public class ItemType
public static ItemType fromStack(ItemStack stack)
{
return new ItemType(stack.getItem(), stack.getItemDamage(), stack.getTagCompound());
return new ItemType(stack.getItem(), stack.getItemDamage(), stack.stackTagCompound);
}
}

View file

@ -1,15 +1,14 @@
package WayofTime.alchemicalWizardry.common;
import WayofTime.alchemicalWizardry.ModBlocks;
import WayofTime.alchemicalWizardry.ModItems;
import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.player.FillBucketEvent;
import net.minecraftforge.fml.common.eventhandler.Event.Result;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import WayofTime.alchemicalWizardry.ModBlocks;
import WayofTime.alchemicalWizardry.ModItems;
public class LifeBucketHandler
{
@ -29,12 +28,11 @@ public class LifeBucketHandler
public ItemStack fillCustomBucket(World world, MovingObjectPosition pos)
{
IBlockState state = world.getBlockState(pos.func_178782_a());
Block block = state.getBlock();
Block block = world.getBlock(pos.blockX, pos.blockY, pos.blockZ);
if (block != null && (block.equals(ModBlocks.blockLifeEssence)) && block.getMetaFromState(state) == 0)
if (block != null && (block.equals(ModBlocks.blockLifeEssence)) && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0)
{
world.setBlockToAir(pos.func_178782_a());
world.setBlockToAir(pos.blockX, pos.blockY, pos.blockZ);
return new ItemStack(ModItems.bucketLife);
} else
{

View file

@ -1,6 +1,7 @@
package WayofTime.alchemicalWizardry.common;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
public class LifeEssence extends Fluid
{
@ -18,7 +19,7 @@ public class LifeEssence extends Fluid
}
@Override
public String getLocalizedName()
public String getLocalizedName(FluidStack fluidStack)
{
return "Life Essence";
}

View file

@ -3,10 +3,10 @@ package WayofTime.alchemicalWizardry.common;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
public class MessageKeyPressed implements IMessage, IMessageHandler<MessageKeyPressed, IMessage>
{

View file

@ -1,11 +1,11 @@
package WayofTime.alchemicalWizardry.common;
import WayofTime.alchemicalWizardry.ModItems;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import WayofTime.alchemicalWizardry.ModItems;
public class ModLivingDropsEvent
{

View file

@ -13,19 +13,9 @@ import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.Packet;
import net.minecraft.network.PacketBuffer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.network.FMLEmbeddedChannel;
import net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec;
import net.minecraftforge.fml.common.network.FMLOutboundHandler;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.ColourAndCoords;
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
@ -39,7 +29,14 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth;
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
import WayofTime.alchemicalWizardry.common.tileEntity.TESocket;
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet;
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.FMLEmbeddedChannel;
import cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec;
import cpw.mods.fml.common.network.FMLOutboundHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public enum NewPacketHandler
{
@ -98,7 +95,7 @@ public enum NewPacketHandler
protected void channelRead0(ChannelHandlerContext ctx, TEAltarMessage msg) throws Exception
{
World world = AlchemicalWizardry.proxy.getClientWorld();
TileEntity te = world.getTileEntity(msg.pos);
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
if (te instanceof TEAltar)
{
TEAltar altar = (TEAltar) te;
@ -114,11 +111,11 @@ public enum NewPacketHandler
protected void channelRead0(ChannelHandlerContext ctx, TEOrientableMessage msg) throws Exception
{
World world = AlchemicalWizardry.proxy.getClientWorld();
TileEntity te = world.getTileEntity(msg.pos);
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
if (te instanceof TEOrientable)
{
((TEOrientable) te).setInputDirection(EnumFacing.getFront(msg.input));
((TEOrientable) te).setOutputDirection(EnumFacing.getFront(msg.output));
((TEOrientable) te).setInputDirection(ForgeDirection.getOrientation(msg.input));
((TEOrientable) te).setOutputDirection(ForgeDirection.getOrientation(msg.output));
}
}
}
@ -129,7 +126,7 @@ public enum NewPacketHandler
protected void channelRead0(ChannelHandlerContext ctx, TEPedestalMessage msg) throws Exception
{
World world = AlchemicalWizardry.proxy.getClientWorld();
TileEntity te = world.getTileEntity(msg.pos);
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
if (te instanceof TEPedestal)
{
TEPedestal pedestal = (TEPedestal) te;
@ -145,7 +142,7 @@ public enum NewPacketHandler
protected void channelRead0(ChannelHandlerContext ctx, TEPlinthMessage msg) throws Exception
{
World world = AlchemicalWizardry.proxy.getClientWorld();
TileEntity te = world.getTileEntity(msg.pos);
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
if (te instanceof TEPlinth)
{
TEPlinth Plinth = (TEPlinth) te;
@ -161,7 +158,7 @@ public enum NewPacketHandler
protected void channelRead0(ChannelHandlerContext ctx, TESocketMessage msg) throws Exception
{
World world = AlchemicalWizardry.proxy.getClientWorld();
TileEntity te = world.getTileEntity(msg.pos);
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
if (te instanceof TESocket)
{
TESocket Socket = (TESocket) te;
@ -177,7 +174,7 @@ public enum NewPacketHandler
protected void channelRead0(ChannelHandlerContext ctx, TETeleposerMessage msg) throws Exception
{
World world = AlchemicalWizardry.proxy.getClientWorld();
TileEntity te = world.getTileEntity(msg.pos);
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
if (te instanceof TETeleposer)
{
TETeleposer Teleposer = (TETeleposer) te;
@ -193,10 +190,10 @@ public enum NewPacketHandler
protected void channelRead0(ChannelHandlerContext ctx, TEWritingTableMessage msg) throws Exception
{
World world = AlchemicalWizardry.proxy.getClientWorld();
TileEntity te = world.getTileEntity(msg.pos);
if (te instanceof TEChemistrySet)
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
if (te instanceof TEWritingTable)
{
TEChemistrySet WritingTable = (TEChemistrySet) te;
TEWritingTable WritingTable = (TEWritingTable) te;
WritingTable.handlePacketData(msg.items);
}
@ -210,7 +207,7 @@ public enum NewPacketHandler
{
World world = AlchemicalWizardry.proxy.getClientWorld();
world.spawnParticle(EnumParticleTypes.func_179342_a(msg.particle), msg.xCoord, msg.yCoord, msg.zCoord, msg.xVel, msg.yVel, msg.zVel);
world.spawnParticle(msg.particle, msg.xCoord, msg.yCoord, msg.zCoord, msg.xVel, msg.yVel, msg.zVel);
}
}
@ -236,7 +233,7 @@ public enum NewPacketHandler
protected void channelRead0(ChannelHandlerContext ctx, TEMasterStoneMessage msg) throws Exception
{
World world = AlchemicalWizardry.proxy.getClientWorld();
TileEntity te = world.getTileEntity(msg.pos);
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
if (te instanceof TEMasterStone)
{
TEMasterStone masterStone = (TEMasterStone) te;
@ -253,7 +250,7 @@ public enum NewPacketHandler
protected void channelRead0(ChannelHandlerContext ctx, TEReagentConduitMessage msg) throws Exception
{
World world = AlchemicalWizardry.proxy.getClientWorld();
TileEntity te = world.getTileEntity(msg.pos);
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
if (te instanceof TEReagentConduit)
{
TEReagentConduit reagentConduit = (TEReagentConduit) te;
@ -321,7 +318,9 @@ public enum NewPacketHandler
public static class TEAltarMessage extends BMMessage
{
BlockPos pos;
int x;
int y;
int z;
int[] items;
int[] fluids;
@ -330,7 +329,9 @@ public enum NewPacketHandler
public static class TEOrientableMessage extends BMMessage
{
BlockPos pos;
int x;
int y;
int z;
int input;
int output;
@ -338,42 +339,52 @@ public enum NewPacketHandler
public static class TEPedestalMessage extends BMMessage
{
BlockPos pos;
int x;
int y;
int z;
int[] items;
}
public static class TEPlinthMessage extends BMMessage
{
BlockPos pos;
int x;
int y;
int z;
int[] items;
}
public static class TESocketMessage extends BMMessage
{
BlockPos pos;
int x;
int y;
int z;
int[] items;
}
public static class TETeleposerMessage extends BMMessage
{
BlockPos pos;
int x;
int y;
int z;
int[] items;
}
public static class TEWritingTableMessage extends BMMessage
{
BlockPos pos;
int x;
int y;
int z;
int[] items;
}
public static class ParticleMessage extends BMMessage
{
int particle;
String particle;
double xCoord;
double yCoord;
@ -393,7 +404,9 @@ public enum NewPacketHandler
public static class TEMasterStoneMessage extends BMMessage
{
BlockPos pos;
int x;
int y;
int z;
String ritual;
boolean isRunning;
@ -401,7 +414,9 @@ public enum NewPacketHandler
public static class TEReagentConduitMessage extends BMMessage
{
BlockPos pos;
int x;
int y;
int z;
List<ColourAndCoords> destinationList;
}
@ -486,209 +501,231 @@ public enum NewPacketHandler
@Override
public void encodeInto(ChannelHandlerContext ctx, BMMessage msg, ByteBuf target) throws Exception
{
PacketBuffer newBuffer = new PacketBuffer(target);
newBuffer.writeInt(msg.index);
target.writeInt(msg.index);
switch (msg.index)
{
case 0:
newBuffer.writeBlockPos(((TEAltarMessage) msg).pos);
target.writeInt(((TEAltarMessage) msg).x);
target.writeInt(((TEAltarMessage) msg).y);
target.writeInt(((TEAltarMessage) msg).z);
newBuffer.writeBoolean(((TEAltarMessage) msg).items != null);
target.writeBoolean(((TEAltarMessage) msg).items != null);
if (((TEAltarMessage) msg).items != null)
{
int[] items = ((TEAltarMessage) msg).items;
for (int j = 0; j < items.length; j++)
{
int i = items[j];
newBuffer.writeInt(i);
target.writeInt(i);
}
}
newBuffer.writeBoolean(((TEAltarMessage) msg).fluids != null);
target.writeBoolean(((TEAltarMessage) msg).fluids != null);
if (((TEAltarMessage) msg).fluids != null)
{
int[] fluids = ((TEAltarMessage) msg).fluids;
for (int j = 0; j < fluids.length; j++)
{
int i = fluids[j];
newBuffer.writeInt(i);
target.writeInt(i);
}
}
newBuffer.writeInt(((TEAltarMessage) msg).capacity);
target.writeInt(((TEAltarMessage) msg).capacity);
break;
case 1:
newBuffer.writeBlockPos(((TEOrientableMessage) msg).pos);
target.writeInt(((TEOrientableMessage) msg).x);
target.writeInt(((TEOrientableMessage) msg).y);
target.writeInt(((TEOrientableMessage) msg).z);
newBuffer.writeInt(((TEOrientableMessage) msg).input);
newBuffer.writeInt(((TEOrientableMessage) msg).output);
target.writeInt(((TEOrientableMessage) msg).input);
target.writeInt(((TEOrientableMessage) msg).output);
break;
case 2:
newBuffer.writeBlockPos(((TEPedestalMessage) msg).pos);
target.writeInt(((TEPedestalMessage) msg).x);
target.writeInt(((TEPedestalMessage) msg).y);
target.writeInt(((TEPedestalMessage) msg).z);
newBuffer.writeBoolean(((TEPedestalMessage) msg).items != null);
target.writeBoolean(((TEPedestalMessage) msg).items != null);
if (((TEPedestalMessage) msg).items != null)
{
int[] items = ((TEPedestalMessage) msg).items;
for (int j = 0; j < items.length; j++)
{
int i = items[j];
newBuffer.writeInt(i);
target.writeInt(i);
}
}
break;
case 3:
newBuffer.writeBlockPos(((TEPlinthMessage) msg).pos);
target.writeInt(((TEPlinthMessage) msg).x);
target.writeInt(((TEPlinthMessage) msg).y);
target.writeInt(((TEPlinthMessage) msg).z);
newBuffer.writeBoolean(((TEPlinthMessage) msg).items != null);
target.writeBoolean(((TEPlinthMessage) msg).items != null);
if (((TEPlinthMessage) msg).items != null)
{
int[] items = ((TEPlinthMessage) msg).items;
for (int j = 0; j < items.length; j++)
{
int i = items[j];
newBuffer.writeInt(i);
target.writeInt(i);
}
}
break;
case 4:
newBuffer.writeBlockPos(((TESocketMessage) msg).pos);
target.writeInt(((TESocketMessage) msg).x);
target.writeInt(((TESocketMessage) msg).y);
target.writeInt(((TESocketMessage) msg).z);
newBuffer.writeBoolean(((TESocketMessage) msg).items != null);
target.writeBoolean(((TESocketMessage) msg).items != null);
if (((TESocketMessage) msg).items != null)
{
int[] items = ((TESocketMessage) msg).items;
for (int j = 0; j < items.length; j++)
{
int i = items[j];
newBuffer.writeInt(i);
target.writeInt(i);
}
}
break;
case 5:
newBuffer.writeBlockPos(((TETeleposerMessage) msg).pos);
target.writeInt(((TETeleposerMessage) msg).x);
target.writeInt(((TETeleposerMessage) msg).y);
target.writeInt(((TETeleposerMessage) msg).z);
newBuffer.writeBoolean(((TETeleposerMessage) msg).items != null);
target.writeBoolean(((TETeleposerMessage) msg).items != null);
if (((TETeleposerMessage) msg).items != null)
{
int[] items = ((TETeleposerMessage) msg).items;
for (int j = 0; j < items.length; j++)
{
int i = items[j];
newBuffer.writeInt(i);
target.writeInt(i);
}
}
break;
case 6:
newBuffer.writeBlockPos(((TEWritingTableMessage) msg).pos);
target.writeInt(((TEWritingTableMessage) msg).x);
target.writeInt(((TEWritingTableMessage) msg).y);
target.writeInt(((TEWritingTableMessage) msg).z);
newBuffer.writeBoolean(((TEWritingTableMessage) msg).items != null);
target.writeBoolean(((TEWritingTableMessage) msg).items != null);
if (((TEWritingTableMessage) msg).items != null)
{
int[] items = ((TEWritingTableMessage) msg).items;
for (int j = 0; j < items.length; j++)
{
int i = items[j];
newBuffer.writeInt(i);
target.writeInt(i);
}
}
break;
case 7:
newBuffer.writeInt(((ParticleMessage) msg).particle);
String str = ((ParticleMessage) msg).particle;
target.writeInt(str.length());
for (int i = 0; i < str.length(); i++)
{
target.writeChar(str.charAt(i));
}
newBuffer.writeDouble(((ParticleMessage) msg).xCoord);
newBuffer.writeDouble(((ParticleMessage) msg).yCoord);
newBuffer.writeDouble(((ParticleMessage) msg).zCoord);
target.writeDouble(((ParticleMessage) msg).xCoord);
target.writeDouble(((ParticleMessage) msg).yCoord);
target.writeDouble(((ParticleMessage) msg).zCoord);
newBuffer.writeDouble(((ParticleMessage) msg).xVel);
newBuffer.writeDouble(((ParticleMessage) msg).yVel);
newBuffer.writeDouble(((ParticleMessage) msg).zVel);
target.writeDouble(((ParticleMessage) msg).xVel);
target.writeDouble(((ParticleMessage) msg).yVel);
target.writeDouble(((ParticleMessage) msg).zVel);
break;
case 8:
newBuffer.writeDouble(((VelocityMessage) msg).xVel);
newBuffer.writeDouble(((VelocityMessage) msg).yVel);
newBuffer.writeDouble(((VelocityMessage) msg).zVel);
target.writeDouble(((VelocityMessage) msg).xVel);
target.writeDouble(((VelocityMessage) msg).yVel);
target.writeDouble(((VelocityMessage) msg).zVel);
break;
case 9:
newBuffer.writeBlockPos(((TEMasterStoneMessage) msg).pos);
target.writeInt(((TEMasterStoneMessage) msg).x);
target.writeInt(((TEMasterStoneMessage) msg).y);
target.writeInt(((TEMasterStoneMessage) msg).z);
String ritual = ((TEMasterStoneMessage) msg).ritual;
newBuffer.writeInt(ritual.length());
target.writeInt(ritual.length());
for (int i = 0; i < ritual.length(); i++)
{
newBuffer.writeChar(ritual.charAt(i));
target.writeChar(ritual.charAt(i));
}
newBuffer.writeBoolean(((TEMasterStoneMessage) msg).isRunning);
target.writeBoolean(((TEMasterStoneMessage) msg).isRunning);
break;
case 10:
newBuffer.writeBlockPos(((TEReagentConduitMessage) msg).pos);
target.writeInt(((TEReagentConduitMessage) msg).x);
target.writeInt(((TEReagentConduitMessage) msg).y);
target.writeInt(((TEReagentConduitMessage) msg).z);
List<ColourAndCoords> list = ((TEReagentConduitMessage) msg).destinationList;
newBuffer.writeInt(list.size());
target.writeInt(list.size());
for (ColourAndCoords colourSet : list)
{
newBuffer.writeInt(colourSet.colourRed);
newBuffer.writeInt(colourSet.colourGreen);
newBuffer.writeInt(colourSet.colourBlue);
newBuffer.writeInt(colourSet.colourIntensity);
newBuffer.writeInt(colourSet.xCoord);
newBuffer.writeInt(colourSet.yCoord);
newBuffer.writeInt(colourSet.zCoord);
target.writeInt(colourSet.colourRed);
target.writeInt(colourSet.colourGreen);
target.writeInt(colourSet.colourBlue);
target.writeInt(colourSet.colourIntensity);
target.writeInt(colourSet.xCoord);
target.writeInt(colourSet.yCoord);
target.writeInt(colourSet.zCoord);
}
break;
case 11:
newBuffer.writeInt(((CurrentLPMessage) msg).currentLP);
newBuffer.writeInt(((CurrentLPMessage) msg).maxLP);
target.writeInt(((CurrentLPMessage) msg).currentLP);
target.writeInt(((CurrentLPMessage) msg).maxLP);
break;
case 12:
char[] charSet = ((CurrentReagentBarMessage)msg).reagent.toCharArray();
newBuffer.writeInt(charSet.length);
target.writeInt(charSet.length);
for(char cha : charSet)
{
newBuffer.writeChar(cha);
target.writeChar(cha);
}
newBuffer.writeFloat(((CurrentReagentBarMessage)msg).currentAR);
newBuffer.writeFloat(((CurrentReagentBarMessage)msg).maxAR);
target.writeFloat(((CurrentReagentBarMessage)msg).currentAR);
target.writeFloat(((CurrentReagentBarMessage)msg).maxAR);
break;
case 13:
newBuffer.writeFloat(((CurrentAddedHPMessage) msg).currentHP);
newBuffer.writeFloat(((CurrentAddedHPMessage) msg).maxHP);
target.writeFloat(((CurrentAddedHPMessage) msg).currentHP);
target.writeFloat(((CurrentAddedHPMessage) msg).maxHP);
break;
case 14:
System.out.println("Packet is being encoded");
newBuffer.writeByte(((KeyboardMessage)msg).keyPressed);
target.writeByte(((KeyboardMessage)msg).keyPressed);
break;
}
}
@ -697,14 +734,15 @@ public enum NewPacketHandler
@Override
public void decodeInto(ChannelHandlerContext ctx, ByteBuf dat, BMMessage msg)
{
PacketBuffer newBuffer = new PacketBuffer(dat);
int index = newBuffer.readInt();
int index = dat.readInt();
switch (index)
{
case 0:
((TEAltarMessage) msg).pos = newBuffer.readBlockPos();
boolean hasStacks = newBuffer.readBoolean();
((TEAltarMessage) msg).x = dat.readInt();
((TEAltarMessage) msg).y = dat.readInt();
((TEAltarMessage) msg).z = dat.readInt();
boolean hasStacks = dat.readBoolean();
((TEAltarMessage) msg).items = new int[TEAltar.sizeInv * 3];
if (hasStacks)
@ -712,34 +750,38 @@ public enum NewPacketHandler
((TEAltarMessage) msg).items = new int[TEAltar.sizeInv * 3];
for (int i = 0; i < ((TEAltarMessage) msg).items.length; i++)
{
((TEAltarMessage) msg).items[i] = newBuffer.readInt();
((TEAltarMessage) msg).items[i] = dat.readInt();
}
}
boolean hasFluids = newBuffer.readBoolean();
boolean hasFluids = dat.readBoolean();
((TEAltarMessage) msg).fluids = new int[6];
if (hasFluids)
for (int i = 0; i < ((TEAltarMessage) msg).fluids.length; i++)
{
((TEAltarMessage) msg).fluids[i] = newBuffer.readInt();
((TEAltarMessage) msg).fluids[i] = dat.readInt();
}
((TEAltarMessage) msg).capacity = newBuffer.readInt();
((TEAltarMessage) msg).capacity = dat.readInt();
break;
case 1:
((TEOrientableMessage) msg).pos = newBuffer.readBlockPos();
((TEOrientableMessage) msg).x = dat.readInt();
((TEOrientableMessage) msg).y = dat.readInt();
((TEOrientableMessage) msg).z = dat.readInt();
((TEOrientableMessage) msg).input = newBuffer.readInt();
((TEOrientableMessage) msg).output = newBuffer.readInt();
((TEOrientableMessage) msg).input = dat.readInt();
((TEOrientableMessage) msg).output = dat.readInt();
break;
case 2:
((TEPedestalMessage) msg).pos = newBuffer.readBlockPos();
((TEPedestalMessage) msg).x = dat.readInt();
((TEPedestalMessage) msg).y = dat.readInt();
((TEPedestalMessage) msg).z = dat.readInt();
boolean hasStacks1 = newBuffer.readBoolean();
boolean hasStacks1 = dat.readBoolean();
((TEPedestalMessage) msg).items = new int[TEPedestal.sizeInv * 3];
if (hasStacks1)
@ -747,16 +789,18 @@ public enum NewPacketHandler
((TEPedestalMessage) msg).items = new int[TEPedestal.sizeInv * 3];
for (int i = 0; i < ((TEPedestalMessage) msg).items.length; i++)
{
((TEPedestalMessage) msg).items[i] = newBuffer.readInt();
((TEPedestalMessage) msg).items[i] = dat.readInt();
}
}
break;
case 3:
((TEPlinthMessage) msg).pos = newBuffer.readBlockPos();
((TEPlinthMessage) msg).x = dat.readInt();
((TEPlinthMessage) msg).y = dat.readInt();
((TEPlinthMessage) msg).z = dat.readInt();
boolean hasStacks2 = newBuffer.readBoolean();
boolean hasStacks2 = dat.readBoolean();
((TEPlinthMessage) msg).items = new int[TEPlinth.sizeInv * 3];
if (hasStacks2)
@ -764,16 +808,18 @@ public enum NewPacketHandler
((TEPlinthMessage) msg).items = new int[TEPlinth.sizeInv * 3];
for (int i = 0; i < ((TEPlinthMessage) msg).items.length; i++)
{
((TEPlinthMessage) msg).items[i] = newBuffer.readInt();
((TEPlinthMessage) msg).items[i] = dat.readInt();
}
}
break;
case 4:
((TESocketMessage) msg).pos = newBuffer.readBlockPos();
((TESocketMessage) msg).x = dat.readInt();
((TESocketMessage) msg).y = dat.readInt();
((TESocketMessage) msg).z = dat.readInt();
boolean hasStacks3 = newBuffer.readBoolean();
boolean hasStacks3 = dat.readBoolean();
((TESocketMessage) msg).items = new int[TESocket.sizeInv * 3];
if (hasStacks3)
@ -781,16 +827,18 @@ public enum NewPacketHandler
((TESocketMessage) msg).items = new int[TESocket.sizeInv * 3];
for (int i = 0; i < ((TESocketMessage) msg).items.length; i++)
{
((TESocketMessage) msg).items[i] = newBuffer.readInt();
((TESocketMessage) msg).items[i] = dat.readInt();
}
}
break;
case 5:
((TETeleposerMessage) msg).pos = newBuffer.readBlockPos();
((TETeleposerMessage) msg).x = dat.readInt();
((TETeleposerMessage) msg).y = dat.readInt();
((TETeleposerMessage) msg).z = dat.readInt();
boolean hasStacks4 = newBuffer.readBoolean();
boolean hasStacks4 = dat.readBoolean();
((TETeleposerMessage) msg).items = new int[TETeleposer.sizeInv * 3];
if (hasStacks4)
@ -798,75 +846,89 @@ public enum NewPacketHandler
((TETeleposerMessage) msg).items = new int[TETeleposer.sizeInv * 3];
for (int i = 0; i < ((TETeleposerMessage) msg).items.length; i++)
{
((TETeleposerMessage) msg).items[i] = newBuffer.readInt();
((TETeleposerMessage) msg).items[i] = dat.readInt();
}
}
break;
case 6:
((TEWritingTableMessage) msg).pos = newBuffer.readBlockPos();
((TEWritingTableMessage) msg).x = dat.readInt();
((TEWritingTableMessage) msg).y = dat.readInt();
((TEWritingTableMessage) msg).z = dat.readInt();
boolean hasStacks5 = newBuffer.readBoolean();
boolean hasStacks5 = dat.readBoolean();
((TEWritingTableMessage) msg).items = new int[TEChemistrySet.sizeInv * 3];
((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3];
if (hasStacks5)
{
((TEWritingTableMessage) msg).items = new int[TEChemistrySet.sizeInv * 3];
((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3];
for (int i = 0; i < ((TEWritingTableMessage) msg).items.length; i++)
{
((TEWritingTableMessage) msg).items[i] = newBuffer.readInt();
((TEWritingTableMessage) msg).items[i] = dat.readInt();
}
}
break;
case 7:
((ParticleMessage) msg).particle = newBuffer.readInt();
int size = dat.readInt();
String str = "";
((ParticleMessage) msg).xCoord = newBuffer.readDouble();
((ParticleMessage) msg).yCoord = newBuffer.readDouble();
((ParticleMessage) msg).zCoord = newBuffer.readDouble();
for (int i = 0; i < size; i++)
{
str = str + dat.readChar();
}
((ParticleMessage) msg).xVel = newBuffer.readDouble();
((ParticleMessage) msg).yVel = newBuffer.readDouble();
((ParticleMessage) msg).zVel = newBuffer.readDouble();
((ParticleMessage) msg).particle = str;
((ParticleMessage) msg).xCoord = dat.readDouble();
((ParticleMessage) msg).yCoord = dat.readDouble();
((ParticleMessage) msg).zCoord = dat.readDouble();
((ParticleMessage) msg).xVel = dat.readDouble();
((ParticleMessage) msg).yVel = dat.readDouble();
((ParticleMessage) msg).zVel = dat.readDouble();
break;
case 8:
((VelocityMessage) msg).xVel = newBuffer.readDouble();
((VelocityMessage) msg).yVel = newBuffer.readDouble();
((VelocityMessage) msg).zVel = newBuffer.readDouble();
((VelocityMessage) msg).xVel = dat.readDouble();
((VelocityMessage) msg).yVel = dat.readDouble();
((VelocityMessage) msg).zVel = dat.readDouble();
break;
case 9:
((TEMasterStoneMessage) msg).pos = newBuffer.readBlockPos();
((TEMasterStoneMessage) msg).x = dat.readInt();
((TEMasterStoneMessage) msg).y = dat.readInt();
((TEMasterStoneMessage) msg).z = dat.readInt();
int ritualStrSize = newBuffer.readInt();
int ritualStrSize = dat.readInt();
String ritual = "";
for (int i = 0; i < ritualStrSize; i++)
{
ritual = ritual + newBuffer.readChar();
ritual = ritual + dat.readChar();
}
((TEMasterStoneMessage) msg).ritual = ritual;
((TEMasterStoneMessage) msg).isRunning = newBuffer.readBoolean();
((TEMasterStoneMessage) msg).isRunning = dat.readBoolean();
break;
case 10:
((TEReagentConduitMessage) msg).pos = newBuffer.readBlockPos();
int listSize = newBuffer.readInt();
((TEReagentConduitMessage) msg).x = dat.readInt();
((TEReagentConduitMessage) msg).y = dat.readInt();
((TEReagentConduitMessage) msg).z = dat.readInt();
int listSize = dat.readInt();
List<ColourAndCoords> list = new LinkedList();
for (int i = 0; i < listSize; i++)
{
list.add(new ColourAndCoords(newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt()));
list.add(new ColourAndCoords(dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt()));
}
((TEReagentConduitMessage) msg).destinationList = list;
@ -874,34 +936,34 @@ public enum NewPacketHandler
break;
case 11:
((CurrentLPMessage) msg).currentLP = newBuffer.readInt();
((CurrentLPMessage) msg).maxLP = newBuffer.readInt();
((CurrentLPMessage) msg).currentLP = dat.readInt();
((CurrentLPMessage) msg).maxLP = dat.readInt();
break;
case 12:
int size1 = newBuffer.readInt();
int size1 = dat.readInt();
String str1 = "";
for(int i=0; i<size1; i++)
{
str1 = str1 + newBuffer.readChar();
str1 = str1 + dat.readChar();
}
((CurrentReagentBarMessage) msg).reagent = str1;
((CurrentReagentBarMessage) msg).currentAR = newBuffer.readFloat();
((CurrentReagentBarMessage) msg).maxAR = newBuffer.readFloat();
((CurrentReagentBarMessage) msg).currentAR = dat.readFloat();
((CurrentReagentBarMessage) msg).maxAR = dat.readFloat();
break;
case 13:
((CurrentAddedHPMessage) msg).currentHP = newBuffer.readFloat();
((CurrentAddedHPMessage) msg).maxHP = newBuffer.readFloat();
((CurrentAddedHPMessage) msg).currentHP = dat.readFloat();
((CurrentAddedHPMessage) msg).maxHP = dat.readFloat();
break;
case 14:
System.out.println("Packet recieved: being decoded");
((KeyboardMessage)msg).keyPressed = newBuffer.readByte();
((KeyboardMessage)msg).keyPressed = dat.readByte();
break;
}
}
@ -912,7 +974,9 @@ public enum NewPacketHandler
{
TEAltarMessage msg = new TEAltarMessage();
msg.index = 0;
msg.pos = tileAltar.getPos();
msg.x = tileAltar.xCoord;
msg.y = tileAltar.yCoord;
msg.z = tileAltar.zCoord;
msg.items = tileAltar.buildIntDataList();
msg.fluids = tileAltar.buildFluidList();
msg.capacity = tileAltar.getCapacity();
@ -924,9 +988,11 @@ public enum NewPacketHandler
{
TEOrientableMessage msg = new TEOrientableMessage();
msg.index = 1;
msg.pos = tileOrientable.getPos();
msg.input = tileOrientable.getIntForEnumFacing(tileOrientable.getInputDirection());
msg.output = tileOrientable.getIntForEnumFacing(tileOrientable.getOutputDirection());
msg.x = tileOrientable.xCoord;
msg.y = tileOrientable.yCoord;
msg.z = tileOrientable.zCoord;
msg.input = tileOrientable.getIntForForgeDirection(tileOrientable.getInputDirection());
msg.output = tileOrientable.getIntForForgeDirection(tileOrientable.getOutputDirection());
return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg);
}
@ -935,7 +1001,9 @@ public enum NewPacketHandler
{
TEPedestalMessage msg = new TEPedestalMessage();
msg.index = 2;
msg.pos = tilePedestal.getPos();
msg.x = tilePedestal.xCoord;
msg.y = tilePedestal.yCoord;
msg.z = tilePedestal.zCoord;
msg.items = tilePedestal.buildIntDataList();
return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg);
@ -945,7 +1013,9 @@ public enum NewPacketHandler
{
TEPlinthMessage msg = new TEPlinthMessage();
msg.index = 3;
msg.pos = tilePlinth.getPos();
msg.x = tilePlinth.xCoord;
msg.y = tilePlinth.yCoord;
msg.z = tilePlinth.zCoord;
msg.items = tilePlinth.buildIntDataList();
return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg);
@ -955,7 +1025,9 @@ public enum NewPacketHandler
{
TESocketMessage msg = new TESocketMessage();
msg.index = 4;
msg.pos = tileSocket.getPos();
msg.x = tileSocket.xCoord;
msg.y = tileSocket.yCoord;
msg.z = tileSocket.zCoord;
msg.items = tileSocket.buildIntDataList();
return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg);
@ -965,27 +1037,31 @@ public enum NewPacketHandler
{
TETeleposerMessage msg = new TETeleposerMessage();
msg.index = 5;
msg.pos = tileTeleposer.getPos();
msg.x = tileTeleposer.xCoord;
msg.y = tileTeleposer.yCoord;
msg.z = tileTeleposer.zCoord;
msg.items = tileTeleposer.buildIntDataList();
return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg);
}
public static Packet getPacket(TEChemistrySet tileWritingTable)
public static Packet getPacket(TEWritingTable tileWritingTable)
{
TEWritingTableMessage msg = new TEWritingTableMessage();
msg.index = 6;
msg.pos = tileWritingTable.getPos();
msg.x = tileWritingTable.xCoord;
msg.y = tileWritingTable.yCoord;
msg.z = tileWritingTable.zCoord;
msg.items = tileWritingTable.buildIntDataList();
return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg);
}
public static Packet getParticlePacket(EnumParticleTypes type, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel)
public static Packet getParticlePacket(String str, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel)
{
ParticleMessage msg = new ParticleMessage();
msg.index = 7;
msg.particle = type.ordinal();
msg.particle = str;
msg.xCoord = xCoord;
msg.yCoord = yCoord;
msg.zCoord = zCoord;
@ -1011,7 +1087,9 @@ public enum NewPacketHandler
{
TEMasterStoneMessage msg = new TEMasterStoneMessage();
msg.index = 9;
msg.pos = tile.getPos();
msg.x = tile.xCoord;
msg.y = tile.yCoord;
msg.z = tile.zCoord;
msg.ritual = tile.getCurrentRitual();
msg.isRunning = tile.isRunning;
@ -1023,7 +1101,9 @@ public enum NewPacketHandler
{
TEReagentConduitMessage msg = new TEReagentConduitMessage();
msg.index = 10;
msg.pos = tile.getPos();
msg.x = tile.xCoord;
msg.y = tile.yCoord;
msg.z = tile.zCoord;
msg.destinationList = tile.destinationList;

View file

@ -1,10 +1,11 @@
package WayofTime.alchemicalWizardry.common.achievements;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
public class AchievementTrigger
{
@ -32,13 +33,25 @@ public class AchievementTrigger
{
for (Item item : AchievementsRegistry.craftinglist)
{
if (event.crafting != null && event.crafting.getItem() == item)
if (event.crafting != null)
{
Achievement achievement = AchievementsRegistry.getAchievementForItem(event.crafting.getItem());
if (achievement != null)
if (event.crafting.getItem() == item)
{
event.player.addStat(achievement, 1);
Achievement achievement = AchievementsRegistry.getAchievementForItem(event.crafting.getItem());
if (achievement != null)
{
event.player.addStat(achievement, 1);
}
}
if (event.crafting.getItem() instanceof ItemBlock)
{
Achievement achievement = AchievementsRegistry.getAchievementForBlock(((ItemBlock) event.crafting.getItem()).field_150939_a);
if (achievement != null)
{
event.player.addStat(achievement, 1);
}
}
}
}

View file

@ -10,7 +10,7 @@ import java.util.List;
public class AchievementsMod extends Achievement
{
public static List<Achievement> achievements = new ArrayList<Achievement>();
public static List<Achievement> achievements = new ArrayList();
public AchievementsMod(String name, int x, int y, ItemStack icon, Achievement parent)
{

View file

@ -1,6 +1,9 @@
package WayofTime.alchemicalWizardry.common.achievements;
import WayofTime.alchemicalWizardry.ModBlocks;
import WayofTime.alchemicalWizardry.ModItems;
import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner;
import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour;
import net.minecraft.item.Item;
import net.minecraft.block.Block;
import net.minecraft.stats.Achievement;
@ -12,38 +15,90 @@ public class AchievementsRegistry
{
public final static List<Item> craftinglist = new ArrayList<Item>();
public final static List<Item> pickupList = new ArrayList<Item>();
public final static List<Block> blockCraftingList = new ArrayList<Block>();
// public final static List<Block> blockPickupList = new ArrayList<Block>();
public static void init()
{
addItemsToCraftingList();
addBlocksToCraftingList();
addItemsToPickupList();
// addBlocksToPickupList();
}
public static void addItemsToCraftingList()
{
craftinglist.add(ModItems.sacrificialDagger);
craftinglist.add(ModItems.itemBloodPack);
craftinglist.add(ModItems.waterSigil);
craftinglist.add(ModItems.airSigil);
craftinglist.add(ModItems.sigilOfHolding);
craftinglist.add(ModItems.itemRitualDiviner);
craftinglist.add(ModItems.sigilOfTheBridge);
craftinglist.add(ModItems.itemSigilOfSupression);
craftinglist.add(ModItems.energyBazooka);
}
public static void addBlocksToCraftingList()
{
blockCraftingList.add(ModBlocks.bloodRune);
blockCraftingList.add(ModBlocks.blockWritingTable);
blockCraftingList.add(ModBlocks.blockTeleposer);
}
public static void addItemsToPickupList()
{
pickupList.add(ModItems.weakBloodOrb);
pickupList.add(ModItems.apprenticeBloodOrb);
pickupList.add(ModItems.daggerOfSacrifice);
pickupList.add(ModItems.magicianBloodOrb);
pickupList.add(ModItems.energySword);
pickupList.add(ModItems.boundHelmet);
pickupList.add(ModItems.boundPlate);
pickupList.add(ModItems.boundLeggings);
pickupList.add(ModItems.boundBoots);
pickupList.add(ModItems.itemComplexSpellCrystal);
pickupList.add(ModItems.masterBloodOrb);
pickupList.add(ModItems.archmageBloodOrb);
pickupList.add(ModItems.transcendentBloodOrb);
}
public static void addBlocksToPickupList()
{
}
public static Achievement getAchievementForItem(Item item)
{
if (item == ModItems.sacrificialDagger)
{
return ModAchievements.firstPrick;
}
if (item == ModItems.weakBloodOrb)
{
return ModAchievements.weakOrb;
}
if (item == ModItems.sacrificialDagger) return ModAchievements.firstPrick;
if (item == ModItems.weakBloodOrb) return ModAchievements.weakOrb;
if (item == ModItems.itemBloodPack) return ModAchievements.bloodLettersPack;
if (item == ModItems.waterSigil) return ModAchievements.waterSigil;
if (item == ModItems.apprenticeBloodOrb) return ModAchievements.apprenticeOrb;
if (item == ModItems.airSigil) return ModAchievements.airSigil;
if (item == ModItems.daggerOfSacrifice) return ModAchievements.daggerOfSacrifice;
if (item == ModItems.magicianBloodOrb) return ModAchievements.magicianOrb;
if (item == ModItems.sigilOfHolding) return ModAchievements.sigilHolding;
if (item == ModItems.energySword) return ModAchievements.boundBlade;
if (item instanceof BoundArmour) return ModAchievements.boundArmor;
if (item == ModItems.itemComplexSpellCrystal) return ModAchievements.complexSpells;
if (item instanceof ItemRitualDiviner) return ModAchievements.ritualDiviner;
if (item == ModItems.masterBloodOrb) return ModAchievements.masterOrb;
if (item == ModItems.sigilOfTheBridge) return ModAchievements.phantomBridgeSigil;
if (item == ModItems.itemSigilOfSupression) return ModAchievements.suppressionSigil;
if (item == ModItems.archmageBloodOrb) return ModAchievements.archmageOrb;
if (item == ModItems.energyBazooka) return ModAchievements.energyBazooka;
if (item == ModItems.transcendentBloodOrb) return ModAchievements.transcendentOrb;
return null;
}
public static Achievement getAchievementForBlock(Block block)
{
if (block == ModBlocks.bloodRune) return ModAchievements.blankRunes;
if (block == ModBlocks.blockWritingTable) return ModAchievements.brewingPotions;
if (block == ModBlocks.blockTeleposer) return ModAchievements.teleposer;
return null;
}
}

View file

@ -1,11 +0,0 @@
package WayofTime.alchemicalWizardry.common.achievements;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
public interface ICraftAchievement
{
Achievement getAchievementOnCraft(ItemStack stack, EntityPlayer player, IInventory matrix);
}

View file

@ -1,11 +0,0 @@
package WayofTime.alchemicalWizardry.common.achievements;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
public interface IPickupAchievement
{
Achievement getAchievementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item);
}

View file

@ -1,10 +1,11 @@
package WayofTime.alchemicalWizardry.common.achievements;
import WayofTime.alchemicalWizardry.ModBlocks;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.AchievementPage;
import net.minecraftforge.fml.common.FMLCommonHandler;
import WayofTime.alchemicalWizardry.ModItems;
import cpw.mods.fml.common.FMLCommonHandler;
public class ModAchievements
{
@ -12,13 +13,57 @@ public class ModAchievements
public static Achievement firstPrick;
public static Achievement weakOrb;
public static Achievement bloodLettersPack;
public static Achievement waterSigil;
public static Achievement blankRunes;
public static Achievement apprenticeOrb;
public static Achievement airSigil;
public static Achievement daggerOfSacrifice;
public static Achievement brewingPotions;
public static Achievement magicianOrb;
public static Achievement sigilHolding;
public static Achievement boundBlade;
public static Achievement boundArmor;
public static Achievement complexSpells;
public static Achievement ritualDiviner;
public static Achievement masterOrb;
public static Achievement demonSpawn;
public static Achievement phantomBridgeSigil;
public static Achievement teleposer;
public static Achievement suppressionSigil;
public static Achievement archmageOrb;
public static Achievement energyBazooka;
public static Achievement demons;
public static Achievement transcendentOrb;
public static void init()
{
firstPrick = new AchievementsMod(StatCollector.translateToLocal("firstPrick"), 0, 0, ModItems.sacrificialDagger, null);
weakOrb = new AchievementsMod(StatCollector.translateToLocal("weakOrb"), 3, 0, ModItems.weakBloodOrb, firstPrick);
firstPrick = new AchievementsMod("firstPrick", 0, 0, ModItems.sacrificialDagger, null).setSpecial();
weakOrb = new AchievementsMod("weakOrb", 3, 0, ModItems.weakBloodOrb, firstPrick);
bloodLettersPack = new AchievementsMod("bloodLettersPack", 3, 2, ModItems.itemBloodPack, weakOrb);
waterSigil = new AchievementsMod("waterSigil", 6, 2, ModItems.waterSigil, weakOrb);
blankRunes = new AchievementsMod("blankRunes", 4, -2, ModBlocks.bloodRune, weakOrb);
apprenticeOrb = new AchievementsMod("apprenticeOrb", 4, -4, ModItems.apprenticeBloodOrb, blankRunes);
airSigil = new AchievementsMod("airSigil", 6, 1, ModItems.airSigil, apprenticeOrb);
daggerOfSacrifice = new AchievementsMod("daggerSacrifice", 4, -5, ModItems.daggerOfSacrifice, apprenticeOrb);
brewingPotions = new AchievementsMod("brewingPotions", 6, -3, ModBlocks.blockWritingTable, apprenticeOrb);
magicianOrb = new AchievementsMod("magicianOrb", 2, -2, ModItems.magicianBloodOrb, apprenticeOrb);
sigilHolding = new AchievementsMod("sigilHolding", 6, 0, ModItems.sigilOfHolding, magicianOrb);
boundBlade = new AchievementsMod("boundBlade", 0, -2, ModItems.energySword, magicianOrb);
boundArmor = new AchievementsMod("boundArmor", 1, -1, ModItems.boundPlate, magicianOrb);
complexSpells = new AchievementsMod("complexSpells", 1, -4, ModItems.itemComplexSpellCrystal, magicianOrb);
ritualDiviner = new AchievementsMod("ritualDiviner", 1, -3, ModItems.itemRitualDiviner, magicianOrb);
masterOrb = new AchievementsMod("masterOrb", -2, -1, ModItems.masterBloodOrb, boundBlade);
demonSpawn = new AchievementsMod("demonSpawn", -3, -2, ModItems.demonPlacer, masterOrb);
phantomBridgeSigil = new AchievementsMod("phantomBridgeSigil", 6, -1, ModItems.sigilOfTheBridge, masterOrb);
teleposer = new AchievementsMod("teleposer", -4, -1, ModBlocks.blockTeleposer, masterOrb);
suppressionSigil = new AchievementsMod("suppressionSigil", 6, -2, ModItems.itemSigilOfSupression, masterOrb);
archmageOrb = new AchievementsMod("archmageOrb", -1, 2, ModItems.archmageBloodOrb, masterOrb);
energyBazooka = new AchievementsMod("energyBazooka", -3, 2, ModItems.energyBazooka, archmageOrb);
demons = new AchievementsMod("demons", 0, 3, new ItemStack(ModItems.baseItems, 1, 29), archmageOrb).setSpecial();
transcendentOrb = new AchievementsMod("trancsendentOrb", 0, 5, ModItems.transcendentBloodOrb, demons);
alchemicalWizardryPage = new AchievementPage("AlchemicalWizardry", AchievementsMod.achievements.toArray(new Achievement[AchievementsMod.achievements.size()]));
alchemicalWizardryPage = new AchievementPage("Blood Magic", AchievementsMod.achievements.toArray(new Achievement[AchievementsMod.achievements.size()]));
AchievementPage.registerAchievementPage(alchemicalWizardryPage);
AchievementsRegistry.init();
FMLCommonHandler.instance().bus().register(new AchievementTrigger());

View file

@ -11,7 +11,7 @@ import java.util.List;
public class CombinedPotionRegistry
{
public static List<CombinedPotionComponent> potionList = new ArrayList<CombinedPotionComponent>();
public static List<CombinedPotionComponent> potionList = new ArrayList();
public static void registerCombinedPotionRecipe(Potion result, Potion pot1, Potion pot2)
{

Some files were not shown because too many files have changed in this diff Show more