Pushing changes in 1.7.2 to 1.6.4 build

This commit is contained in:
WayofTime 2014-03-15 17:43:59 -04:00
parent a4a02b4118
commit fa9112493c
170 changed files with 4803 additions and 272 deletions
1.7.2
java/WayofTime/alchemicalWizardry
resources/assets
BM_src/WayofTime/alchemicalWizardry

View file

@ -56,6 +56,7 @@ 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.rituals.Rituals;
@ -99,7 +100,7 @@ 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 = "v0.8.0")
@Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.0.0Beta")
//@NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = {"BloodAltar", "particle", "SetLifeEssence", "GetLifeEssence", "Ritual", "GetAltarEssence", "TESocket", "TEWritingTable", "CustomParticle", "SetPlayerVel", "SetPlayerPos", "TEPedestal", "TEPlinth", "TETeleposer", "InfiniteLPPath", "TEOrientor"}, packetHandler = PacketHandler.class)
public class AlchemicalWizardry
@ -113,6 +114,8 @@ public class AlchemicalWizardry
public static int ironBlockMeteorRadius;
public static String[] netherStarMeteorArray;
public static int netherStarMeteorRadius;
public static String[] allowedCrushedOresArray;
public static Potion customPotionDrowning;
public static Potion customPotionBoost;
@ -124,6 +127,7 @@ public class AlchemicalWizardry
public static Potion customPotionIceCloak;
public static Potion customPotionHeavyHeart;
public static Potion customPotionFireFuse;
public static Potion customPotionPlanarBinding;
public static int customPotionDrowningID;
public static int customPotionBoostID;
@ -135,6 +139,7 @@ public class AlchemicalWizardry
public static int customPotionIceCloakID;
public static int customPotionHeavyHeartID;
public static int customPotionFireFuseID;
public static int customPotionPlanarBindingID;
public static boolean isThaumcraftLoaded;
public static boolean isForestryLoaded;
@ -259,7 +264,7 @@ public class AlchemicalWizardry
ItemStack lavaBucketStack = new ItemStack(Items.lava_bucket);
ItemStack cobblestoneStack = new ItemStack(Blocks.cobblestone);
ItemStack glassStack = new ItemStack(Blocks.glass, 1, craftingConstant);
ItemStack ironStack = new ItemStack(Items.iron_ingot);
ItemStack ironIngotStack = new ItemStack(Items.iron_ingot);
ItemStack diamondStack = new ItemStack(Items.diamond, 1, craftingConstant);
ItemStack woolStack = new ItemStack(Blocks.wool);
ItemStack goldNuggetStack = new ItemStack(Items.gold_nugget);
@ -362,18 +367,18 @@ public class AlchemicalWizardry
ItemStack magicalesStack = new ItemStack(ModItems.magicales);
//All crafting goes here
// GameRegistry.addRecipe(orbOfTestingStack, "x x", " ", "x x", 'x', cobblestoneStack);
//GameRegistry.addRecipe(glassShardStack, " x", "y ", 'x', ironStack, 'y', glassStack);
//GameRegistry.addRecipe(glassShardStack, " x", "y ", 'x', ironIngotStack, 'y', glassStack);
//GameRegistry.addRecipe(weakBloodOrbStackCrafted, "xxx", "xdx", "www", 'x', bloodiedShardStack, 'd', diamondStack, 'w', woolStack);
GameRegistry.addRecipe(sacrificialDaggerStack, "ggg", " dg", "i g", 'g', glassStack, 'd', goldIngotStack, 'i', ironStack);
//GameRegistry.addRecipe(blankSlateStack, "sgs", "gig", "sgs", 's', stoneStack, 'g', goldNuggetStack, 'i', ironStack);
//GameRegistry.addRecipe(reinforcedSlateStack, "rir", "ibi", "gig", 'r', redstoneStack, 'i', ironStack, 'b', blankSlateStack, 'g', glowstoneBlockStack);
GameRegistry.addRecipe(sacrificialDaggerStack, "ggg", " dg", "i g", 'g', glassStack, 'd', goldIngotStack, 'i', ironIngotStack);
//GameRegistry.addRecipe(blankSlateStack, "sgs", "gig", "sgs", 's', stoneStack, 'g', goldNuggetStack, 'i', ironIngotStack);
//GameRegistry.addRecipe(reinforcedSlateStack, "rir", "ibi", "gig", 'r', redstoneStack, 'i', ironIngotStack, 'b', blankSlateStack, 'g', glowstoneBlockStack);
GameRegistry.addRecipe(lavaCrystalStackCrafted, "glg", "lbl", "odo", 'g', glassStack, 'l', lavaBucketStack, 'b', weakBloodOrbStack, 'd', diamondStack, 'o', obsidianStack);
GameRegistry.addRecipe(waterSigilStackCrafted, "www", "wbw", "wow", 'w', waterBucketStack, 'b', blankSlateStack, 'o', weakBloodOrbStack);
GameRegistry.addRecipe(lavaSigilStackCrafted, "lml", "lbl", "lcl", 'l', lavaBucketStack, 'b', blankSlateStack, 'm', magmaCreamStack, 'c', lavaCrystalStack);
GameRegistry.addRecipe(voidSigilStackCrafted, "ese", "ere", "eoe", 'e', emptyBucketStack, 'r', reinforcedSlateStack, 'o', apprenticeBloodOrbStack, 's', stringStack);
GameRegistry.addRecipe(bloodAltarStack, "s s", "scs", "gdg", 's', stoneStack, 'c', furnaceStack, 'd', diamondStack, 'g', goldIngotStack);
//GameRegistry.addRecipe(energySwordStack, " o ", " o ", " s ", 'o', weakBloodOrbStack, 's', diamondSwordStack);
//GameRegistry.addRecipe(energyBlasterStack, "oi ", "gdi", " rd", 'o', weakBloodOrbStack, 'i', ironStack, 'd', diamondStack, 'r', reinforcedSlateStack, 'g', goldIngotStack);
//GameRegistry.addRecipe(energyBlasterStack, "oi ", "gdi", " rd", 'o', weakBloodOrbStack, 'i', ironIngotStack, 'd', diamondStack, 'r', reinforcedSlateStack, 'g', goldIngotStack);
GameRegistry.addRecipe(bloodRuneCraftedStack, "sss", "ror", "sss", 's', stoneStack, 'o', weakBloodOrbStack, 'r', blankSlateStack);
GameRegistry.addRecipe(speedRuneStack, "sbs", "uru", "sbs", 'u', sugarStack, 's', stoneStack, 'r', bloodRuneStack, 'b', blankSlateStack);
//GameRegistry.addRecipe(efficiencyRuneStack, "sbs", "rur", "sbs", 'r', redstoneStack, 's', stoneStack, 'u', bloodRuneStack,'b',blankSlateStack);
@ -431,6 +436,7 @@ public class AlchemicalWizardry
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"));
//FluidStack lifeEssenceFluidStack = new FluidStack(lifeEssenceFluid, 1);
@ -583,9 +589,55 @@ public class AlchemicalWizardry
MeteorRegistry.registerMeteorParadigm(stoneStack, this.stoneMeteorArray, this.stoneMeteorRadius);
MeteorRegistry.registerMeteorParadigm(ironBlockStack, this.ironBlockMeteorArray, this.ironBlockMeteorRadius);
MeteorRegistry.registerMeteorParadigm(new ItemStack(Items.nether_star), this.netherStarMeteorArray, this.netherStarMeteorRadius);
// sanguineHelmet = new ItemSanguineArmour(sanguineHelmetItemID).setUnlocalizedName("sanguineHelmet");
//
// LanguageRegistry.addName(sanguineHelmet,"Sanguine Helmet");
//Register spell component recipes
ItemStack quartzRodStack = new ItemStack(ModItems.baseItems,1,0);
ItemStack emptyCoreStack = new ItemStack(ModItems.baseItems,1,1);
ItemStack magicalesCableStack = new ItemStack(ModItems.baseItems,1,2);
ItemStack woodBraceStack = new ItemStack(ModItems.baseItems,1,3);
ItemStack stoneBraceStack = new ItemStack(ModItems.baseItems,1,4);
ItemStack projectileCoreStack = new ItemStack(ModItems.baseItems,1,5);
ItemStack selfCoreStack = new ItemStack(ModItems.baseItems,1,6);
ItemStack meleeCoreStack = new ItemStack(ModItems.baseItems,1,7);
ItemStack paradigmBackPlateStack = new ItemStack(ModItems.baseItems,1,8);
ItemStack outputCableStack = new ItemStack(ModItems.baseItems,1,9);
ItemStack flameCoreStack = new ItemStack(ModItems.baseItems,1,10);
ItemStack iceCoreStack = new ItemStack(ModItems.baseItems,1,11);
ItemStack windCoreStack = new ItemStack(ModItems.baseItems,1,12);
ItemStack earthCoreStack = new ItemStack(ModItems.baseItems,1,13);
ItemStack inputCableStack = new ItemStack(ModItems.baseItems,1,14);
ItemStack magicalesCraftedCableStack = new ItemStack(ModItems.baseItems,5,2);
GameRegistry.addRecipe(quartzRodStack, "qqq", 'q', new ItemStack(Items.quartz));
GameRegistry.addRecipe(emptyCoreStack,"gig","nrn","gig",'n',goldIngotStack,'i',ironIngotStack,'g',glassStack,'r',simpleCatalystStack);
GameRegistry.addRecipe(magicalesCraftedCableStack,"sss","mmm","sss",'s',new ItemStack(Items.string),'m',magicalesStack);
GameRegistry.addRecipe(woodBraceStack," il","ili","li ",'l', new ItemStack(Blocks.log,1,craftingConstant),'i',new ItemStack(Items.string));
GameRegistry.addRecipe(stoneBraceStack," is","isi","si ",'i', ironIngotStack,'s',reinforcedSlateStack);
GameRegistry.addRecipe(projectileCoreStack, "mbm","aca","mom",'c', emptyCoreStack,'b',weakBloodShardStack,'m', magicalesStack,'o', magicianBloodOrbStack,'a',new ItemStack(Items.arrow));
GameRegistry.addRecipe(selfCoreStack,"sbs","ncn","sos",'c', emptyCoreStack, 's',sanctusStack,'b', weakBloodShardStack,'o', magicianBloodOrbStack,'n',glowstoneDustStack);
GameRegistry.addRecipe(meleeCoreStack,"sbs","ncn","sos",'c', emptyCoreStack, 's',incendiumStack,'b', weakBloodShardStack,'o', magicianBloodOrbStack,'n',new ItemStack(Items.flint_and_steel));
GameRegistry.addRecipe(paradigmBackPlateStack,"isi","rgr","isi",'i',ironIngotStack,'r',stoneStack,'g',goldIngotStack,'s',reinforcedSlateStack);
GameRegistry.addRecipe(outputCableStack, " si","s c"," si",'s',stoneStack,'i',ironIngotStack,'c',simpleCatalystStack);
GameRegistry.addRecipe(flameCoreStack,"mdm","scs","mom",'m',incendiumStack,'c',emptyCoreStack,'o',magicianBloodOrbStack,'d',diamondStack,'s',weakBloodShardStack);
GameRegistry.addRecipe(iceCoreStack,"mdm","scs","mom",'m',crystallosStack,'c',emptyCoreStack,'o',magicianBloodOrbStack,'d',diamondStack,'s',weakBloodShardStack);
GameRegistry.addRecipe(windCoreStack,"mdm","scs","mom",'m',aetherStack,'c',emptyCoreStack,'o',magicianBloodOrbStack,'d',diamondStack,'s',weakBloodShardStack);
GameRegistry.addRecipe(earthCoreStack,"mdm","scs","mom",'m',terraeStack,'c',emptyCoreStack,'o',magicianBloodOrbStack,'d',diamondStack,'s',weakBloodShardStack);
GameRegistry.addRecipe(inputCableStack, "ws ","rcs","ws ",'w',blankSlateStack,'s',stoneStack,'r',imbuedSlateStack,'c',simpleCatalystStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockConduit,1,0),"q q","ccc","q q",'q', quartzRodStack,'c', magicalesCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm,1,0),"gb ","pcw","gb ",'p',paradigmBackPlateStack,'c', projectileCoreStack,'g',goldIngotStack,'b',stoneBraceStack,'w',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm,1,1),"gb ","pcw","gb ",'p',paradigmBackPlateStack,'c', selfCoreStack,'g',goldIngotStack,'b',stoneBraceStack,'w',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm,1,2),"gb ","pcw","gb ",'p',paradigmBackPlateStack,'c', meleeCoreStack,'g',goldIngotStack,'b',stoneBraceStack,'w',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect,1,0),"bgb","ico","bgb",'c',flameCoreStack,'b',stoneBraceStack,'g',goldIngotStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect,1,1),"bgb","ico","bgb",'c',iceCoreStack,'b',stoneBraceStack,'g',goldIngotStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect,1,2),"bgb","ico","bgb",'c',windCoreStack,'b',stoneBraceStack,'g',goldIngotStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect,1,3),"bgb","ico","bgb",'c',earthCoreStack,'b',stoneBraceStack,'g',goldIngotStack,'i',inputCableStack,'o',outputCableStack);
}
@EventHandler

View file

@ -48,6 +48,7 @@ public class BloodMagicConfiguration
AlchemicalWizardry.customPotionIceCloakID = config.get("Potion ID","IceCloak",107).getInt();
AlchemicalWizardry.customPotionHeavyHeartID = config.get("Potion ID","HeavyHeart",108).getInt();
AlchemicalWizardry.customPotionFireFuseID = config.get("Potion ID","FireFuse",109).getInt();
AlchemicalWizardry.customPotionPlanarBindingID = config.get("Potion ID","PlanarBinding",110).getInt();
MeteorParadigm.maxChance = config.get("meteor", "maxChance", 1000).getInt();
AlchemicalWizardry.doMeteorsDestroyBlocks = config.get("meteor", "doMeteorsDestroyBlocks", true).getBoolean(true);
@ -60,6 +61,7 @@ public class BloodMagicConfiguration
AlchemicalWizardry.netherStarMeteorArray = config.get("meteor", "netherStarMeteor", new String[]{"oreDiamond", "150", "oreEmerald", "100", "oreQuartz", "250", "oreSunstone", "5", "oreMoonstone", "50", "oreIridium", "5", "oreCertusQuartz", "150"}).getStringList();
AlchemicalWizardry.netherStarMeteorRadius = config.get("meteor", "netherStarMeteorRadius", 3).getInt();
AlchemicalWizardry.allowedCrushedOresArray = config.get("oreCrushing", "allowedOres", new String[]{"iron","gold","copper","tin","lead","silver","osmium"}).getStringList();
// AlchemicalWizardry.testingBlockBlockID = config.getBlock("TestingBlock", 1400).getInt();
// AlchemicalWizardry.lifeEssenceFlowingBlockID = config.getBlock("LifeEssenceFlowing", 1401).getInt();
// AlchemicalWizardry.lifeEssenceStillBlockID = config.getBlock("LifeEssenceStill", 1402).getInt();

View file

@ -27,6 +27,7 @@ import WayofTime.alchemicalWizardry.common.items.EnergyBlast;
import WayofTime.alchemicalWizardry.common.items.EnergySword;
import WayofTime.alchemicalWizardry.common.items.EnhancedTelepositionFocus;
import WayofTime.alchemicalWizardry.common.items.FireScribeTool;
import WayofTime.alchemicalWizardry.common.items.ItemAlchemyBase;
import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal;
import WayofTime.alchemicalWizardry.common.items.ItemComponents;
import WayofTime.alchemicalWizardry.common.items.ItemDiabloKey;
@ -55,6 +56,7 @@ import WayofTime.alchemicalWizardry.common.items.potion.WeakFillingAgent;
import WayofTime.alchemicalWizardry.common.items.sigil.AirSigil;
import WayofTime.alchemicalWizardry.common.items.sigil.DivinationSigil;
import WayofTime.alchemicalWizardry.common.items.sigil.ItemBloodLightSigil;
import WayofTime.alchemicalWizardry.common.items.sigil.ItemSigilOfEnderSeverance;
import WayofTime.alchemicalWizardry.common.items.sigil.LavaSigil;
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfElementalAffinity;
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfGrowth;
@ -145,6 +147,7 @@ public class ModItems
public static Item demonPlacer;
public static Item baseItems;
public static Item baseAlchemyItems;
public static Item weakFillingAgent;
public static Item standardFillingAgent;
@ -161,6 +164,8 @@ public class ModItems
public static Item itemComplexSpellCrystal;
public static Item itemBloodFrame;
public static Item itemSigilOfEnderSeverance;
public static Item bucketLife;
public static void init()
@ -243,7 +248,9 @@ public class ModItems
itemBloodLightSigil = new ItemBloodLightSigil().setUnlocalizedName("bloodLightSigil");
itemComplexSpellCrystal = new ItemComplexSpellCrystal().setUnlocalizedName("itemComplexSpellCrystal");
bucketLife = (new LifeBucket(ModBlocks.blockLifeEssence)).setUnlocalizedName("bucketLife").setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc);
itemSigilOfEnderSeverance = (new ItemSigilOfEnderSeverance()).setUnlocalizedName("itemSigilOfEnderSeverance");
baseItems = new ItemComponents().setUnlocalizedName("baseItems");
baseAlchemyItems = new ItemAlchemyBase().setUnlocalizedName("baseAlchemyItems");
}
public static void registerItems()
@ -330,9 +337,12 @@ public class ModItems
GameRegistry.registerItem(ModItems.energyBazooka, "energyBazooka");
GameRegistry.registerItem(ModItems.itemBloodLightSigil, "itemBloodLightSigil");
GameRegistry.registerItem(ModItems.itemComplexSpellCrystal, "itemComplexSpellCrystal");
GameRegistry.registerItem(ModItems.itemSigilOfEnderSeverance, "sigilOfEnderSeverance");
GameRegistry.registerItem(ModItems.bucketLife, "bucketLife");
GameRegistry.registerItem(ModItems.baseItems, "bloodMagicBaseItems");
GameRegistry.registerItem(ModItems.baseAlchemyItems, "bloodMagicBaseAlchemyItems");
//GameRegistry.registerItem(ModItems.itemBloodFrame, "itemBloodFrame");
}
}

View file

@ -27,12 +27,16 @@ import WayofTime.alchemicalWizardry.common.renderer.block.RenderPedestal;
import WayofTime.alchemicalWizardry.common.renderer.block.RenderPlinth;
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.TEAltarItemRenderer;
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEConduitItemRenderer;
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellEffectBlockItemRenderer;
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellEnhancementBlockItemRenderer;
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellModifierBlockItemRenderer;
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellParadigmBlockItemRenderer;
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderBileDemon;
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderBoulderFist;
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderElemental;
@ -61,6 +65,8 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal;
import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth;
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;
@ -114,12 +120,16 @@ public class ClientProxy extends CommonProxy
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());
//Item Renderer stuff
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockConduit), new TEConduitItemRenderer());
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellEffect), new TESpellEffectBlockItemRenderer());
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellEnhancement), new TESpellEnhancementBlockItemRenderer());
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellParadigm), new TESpellParadigmBlockItemRenderer());
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellModifier), new TESpellModifierBlockItemRenderer());
//RenderingRegistry.registerEntityRenderingHandler(FireProjectile.class, new RenderFireProjectile());
//RenderingRegistry.registerBlockHandler(new AltarRenderer());
}

View file

@ -16,6 +16,7 @@ import net.minecraft.potion.Potion;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.Vec3;
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
import net.minecraftforge.event.entity.living.LivingAttackEvent;
import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent;
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
@ -49,6 +50,15 @@ public class AlchemicalWizardryEventHooks
event.entityLiving.motionY = 0;
}
}
@SubscribeEvent
public void onEndermanTeleportEvent(EnderTeleportEvent event)
{
if(event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionPlanarBinding) && event.isCancelable())
{
event.setCanceled(true);
}
}
@SubscribeEvent
public void onEntityDamaged(LivingAttackEvent event)
@ -149,18 +159,15 @@ public class AlchemicalWizardryEventHooks
EntityLivingBase entity = event.entityLiving;
//if(!entity.isSneaking())
{
double percentIncrease = (i + 1) * 0.03d;
float percentIncrease = (i + 1) * 0.05f;
if (event.entityLiving instanceof EntityPlayer)
{
EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving;
entityPlayer.stepHeight = 1.0f;
if (!entityPlayer.worldObj.isRemote)
{
float speed = ((Float) ReflectionHelper.getPrivateValue(PlayerCapabilities.class, entityPlayer.capabilities, new String[]{"walkSpeed", "g", "field_75097_g"})).floatValue();
ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, entityPlayer.capabilities, Float.valueOf(speed + (float) percentIncrease), new String[]{"walkSpeed", "g", "field_75097_g"}); //CAUTION
}
if((entityPlayer.onGround || entityPlayer.capabilities.isFlying) && entityPlayer.moveForward > 0F)
entityPlayer.moveFlying(0F, 1F, entityPlayer.capabilities.isFlying ? (percentIncrease/2.0f) : percentIncrease);
}
}
}
@ -312,7 +319,7 @@ public class AlchemicalWizardryEventHooks
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionHeavyHeart).getAmplifier();
double decrease = 0.025*(i+1);
if(entityLiving.motionY>-0.5)
if(entityLiving.motionY>-0.9)
{
entityLiving.motionY-=decrease;
}

View file

@ -42,7 +42,7 @@ public class AltarRecipeRegistry
registerAltarRecipe(new ItemStack(ModItems.telepositionFocus), new ItemStack(Items.ender_pearl),4,2000,10,10,false);
registerAltarRecipe(new ItemStack(ModItems.enhancedTelepositionFocus), new ItemStack(ModItems.telepositionFocus),4,10000,25,15,false);
registerAltarRecipe(new ItemStack(ModItems.imbuedSlate), new ItemStack(ModItems.imbuedSlate),4,15000,20,20,false);
registerAltarRecipe(new ItemStack(ModItems.demonicSlate), new ItemStack(ModItems.imbuedSlate),4,15000,20,20,false);
registerAltarRecipe(new ItemStack(ModItems.duskScribeTool), new ItemStack(Blocks.coal_block),4,2000,20,10,false);
registerAltarRecipe(new ItemStack(ModBlocks.bloodSocket), new ItemStack(ModBlocks.emptySocket),3,30000,40,10,false);
registerAltarRecipe(new ItemStack(ModItems.earthScribeTool), new ItemStack(Blocks.obsidian),3,1000,5,5,false);

View file

@ -249,4 +249,6 @@ public class BlockOrientable extends BlockContainer
{
return metadata;
}
}

View file

@ -42,4 +42,22 @@ public class BlockSpellModifier extends BlockOrientable
super.getSubBlocks(par1, par2CreativeTabs, par3List);
}
}
@Override
public boolean isOpaqueCube()
{
return false;
}
@Override
public boolean renderAsNormalBlock()
{
return false;
}
@Override
public int getRenderType()
{
return -1;
}
}

View file

@ -91,23 +91,23 @@ public class BlockSpellParadigm extends BlockOrientable
return super.onBlockActivated(world, x, y, z, player, side, what, these, are);
}
// @Override
// public boolean isOpaqueCube()
// {
// return false;
// }
//
// @Override
// public boolean renderAsNormalBlock()
// {
// return false;
// }
@Override
public boolean isOpaqueCube()
{
return false;
}
// @Override
// public int getRenderType()
// {
// return -1;
// }
@Override
public boolean renderAsNormalBlock()
{
return false;
}
@Override
public int getRenderType()
{
return -1;
}
//TODO Need to make a renderer for the paradigm blocks and other spell blocks.
/*

View file

@ -289,7 +289,7 @@ public class EnergyItems extends Item implements IBindable
}
}
public String getOwnerName(ItemStack item)
public static String getOwnerName(ItemStack item)
{
if (item.stackTagCompound == null)
{

View file

@ -0,0 +1,6 @@
package WayofTime.alchemicalWizardry.common.items;
public interface IHolding
{
}

View file

@ -0,0 +1,107 @@
package WayofTime.alchemicalWizardry.common.items;
import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import org.lwjgl.input.Keyboard;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemAlchemyBase extends Item
{
private static final String[] ITEM_NAMES = new String[]{};
@SideOnly(Side.CLIENT)
private IIcon[] icons;
public ItemAlchemyBase()
{
super();
this.maxStackSize = 64;
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
this.hasSubtypes = true;
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
icons = new IIcon[ITEM_NAMES.length];
for (int i = 0; i < ITEM_NAMES.length; ++i)
{
icons[i] = iconRegister.registerIcon("AlchemicalWizardry:" + "baseAlchemyItem" + ITEM_NAMES[i]);
}
}
@Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{
par3List.add("Used in alchemy");
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT))
{
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
if (recipe != null)
{
par3List.add(EnumChatFormatting.BLUE + "Recipe:");
for (ItemStack item : recipe)
{
if (item != null)
{
par3List.add("" + item.getDisplayName());
}
}
}
} else
{
par3List.add("-Press " + EnumChatFormatting.BLUE + "shift" + EnumChatFormatting.GRAY + " for Recipe-");
}
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
return par1ItemStack;
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
//This is what will do all the localisation things on the alchemy components so you dont have to set it :D
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1);
return ("" + "item.bloodMagicAlchemyItem." + ITEM_NAMES[meta]);
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int meta)
{
int j = MathHelper.clamp_int(meta, 0, ITEM_NAMES.length - 1);
return icons[j];
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item id, CreativeTabs creativeTab, List list)
{
for (int meta = 0; meta < ITEM_NAMES.length; ++meta)
{
list.add(new ItemStack(id, 1, meta));
}
}
}

View file

@ -21,7 +21,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class ItemComponents extends Item
{
private static final String[] ITEM_NAMES = new String[]{"QuartzRod"};
private static final String[] ITEM_NAMES = new String[]{"QuartzRod", "EmptyCore", "MagicalesCable", "WoodBrace", "StoneBrace", "ProjectileCore", "SelfCore","MeleeCore","ParadigmBackPlate","OutputCable","FlameCore","IcyCore","GustCore","EarthenCore","InputCable","CrackedRunicPlate","RunicPlate","ScribedRunicPlate","DefaultCore","OffensiveCore","DefensiveCore","EnvironmentalCore"};
@SideOnly(Side.CLIENT)
private IIcon[] icons;
@ -29,7 +29,7 @@ public class ItemComponents extends Item
public ItemComponents()
{
super();
this.maxStackSize = 1;
this.maxStackSize = 64;
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
this.hasSubtypes = true;
}

View file

@ -42,7 +42,6 @@ public class AlchemyFlask extends Item
this.setMaxDamage(8);
this.setMaxStackSize(1);
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
setNoRepair();
// TODO Auto-generated constructor stub
}

View file

@ -0,0 +1,171 @@
package WayofTime.alchemicalWizardry.common.items.sigil;
import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import WayofTime.alchemicalWizardry.common.items.IHolding;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemSigilOfEnderSeverance extends EnergyItems implements IHolding
{
@SideOnly(Side.CLIENT)
private static IIcon activeIcon;
@SideOnly(Side.CLIENT)
private static IIcon passiveIcon;
public ItemSigilOfEnderSeverance()
{
super();
this.maxStackSize = 1;
setEnergyUsed(200);
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
}
@Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{
par3List.add("Put those endermen in a Dire situation!");
if (!(par1ItemStack.stackTagCompound == null))
{
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
{
par3List.add("Activated");
} else
{
par3List.add("Deactivated");
}
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
}
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfTheFastMiner");
this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:ElementalSigil_activated");
this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:ElementalSigil_deactivated");
}
@Override
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
{
if (stack.stackTagCompound == null)
{
stack.setTagCompound(new NBTTagCompound());
}
NBTTagCompound tag = stack.stackTagCompound;
if (tag.getBoolean("isActive"))
{
return this.activeIcon;
} else
{
return this.passiveIcon;
}
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int par1)
{
if (par1 == 1)
{
return this.activeIcon;
} else
{
return this.passiveIcon;
}
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
if (par3EntityPlayer.isSneaking())
{
return par1ItemStack;
}
if (par1ItemStack.stackTagCompound == null)
{
par1ItemStack.setTagCompound(new NBTTagCompound());
}
NBTTagCompound tag = par1ItemStack.stackTagCompound;
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
if (tag.getBoolean("isActive"))
{
par1ItemStack.setItemDamage(1);
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
if (!par3EntityPlayer.capabilities.isCreativeMode)
{
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
{
}
}
} else
{
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
}
return par1ItemStack;
}
@Override
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5)
{
if (!(par3Entity instanceof EntityPlayer))
{
return;
}
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
if (par1ItemStack.stackTagCompound == null)
{
par1ItemStack.setTagCompound(new NBTTagCompound());
}
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
{
List<Entity> list = SpellHelper.getEntitiesInRange(par2World, par3Entity.posX, par3Entity.posY, par3Entity.posZ, 4.5, 4.5);
for(Entity entity : list)
{
if(!entity.equals(par3Entity)&&entity instanceof EntityLiving)
{
((EntityLiving)entity).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionPlanarBinding.id,2,0));
}
}
}
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
{
//par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 2400,99));
if (!par3EntityPlayer.capabilities.isCreativeMode)
{
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed());
}
}
return;
}
}

View file

@ -27,7 +27,6 @@ public class SigilOfElementalAffinity extends EnergyItems
{
super();
this.maxStackSize = 1;
setMaxDamage(100);
setEnergyUsed(200);
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
}

View file

@ -16,6 +16,7 @@ import net.minecraftforge.common.util.Constants;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.ModItems;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import WayofTime.alchemicalWizardry.common.items.IHolding;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -304,6 +305,13 @@ public class SigilOfHolding extends EnergyItems
return false;
}
if(addedItemStack.getItem() instanceof IHolding)
{
inv[candidateSlot] = addedItemStack;
saveInternalInventory(sigilItemStack, inv);
return true;
}
for (ItemStack i : allowedSigils)
{
if (i != null && i.getItem() == item)

View file

@ -0,0 +1,18 @@
package WayofTime.alchemicalWizardry.common.potion;
import net.minecraft.potion.Potion;
public class PotionPlanarBinding extends Potion
{
public PotionPlanarBinding(int par1, boolean par2, int par3)
{
super(par1, par2, par3);
}
@Override
public Potion setIconIndex(int par1, int par2)
{
super.setIconIndex(par1, par2);
return this;
}
}

View file

@ -0,0 +1,49 @@
package WayofTime.alchemicalWizardry.common.renderer.block;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock;
import cpw.mods.fml.client.FMLClientHandler;
public class RenderSpellModifierBlock extends TileEntitySpecialRenderer
{
private ModelSpellModifierBlock modelSpellModifierBlock = new ModelSpellModifierBlock();
@Override
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
{
if (tileEntity instanceof TESpellModifierBlock)
{
TESpellModifierBlock tileSpellBlock = (TESpellModifierBlock) tileEntity;
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
/**
* Render the ghost item inside of the Altar, slowly spinning
*/
GL11.glPushMatrix();
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/BlockSpellModifier.png");
int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
String resource = tileSpellBlock.getResourceLocationForMeta(meta);
test = new ResourceLocation(resource);
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
GL11.glPushMatrix();
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
//A reference to your Model file. Again, very important.
this.modelSpellModifierBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileSpellBlock.getInputDirection(), tileSpellBlock.getOutputDirection());
//Tell it to stop rendering for both the PushMatrix's
GL11.glPopMatrix();
GL11.glPopMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
}
}
}

View file

@ -0,0 +1,49 @@
package WayofTime.alchemicalWizardry.common.renderer.block;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock;
import cpw.mods.fml.client.FMLClientHandler;
public class RenderSpellParadigmBlock extends TileEntitySpecialRenderer
{
private ModelSpellParadigmBlock modelSpellParadigmBlock = new ModelSpellParadigmBlock();
@Override
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
{
if (tileEntity instanceof TESpellParadigmBlock)
{
TESpellParadigmBlock tileSpellBlock = (TESpellParadigmBlock) tileEntity;
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
/**
* Render the ghost item inside of the Altar, slowly spinning
*/
GL11.glPushMatrix();
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/BlockSpellParadigm.png");
int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
String resource = tileSpellBlock.getResourceLocationForMeta(meta);
test = new ResourceLocation(resource);
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
GL11.glPushMatrix();
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
//A reference to your Model file. Again, very important.
this.modelSpellParadigmBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileSpellBlock.getInputDirection(), tileSpellBlock.getOutputDirection());
//Tell it to stop rendering for both the PushMatrix's
GL11.glPopMatrix();
GL11.glPopMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
}
}
}

View file

@ -0,0 +1,108 @@
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.ModBlocks;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock;
import cpw.mods.fml.client.FMLClientHandler;
public class TESpellModifierBlockItemRenderer implements IItemRenderer
{
private ModelSpellModifierBlock modelSpellBlock = new ModelSpellModifierBlock();
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
Tessellator tessellator = Tessellator.instance;
Block block = ModBlocks.blockSpellEffect;
//Icon icon = item.getItem().getIconFromDamage(0);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
/**
* Render the ghost item inside of the Altar, slowly spinning
*/
GL11.glPushMatrix();
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
ResourceLocation test = new ResourceLocation(this.getResourceLocationForMeta(item.getItemDamage()));
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
GL11.glPushMatrix();
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
//A reference to your Model file. Again, very important.
this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP);
//Tell it to stop rendering for both the PushMatrix's
GL11.glPopMatrix();
GL11.glPopMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
}
/**
* IItemRenderer implementation *
*/
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch (type) {
case ENTITY:
return true;
case EQUIPPED:
return true;
case EQUIPPED_FIRST_PERSON:
return true;
case INVENTORY:
return true;
default:
return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return true;
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
switch (type) {
case ENTITY:
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
break;
case EQUIPPED:
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
break;
case EQUIPPED_FIRST_PERSON:
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
break;
case INVENTORY:
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
break;
default:
}
}
public String getResourceLocationForMeta(int meta)
{
switch(meta)
{
case 0: return "alchemicalwizardry:textures/models/SpellModifierDefault.png";
case 1: return "alchemicalwizardry:textures/models/SpellModifierOffensive.png";
case 2: return "alchemicalwizardry:textures/models/SpellModifierDefensive.png";
case 3: return "alchemicalwizardry:textures/models/SpellModifierEnvironmental.png";
}
return "alchemicalwizardry:textures/models/SpellModifierDefault.png";
}
}

View file

@ -0,0 +1,107 @@
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.ModBlocks;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock;
import cpw.mods.fml.client.FMLClientHandler;
public class TESpellParadigmBlockItemRenderer implements IItemRenderer
{
private ModelSpellParadigmBlock modelSpellBlock = new ModelSpellParadigmBlock();
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
Tessellator tessellator = Tessellator.instance;
Block block = ModBlocks.blockSpellEffect;
//Icon icon = item.getItem().getIconFromDamage(0);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
/**
* Render the ghost item inside of the Altar, slowly spinning
*/
GL11.glPushMatrix();
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
ResourceLocation test = new ResourceLocation(this.getResourceLocationForMeta(item.getItemDamage()));
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
GL11.glPushMatrix();
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
//A reference to your Model file. Again, very important.
this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP);
//Tell it to stop rendering for both the PushMatrix's
GL11.glPopMatrix();
GL11.glPopMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
}
/**
* IItemRenderer implementation *
*/
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch (type) {
case ENTITY:
return true;
case EQUIPPED:
return true;
case EQUIPPED_FIRST_PERSON:
return true;
case INVENTORY:
return true;
default:
return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return true;
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
switch (type) {
case ENTITY:
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
break;
case EQUIPPED:
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
break;
case EQUIPPED_FIRST_PERSON:
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
break;
case INVENTORY:
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
break;
default:
}
}
public String getResourceLocationForMeta(int meta)
{
switch(meta)
{
case 0: return "alchemicalwizardry:textures/models/SpellParadigmProjectile.png";
case 1: return "alchemicalwizardry:textures/models/SpellParadigmSelf.png";
case 2: return "alchemicalwizardry:textures/models/SpellParadigmMelee.png";
}
return "alchemicalwizardry:textures/models/SpellParadigmProjectile.png";
}
}

View file

@ -0,0 +1,303 @@
package WayofTime.alchemicalWizardry.common.renderer.model;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraftforge.common.util.ForgeDirection;
public class ModelSpellModifierBlock extends ModelBase
{
//fields
ModelRenderer core;
ModelRenderer inputMain;
ModelRenderer Shape2;
ModelRenderer Shape3;
ModelRenderer Shape4;
ModelRenderer Shape5;
ModelRenderer Shape6;
ModelRenderer Shape7;
ModelRenderer Shape8;
ModelRenderer Shape9;
ModelRenderer outputMain;
ModelRenderer Shape11;
ModelRenderer Shape12;
ModelRenderer Shape13;
ModelRenderer Shape14;
ModelRenderer output1;
ModelRenderer output2;
ModelRenderer output3;
ModelRenderer output4;
public ModelSpellModifierBlock()
{
textureWidth = 64;
textureHeight = 64;
core = new ModelRenderer(this, 0, 0);
core.addBox(-3F, -3F, -3F, 6, 6, 6);
core.setRotationPoint(0F, 16F, 0F);
core.setTextureSize(64, 64);
core.mirror = true;
setRotation(core, 0F, 0F, 0F);
inputMain = new ModelRenderer(this, 25, 18);
inputMain.addBox(-2F, -2F, -8F, 4, 4, 1);
inputMain.setRotationPoint(0F, 16F, 0F);
inputMain.setTextureSize(64, 64);
inputMain.mirror = true;
setRotation(inputMain, 0F, 0F, 0F);
Shape2 = new ModelRenderer(this, 0, 13);
Shape2.addBox(-5F, -5F, -8F, 10, 2, 2);
Shape2.setRotationPoint(0F, 16F, 0F);
Shape2.setTextureSize(64, 64);
Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F);
Shape3 = new ModelRenderer(this, 0, 27);
Shape3.addBox(-5F, 3F, -8F, 10, 2, 2);
Shape3.setRotationPoint(0F, 16F, 0F);
Shape3.setTextureSize(64, 64);
Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F);
Shape4 = new ModelRenderer(this, 16, 18);
Shape4.addBox(3F, -3F, -8F, 2, 6, 2);
Shape4.setRotationPoint(0F, 16F, 0F);
Shape4.setTextureSize(64, 64);
Shape4.mirror = true;
setRotation(Shape4, 0F, 0F, 0F);
Shape5 = new ModelRenderer(this, 0, 18);
Shape5.addBox(-5F, -3F, -8F, 2, 6, 2);
Shape5.setRotationPoint(0F, 16F, 0F);
Shape5.setTextureSize(64, 64);
Shape5.mirror = true;
setRotation(Shape5, 0F, 0F, 0F);
Shape6 = new ModelRenderer(this, 0, 32);
Shape6.addBox(-1F, -6F, -7F, 2, 1, 5);
Shape6.setRotationPoint(0F, 16F, 0F);
Shape6.setTextureSize(64, 64);
Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F);
Shape7 = new ModelRenderer(this, 15, 32);
Shape7.addBox(-2F, -6F, -2F, 4, 1, 4);
Shape7.setRotationPoint(0F, 16F, 0F);
Shape7.setTextureSize(64, 64);
Shape7.mirror = true;
setRotation(Shape7, 0F, 0F, 0F);
Shape8 = new ModelRenderer(this, 15, 39);
Shape8.addBox(-2F, 5F, -2F, 4, 1, 4);
Shape8.setRotationPoint(0F, 16F, 0F);
Shape8.setTextureSize(64, 64);
Shape8.mirror = true;
setRotation(Shape8, 0F, 0F, 0F);
Shape9 = new ModelRenderer(this, 0, 39);
Shape9.addBox(-1F, 5F, -7F, 2, 1, 5);
Shape9.setRotationPoint(0F, 16F, 0F);
Shape9.setTextureSize(64, 64);
Shape9.mirror = true;
setRotation(Shape9, 0F, 0F, 0F);
outputMain = new ModelRenderer(this, 51, 23);
outputMain.addBox(7F, -2F, -2F, 1, 4, 4);
outputMain.setRotationPoint(0F, 16F, 0F);
outputMain.setTextureSize(64, 64);
outputMain.mirror = true;
setRotation(outputMain, 0F, 0F, 0F);
Shape11 = new ModelRenderer(this, 13, 46);
Shape11.addBox(5F, -2F, -2F, 1, 4, 4);
Shape11.setRotationPoint(0F, 16F, 0F);
Shape11.setTextureSize(64, 64);
Shape11.mirror = true;
setRotation(Shape11, 0F, 0F, 0F);
Shape12 = new ModelRenderer(this, 0, 46);
Shape12.addBox(5F, -1F, -7F, 1, 2, 5);
Shape12.setRotationPoint(0F, 16F, 0F);
Shape12.setTextureSize(64, 64);
Shape12.mirror = true;
setRotation(Shape12, 0F, 0F, 0F);
Shape13 = new ModelRenderer(this, 0, 56);
Shape13.addBox(-6F, -1F, -7F, 1, 2, 5);
Shape13.setRotationPoint(0F, 16F, 0F);
Shape13.setTextureSize(64, 64);
Shape13.mirror = true;
setRotation(Shape13, 0F, 0F, 0F);
Shape14 = new ModelRenderer(this, 13, 56);
Shape14.addBox(-6F, -2F, -2F, 1, 4, 4);
Shape14.setRotationPoint(0F, 16F, 0F);
Shape14.setTextureSize(64, 64);
Shape14.mirror = true;
setRotation(Shape14, 0F, 0F, 0F);
output1 = new ModelRenderer(this, 51, 18);
output1.addBox(5F, -5F, -5F, 3, 2, 2);
output1.setRotationPoint(0F, 16F, 0F);
output1.setTextureSize(64, 64);
output1.mirror = true;
setRotation(output1, 0F, 0F, 0F);
output2 = new ModelRenderer(this, 51, 18);
output2.addBox(5F, -5F, 3F, 3, 2, 2);
output2.setRotationPoint(0F, 16F, 0F);
output2.setTextureSize(64, 64);
output2.mirror = true;
setRotation(output2, 0F, 0F, 0F);
output3 = new ModelRenderer(this, 51, 18);
output3.addBox(5F, 3F, -5F, 3, 2, 2);
output3.setRotationPoint(0F, 16F, 0F);
output3.setTextureSize(64, 64);
output3.mirror = true;
setRotation(output3, 0F, 0F, 0F);
output4 = new ModelRenderer(this, 51, 18);
output4.addBox(5F, 3F, 3F, 3, 2, 2);
output4.setRotationPoint(0F, 16F, 0F);
output4.setTextureSize(64, 64);
output4.mirror = true;
setRotation(output4, 0F, 0F, 0F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
float xInputRot = 0.0f;
float yInputRot = 0.0f;
float zInputRot = 0.0f;
float xOutputRot = 0.0f;
float yOutputRot = 0.0f;
float zOutputRot = 0.0f;
switch (input)
{
case NORTH:
xInputRot = 0.0f;
yInputRot = 0.0f;
zInputRot = 0.0f;
break;
case EAST:
xInputRot = 0.0f;
yInputRot = (float) (0.5f * Math.PI);
zInputRot = 0.0f;
break;
case SOUTH:
xInputRot = 0.0f;
yInputRot = (float) (1.0f * Math.PI);
zInputRot = 0.0f;
break;
case WEST:
xInputRot = 0.0f;
yInputRot = (float) (-0.5f * Math.PI);
zInputRot = 0.0f;
break;
case UP:
xInputRot = (float) (-0.5f * Math.PI);
yInputRot = 0.0f;
zInputRot = 0.0f;
break;
case DOWN:
xInputRot = (float) (0.5f * Math.PI);
yInputRot = 0.0f;
zInputRot = 0.0f;
break;
default:
break;
}
switch (output)
{
case NORTH:
xOutputRot = 0.0f;
yOutputRot = (float) (0.5f * Math.PI);
zOutputRot = 0.0f;
break;
case EAST:
xOutputRot = 0.0f;
yOutputRot = (float) (1.0f * Math.PI);
zOutputRot = 0.0f;
break;
case SOUTH:
xOutputRot = 0.0f;
yOutputRot = (float) (-0.5f * Math.PI);
zOutputRot = 0.0f;
break;
case WEST:
xOutputRot = 0.0f;
yOutputRot = 0.0f;
zOutputRot = 0.0f;
break;
case UP:
xOutputRot = 0.0f;
yOutputRot = 0.0f;
zOutputRot = (float) (-0.5f * Math.PI);
break;
case DOWN:
xOutputRot = 0.0f;
yOutputRot = 0.0f;
zOutputRot = (float) (0.5f * Math.PI);
break;
default:
break;
}
this.setRotation(inputMain, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape2, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape3, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape4, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape5, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape6, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape7, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape8, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape9, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape12, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape11, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape13, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape14, xInputRot, yInputRot, zInputRot);
this.setRotation(outputMain, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output1, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output2, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output3, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output4, xOutputRot, yOutputRot, zOutputRot);
core.render(f5);
inputMain.render(f5);
Shape2.render(f5);
Shape3.render(f5);
Shape4.render(f5);
Shape5.render(f5);
Shape6.render(f5);
Shape7.render(f5);
Shape8.render(f5);
Shape9.render(f5);
outputMain.render(f5);
Shape11.render(f5);
Shape12.render(f5);
Shape13.render(f5);
Shape14.render(f5);
output1.render(f5);
output2.render(f5);
output3.render(f5);
output4.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
}
}

View file

@ -0,0 +1,234 @@
package WayofTime.alchemicalWizardry.common.renderer.model;
//Date: 07/03/2014 9:30:25 PM
//Template version 1.1
//Java generated by Techne
//Keep in mind that you still need to fill in some blanks
//- ZeuX
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraftforge.common.util.ForgeDirection;
public class ModelSpellParadigmBlock extends ModelBase
{
//fields
ModelRenderer core;
ModelRenderer outputMain;
ModelRenderer output1;
ModelRenderer output2;
ModelRenderer output3;
ModelRenderer output4;
ModelRenderer Shape1;
ModelRenderer Shape2;
ModelRenderer Shape3;
ModelRenderer Shape4;
ModelRenderer Shape5;
public ModelSpellParadigmBlock()
{
textureWidth = 64;
textureHeight = 64;
core = new ModelRenderer(this, 0, 0);
core.addBox(-3F, -3F, -3F, 6, 6, 6);
core.setRotationPoint(0F, 16F, 0F);
core.setTextureSize(64, 64);
core.mirror = true;
setRotation(core, 0F, 0F, 0F);
outputMain = new ModelRenderer(this, 0, 13);
outputMain.addBox(6F, -2F, -2F, 2, 4, 4);
outputMain.setRotationPoint(0F, 16F, 0F);
outputMain.setTextureSize(64, 64);
outputMain.mirror = true;
setRotation(outputMain, 0F, 0F, 0F);
output1 = new ModelRenderer(this, 0, 22);
output1.addBox(5F, -5F, -5F, 3, 2, 2);
output1.setRotationPoint(0F, 16F, 0F);
output1.setTextureSize(64, 64);
output1.mirror = true;
setRotation(output1, 0F, 0F, 0F);
output2 = new ModelRenderer(this, 0, 22);
output2.addBox(5F, -5F, 3F, 3, 2, 2);
output2.setRotationPoint(0F, 16F, 0F);
output2.setTextureSize(64, 64);
output2.mirror = true;
setRotation(output2, 0F, 0F, 0F);
output3 = new ModelRenderer(this, 0, 22);
output3.addBox(5F, 3F, -5F, 3, 2, 2);
output3.setRotationPoint(0F, 16F, 0F);
output3.setTextureSize(64, 64);
output3.mirror = true;
setRotation(output3, 0F, 0F, 0F);
output4 = new ModelRenderer(this, 0, 22);
output4.addBox(5F, 3F, 3F, 3, 2, 2);
output4.setRotationPoint(0F, 16F, 0F);
output4.setTextureSize(64, 64);
output4.mirror = true;
setRotation(output4, 0F, 0F, 0F);
Shape1 = new ModelRenderer(this, 0, 28);
Shape1.addBox(-5F, -5F, -1F, 10, 1, 2);
Shape1.setRotationPoint(0F, 16F, 0F);
Shape1.setTextureSize(64, 64);
Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F);
Shape2 = new ModelRenderer(this, 25, 28);
Shape2.addBox(-5F, -4F, -4F, 1, 8, 8);
Shape2.setRotationPoint(0F, 16F, 0F);
Shape2.setTextureSize(64, 64);
Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F);
Shape3 = new ModelRenderer(this, 0, 33);
Shape3.addBox(-5F, 4F, -1F, 10, 1, 2);
Shape3.setRotationPoint(0F, 16F, 0F);
Shape3.setTextureSize(64, 64);
Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F);
Shape4 = new ModelRenderer(this, 0, 38);
Shape4.addBox(-5F, -1F, -5F, 10, 2, 1);
Shape4.setRotationPoint(0F, 16F, 0F);
Shape4.setTextureSize(64, 64);
Shape4.mirror = true;
setRotation(Shape4, 0F, 0F, 0F);
Shape5 = new ModelRenderer(this, 0, 43);
Shape5.addBox(-5F, -1F, 4F, 10, 2, 1);
Shape5.setRotationPoint(0F, 16F, 0F);
Shape5.setTextureSize(64, 64);
Shape5.mirror = true;
setRotation(Shape5, 0F, 0F, 0F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
float xInputRot = 0.0f;
float yInputRot = 0.0f;
float zInputRot = 0.0f;
float xOutputRot = 0.0f;
float yOutputRot = 0.0f;
float zOutputRot = 0.0f;
switch (input)
{
case NORTH:
xInputRot = 0.0f;
yInputRot = 0.0f;
zInputRot = 0.0f;
break;
case EAST:
xInputRot = 0.0f;
yInputRot = (float) (0.5f * Math.PI);
zInputRot = 0.0f;
break;
case SOUTH:
xInputRot = 0.0f;
yInputRot = (float) (1.0f * Math.PI);
zInputRot = 0.0f;
break;
case WEST:
xInputRot = 0.0f;
yInputRot = (float) (-0.5f * Math.PI);
zInputRot = 0.0f;
break;
case UP:
xInputRot = (float) (-0.5f * Math.PI);
yInputRot = 0.0f;
zInputRot = 0.0f;
break;
case DOWN:
xInputRot = (float) (0.5f * Math.PI);
yInputRot = 0.0f;
zInputRot = 0.0f;
break;
default:
break;
}
switch (output)
{
case NORTH:
xOutputRot = 0.0f;
yOutputRot = (float) (0.5f * Math.PI);
zOutputRot = 0.0f;
break;
case EAST:
xOutputRot = 0.0f;
yOutputRot = (float) (1.0f * Math.PI);
zOutputRot = 0.0f;
break;
case SOUTH:
xOutputRot = 0.0f;
yOutputRot = (float) (-0.5f * Math.PI);
zOutputRot = 0.0f;
break;
case WEST:
xOutputRot = 0.0f;
yOutputRot = 0.0f;
zOutputRot = 0.0f;
break;
case UP:
xOutputRot = 0.0f;
yOutputRot = 0.0f;
zOutputRot = (float) (-0.5f * Math.PI);
break;
case DOWN:
xOutputRot = 0.0f;
yOutputRot = 0.0f;
zOutputRot = (float) (0.5f * Math.PI);
break;
default:
break;
}
this.setRotation(outputMain, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output1, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output2, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output3, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output4, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(Shape1, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(Shape2, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(Shape3, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(Shape4, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(Shape5, xOutputRot, yOutputRot, zOutputRot);
core.render(f5);
outputMain.render(f5);
output1.render(f5);
output2.render(f5);
output3.render(f5);
output4.render(f5);
Shape1.render(f5);
Shape2.render(f5);
Shape3.render(f5);
Shape4.render(f5);
Shape5.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
}
}

View file

@ -0,0 +1,103 @@
package WayofTime.alchemicalWizardry.common.rituals;
import java.util.List;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.IBindable;
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
public class RitualEffectSummonPlayer extends RitualEffect //Summons a player via the bound item
{
@Override
public void performEffect(TEMasterStone ritualStone)
{
String owner = ritualStone.getOwner();
World worldSave = MinecraftServer.getServer().worldServers[0];
LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner);
if (data == null)
{
data = new LifeEssenceNetwork(owner);
worldSave.setItemData(owner, data);
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
int x = ritualStone.xCoord;
int y = ritualStone.yCoord;
int z = ritualStone.zCoord;
if (ritualStone.getCooldown() > 0)
{
ritualStone.setCooldown(0);
}
if (currentEssence < this.getCostPerRefresh())
{
EntityPlayer entityOwner = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(owner);
if (entityOwner == null)
{
return;
}
entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
} else
{
List<EntityItem> entities = world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x, y + 1, z, x + 1, y + 2, z + 1));
if (entities == null)
{
return;
}
for (EntityItem entityItem : entities)
{
if (entityItem != null && entityItem.getEntityItem().getItem() instanceof IBindable)
{
String str = EnergyItems.getOwnerName(entityItem.getEntityItem());
EntityPlayer entityPlayer = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(str);
if(entityPlayer!=null)
{
entityPlayer.posX = x;
entityPlayer.posY = y+1;
entityPlayer.posZ = z;
if(entityPlayer instanceof EntityPlayerMP)
{
((EntityPlayerMP)entityPlayer).mcServer.getConfigurationManager().transferPlayerToDimension(((EntityPlayerMP)entityPlayer), 0);
}
entityItem.setDead();
data.currentEssence = currentEssence - this.getCostPerRefresh();
data.markDirty();
}
break;
}
}
// EnergyBlastProjectile proj = new EnergyBlastProjectile(world, x, y+20, z);
// proj.motionX = 0.0d;
// proj.motionZ = 0.0d;
// proj.motionY = -1.0d;
// world.spawnEntityInWorld(proj);
}
}
@Override
public int getCostPerRefresh()
{
return 0;
}
}

View file

@ -4,10 +4,17 @@ import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeDefaultEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeDefensiveEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeEnvironmentalEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeOffensiveEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileDefaultEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileDefensiveEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileEnvironmentalEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileOffensiveEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfDefaultEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfDefensiveEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfEnvironmentalEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfOffensiveEarth;
public class SpellEffectEarth extends SpellEffect
{
@ -38,29 +45,25 @@ public class SpellEffectEarth extends SpellEffect
@Override
public void defaultModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
parad.addSelfSpellEffect(new SelfDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
}
@Override
public void offensiveModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
parad.addSelfSpellEffect(new SelfOffensiveEarth(this.powerEnhancement,this.potencyEnhancement, this.costEnhancement));
}
@Override
public void defensiveModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
parad.addSelfSpellEffect(new SelfDefensiveEarth(this.powerEnhancement,this.potencyEnhancement, this.costEnhancement));
}
@Override
public void environmentalModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
parad.addSelfSpellEffect(new SelfEnvironmentalEarth(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
@ -72,22 +75,19 @@ public class SpellEffectEarth extends SpellEffect
@Override
public void offensiveModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addWorldEffect(new MeleeOffensiveEarth(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void defensiveModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addWorldEffect(new MeleeDefensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
}
@Override
public void environmentalModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addWorldEffect(new MeleeEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
}
@Override
@ -100,7 +100,7 @@ public class SpellEffectEarth extends SpellEffect
protected int getCostForOffenseProjectile()
{
return (int)(3*(1.5*this.potencyEnhancement+1)*(Math.pow(1*this.powerEnhancement+1,2))*Math.pow(0.8, costEnhancement));
return (int)(10*(1.5*this.potencyEnhancement+1)*(Math.pow(1*this.powerEnhancement+1,2))*Math.pow(0.8, costEnhancement));
}
@Override
@ -118,22 +118,19 @@ public class SpellEffectEarth extends SpellEffect
@Override
protected int getCostForDefaultSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(20*Math.pow(1.5*powerEnhancement+1,2)*(2*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForOffenseSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(10*Math.pow(2*this.powerEnhancement+1,2)*(this.potencyEnhancement+1));
}
@Override
protected int getCostForDefenseSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(750*(1.1*this.powerEnhancement+1)*(0.5*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override
@ -146,28 +143,24 @@ public class SpellEffectEarth extends SpellEffect
@Override
protected int getCostForDefaultMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(50*Math.pow(1.5*this.potencyEnhancement + 1,3)*(0.5*this.powerEnhancement + 1)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForOffenseMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(20*Math.pow(1.5*this.powerEnhancement+1,3)*(0.25*this.powerEnhancement+1));
}
@Override
protected int getCostForDefenseMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(5*(1.2*this.powerEnhancement+1)*(1.0f/3.0f*Math.pow(this.potencyEnhancement,2)+2+1.0f/2.0f*this.potencyEnhancement)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForEnvironmentMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(500*Math.pow(2*this.potencyEnhancement+1, 3)*(0.25*this.powerEnhancement+1)*Math.pow(0.8, costEnhancement));
}
}

View file

@ -1,5 +1,6 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
@ -16,6 +17,8 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.oredict.OreDictionary;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
public class SpellHelper
@ -201,14 +204,17 @@ public class SpellHelper
if(block==Blocks.stone)
{
world.setBlock(posX, posY, posZ, Blocks.cobblestone);
return;
}
else if(block==Blocks.cobblestone)
{
world.setBlock(posX, posY, posZ, Blocks.gravel);
return;
}
else if(block==Blocks.gravel)
{
world.setBlock(posX, posY, posZ, Blocks.sand);
return;
}
}
@ -226,4 +232,40 @@ public class SpellHelper
world.setBlockToAir(posX, posY, posZ);
}
}
public static ItemStack getDustForOre(ItemStack item)
{
String oreName = OreDictionary.getOreName(OreDictionary.getOreID(item));
if(oreName.contains("ore"))
{
String lowercaseOre = oreName;
lowercaseOre.toLowerCase();
boolean isAllowed = false;
for(String str : AlchemicalWizardry.allowedCrushedOresArray)
{
if(lowercaseOre.contains(str))
{
isAllowed = true;
}
}
if(!isAllowed)
{
return null;
}
String dustName = oreName.replace("ore", "dust");
ArrayList<ItemStack> items = OreDictionary.getOres(dustName);
if(items!=null && items.size()>=1)
{
return(items.get(0).copy());
}
}
return null;
}
}

View file

@ -11,18 +11,17 @@ public abstract class MeleeSpellCenteredWorldEffect extends MeleeSpellWorldEffec
public MeleeSpellCenteredWorldEffect(int power, int potency, int cost)
{
super(power, potency, cost);
range = 0;
}
@Override
public void onWorldEffect(World world, EntityPlayer entityPlayer)
{
Vec3 lookVec = entityPlayer.getLook(range);
int x = (int)(entityPlayer.posX + lookVec.xCoord);
int y = (int)(entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord);
int z = (int)(entityPlayer.posZ + lookVec.zCoord);
Vec3 lookVec = entityPlayer.getLook(range).normalize();
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(world, x, y, z);
this.onCenteredWorldEffect(entityPlayer, world, x, y, z);
}
public void setRange(float range)
@ -30,5 +29,5 @@ public abstract class MeleeSpellCenteredWorldEffect extends MeleeSpellWorldEffec
this.range = range;
}
public abstract void onCenteredWorldEffect(World world, int posX, int posY, int posZ);
public abstract void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ);
}

View file

@ -2,6 +2,7 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.e
import net.minecraft.block.Block;
import net.minecraft.entity.item.EntityFallingBlock;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
@ -10,17 +11,19 @@ public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect
public MeleeDefaultEarth(int power, int potency, int cost)
{
super(power, potency, cost);
this.setRange(2);
this.setRange(3*power + 2);
}
@Override
public void onCenteredWorldEffect(World world, int posX, int posY, int posZ)
public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ)
{
for(int i=-3; i<=3; i++)
int radius = this.potencyUpgrades;
for(int i=-radius; i<=radius; i++)
{
for(int j=-3; j<=3; j++)
for(int j=-radius; j<=radius; j++)
{
for(int k=-3; k<=3; k++)
for(int k=-radius; k<=radius; k++)
{
if(!world.isAirBlock(posX + i, posY + j, posZ + k) && world.getTileEntity(posX + i, posY + j, posZ + k)==null)
{

View file

@ -0,0 +1,39 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.block.Block;
import net.minecraft.entity.item.EntityFallingBlock;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
public class MeleeDefensiveEarth extends MeleeSpellCenteredWorldEffect
{
public MeleeDefensiveEarth(int power, int potency, int cost)
{
super(power, potency, cost);
this.setRange(3*power+2);
}
@Override
public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ)
{
ForgeDirection dir = SpellHelper.getDirectionForLookVector(player.getLook(1));
int vertRadius = (int)(2 + 1.0f/2.0f*Math.pow(this.potencyUpgrades,2)+1.0f/2.0f*this.potencyUpgrades);
int horizRadius = this.potencyUpgrades+1;
int xOff = dir.offsetX;
int zOff = dir.offsetZ;
for(int i=-horizRadius; i<=horizRadius; i++)
{
for(int j=0; j<vertRadius; j++)
{
BlockTeleposer.swapBlocks(world, world, posX + i*zOff, posY + j, posZ + i*xOff, posX + i*zOff, posY + j - vertRadius, posZ + i*xOff);
}
}
}
}

View file

@ -0,0 +1,47 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
public class MeleeEnvironmentalEarth extends MeleeSpellCenteredWorldEffect
{
public MeleeEnvironmentalEarth(int power, int potency, int cost)
{
super(power, potency, cost);
this.setRange(3*power + 2);
}
@Override
public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ)
{
int radius = this.potencyUpgrades;
for(int i=-radius; i<=radius; i++)
{
for(int j=-radius; j<=radius; j++)
{
for(int k=-radius; k<=radius; k++)
{
if(!world.isAirBlock(posX + i, posY + j, posZ + k) && world.getTileEntity(posX + i, posY + j, posZ + k)==null)
{
ItemStack stack = new ItemStack(world.getBlock(posX+i, posY+j, posZ+k),1,world.getBlockMetadata(posX+i, posY+j, posZ+k));
ItemStack dustStack = SpellHelper.getDustForOre(stack);
if(dustStack!=null)
{
dustStack.stackSize *= 3;
world.spawnEntityInWorld(new EntityItem(world,posX,posY,posZ,dustStack));
world.setBlockToAir(posX+i, posY+j, posZ+k);
}
}
}
}
}
}
}

View file

@ -0,0 +1,34 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
public class MeleeOffensiveEarth extends MeleeSpellCenteredWorldEffect
{
public MeleeOffensiveEarth(int power, int potency, int cost)
{
super(power, potency, cost);
this.setRange(3*power + 2);
}
@Override
public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ)
{
int radius = this.potencyUpgrades;
for(int i=-radius; i<=radius; i++)
{
for(int j=-radius; j<=radius; j++)
{
for(int k=-radius; k<=radius; k++)
{
SpellHelper.smashBlock(world, posX+i, posY+j, posZ+k);
}
}
}
}
}

View file

@ -0,0 +1,51 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
public class SelfDefaultEarth extends SelfSpellEffect
{
public SelfDefaultEarth(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onSelfUse(World world, EntityPlayer player)
{
int horizRadius = this.powerUpgrades;
int vertRange = 5 + 10*this.potencyUpgrades;
Vec3 blockVec = SpellHelper.getEntityBlockVector(player);
int posX = (int)(blockVec.xCoord);
int posY = (int)(blockVec.yCoord) - 1;
int posZ = (int)(blockVec.zCoord);
for(int i=-horizRadius; i<=horizRadius; i++)
{
for(int k=-horizRadius; k<=horizRadius; k++)
{
if(!world.isAirBlock(posX+i, posY, posZ+k))
{
continue;
}
for(int j=-1; j>=-vertRange; j--)
{
if(!world.isAirBlock(posX+i, posY+j, posZ+k)&&!SpellHelper.isBlockFluid(world.getBlock(posX+i, posY+j, posZ+k)))
{
BlockTeleposer.swapBlocks(world, world, posX+i, posY, posZ+k, posX+i, posY+j, posZ+k);
break;
}
}
}
}
}
}

View file

@ -0,0 +1,27 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
public class SelfDefensiveEarth extends SelfSpellEffect
{
public SelfDefensiveEarth(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onSelfUse(World world, EntityPlayer player)
{
int pot = 2*this.potencyUpgrades + 1;
int duration = 20*60*(this.powerUpgrades+1);
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id,duration, pot));
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, duration, pot));
}
}

View file

@ -0,0 +1,45 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
public class SelfEnvironmentalEarth extends SelfSpellEffect
{
public SelfEnvironmentalEarth(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onSelfUse(World world, EntityPlayer player)
{
int horizRadius = this.powerUpgrades + 1;
int vertRadius = this.potencyUpgrades + 2;
Vec3 blockVec = SpellHelper.getEntityBlockVector(player);
int posX = (int)(blockVec.xCoord);
int posY = (int)(blockVec.yCoord);
int posZ = (int)(blockVec.zCoord);
for(int i=-horizRadius; i<=horizRadius; i++)
{
for(int j=0; j<vertRadius; j++)
{
for(int k=-horizRadius; k<=horizRadius; k++)
{
// if(k==0&&i==0)
// {
// continue;
// }
BlockTeleposer.swapBlocks(world, world, posX + i, posY + j, posZ+k, posX+i, posY+j-vertRadius, posZ+k);
}
}
}
}
}

View file

@ -0,0 +1,43 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
public class SelfOffensiveEarth extends SelfSpellEffect
{
public SelfOffensiveEarth(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onSelfUse(World world, EntityPlayer player)
{
int horizRadius = this.powerUpgrades;
int vertRadius = this.potencyUpgrades + 1;
Vec3 blockVec = SpellHelper.getEntityBlockVector(player);
int posX = (int)(blockVec.xCoord);
int posY = (int)(blockVec.yCoord);
int posZ = (int)(blockVec.zCoord);
for(int i=-horizRadius; i<=horizRadius; i++)
{
for(int j=-vertRadius; j<0; j++)
{
for(int k=-horizRadius; k<=horizRadius; k++)
{
if(world.rand.nextFloat()<0.7f)
{
SpellHelper.smashBlock(world, posX+i, posY+j, posZ+k);
}
}
}
}
}
}

View file

@ -16,6 +16,6 @@ public class SelfOffensiveFire extends SelfSpellEffect
@Override
public void onSelfUse(World world, EntityPlayer player)
{
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFlameCloak.id,(this.powerUpgrades+1)*this.powerUpgrades,this.potencyUpgrades));
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFlameCloak.id,200*(this.powerUpgrades+1)*(this.powerUpgrades+1),this.potencyUpgrades));
}
}

View file

@ -13,6 +13,7 @@ public class TEMasterStone extends TileEntity
private int currentRitual;
private boolean isActive;
private String owner;
private String varString1;
private int cooldown;
private int var1;
private int direction;
@ -37,6 +38,7 @@ public class TEMasterStone extends TileEntity
cooldown = par1NBTTagCompound.getInteger("cooldown");
var1 = par1NBTTagCompound.getInteger("var1");
direction = par1NBTTagCompound.getInteger("direction");
varString1 = par1NBTTagCompound.getString("varString1");
}
@Override
@ -49,6 +51,7 @@ public class TEMasterStone extends TileEntity
par1NBTTagCompound.setInteger("cooldown", cooldown);
par1NBTTagCompound.setInteger("var1", var1);
par1NBTTagCompound.setInteger("direction", direction);
par1NBTTagCompound.setString(varString1, "varString1");
}
public void activateRitual(World world, int crystalLevel)
@ -180,6 +183,16 @@ public class TEMasterStone extends TileEntity
{
return this.var1;
}
public void setVarString1(String newVar)
{
this.varString1 = newVar;
}
public String getVarString1()
{
return this.varString1;
}
public void setActive(boolean active)
{

View file

@ -65,7 +65,41 @@ public class TESpellEnhancementBlock extends TESpellBlock
public int getLimit()
{
return 5;
int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
switch(meta)
{
case 0:
return 1;
case 1:
return 2;
case 2:
return 3;
case 3:
return 4;
case 4:
return 5;
case 5:
return 1;
case 6:
return 2;
case 7:
return 3;
case 8:
return 4;
case 9:
return 5;
case 10:
return 1;
case 11:
return 2;
case 12:
return 3;
case 13:
return 4;
case 14:
return 5;
}
return 0;
}
public int enhancementType() //0 is power, 1 is cost, 2 is potency

View file

@ -27,4 +27,17 @@ public class TESpellModifierBlock extends TESpellBlock
}
return new SpellModifierDefault();
}
@Override
public String getResourceLocationForMeta(int meta)
{
switch(meta)
{
case 0: return "alchemicalwizardry:textures/models/SpellModifierDefault.png";
case 1: return "alchemicalwizardry:textures/models/SpellModifierOffensive.png";
case 2: return "alchemicalwizardry:textures/models/SpellModifierDefensive.png";
case 3: return "alchemicalwizardry:textures/models/SpellModifierEnvironmental.png";
}
return "alchemicalwizardry:textures/models/SpellModifierDefault.png";
}
}

View file

@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.tileEntity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigm;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile;
@ -68,5 +69,27 @@ public class TESpellParadigmBlock extends TESpellBlock
}
@Override
public String getResourceLocationForMeta(int meta)
{
switch(meta)
{
case 0: return "alchemicalwizardry:textures/models/SpellParadigmProjectile.png";
case 1: return "alchemicalwizardry:textures/models/SpellParadigmSelf.png";
case 2: return "alchemicalwizardry:textures/models/SpellParadigmMelee.png";
}
return "alchemicalwizardry:textures/models/SpellParadigmProjectile.png";
}
@Override
public void setInputDirection(ForgeDirection direction)
{
}
@Override
public ForgeDirection getInputDirection()
{
return ForgeDirection.UNKNOWN;
}
}

Binary file not shown.

After

(image error) Size: 522 B

Binary file not shown.

After

(image error) Size: 327 B

Binary file not shown.

After

(image error) Size: 502 B

Binary file not shown.

After

(image error) Size: 454 B

Binary file not shown.

After

(image error) Size: 237 B

Binary file not shown.

After

(image error) Size: 370 B

Binary file not shown.

After

(image error) Size: 488 B

Binary file not shown.

After

(image error) Size: 488 B

Binary file not shown.

After

(image error) Size: 551 B

Binary file not shown.

After

(image error) Size: 291 B

Binary file not shown.

After

(image error) Size: 284 B

Binary file not shown.

After

(image error) Size: 461 B

Binary file not shown.

After

(image error) Size: 353 B

Binary file not shown.

After

(image error) Size: 290 B

Binary file not shown.

After

(image error) Size: 306 B

Binary file not shown.

After

(image error) Size: 478 B

Binary file not shown.

After

(image error) Size: 420 B

Binary file not shown.

After

(image error) Size: 481 B

Binary file not shown.

After

(image error) Size: 433 B

Binary file not shown.

After

(image error) Size: 308 B

Binary file not shown.

After

(image error) Size: 316 B

Binary file not shown.

After

(image error) Size: 1.2 KiB

Binary file not shown.

After

(image error) Size: 1.6 KiB

Binary file not shown.

After

(image error) Size: 1.4 KiB

Binary file not shown.

After

(image error) Size: 1.3 KiB

Binary file not shown.

After

(image error) Size: 1.2 KiB

Binary file not shown.

After

(image error) Size: 1.2 KiB

Binary file not shown.

After

(image error) Size: 1.2 KiB

View file

@ -1,5 +0,0 @@
commands.forge.usage=Use /forge <subcommand>. Subcommands are tps, track
commands.forge.usage.tracking=Use /forge track <type> <duration>. Valid types are te (Tile Entities). Duration is < 60.
commands.forge.tps.summary=%s : Mean tick time: %d ms. Mean TPS: %d
commands.forge.tracking.te.enabled=Tile Entity tracking enabled for %d seconds.

View file

@ -22,7 +22,6 @@ import net.minecraftforge.oredict.OreDictionary;
import thaumcraft.api.ItemApi;
import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks;
import WayofTime.alchemicalWizardry.common.AlchemicalWizardryFuelHandler;
import WayofTime.alchemicalWizardry.common.AlchemicalWizardryTickHandler;
import WayofTime.alchemicalWizardry.common.CommonProxy;
import WayofTime.alchemicalWizardry.common.EntityAirElemental;
import WayofTime.alchemicalWizardry.common.LifeBucketHandler;
@ -30,10 +29,13 @@ import WayofTime.alchemicalWizardry.common.ModLivingDropsEvent;
import WayofTime.alchemicalWizardry.common.PacketHandler;
import WayofTime.alchemicalWizardry.common.PotionBoost;
import WayofTime.alchemicalWizardry.common.PotionDrowning;
import WayofTime.alchemicalWizardry.common.PotionFireFuse;
import WayofTime.alchemicalWizardry.common.PotionFlameCloak;
import WayofTime.alchemicalWizardry.common.PotionFlight;
import WayofTime.alchemicalWizardry.common.PotionHeavyHeart;
import WayofTime.alchemicalWizardry.common.PotionIceCloak;
import WayofTime.alchemicalWizardry.common.PotionInhibit;
import WayofTime.alchemicalWizardry.common.PotionPlanarBinding;
import WayofTime.alchemicalWizardry.common.PotionProjectileProtect;
import WayofTime.alchemicalWizardry.common.PotionReciprocation;
import WayofTime.alchemicalWizardry.common.alchemy.AlchemicalPotionCreationHandler;
@ -62,7 +64,6 @@ import WayofTime.alchemicalWizardry.common.items.ItemSpellEnhancementBlock;
import WayofTime.alchemicalWizardry.common.items.ItemSpellModifierBlock;
import WayofTime.alchemicalWizardry.common.items.ItemSpellParadigmBlock;
import WayofTime.alchemicalWizardry.common.items.LifeBucket;
import WayofTime.alchemicalWizardry.common.items.forestry.ItemBloodFrame;
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding;
import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour;
import WayofTime.alchemicalWizardry.common.rituals.Rituals;
@ -107,10 +108,8 @@ import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.common.registry.TickRegistry;
import cpw.mods.fml.relauncher.Side;
@Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v0.7.3c")
@Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v0.7.3e")
@NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = {"BloodAltar", "particle", "SetLifeEssence", "GetLifeEssence", "Ritual", "GetAltarEssence", "TESocket", "TEWritingTable", "CustomParticle", "SetPlayerVel", "SetPlayerPos", "TEPedestal", "TEPlinth", "TETeleposer", "InfiniteLPPath", "TEOrientor"}, packetHandler = PacketHandler.class)
public class AlchemicalWizardry
@ -124,6 +123,8 @@ public class AlchemicalWizardry
public static int ironBlockMeteorRadius;
public static String[] netherStarMeteorArray;
public static int netherStarMeteorRadius;
public static String[] allowedCrushedOresArray;
public static Potion customPotionDrowning;
public static Potion customPotionBoost;
@ -133,6 +134,9 @@ public class AlchemicalWizardry
public static Potion customPotionReciprocation;
public static Potion customPotionFlameCloak;
public static Potion customPotionIceCloak;
public static Potion customPotionHeavyHeart;
public static Potion customPotionFireFuse;
public static Potion customPotionPlanarBinding;
public static int customPotionDrowningID;
public static int customPotionBoostID;
@ -142,6 +146,9 @@ public class AlchemicalWizardry
public static int customPotionReciprocationID;
public static int customPotionFlameCloakID;
public static int customPotionIceCloakID;
public static int customPotionHeavyHeartID;
public static int customPotionFireFuseID;
public static int customPotionPlanarBindingID;
public static boolean isThaumcraftLoaded;
public static boolean isForestryLoaded;
@ -274,6 +281,8 @@ public class AlchemicalWizardry
public static int itemBloodLightSigilItemID;
public static int itemComplexSpellCrystalItemID;
public static int itemBloodFrameItemID;
public static int baseComponentsItemID;
public static int baseAlchemyComponentsItemID;
public static int testingBlockBlockID;
public static int lifeEssenceFlowingBlockID;
@ -392,7 +401,7 @@ public class AlchemicalWizardry
ItemStack lavaBucketStack = new ItemStack(Item.bucketLava);
ItemStack cobblestoneStack = new ItemStack(Block.cobblestone);
ItemStack glassStack = new ItemStack(Block.glass, 1, craftingConstant);
ItemStack ironStack = new ItemStack(Item.ingotIron);
ItemStack ironIngotStack = new ItemStack(Item.ingotIron);
ItemStack diamondStack = new ItemStack(Item.diamond, 1, craftingConstant);
ItemStack woolStack = new ItemStack(Block.cloth);
ItemStack goldNuggetStack = new ItemStack(Item.goldNugget);
@ -495,18 +504,18 @@ public class AlchemicalWizardry
ItemStack magicalesStack = new ItemStack(ModItems.magicales);
//All crafting goes here
// GameRegistry.addRecipe(orbOfTestingStack, "x x", " ", "x x", 'x', cobblestoneStack);
//GameRegistry.addRecipe(glassShardStack, " x", "y ", 'x', ironStack, 'y', glassStack);
//GameRegistry.addRecipe(glassShardStack, " x", "y ", 'x', ironIngotStack, 'y', glassStack);
//GameRegistry.addRecipe(weakBloodOrbStackCrafted, "xxx", "xdx", "www", 'x', bloodiedShardStack, 'd', diamondStack, 'w', woolStack);
GameRegistry.addRecipe(sacrificialDaggerStack, "ggg", " dg", "i g", 'g', glassStack, 'd', goldIngotStack, 'i', ironStack);
//GameRegistry.addRecipe(blankSlateStack, "sgs", "gig", "sgs", 's', stoneStack, 'g', goldNuggetStack, 'i', ironStack);
//GameRegistry.addRecipe(reinforcedSlateStack, "rir", "ibi", "gig", 'r', redstoneStack, 'i', ironStack, 'b', blankSlateStack, 'g', glowstoneBlockStack);
GameRegistry.addRecipe(sacrificialDaggerStack, "ggg", " dg", "i g", 'g', glassStack, 'd', goldIngotStack, 'i', ironIngotStack);
//GameRegistry.addRecipe(blankSlateStack, "sgs", "gig", "sgs", 's', stoneStack, 'g', goldNuggetStack, 'i', ironIngotStack);
//GameRegistry.addRecipe(reinforcedSlateStack, "rir", "ibi", "gig", 'r', redstoneStack, 'i', ironIngotStack, 'b', blankSlateStack, 'g', glowstoneBlockStack);
GameRegistry.addRecipe(lavaCrystalStackCrafted, "glg", "lbl", "odo", 'g', glassStack, 'l', lavaBucketStack, 'b', weakBloodOrbStack, 'd', diamondStack, 'o', obsidianStack);
GameRegistry.addRecipe(waterSigilStackCrafted, "www", "wbw", "wow", 'w', waterBucketStack, 'b', blankSlateStack, 'o', weakBloodOrbStack);
GameRegistry.addRecipe(lavaSigilStackCrafted, "lml", "lbl", "lcl", 'l', lavaBucketStack, 'b', blankSlateStack, 'm', magmaCreamStack, 'c', lavaCrystalStack);
GameRegistry.addRecipe(voidSigilStackCrafted, "ese", "ere", "eoe", 'e', emptyBucketStack, 'r', reinforcedSlateStack, 'o', apprenticeBloodOrbStack, 's', stringStack);
GameRegistry.addRecipe(bloodAltarStack, "s s", "scs", "gdg", 's', stoneStack, 'c', furnaceStack, 'd', diamondStack, 'g', goldIngotStack);
//GameRegistry.addRecipe(energySwordStack, " o ", " o ", " s ", 'o', weakBloodOrbStack, 's', diamondSwordStack);
//GameRegistry.addRecipe(energyBlasterStack, "oi ", "gdi", " rd", 'o', weakBloodOrbStack, 'i', ironStack, 'd', diamondStack, 'r', reinforcedSlateStack, 'g', goldIngotStack);
//GameRegistry.addRecipe(energyBlasterStack, "oi ", "gdi", " rd", 'o', weakBloodOrbStack, 'i', ironIngotStack, 'd', diamondStack, 'r', reinforcedSlateStack, 'g', goldIngotStack);
GameRegistry.addRecipe(bloodRuneCraftedStack, "sss", "ror", "sss", 's', stoneStack, 'o', weakBloodOrbStack, 'r', blankSlateStack);
GameRegistry.addRecipe(speedRuneStack, "sbs", "uru", "sbs", 'u', sugarStack, 's', stoneStack, 'r', bloodRuneStack, 'b', blankSlateStack);
//GameRegistry.addRecipe(efficiencyRuneStack, "sbs", "rur", "sbs", 'r', redstoneStack, 's', stoneStack, 'u', bloodRuneStack,'b',blankSlateStack);
@ -562,6 +571,10 @@ public class AlchemicalWizardry
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"));
//All items registered go here
//LanguageRegistry.addName(orbOfTesting, "Orb of Testing");
LanguageRegistry.addName(ModItems.weakBloodOrb, "Weak Blood Orb");
@ -902,6 +915,56 @@ public class AlchemicalWizardry
MeteorRegistry.registerMeteorParadigm(stoneStack, this.stoneMeteorArray, this.stoneMeteorRadius);
MeteorRegistry.registerMeteorParadigm(ironBlockStack, this.ironBlockMeteorArray, this.ironBlockMeteorRadius);
MeteorRegistry.registerMeteorParadigm(new ItemStack(Item.netherStar), this.netherStarMeteorArray, this.netherStarMeteorRadius);
//Register spell component recipes
ItemStack quartzRodStack = new ItemStack(ModItems.baseItems,1,0);
ItemStack emptyCoreStack = new ItemStack(ModItems.baseItems,1,1);
ItemStack magicalesCableStack = new ItemStack(ModItems.baseItems,1,2);
ItemStack woodBraceStack = new ItemStack(ModItems.baseItems,1,3);
ItemStack stoneBraceStack = new ItemStack(ModItems.baseItems,1,4);
ItemStack projectileCoreStack = new ItemStack(ModItems.baseItems,1,5);
ItemStack selfCoreStack = new ItemStack(ModItems.baseItems,1,6);
ItemStack meleeCoreStack = new ItemStack(ModItems.baseItems,1,7);
ItemStack paradigmBackPlateStack = new ItemStack(ModItems.baseItems,1,8);
ItemStack outputCableStack = new ItemStack(ModItems.baseItems,1,9);
ItemStack flameCoreStack = new ItemStack(ModItems.baseItems,1,10);
ItemStack iceCoreStack = new ItemStack(ModItems.baseItems,1,11);
ItemStack windCoreStack = new ItemStack(ModItems.baseItems,1,12);
ItemStack earthCoreStack = new ItemStack(ModItems.baseItems,1,13);
ItemStack inputCableStack = new ItemStack(ModItems.baseItems,1,14);
ItemStack magicalesCraftedCableStack = new ItemStack(ModItems.baseItems,5,2);
GameRegistry.addRecipe(quartzRodStack, "qqq", 'q', new ItemStack(Item.netherQuartz));
GameRegistry.addRecipe(emptyCoreStack,"gig","nrn","gig",'n',goldIngotStack,'i',ironIngotStack,'g',glassStack,'r',simpleCatalystStack);
GameRegistry.addRecipe(magicalesCraftedCableStack,"sss","mmm","sss",'s',new ItemStack(Item.silk),'m',magicalesStack);
GameRegistry.addRecipe(woodBraceStack," il","ili","li ",'l', new ItemStack(Block.wood,1,craftingConstant),'i',new ItemStack(Item.silk));
GameRegistry.addRecipe(stoneBraceStack," is","isi","si ",'i', ironIngotStack,'s',reinforcedSlateStack);
GameRegistry.addRecipe(projectileCoreStack, "mbm","aca","mom",'c', emptyCoreStack,'b',weakBloodShardStack,'m', magicalesStack,'o', magicianBloodOrbStack,'a',new ItemStack(Item.arrow));
GameRegistry.addRecipe(selfCoreStack,"sbs","ncn","sos",'c', emptyCoreStack, 's',sanctusStack,'b', weakBloodShardStack,'o', magicianBloodOrbStack,'n',glowstoneDustStack);
GameRegistry.addRecipe(meleeCoreStack,"sbs","ncn","sos",'c', emptyCoreStack, 's',incendiumStack,'b', weakBloodShardStack,'o', magicianBloodOrbStack,'n',new ItemStack(Item.flintAndSteel));
GameRegistry.addRecipe(paradigmBackPlateStack,"isi","rgr","isi",'i',ironIngotStack,'r',stoneStack,'g',goldIngotStack,'s',reinforcedSlateStack);
GameRegistry.addRecipe(outputCableStack, " si","s c"," si",'s',stoneStack,'i',ironIngotStack,'c',simpleCatalystStack);
GameRegistry.addRecipe(flameCoreStack,"mdm","scs","mom",'m',incendiumStack,'c',emptyCoreStack,'o',magicianBloodOrbStack,'d',diamondStack,'s',weakBloodShardStack);
GameRegistry.addRecipe(iceCoreStack,"mdm","scs","mom",'m',crystallosStack,'c',emptyCoreStack,'o',magicianBloodOrbStack,'d',diamondStack,'s',weakBloodShardStack);
GameRegistry.addRecipe(windCoreStack,"mdm","scs","mom",'m',aetherStack,'c',emptyCoreStack,'o',magicianBloodOrbStack,'d',diamondStack,'s',weakBloodShardStack);
GameRegistry.addRecipe(earthCoreStack,"mdm","scs","mom",'m',terraeStack,'c',emptyCoreStack,'o',magicianBloodOrbStack,'d',diamondStack,'s',weakBloodShardStack);
GameRegistry.addRecipe(inputCableStack, "ws ","rcs","ws ",'w',blankSlateStack,'s',stoneStack,'r',imbuedSlateStack,'c',simpleCatalystStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockConduit,1,0),"q q","ccc","q q",'q', quartzRodStack,'c', magicalesCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm,1,0),"gb ","pcw","gb ",'p',paradigmBackPlateStack,'c', projectileCoreStack,'g',goldIngotStack,'b',stoneBraceStack,'w',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm,1,1),"gb ","pcw","gb ",'p',paradigmBackPlateStack,'c', selfCoreStack,'g',goldIngotStack,'b',stoneBraceStack,'w',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm,1,2),"gb ","pcw","gb ",'p',paradigmBackPlateStack,'c', meleeCoreStack,'g',goldIngotStack,'b',stoneBraceStack,'w',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect,1,0),"bgb","ico","bgb",'c',flameCoreStack,'b',stoneBraceStack,'g',goldIngotStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect,1,1),"bgb","ico","bgb",'c',iceCoreStack,'b',stoneBraceStack,'g',goldIngotStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect,1,2),"bgb","ico","bgb",'c',windCoreStack,'b',stoneBraceStack,'g',goldIngotStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect,1,3),"bgb","ico","bgb",'c',earthCoreStack,'b',stoneBraceStack,'g',goldIngotStack,'i',inputCableStack,'o',outputCableStack);
// sanguineHelmet = new ItemSanguineArmour(sanguineHelmetItemID).setUnlocalizedName("sanguineHelmet");
//
// LanguageRegistry.addName(sanguineHelmet,"Sanguine Helmet");

View file

@ -46,6 +46,9 @@ public class BloodMagicConfiguration
AlchemicalWizardry.customPotionReciprocationID = config.get("Potion ID", "Reciprocation", 105).getInt();
AlchemicalWizardry.customPotionFlameCloakID = config.get("Potion ID","FlameCloak",106).getInt();
AlchemicalWizardry.customPotionIceCloakID = config.get("Potion ID","IceCloak",107).getInt();
AlchemicalWizardry.customPotionHeavyHeartID = config.get("Potion ID","HeavyHeart",108).getInt();
AlchemicalWizardry.customPotionFireFuseID = config.get("Potion ID","FireFuse",109).getInt();
AlchemicalWizardry.customPotionPlanarBindingID = config.get("Potion ID","PlanarBinding",110).getInt();
MeteorParadigm.maxChance = config.get("meteor", "maxChance", 1000).getInt();
AlchemicalWizardry.doMeteorsDestroyBlocks = config.get("meteor", "doMeteorsDestroyBlocks", true).getBoolean(true);
@ -58,6 +61,8 @@ public class BloodMagicConfiguration
AlchemicalWizardry.netherStarMeteorArray = config.get("meteor", "netherStarMeteor", new String[]{"oreDiamond", "150", "oreEmerald", "100", "oreQuartz", "250", "oreSunstone", "5", "oreMoonstone", "50", "oreIridium", "5", "oreCertusQuartz", "150"}).getStringList();
AlchemicalWizardry.netherStarMeteorRadius = config.get("meteor", "netherStarMeteorRadius", 3).getInt();
AlchemicalWizardry.allowedCrushedOresArray = config.get("oreCrushing", "allowedOres", new String[]{"iron","gold","copper","tin","lead","silver","osmium"}).getStringList();
AlchemicalWizardry.testingBlockBlockID = config.getBlock("TestingBlock", 1400).getInt();
AlchemicalWizardry.lifeEssenceFlowingBlockID = config.getBlock("LifeEssenceFlowing", 1401).getInt();
AlchemicalWizardry.lifeEssenceStillBlockID = config.getBlock("LifeEssenceStill", 1402).getInt();
@ -176,6 +181,8 @@ public class BloodMagicConfiguration
AlchemicalWizardry.sigilOfMagnetismItemID = config.getItem("SigilOfMagnetism", 17080).getInt();
AlchemicalWizardry.itemComplexSpellCrystalItemID = config.getItem("ComplexSpellCrystal",17081).getInt();
AlchemicalWizardry.itemBloodFrameItemID = config.getItem("BloodFrame", 17082).getInt();
AlchemicalWizardry.baseComponentsItemID = config.getItem("BaseComponents", 17083).getInt();
AlchemicalWizardry.baseAlchemyComponentsItemID = config.getItem("BaseAlchemyComponents", 17084).getInt();
} catch (Exception e)
{

View file

@ -90,6 +90,9 @@ public class ModItems
public static Item armourInhibitor;
public static Item creativeFiller;
public static Item demonPlacer;
public static Item baseItems;
public static Item baseAlchemyItems;
public static Item weakFillingAgent;
public static Item standardFillingAgent;
@ -185,5 +188,7 @@ public class ModItems
energyBazooka = new EnergyBazooka(AlchemicalWizardry.energyBazookaItemID).setUnlocalizedName("energyBazooka");
itemBloodLightSigil = new ItemBloodLightSigil(AlchemicalWizardry.itemBloodLightSigilItemID).setUnlocalizedName("bloodLightSigil");
itemComplexSpellCrystal = new ItemComplexSpellCrystal(AlchemicalWizardry.itemComplexSpellCrystalItemID).setUnlocalizedName("itemComplexSpellCrystal");
baseItems = new ItemComponents(AlchemicalWizardry.baseComponentsItemID).setUnlocalizedName("baseItems");
baseAlchemyItems = new ItemAlchemyBase(AlchemicalWizardry.baseAlchemyComponentsItemID).setUnlocalizedName("baseAlchemyItems");
}
}

View file

@ -1,5 +1,6 @@
package WayofTime.alchemicalWizardry.client;
import net.minecraft.item.ItemBlock;
import net.minecraft.world.World;
import net.minecraftforge.client.MinecraftForgeClient;
import WayofTime.alchemicalWizardry.ModBlocks;
@ -25,11 +26,17 @@ import WayofTime.alchemicalWizardry.common.renderer.block.RenderConduit;
import WayofTime.alchemicalWizardry.common.renderer.block.RenderPedestal;
import WayofTime.alchemicalWizardry.common.renderer.block.RenderPlinth;
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.TEAltarItemRenderer;
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEConduitItemRenderer;
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellEffectBlockItemRenderer;
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellEnhancementBlockItemRenderer;
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellModifierBlockItemRenderer;
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellParadigmBlockItemRenderer;
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderBileDemon;
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderBoulderFist;
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderElemental;
@ -57,6 +64,9 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit;
import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal;
import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth;
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;
@ -108,10 +118,15 @@ public class ClientProxy extends CommonProxy
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());
//Item Renderer stuff
MinecraftForgeClient.registerItemRenderer(ModBlocks.blockConduit.blockID, new TEConduitItemRenderer());
MinecraftForgeClient.registerItemRenderer(ModBlocks.blockSpellEffect.blockID, new TESpellEffectBlockItemRenderer());
MinecraftForgeClient.registerItemRenderer(ModBlocks.blockSpellEnhancement.blockID, new TESpellEnhancementBlockItemRenderer());
MinecraftForgeClient.registerItemRenderer(ModBlocks.blockSpellParadigm.blockID, new TESpellParadigmBlockItemRenderer());
MinecraftForgeClient.registerItemRenderer(ModBlocks.blockSpellModifier.blockID, new TESpellModifierBlockItemRenderer());
//RenderingRegistry.registerEntityRenderingHandler(FireProjectile.class, new RenderFireProjectile());
//RenderingRegistry.registerBlockHandler(new AltarRenderer());
}

View file

@ -10,21 +10,19 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.IProjectile;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerCapabilities;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.potion.Potion;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.Vec3;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
import net.minecraftforge.event.entity.living.LivingAttackEvent;
import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent;
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import cpw.mods.fml.common.ObfuscationReflectionHelper;
import cpw.mods.fml.relauncher.ReflectionHelper;
public class AlchemicalWizardryEventHooks
{
@ -41,6 +39,15 @@ public class AlchemicalWizardryEventHooks
event.entityLiving.motionY += (0.1f) * (2 + i);
}
}
@ForgeSubscribe
public void onEndermanTeleportEvent(EnderTeleportEvent event)
{
if(event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionPlanarBinding) && event.isCancelable())
{
event.setCanceled(true);
}
}
@ForgeSubscribe
public void onEntityDamaged(LivingAttackEvent event)
@ -136,13 +143,6 @@ public class AlchemicalWizardryEventHooks
if((entityPlayer.onGround || entityPlayer.capabilities.isFlying) && entityPlayer.moveForward > 0F)
entityPlayer.moveFlying(0F, 1F, entityPlayer.capabilities.isFlying ? (percentIncrease/2.0f) : percentIncrease);
// if (!entityPlayer.worldObj.isRemote)
// {
// float speed = ((Float) ReflectionHelper.getPrivateValue(PlayerCapabilities.class, entityPlayer.capabilities, new String[]{"walkSpeed", "g", "field_75097_g"})).floatValue();
// ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, entityPlayer.capabilities, Float.valueOf(speed + (float) percentIncrease), new String[]{"walkSpeed", "g", "field_75097_g"}); //CAUTION
// }
}
}
}
@ -285,6 +285,32 @@ public class AlchemicalWizardryEventHooks
}
}
}
}
}
if(entityLiving.isPotionActive(AlchemicalWizardry.customPotionHeavyHeart))
{
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);
if(entityLiving.motionY>-0.9)
{
entityLiving.motionY-=decrease;
}
}
if(entityLiving.isPotionActive(AlchemicalWizardry.customPotionFireFuse))
{
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;
if(entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse).getDuration()<=2)
{
entityLiving.worldObj.createExplosion(null, x, y, z, radius, false);
}
}
}
}

View file

@ -0,0 +1,18 @@
package WayofTime.alchemicalWizardry.common;
import net.minecraft.potion.Potion;
public class PotionFireFuse extends Potion
{
public PotionFireFuse(int par1, boolean par2, int par3)
{
super(par1, par2, par3);
}
@Override
public Potion setIconIndex(int par1, int par2)
{
super.setIconIndex(par1, par2);
return this;
}
}

View file

@ -0,0 +1,18 @@
package WayofTime.alchemicalWizardry.common;
import net.minecraft.potion.Potion;
public class PotionHeavyHeart extends Potion
{
public PotionHeavyHeart(int par1, boolean par2, int par3)
{
super(par1, par2, par3);
}
@Override
public Potion setIconIndex(int par1, int par2)
{
super.setIconIndex(par1, par2);
return this;
}
}

View file

@ -0,0 +1,18 @@
package WayofTime.alchemicalWizardry.common;
import net.minecraft.potion.Potion;
public class PotionPlanarBinding extends Potion
{
public PotionPlanarBinding(int par1, boolean par2, int par3)
{
super(par1, par2, par3);
}
@Override
public Potion setIconIndex(int par1, int par2)
{
super.setIconIndex(par1, par2);
return this;
}
}

View file

@ -28,6 +28,24 @@ public class BlockSpellEnhancement extends BlockOrientable
return new TESpellEnhancementBlock();
}
@Override
public boolean renderAsNormalBlock()
{
return false;
}
@Override
public int getRenderType()
{
return -1;
}
@Override
public boolean isOpaqueCube()
{
return false;
}
@SideOnly(Side.CLIENT)
public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
{

View file

@ -27,6 +27,24 @@ public class BlockSpellModifier extends BlockOrientable
return new TESpellModifierBlock();
}
@Override
public boolean renderAsNormalBlock()
{
return false;
}
@Override
public int getRenderType()
{
return -1;
}
@Override
public boolean isOpaqueCube()
{
return false;
}
@SideOnly(Side.CLIENT)
public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
{

View file

@ -52,6 +52,24 @@ public class BlockSpellParadigm extends BlockOrientable
// return this.projectileIcons;
// }
@Override
public boolean renderAsNormalBlock()
{
return false;
}
@Override
public int getRenderType()
{
return -1;
}
@Override
public boolean isOpaqueCube()
{
return false;
}
@Override
public TileEntity createNewTileEntity(World world)
{

View file

@ -82,12 +82,11 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable
world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short) 4));
}
if (!par3EntityPlayer.worldObj.isRemote && !(par3EntityPlayer.getClass().equals(EntityPlayerMP.class)))
if(!world.isRemote)
{
return par1ItemStack;
return par1ItemStack;
}
// if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT))
// {
// return par1ItemStack;

View file

@ -0,0 +1,107 @@
package WayofTime.alchemicalWizardry.common.items;
import java.util.List;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import org.lwjgl.input.Keyboard;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemAlchemyBase extends Item
{
private static final String[] ITEM_NAMES = new String[]{};
@SideOnly(Side.CLIENT)
private Icon[] icons;
public ItemAlchemyBase(int id)
{
super(id);
this.maxStackSize = 64;
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
this.hasSubtypes = true;
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
icons = new Icon[ITEM_NAMES.length];
for (int i = 0; i < ITEM_NAMES.length; ++i)
{
icons[i] = iconRegister.registerIcon("AlchemicalWizardry:" + "baseAlchemyItem" + ITEM_NAMES[i]);
}
}
@Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{
par3List.add("Used in alchemy");
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT))
{
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
if (recipe != null)
{
par3List.add(EnumChatFormatting.BLUE + "Recipe:");
for (ItemStack item : recipe)
{
if (item != null)
{
par3List.add("" + item.getDisplayName());
}
}
}
} else
{
par3List.add("-Press " + EnumChatFormatting.BLUE + "shift" + EnumChatFormatting.GRAY + " for Recipe-");
}
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
return par1ItemStack;
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
//This is what will do all the localisation things on the alchemy components so you dont have to set it :D
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1);
return ("" + "item.bloodMagicAlchemyItem." + ITEM_NAMES[meta]);
}
@Override
@SideOnly(Side.CLIENT)
public Icon getIconFromDamage(int meta)
{
int j = MathHelper.clamp_int(meta, 0, ITEM_NAMES.length - 1);
return icons[j];
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(int id, CreativeTabs creativeTab, List list)
{
for (int meta = 0; meta < ITEM_NAMES.length; ++meta)
{
list.add(new ItemStack(id, 1, meta));
}
}
}

View file

@ -0,0 +1,75 @@
package WayofTime.alchemicalWizardry.common.items;
import java.util.List;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemComponents extends Item
{
private static final String[] ITEM_NAMES = new String[]{"QuartzRod", "EmptyCore", "MagicalesCable", "WoodBrace", "StoneBrace", "ProjectileCore", "SelfCore","MeleeCore","ParadigmBackPlate","OutputCable","FlameCore","IcyCore","GustCore","EarthenCore","InputCable","CrackedRunicPlate","RunicPlate","ScribedRunicPlate","DefaultCore","OffensiveCore","DefensiveCore","EnvironmentalCore"};
@SideOnly(Side.CLIENT)
private Icon[] icons;
public ItemComponents(int id)
{
super(id);
this.maxStackSize = 64;
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
this.hasSubtypes = true;
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
icons = new Icon[ITEM_NAMES.length];
for (int i = 0; i < ITEM_NAMES.length; ++i)
{
icons[i] = iconRegister.registerIcon("AlchemicalWizardry:" + "baseItem" + ITEM_NAMES[i]);
}
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
return par1ItemStack;
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
//This is what will do all the localisation things on the alchemy components so you dont have to set it :D
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1);
return ("" + "item.bloodMagicBaseItem." + ITEM_NAMES[meta]);
}
@Override
@SideOnly(Side.CLIENT)
public Icon getIconFromDamage(int meta)
{
int j = MathHelper.clamp_int(meta, 0, ITEM_NAMES.length - 1);
return icons[j];
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(int id, CreativeTabs creativeTab, List list)
{
for (int meta = 0; meta < ITEM_NAMES.length; ++meta)
{
list.add(new ItemStack(id, 1, meta));
}
}
}

View file

@ -0,0 +1,49 @@
package WayofTime.alchemicalWizardry.common.renderer.block;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock;
import cpw.mods.fml.client.FMLClientHandler;
public class RenderSpellEnhancementBlock extends TileEntitySpecialRenderer
{
private ModelSpellEnhancementBlock modelSpellEnhancementBlock = new ModelSpellEnhancementBlock();
@Override
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
{
if (tileEntity instanceof TESpellEnhancementBlock)
{
TESpellEnhancementBlock tileSpellBlock = (TESpellEnhancementBlock) tileEntity;
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
/**
* Render the ghost item inside of the Altar, slowly spinning
*/
GL11.glPushMatrix();
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/BlockSpellEnhancementPower1.png");
int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
String resource = tileSpellBlock.getResourceLocationForMeta(meta);
test = new ResourceLocation(resource);
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
GL11.glPushMatrix();
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
//A reference to your Model file. Again, very important.
this.modelSpellEnhancementBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileSpellBlock.getInputDirection(), tileSpellBlock.getOutputDirection());
//Tell it to stop rendering for both the PushMatrix's
GL11.glPopMatrix();
GL11.glPopMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
}
}
}

View file

@ -0,0 +1,49 @@
package WayofTime.alchemicalWizardry.common.renderer.block;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock;
import cpw.mods.fml.client.FMLClientHandler;
public class RenderSpellModifierBlock extends TileEntitySpecialRenderer
{
private ModelSpellModifierBlock modelSpellModifierBlock = new ModelSpellModifierBlock();
@Override
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
{
if (tileEntity instanceof TESpellModifierBlock)
{
TESpellModifierBlock tileSpellBlock = (TESpellModifierBlock) tileEntity;
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
/**
* Render the ghost item inside of the Altar, slowly spinning
*/
GL11.glPushMatrix();
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/BlockSpellModifier.png");
int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
String resource = tileSpellBlock.getResourceLocationForMeta(meta);
test = new ResourceLocation(resource);
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
GL11.glPushMatrix();
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
//A reference to your Model file. Again, very important.
this.modelSpellModifierBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileSpellBlock.getInputDirection(), tileSpellBlock.getOutputDirection());
//Tell it to stop rendering for both the PushMatrix's
GL11.glPopMatrix();
GL11.glPopMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
}
}
}

View file

@ -0,0 +1,49 @@
package WayofTime.alchemicalWizardry.common.renderer.block;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock;
import cpw.mods.fml.client.FMLClientHandler;
public class RenderSpellParadigmBlock extends TileEntitySpecialRenderer
{
private ModelSpellParadigmBlock modelSpellParadigmBlock = new ModelSpellParadigmBlock();
@Override
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
{
if (tileEntity instanceof TESpellParadigmBlock)
{
TESpellParadigmBlock tileSpellBlock = (TESpellParadigmBlock) tileEntity;
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
/**
* Render the ghost item inside of the Altar, slowly spinning
*/
GL11.glPushMatrix();
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/BlockSpellParadigm.png");
int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
String resource = tileSpellBlock.getResourceLocationForMeta(meta);
test = new ResourceLocation(resource);
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
GL11.glPushMatrix();
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
//A reference to your Model file. Again, very important.
this.modelSpellParadigmBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileSpellBlock.getInputDirection(), tileSpellBlock.getOutputDirection());
//Tell it to stop rendering for both the PushMatrix's
GL11.glPopMatrix();
GL11.glPopMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
}
}
}

View file

@ -0,0 +1,114 @@
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.common.ForgeDirection;
import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.ModBlocks;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock;
import cpw.mods.fml.client.FMLClientHandler;
public class TESpellEnhancementBlockItemRenderer implements IItemRenderer
{
private ModelSpellEnhancementBlock modelSpellBlock = new ModelSpellEnhancementBlock();
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
Tessellator tessellator = Tessellator.instance;
Block block = ModBlocks.blockSpellEffect;
//Icon icon = item.getItem().getIconFromDamage(0);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
/**
* Render the ghost item inside of the Altar, slowly spinning
*/
GL11.glPushMatrix();
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
ResourceLocation test = new ResourceLocation(this.getResourceLocationForMeta(item.getItemDamage()));
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
GL11.glPushMatrix();
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
//A reference to your Model file. Again, very important.
this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP);
//Tell it to stop rendering for both the PushMatrix's
GL11.glPopMatrix();
GL11.glPopMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
}
/**
* IItemRenderer implementation *
*/
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch (type) {
case ENTITY:
return true;
case EQUIPPED:
return true;
case EQUIPPED_FIRST_PERSON:
return true;
case INVENTORY:
return true;
default:
return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return true;
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
switch (type) {
case ENTITY:
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
break;
case EQUIPPED:
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
break;
case EQUIPPED_FIRST_PERSON:
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
break;
case INVENTORY:
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
break;
default:
}
}
public String getResourceLocationForMeta(int meta)
{
switch(meta)
{
case 0: return "alchemicalwizardry:textures/models/SpellEnhancementPower1.png";
case 1: return "alchemicalwizardry:textures/models/SpellEnhancementPower2.png";
case 2: return "alchemicalwizardry:textures/models/SpellEnhancementPower3.png";
case 5: return "alchemicalwizardry:textures/models/SpellEnhancementCost1.png";
case 6: return "alchemicalwizardry:textures/models/SpellEnhancementCost2.png";
case 7: return "alchemicalwizardry:textures/models/SpellEnhancementCost3.png";
case 10: return "alchemicalwizardry:textures/models/SpellEnhancementPotency1.png";
case 11: return "alchemicalwizardry:textures/models/SpellEnhancementPotency2.png";
case 12: return "alchemicalwizardry:textures/models/SpellEnhancementPotency3.png";
}
return "alchemicalwizardry:textures/models/SpellEnhancementPower1.png";
}
}

View file

@ -0,0 +1,108 @@
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.common.ForgeDirection;
import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.ModBlocks;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock;
import cpw.mods.fml.client.FMLClientHandler;
public class TESpellModifierBlockItemRenderer implements IItemRenderer
{
private ModelSpellModifierBlock modelSpellBlock = new ModelSpellModifierBlock();
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
Tessellator tessellator = Tessellator.instance;
Block block = ModBlocks.blockSpellEffect;
//Icon icon = item.getItem().getIconFromDamage(0);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
/**
* Render the ghost item inside of the Altar, slowly spinning
*/
GL11.glPushMatrix();
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
ResourceLocation test = new ResourceLocation(this.getResourceLocationForMeta(item.getItemDamage()));
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
GL11.glPushMatrix();
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
//A reference to your Model file. Again, very important.
this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP);
//Tell it to stop rendering for both the PushMatrix's
GL11.glPopMatrix();
GL11.glPopMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
}
/**
* IItemRenderer implementation *
*/
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch (type) {
case ENTITY:
return true;
case EQUIPPED:
return true;
case EQUIPPED_FIRST_PERSON:
return true;
case INVENTORY:
return true;
default:
return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return true;
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
switch (type) {
case ENTITY:
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
break;
case EQUIPPED:
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
break;
case EQUIPPED_FIRST_PERSON:
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
break;
case INVENTORY:
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
break;
default:
}
}
public String getResourceLocationForMeta(int meta)
{
switch(meta)
{
case 0: return "alchemicalwizardry:textures/models/SpellModifierDefault.png";
case 1: return "alchemicalwizardry:textures/models/SpellModifierOffensive.png";
case 2: return "alchemicalwizardry:textures/models/SpellModifierDefensive.png";
case 3: return "alchemicalwizardry:textures/models/SpellModifierEnvironmental.png";
}
return "alchemicalwizardry:textures/models/SpellModifierDefault.png";
}
}

View file

@ -0,0 +1,107 @@
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.common.ForgeDirection;
import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.ModBlocks;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock;
import cpw.mods.fml.client.FMLClientHandler;
public class TESpellParadigmBlockItemRenderer implements IItemRenderer
{
private ModelSpellParadigmBlock modelSpellBlock = new ModelSpellParadigmBlock();
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
Tessellator tessellator = Tessellator.instance;
Block block = ModBlocks.blockSpellEffect;
//Icon icon = item.getItem().getIconFromDamage(0);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
/**
* Render the ghost item inside of the Altar, slowly spinning
*/
GL11.glPushMatrix();
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
ResourceLocation test = new ResourceLocation(this.getResourceLocationForMeta(item.getItemDamage()));
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
GL11.glPushMatrix();
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
//A reference to your Model file. Again, very important.
this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP);
//Tell it to stop rendering for both the PushMatrix's
GL11.glPopMatrix();
GL11.glPopMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
}
/**
* IItemRenderer implementation *
*/
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch (type) {
case ENTITY:
return true;
case EQUIPPED:
return true;
case EQUIPPED_FIRST_PERSON:
return true;
case INVENTORY:
return true;
default:
return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return true;
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
switch (type) {
case ENTITY:
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
break;
case EQUIPPED:
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
break;
case EQUIPPED_FIRST_PERSON:
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
break;
case INVENTORY:
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
break;
default:
}
}
public String getResourceLocationForMeta(int meta)
{
switch(meta)
{
case 0: return "alchemicalwizardry:textures/models/SpellParadigmProjectile.png";
case 1: return "alchemicalwizardry:textures/models/SpellParadigmSelf.png";
case 2: return "alchemicalwizardry:textures/models/SpellParadigmMelee.png";
}
return "alchemicalwizardry:textures/models/SpellParadigmProjectile.png";
}
}

View file

@ -0,0 +1,334 @@
package WayofTime.alchemicalWizardry.common.renderer.model;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraftforge.common.ForgeDirection;
public class ModelSpellEnhancementBlock extends ModelBase
{
//fields
ModelRenderer core;
ModelRenderer frame1;
ModelRenderer frame2;
ModelRenderer frame3;
ModelRenderer frame4;
ModelRenderer frame5;
ModelRenderer frame6;
ModelRenderer frame7;
ModelRenderer frame8;
ModelRenderer frame9;
ModelRenderer frame10;
ModelRenderer frame11;
ModelRenderer frame12;
ModelRenderer outputMain;
ModelRenderer inputMain;
ModelRenderer output1;
ModelRenderer output2;
ModelRenderer output3;
ModelRenderer output4;
ModelRenderer input1;
ModelRenderer input2;
ModelRenderer input3;
ModelRenderer input4;
ModelRenderer outputSecond;
public ModelSpellEnhancementBlock()
{
textureWidth = 128;
textureHeight = 64;
core = new ModelRenderer(this, 0, 0);
core.addBox(-3F, -3F, -3F, 6, 6, 6);
core.setRotationPoint(0F, 16F, 0F);
core.setTextureSize(128, 64);
core.mirror = true;
setRotation(core, 0F, 0F, 0F);
frame1 = new ModelRenderer(this, 0, 32);
frame1.addBox(-7F, 5F, -7F, 14, 2, 2);
frame1.setRotationPoint(0F, 16F, 0F);
frame1.setTextureSize(128, 64);
frame1.mirror = true;
setRotation(frame1, 0F, 0F, 0F);
frame2 = new ModelRenderer(this, 24, 19);
frame2.addBox(5F, -5F, -7F, 2, 10, 2);
frame2.setRotationPoint(0F, 16F, 0F);
frame2.setTextureSize(128, 64);
frame2.mirror = true;
setRotation(frame2, 0F, 0F, 0F);
frame3 = new ModelRenderer(this, 0, 19);
frame3.addBox(-7F, -5F, -7F, 2, 10, 2);
frame3.setRotationPoint(0F, 16F, 0F);
frame3.setTextureSize(128, 64);
frame3.mirror = true;
setRotation(frame3, 0F, 0F, 0F);
frame4 = new ModelRenderer(this, 0, 14);
frame4.addBox(-7F, -7F, -7F, 14, 2, 2);
frame4.setRotationPoint(0F, 16F, 0F);
frame4.setTextureSize(128, 64);
frame4.mirror = true;
setRotation(frame4, 0F, 0F, 0F);
frame5 = new ModelRenderer(this, 0, 57);
frame5.addBox(-7F, 5F, 5F, 14, 2, 2);
frame5.setRotationPoint(0F, 16F, 0F);
frame5.setTextureSize(128, 64);
frame5.mirror = true;
setRotation(frame5, 0F, 0F, 0F);
frame6 = new ModelRenderer(this, 0, 44);
frame6.addBox(5F, -5F, 5F, 2, 10, 2);
frame6.setRotationPoint(0F, 16F, 0F);
frame6.setTextureSize(128, 64);
frame6.mirror = true;
setRotation(frame6, 0F, 0F, 0F);
frame7 = new ModelRenderer(this, 24, 44);
frame7.addBox(-7F, -5F, 5F, 2, 10, 2);
frame7.setRotationPoint(0F, 16F, 0F);
frame7.setTextureSize(128, 64);
frame7.mirror = true;
setRotation(frame7, 0F, 0F, 0F);
frame8 = new ModelRenderer(this, 0, 39);
frame8.addBox(-7F, -7F, 5F, 14, 2, 2);
frame8.setRotationPoint(0F, 16F, 0F);
frame8.setTextureSize(128, 64);
frame8.mirror = true;
setRotation(frame8, 0F, 0F, 0F);
frame9 = new ModelRenderer(this, 66, 14);
frame9.addBox(5F, 5F, -5F, 2, 2, 10);
frame9.setRotationPoint(0F, 16F, 0F);
frame9.setTextureSize(128, 64);
frame9.mirror = true;
setRotation(frame9, 0F, 0F, 0F);
frame10 = new ModelRenderer(this, 40, 14);
frame10.addBox(-7F, 5F, -5F, 2, 2, 10);
frame10.setRotationPoint(0F, 16F, 0F);
frame10.setTextureSize(128, 64);
frame10.mirror = true;
setRotation(frame10, 0F, 0F, 0F);
frame11 = new ModelRenderer(this, 66, 0);
frame11.addBox(5F, -7F, -5F, 2, 2, 10);
frame11.setRotationPoint(0F, 16F, 0F);
frame11.setTextureSize(128, 64);
frame11.mirror = true;
setRotation(frame11, 0F, 0F, 0F);
frame12 = new ModelRenderer(this, 40, 0);
frame12.addBox(-7F, -7F, -5F, 2, 2, 10);
frame12.setRotationPoint(0F, 16F, 0F);
frame12.setTextureSize(128, 64);
frame12.mirror = true;
setRotation(frame12, 0F, 0F, 0F);
outputMain = new ModelRenderer(this, 78, 36);
outputMain.addBox(6F, -2F, -2F, 2, 4, 4);
outputMain.setRotationPoint(0F, 16F, 0F);
outputMain.setTextureSize(128, 64);
outputMain.mirror = true;
setRotation(outputMain, 0F, 0F, 0F);
inputMain = new ModelRenderer(this, 40, 36);
inputMain.addBox(-2F, -2F, -8F, 4, 4, 5);
inputMain.setRotationPoint(0F, 16F, 0F);
inputMain.setTextureSize(128, 64);
inputMain.mirror = true;
setRotation(inputMain, 0F, 0F, 0F);
output1 = new ModelRenderer(this, 80, 30);
output1.addBox(5F, -5F, -5F, 3, 2, 2);
output1.setRotationPoint(0F, 16F, 0F);
output1.setTextureSize(128, 64);
output1.mirror = true;
setRotation(output1, 0F, 0F, 0F);
output2 = new ModelRenderer(this, 80, 30);
output2.addBox(5F, -5F, 3F, 3, 2, 2);
output2.setRotationPoint(0F, 16F, 0F);
output2.setTextureSize(128, 64);
output2.mirror = true;
setRotation(output2, 0F, 0F, 0F);
output3 = new ModelRenderer(this, 80, 30);
output3.addBox(5F, 3F, -5F, 3, 2, 2);
output3.setRotationPoint(0F, 16F, 0F);
output3.setTextureSize(128, 64);
output3.mirror = true;
setRotation(output3, 0F, 0F, 0F);
output4 = new ModelRenderer(this, 80, 30);
output4.addBox(5F, 3F, 3F, 3, 2, 2);
output4.setRotationPoint(0F, 16F, 0F);
output4.setTextureSize(128, 64);
output4.mirror = true;
setRotation(output4, 0F, 0F, 0F);
input1 = new ModelRenderer(this, 40, 27);
input1.addBox(3F, -5F, -8F, 2, 2, 5);
input1.setRotationPoint(0F, 16F, 0F);
input1.setTextureSize(128, 64);
input1.mirror = true;
setRotation(input1, 0F, 0F, 0F);
input2 = new ModelRenderer(this, 40, 27);
input2.addBox(-5F, -5F, -8F, 2, 2, 5);
input2.setRotationPoint(0F, 16F, 0F);
input2.setTextureSize(128, 64);
input2.mirror = true;
setRotation(input2, 0F, 0F, 0F);
input3 = new ModelRenderer(this, 40, 27);
input3.addBox(3F, 3F, -8F, 2, 2, 5);
input3.setRotationPoint(0F, 16F, 0F);
input3.setTextureSize(128, 64);
input3.mirror = true;
setRotation(input3, 0F, 0F, 0F);
input4 = new ModelRenderer(this, 40, 27);
input4.addBox(-5F, 3F, -8F, 2, 2, 5);
input4.setRotationPoint(0F, 16F, 0F);
input4.setTextureSize(128, 64);
input4.mirror = true;
setRotation(input4, 0F, 0F, 0F);
outputSecond = new ModelRenderer(this, 78, 47);
outputSecond.addBox(4F, -3F, -3F, 1, 6, 6);
outputSecond.setRotationPoint(0F, 16F, 0F);
outputSecond.setTextureSize(128, 64);
outputSecond.mirror = true;
setRotation(outputSecond, 0F, 0F, 0F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
float xInputRot = 0.0f;
float yInputRot = 0.0f;
float zInputRot = 0.0f;
float xOutputRot = 0.0f;
float yOutputRot = 0.0f;
float zOutputRot = 0.0f;
switch (input)
{
case NORTH:
xInputRot = 0.0f;
yInputRot = 0.0f;
zInputRot = 0.0f;
break;
case EAST:
xInputRot = 0.0f;
yInputRot = (float) (0.5f * Math.PI);
zInputRot = 0.0f;
break;
case SOUTH:
xInputRot = 0.0f;
yInputRot = (float) (1.0f * Math.PI);
zInputRot = 0.0f;
break;
case WEST:
xInputRot = 0.0f;
yInputRot = (float) (-0.5f * Math.PI);
zInputRot = 0.0f;
break;
case UP:
xInputRot = (float) (-0.5f * Math.PI);
yInputRot = 0.0f;
zInputRot = 0.0f;
break;
case DOWN:
xInputRot = (float) (0.5f * Math.PI);
yInputRot = 0.0f;
zInputRot = 0.0f;
break;
default:
break;
}
switch (output)
{
case NORTH:
xOutputRot = 0.0f;
yOutputRot = (float) (0.5f * Math.PI);
zOutputRot = 0.0f;
break;
case EAST:
xOutputRot = 0.0f;
yOutputRot = (float) (1.0f * Math.PI);
zOutputRot = 0.0f;
break;
case SOUTH:
xOutputRot = 0.0f;
yOutputRot = (float) (-0.5f * Math.PI);
zOutputRot = 0.0f;
break;
case WEST:
xOutputRot = 0.0f;
yOutputRot = 0.0f;
zOutputRot = 0.0f;
break;
case UP:
xOutputRot = 0.0f;
yOutputRot = 0.0f;
zOutputRot = (float) (-0.5f * Math.PI);
break;
case DOWN:
xOutputRot = 0.0f;
yOutputRot = 0.0f;
zOutputRot = (float) (0.5f * Math.PI);
break;
default:
break;
}
this.setRotation(inputMain, xInputRot, yInputRot, zInputRot);
this.setRotation(outputMain, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(input1, xInputRot, yInputRot, zInputRot);
this.setRotation(input2, xInputRot, yInputRot, zInputRot);
this.setRotation(input3, xInputRot, yInputRot, zInputRot);
this.setRotation(input4, xInputRot, yInputRot, zInputRot);
this.setRotation(outputSecond, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output1, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output2, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output3, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output4, xOutputRot, yOutputRot, zOutputRot);
core.render(f5);
frame1.render(f5);
frame2.render(f5);
frame3.render(f5);
frame4.render(f5);
frame5.render(f5);
frame6.render(f5);
frame7.render(f5);
frame8.render(f5);
frame9.render(f5);
frame10.render(f5);
frame11.render(f5);
frame12.render(f5);
outputMain.render(f5);
inputMain.render(f5);
output1.render(f5);
output2.render(f5);
output3.render(f5);
output4.render(f5);
input1.render(f5);
input2.render(f5);
input3.render(f5);
input4.render(f5);
outputSecond.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
}
}

View file

@ -0,0 +1,303 @@
package WayofTime.alchemicalWizardry.common.renderer.model;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraftforge.common.ForgeDirection;
public class ModelSpellModifierBlock extends ModelBase
{
//fields
ModelRenderer core;
ModelRenderer inputMain;
ModelRenderer Shape2;
ModelRenderer Shape3;
ModelRenderer Shape4;
ModelRenderer Shape5;
ModelRenderer Shape6;
ModelRenderer Shape7;
ModelRenderer Shape8;
ModelRenderer Shape9;
ModelRenderer outputMain;
ModelRenderer Shape11;
ModelRenderer Shape12;
ModelRenderer Shape13;
ModelRenderer Shape14;
ModelRenderer output1;
ModelRenderer output2;
ModelRenderer output3;
ModelRenderer output4;
public ModelSpellModifierBlock()
{
textureWidth = 64;
textureHeight = 64;
core = new ModelRenderer(this, 0, 0);
core.addBox(-3F, -3F, -3F, 6, 6, 6);
core.setRotationPoint(0F, 16F, 0F);
core.setTextureSize(64, 64);
core.mirror = true;
setRotation(core, 0F, 0F, 0F);
inputMain = new ModelRenderer(this, 25, 18);
inputMain.addBox(-2F, -2F, -8F, 4, 4, 1);
inputMain.setRotationPoint(0F, 16F, 0F);
inputMain.setTextureSize(64, 64);
inputMain.mirror = true;
setRotation(inputMain, 0F, 0F, 0F);
Shape2 = new ModelRenderer(this, 0, 13);
Shape2.addBox(-5F, -5F, -8F, 10, 2, 2);
Shape2.setRotationPoint(0F, 16F, 0F);
Shape2.setTextureSize(64, 64);
Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F);
Shape3 = new ModelRenderer(this, 0, 27);
Shape3.addBox(-5F, 3F, -8F, 10, 2, 2);
Shape3.setRotationPoint(0F, 16F, 0F);
Shape3.setTextureSize(64, 64);
Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F);
Shape4 = new ModelRenderer(this, 16, 18);
Shape4.addBox(3F, -3F, -8F, 2, 6, 2);
Shape4.setRotationPoint(0F, 16F, 0F);
Shape4.setTextureSize(64, 64);
Shape4.mirror = true;
setRotation(Shape4, 0F, 0F, 0F);
Shape5 = new ModelRenderer(this, 0, 18);
Shape5.addBox(-5F, -3F, -8F, 2, 6, 2);
Shape5.setRotationPoint(0F, 16F, 0F);
Shape5.setTextureSize(64, 64);
Shape5.mirror = true;
setRotation(Shape5, 0F, 0F, 0F);
Shape6 = new ModelRenderer(this, 0, 32);
Shape6.addBox(-1F, -6F, -7F, 2, 1, 5);
Shape6.setRotationPoint(0F, 16F, 0F);
Shape6.setTextureSize(64, 64);
Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F);
Shape7 = new ModelRenderer(this, 15, 32);
Shape7.addBox(-2F, -6F, -2F, 4, 1, 4);
Shape7.setRotationPoint(0F, 16F, 0F);
Shape7.setTextureSize(64, 64);
Shape7.mirror = true;
setRotation(Shape7, 0F, 0F, 0F);
Shape8 = new ModelRenderer(this, 15, 39);
Shape8.addBox(-2F, 5F, -2F, 4, 1, 4);
Shape8.setRotationPoint(0F, 16F, 0F);
Shape8.setTextureSize(64, 64);
Shape8.mirror = true;
setRotation(Shape8, 0F, 0F, 0F);
Shape9 = new ModelRenderer(this, 0, 39);
Shape9.addBox(-1F, 5F, -7F, 2, 1, 5);
Shape9.setRotationPoint(0F, 16F, 0F);
Shape9.setTextureSize(64, 64);
Shape9.mirror = true;
setRotation(Shape9, 0F, 0F, 0F);
outputMain = new ModelRenderer(this, 51, 23);
outputMain.addBox(7F, -2F, -2F, 1, 4, 4);
outputMain.setRotationPoint(0F, 16F, 0F);
outputMain.setTextureSize(64, 64);
outputMain.mirror = true;
setRotation(outputMain, 0F, 0F, 0F);
Shape11 = new ModelRenderer(this, 13, 46);
Shape11.addBox(5F, -2F, -2F, 1, 4, 4);
Shape11.setRotationPoint(0F, 16F, 0F);
Shape11.setTextureSize(64, 64);
Shape11.mirror = true;
setRotation(Shape11, 0F, 0F, 0F);
Shape12 = new ModelRenderer(this, 0, 46);
Shape12.addBox(5F, -1F, -7F, 1, 2, 5);
Shape12.setRotationPoint(0F, 16F, 0F);
Shape12.setTextureSize(64, 64);
Shape12.mirror = true;
setRotation(Shape12, 0F, 0F, 0F);
Shape13 = new ModelRenderer(this, 0, 56);
Shape13.addBox(-6F, -1F, -7F, 1, 2, 5);
Shape13.setRotationPoint(0F, 16F, 0F);
Shape13.setTextureSize(64, 64);
Shape13.mirror = true;
setRotation(Shape13, 0F, 0F, 0F);
Shape14 = new ModelRenderer(this, 13, 56);
Shape14.addBox(-6F, -2F, -2F, 1, 4, 4);
Shape14.setRotationPoint(0F, 16F, 0F);
Shape14.setTextureSize(64, 64);
Shape14.mirror = true;
setRotation(Shape14, 0F, 0F, 0F);
output1 = new ModelRenderer(this, 51, 18);
output1.addBox(5F, -5F, -5F, 3, 2, 2);
output1.setRotationPoint(0F, 16F, 0F);
output1.setTextureSize(64, 64);
output1.mirror = true;
setRotation(output1, 0F, 0F, 0F);
output2 = new ModelRenderer(this, 51, 18);
output2.addBox(5F, -5F, 3F, 3, 2, 2);
output2.setRotationPoint(0F, 16F, 0F);
output2.setTextureSize(64, 64);
output2.mirror = true;
setRotation(output2, 0F, 0F, 0F);
output3 = new ModelRenderer(this, 51, 18);
output3.addBox(5F, 3F, -5F, 3, 2, 2);
output3.setRotationPoint(0F, 16F, 0F);
output3.setTextureSize(64, 64);
output3.mirror = true;
setRotation(output3, 0F, 0F, 0F);
output4 = new ModelRenderer(this, 51, 18);
output4.addBox(5F, 3F, 3F, 3, 2, 2);
output4.setRotationPoint(0F, 16F, 0F);
output4.setTextureSize(64, 64);
output4.mirror = true;
setRotation(output4, 0F, 0F, 0F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
float xInputRot = 0.0f;
float yInputRot = 0.0f;
float zInputRot = 0.0f;
float xOutputRot = 0.0f;
float yOutputRot = 0.0f;
float zOutputRot = 0.0f;
switch (input)
{
case NORTH:
xInputRot = 0.0f;
yInputRot = 0.0f;
zInputRot = 0.0f;
break;
case EAST:
xInputRot = 0.0f;
yInputRot = (float) (0.5f * Math.PI);
zInputRot = 0.0f;
break;
case SOUTH:
xInputRot = 0.0f;
yInputRot = (float) (1.0f * Math.PI);
zInputRot = 0.0f;
break;
case WEST:
xInputRot = 0.0f;
yInputRot = (float) (-0.5f * Math.PI);
zInputRot = 0.0f;
break;
case UP:
xInputRot = (float) (-0.5f * Math.PI);
yInputRot = 0.0f;
zInputRot = 0.0f;
break;
case DOWN:
xInputRot = (float) (0.5f * Math.PI);
yInputRot = 0.0f;
zInputRot = 0.0f;
break;
default:
break;
}
switch (output)
{
case NORTH:
xOutputRot = 0.0f;
yOutputRot = (float) (0.5f * Math.PI);
zOutputRot = 0.0f;
break;
case EAST:
xOutputRot = 0.0f;
yOutputRot = (float) (1.0f * Math.PI);
zOutputRot = 0.0f;
break;
case SOUTH:
xOutputRot = 0.0f;
yOutputRot = (float) (-0.5f * Math.PI);
zOutputRot = 0.0f;
break;
case WEST:
xOutputRot = 0.0f;
yOutputRot = 0.0f;
zOutputRot = 0.0f;
break;
case UP:
xOutputRot = 0.0f;
yOutputRot = 0.0f;
zOutputRot = (float) (-0.5f * Math.PI);
break;
case DOWN:
xOutputRot = 0.0f;
yOutputRot = 0.0f;
zOutputRot = (float) (0.5f * Math.PI);
break;
default:
break;
}
this.setRotation(inputMain, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape2, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape3, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape4, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape5, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape6, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape7, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape8, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape9, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape12, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape11, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape13, xInputRot, yInputRot, zInputRot);
this.setRotation(Shape14, xInputRot, yInputRot, zInputRot);
this.setRotation(outputMain, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output1, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output2, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output3, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output4, xOutputRot, yOutputRot, zOutputRot);
core.render(f5);
inputMain.render(f5);
Shape2.render(f5);
Shape3.render(f5);
Shape4.render(f5);
Shape5.render(f5);
Shape6.render(f5);
Shape7.render(f5);
Shape8.render(f5);
Shape9.render(f5);
outputMain.render(f5);
Shape11.render(f5);
Shape12.render(f5);
Shape13.render(f5);
Shape14.render(f5);
output1.render(f5);
output2.render(f5);
output3.render(f5);
output4.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
}
}

View file

@ -0,0 +1,234 @@
package WayofTime.alchemicalWizardry.common.renderer.model;
//Date: 07/03/2014 9:30:25 PM
//Template version 1.1
//Java generated by Techne
//Keep in mind that you still need to fill in some blanks
//- ZeuX
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraftforge.common.ForgeDirection;
public class ModelSpellParadigmBlock extends ModelBase
{
//fields
ModelRenderer core;
ModelRenderer outputMain;
ModelRenderer output1;
ModelRenderer output2;
ModelRenderer output3;
ModelRenderer output4;
ModelRenderer Shape1;
ModelRenderer Shape2;
ModelRenderer Shape3;
ModelRenderer Shape4;
ModelRenderer Shape5;
public ModelSpellParadigmBlock()
{
textureWidth = 64;
textureHeight = 64;
core = new ModelRenderer(this, 0, 0);
core.addBox(-3F, -3F, -3F, 6, 6, 6);
core.setRotationPoint(0F, 16F, 0F);
core.setTextureSize(64, 64);
core.mirror = true;
setRotation(core, 0F, 0F, 0F);
outputMain = new ModelRenderer(this, 0, 13);
outputMain.addBox(6F, -2F, -2F, 2, 4, 4);
outputMain.setRotationPoint(0F, 16F, 0F);
outputMain.setTextureSize(64, 64);
outputMain.mirror = true;
setRotation(outputMain, 0F, 0F, 0F);
output1 = new ModelRenderer(this, 0, 22);
output1.addBox(5F, -5F, -5F, 3, 2, 2);
output1.setRotationPoint(0F, 16F, 0F);
output1.setTextureSize(64, 64);
output1.mirror = true;
setRotation(output1, 0F, 0F, 0F);
output2 = new ModelRenderer(this, 0, 22);
output2.addBox(5F, -5F, 3F, 3, 2, 2);
output2.setRotationPoint(0F, 16F, 0F);
output2.setTextureSize(64, 64);
output2.mirror = true;
setRotation(output2, 0F, 0F, 0F);
output3 = new ModelRenderer(this, 0, 22);
output3.addBox(5F, 3F, -5F, 3, 2, 2);
output3.setRotationPoint(0F, 16F, 0F);
output3.setTextureSize(64, 64);
output3.mirror = true;
setRotation(output3, 0F, 0F, 0F);
output4 = new ModelRenderer(this, 0, 22);
output4.addBox(5F, 3F, 3F, 3, 2, 2);
output4.setRotationPoint(0F, 16F, 0F);
output4.setTextureSize(64, 64);
output4.mirror = true;
setRotation(output4, 0F, 0F, 0F);
Shape1 = new ModelRenderer(this, 0, 28);
Shape1.addBox(-5F, -5F, -1F, 10, 1, 2);
Shape1.setRotationPoint(0F, 16F, 0F);
Shape1.setTextureSize(64, 64);
Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F);
Shape2 = new ModelRenderer(this, 25, 28);
Shape2.addBox(-5F, -4F, -4F, 1, 8, 8);
Shape2.setRotationPoint(0F, 16F, 0F);
Shape2.setTextureSize(64, 64);
Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F);
Shape3 = new ModelRenderer(this, 0, 33);
Shape3.addBox(-5F, 4F, -1F, 10, 1, 2);
Shape3.setRotationPoint(0F, 16F, 0F);
Shape3.setTextureSize(64, 64);
Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F);
Shape4 = new ModelRenderer(this, 0, 38);
Shape4.addBox(-5F, -1F, -5F, 10, 2, 1);
Shape4.setRotationPoint(0F, 16F, 0F);
Shape4.setTextureSize(64, 64);
Shape4.mirror = true;
setRotation(Shape4, 0F, 0F, 0F);
Shape5 = new ModelRenderer(this, 0, 43);
Shape5.addBox(-5F, -1F, 4F, 10, 2, 1);
Shape5.setRotationPoint(0F, 16F, 0F);
Shape5.setTextureSize(64, 64);
Shape5.mirror = true;
setRotation(Shape5, 0F, 0F, 0F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
float xInputRot = 0.0f;
float yInputRot = 0.0f;
float zInputRot = 0.0f;
float xOutputRot = 0.0f;
float yOutputRot = 0.0f;
float zOutputRot = 0.0f;
switch (input)
{
case NORTH:
xInputRot = 0.0f;
yInputRot = 0.0f;
zInputRot = 0.0f;
break;
case EAST:
xInputRot = 0.0f;
yInputRot = (float) (0.5f * Math.PI);
zInputRot = 0.0f;
break;
case SOUTH:
xInputRot = 0.0f;
yInputRot = (float) (1.0f * Math.PI);
zInputRot = 0.0f;
break;
case WEST:
xInputRot = 0.0f;
yInputRot = (float) (-0.5f * Math.PI);
zInputRot = 0.0f;
break;
case UP:
xInputRot = (float) (-0.5f * Math.PI);
yInputRot = 0.0f;
zInputRot = 0.0f;
break;
case DOWN:
xInputRot = (float) (0.5f * Math.PI);
yInputRot = 0.0f;
zInputRot = 0.0f;
break;
default:
break;
}
switch (output)
{
case NORTH:
xOutputRot = 0.0f;
yOutputRot = (float) (0.5f * Math.PI);
zOutputRot = 0.0f;
break;
case EAST:
xOutputRot = 0.0f;
yOutputRot = (float) (1.0f * Math.PI);
zOutputRot = 0.0f;
break;
case SOUTH:
xOutputRot = 0.0f;
yOutputRot = (float) (-0.5f * Math.PI);
zOutputRot = 0.0f;
break;
case WEST:
xOutputRot = 0.0f;
yOutputRot = 0.0f;
zOutputRot = 0.0f;
break;
case UP:
xOutputRot = 0.0f;
yOutputRot = 0.0f;
zOutputRot = (float) (-0.5f * Math.PI);
break;
case DOWN:
xOutputRot = 0.0f;
yOutputRot = 0.0f;
zOutputRot = (float) (0.5f * Math.PI);
break;
default:
break;
}
this.setRotation(outputMain, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output1, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output2, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output3, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(output4, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(Shape1, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(Shape2, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(Shape3, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(Shape4, xOutputRot, yOutputRot, zOutputRot);
this.setRotation(Shape5, xOutputRot, yOutputRot, zOutputRot);
core.render(f5);
outputMain.render(f5);
output1.render(f5);
output2.render(f5);
output3.render(f5);
output4.render(f5);
Shape1.render(f5);
Shape2.render(f5);
Shape3.render(f5);
Shape4.render(f5);
Shape5.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
}
}

View file

@ -1,6 +1,7 @@
package WayofTime.alchemicalWizardry.common.rituals;
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
import net.minecraft.entity.player.EntityPlayer;
@ -84,7 +85,7 @@ public class RitualEffectFeatheredKnife extends RitualEffect
{
entity = (EntityPlayer) iterator1.next();
if (entity.getClass().equals(EntityPlayerMP.class) || entity.getClass().equals(EntityPlayer.class))
if (!SpellHelper.isFakePlayer(world, entity))
{
entityCount++;
}
@ -110,7 +111,7 @@ public class RitualEffectFeatheredKnife extends RitualEffect
entity = (EntityPlayer) iterator2.next();
//entity = (EntityPlayer)iterator1.next();
if (entity.getClass().equals(EntityPlayerMP.class) || entity.getClass().equals(EntityPlayer.class))
if (!SpellHelper.isFakePlayer(world, entity))
{
if (entity.getHealth() > 6.2f)
{

View file

@ -524,7 +524,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
{
for(IProjectileImpactEffect impactEffect : impactList)
{
impactEffect.onEntityImpact(mop);
impactEffect.onEntityImpact(mop,this);
}
}
}

View file

@ -3,141 +3,134 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeDefaultEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeDefensiveEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeEnvironmentalEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeOffensiveEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileDefaultEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileDefensiveEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileEnvironmentalEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileOffensiveEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfDefaultEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfDefensiveEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfEnvironmentalEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfOffensiveEarth;
public class SpellEffectEarth extends SpellEffect
{
@Override
public void defaultModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.addImpactEffect(new ProjectileDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
}
@Override
public void offensiveModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.addImpactEffect(new ProjectileOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
}
@Override
public void defensiveModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.addImpactEffect(new ProjectileDefensiveEarth(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void environmentalModificationProjectile(SpellParadigmProjectile parad)
{
parad.addUpdateEffect(new ProjectileEnvironmentalEarth(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void defaultModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
parad.addSelfSpellEffect(new SelfDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
}
@Override
public void offensiveModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
parad.addSelfSpellEffect(new SelfOffensiveEarth(this.powerEnhancement,this.potencyEnhancement, this.costEnhancement));
}
@Override
public void defensiveModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
parad.addSelfSpellEffect(new SelfDefensiveEarth(this.powerEnhancement,this.potencyEnhancement, this.costEnhancement));
}
@Override
public void environmentalModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
parad.addSelfSpellEffect(new SelfEnvironmentalEarth(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void defaultModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addWorldEffect(new MeleeDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
}
@Override
public void offensiveModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addWorldEffect(new MeleeOffensiveEarth(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void defensiveModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addWorldEffect(new MeleeDefensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
}
@Override
public void environmentalModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addWorldEffect(new MeleeEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
}
@Override
protected int getCostForDefaultProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(10*Math.pow((0.5*(this.powerEnhancement)+1)*2 + 1,3)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForOffenseProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(10*(1.5*this.potencyEnhancement+1)*(Math.pow(1*this.powerEnhancement+1,2))*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForDefenseProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(3*Math.pow((this.powerEnhancement*2+1),2)*(this.potencyEnhancement*2+1)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForEnvironmentProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(10*2*(0.1d*(this.potencyEnhancement+1))*Math.pow(3.47,this.potencyEnhancement)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForDefaultSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(20*Math.pow(1.5*powerEnhancement+1,2)*(2*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForOffenseSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(10*Math.pow(2*this.powerEnhancement+1,2)*(this.potencyEnhancement+1));
}
@Override
protected int getCostForDefenseSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(750*(1.1*this.powerEnhancement+1)*(0.5*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override
@ -150,28 +143,24 @@ public class SpellEffectEarth extends SpellEffect
@Override
protected int getCostForDefaultMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(50*Math.pow(1.5*this.potencyEnhancement + 1,3)*(0.5*this.powerEnhancement + 1)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForOffenseMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(20*Math.pow(1.5*this.powerEnhancement+1,3)*(0.25*this.powerEnhancement+1));
}
@Override
protected int getCostForDefenseMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(5*(1.2*this.powerEnhancement+1)*(1.0f/3.0f*Math.pow(this.potencyEnhancement,2)+2+1.0f/2.0f*this.potencyEnhancement)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForEnvironmentMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(500*Math.pow(2*this.potencyEnhancement+1, 3)*(0.25*this.powerEnhancement+1)*Math.pow(0.8, costEnhancement));
}
}

View file

@ -4,6 +4,9 @@ import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileDefaultFire;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileDefensiveFire;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileEnvironmentalFire;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileOffensiveFire;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfDefaultFire;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfDefensiveFire;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfEnvironmentalFire;
@ -21,25 +24,19 @@ public class SpellEffectFire extends SpellEffect
@Override
public void offensiveModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.addImpactEffect(new ProjectileDefaultFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
parad.damage+=this.potencyEnhancement;
parad.addImpactEffect(new ProjectileOffensiveFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void defensiveModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.addImpactEffect(new ProjectileDefaultFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
parad.damage+=this.potencyEnhancement;
parad.addImpactEffect(new ProjectileDefensiveFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void environmentalModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.addImpactEffect(new ProjectileDefaultFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
parad.damage+=this.potencyEnhancement;
parad.addUpdateEffect(new ProjectileEnvironmentalFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
@ -97,48 +94,43 @@ public class SpellEffectFire extends SpellEffect
@Override
protected int getCostForDefaultProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)((5*Math.pow(1.5*this.powerEnhancement+1, 2)*(1.5*this.potencyEnhancement+1)+this.potencyEnhancement*15)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForOffenseProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(10*Math.pow((this.powerEnhancement)*1.3+1,2)*((1.5*this.potencyEnhancement+1))*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForDefenseProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(25*Math.pow(1*this.powerEnhancement+1,2)*(1*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForEnvironmentProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(75*(0.5*this.powerEnhancement+1)*(0.5*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForDefaultSelf()
{
return 10*(int)(10*Math.pow(1.5, this.powerEnhancement+1.5*this.potencyEnhancement));
return 10*(int)(10*Math.pow(1.5, this.powerEnhancement+1.5*this.potencyEnhancement)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForOffenseSelf()
{
return 500*(int)((this.powerEnhancement+1)*Math.pow(2, potencyEnhancement));
return 500*(int)((this.powerEnhancement+1)*Math.pow(2, potencyEnhancement)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForDefenseSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(25*(3*this.potencyEnhancement+1)*(2*this.powerEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override
@ -174,5 +166,4 @@ public class SpellEffectFire extends SpellEffect
// TODO Auto-generated method stub
return 0;
}
}

View file

@ -3,36 +3,34 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileDefaultWind;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileEnvironmentalWind;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileOffensiveWind;
public class SpellEffectWind extends SpellEffect
{
@Override
public void defaultModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.addImpactEffect(new ProjectileDefaultWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void offensiveModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.addImpactEffect(new ProjectileOffensiveWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void defensiveModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.ricochetMax+=this.potencyEnhancement;
}
@Override
public void environmentalModificationProjectile(SpellParadigmProjectile parad)
{
parad.addUpdateEffect(new ProjectileEnvironmentalWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
@ -94,15 +92,13 @@ public class SpellEffectWind extends SpellEffect
@Override
protected int getCostForDefaultProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(100*(this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForOffenseProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(100*(0.5*this.potencyEnhancement+1)*(this.powerEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override
@ -115,8 +111,7 @@ public class SpellEffectWind extends SpellEffect
@Override
protected int getCostForEnvironmentProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(50*(this.powerEnhancement+1)*(this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override

View file

@ -1,10 +1,11 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFluid;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
@ -16,6 +17,11 @@ import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.FakePlayer;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.oredict.OreDictionary;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.PacketHandler;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network.Player;
public class SpellHelper
{
@ -46,6 +52,11 @@ public class SpellHelper
return world.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(posX-0.5f, posY-0.5f, posZ-0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius));
}
public static List<EntityPlayer> getPlayersInRange(World world, double posX, double posY, double posZ, double horizontalRadius, double verticalRadius)
{
return world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(posX-0.5f, posY-0.5f, posZ-0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius));
}
public static double gaussian(double d)
{
return d * ((rand.nextFloat() - 0.5D));
@ -110,6 +121,11 @@ public class SpellHelper
}
}
public static String getUsername(EntityPlayer player)
{
return player.getDisplayName();
}
public static boolean isFakePlayer(World world, EntityPlayer player)
{
if(world.isRemote)
@ -135,4 +151,82 @@ public class SpellHelper
return false;
}
public static void smashBlock(World world, int posX, int posY, int posZ)
{
Block block = Block.blocksList[world.getBlockId(posX, posY, posZ)];
if(block==Block.stone)
{
world.setBlock(posX, posY, posZ, Block.cobblestone.blockID);
return;
}
else if(block==Block.cobblestone)
{
world.setBlock(posX, posY, posZ, Block.gravel.blockID);
return;
}
else if(block==Block.gravel)
{
world.setBlock(posX, posY, posZ, Block.sand.blockID);
return;
}
}
public static boolean isBlockFluid(Block block)
{
return block instanceof BlockFluid;
}
public static void evaporateWaterBlock(World world, int posX, int posY, int posZ)
{
Block block = Block.blocksList[world.getBlockId(posX, posY, posZ)];
if(block == Block.waterMoving || block == Block.waterStill)
{
world.setBlockToAir(posX, posY, posZ);
}
}
public static ItemStack getDustForOre(ItemStack item)
{
String oreName = OreDictionary.getOreName(OreDictionary.getOreID(item));
if(oreName.contains("ore"))
{
String lowercaseOre = oreName;
lowercaseOre.toLowerCase();
boolean isAllowed = false;
for(String str : AlchemicalWizardry.allowedCrushedOresArray)
{
if(lowercaseOre.contains(str))
{
isAllowed = true;
}
}
if(!isAllowed)
{
return null;
}
String dustName = oreName.replace("ore", "dust");
ArrayList<ItemStack> items = OreDictionary.getOres(dustName);
if(items!=null && items.size()>=1)
{
return(items.get(0).copy());
}
}
return null;
}
public static void setPlayerSpeedFromServer(EntityPlayer player, double xVel, double yVel, double zVel)
{
PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(xVel, yVel, zVel), (Player)player);
}
}

View file

@ -6,6 +6,6 @@ import net.minecraft.world.World;
public interface IProjectileImpactEffect
{
public void onEntityImpact(Entity mop);
public void onEntityImpact(Entity mop, Entity proj);
public void onTileImpact(World world, MovingObjectPosition mop);
}

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