Added the method to create the Omega armours, though it wasn't a secret for a while! :D

Added the ability to enchant omega armour in such a way that there won't be a single best method
A bunch of other stuff I can't remember. Fun times!
This commit is contained in:
WayofTime 2015-04-11 15:43:06 -04:00
parent afa3988a21
commit b725f7b814
34 changed files with 477 additions and 146 deletions

View file

@ -1,7 +1,6 @@
package thaumcraft.api.aspects; package thaumcraft.api.aspects;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
/** /**
* *

View file

@ -284,7 +284,7 @@ import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
@Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.3.1", guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory") @Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.3.2", guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory")
public class AlchemicalWizardry public class AlchemicalWizardry
{ {
@ -731,6 +731,7 @@ public class AlchemicalWizardry
customPotionAmphibian = (new PotionAmphibian(customPotionAmphibianID, false, 0).setIconIndex(0, 0).setPotionName("Amphibian")); customPotionAmphibian = (new PotionAmphibian(customPotionAmphibianID, false, 0).setIconIndex(0, 0).setPotionName("Amphibian"));
ItemStack masterBloodOrbStack = new ItemStack(ModItems.masterBloodOrb); ItemStack masterBloodOrbStack = new ItemStack(ModItems.masterBloodOrb);
ItemStack transcendentBloodOrbStack = new ItemStack(ModItems.transcendentBloodOrb);
// ModBlocks.blockLifeEssence.setUnlocalizedName("lifeEssenceBlock"); // ModBlocks.blockLifeEssence.setUnlocalizedName("lifeEssenceBlock");
FluidContainerRegistry.registerFluidContainer(lifeEssenceFluid, new ItemStack(ModItems.bucketLife), FluidContainerRegistry.EMPTY_BUCKET); FluidContainerRegistry.registerFluidContainer(lifeEssenceFluid, new ItemStack(ModItems.bucketLife), FluidContainerRegistry.EMPTY_BUCKET);
@ -1071,7 +1072,10 @@ public class AlchemicalWizardry
GameRegistry.addRecipe(new ItemStack(ModItems.outputRoutingFocus, 1, 3), "sgs", "geg", "sgs", 'e', enderShardStack, 's', stickStack, 'g', obsidianStack); GameRegistry.addRecipe(new ItemStack(ModItems.outputRoutingFocus, 1, 3), "sgs", "geg", "sgs", 'e', enderShardStack, 's', stickStack, 'g', obsidianStack);
GameRegistry.addRecipe(new ItemStack(ModItems.outputRoutingFocus, 1, 4), "sgs", "geg", "sgs", 'e', enderShardStack, 's', stickStack, 'g', stringStack); GameRegistry.addRecipe(new ItemStack(ModItems.outputRoutingFocus, 1, 4), "sgs", "geg", "sgs", 'e', enderShardStack, 's', stickStack, 'g', stringStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockStabilityGlyph), "1s1", "grg", "bob", 'o', transcendentBloodOrbStack, 'r', bloodRuneStack, '1', crepitousStack, 'g', etherealSlateStack, 'b', praesidiumStack, 's', magicalesStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockEnchantmentGlyph, 1, 0), "1s1", "grg", "bob", 'o', transcendentBloodOrbStack, 'r', bloodRuneStack, 'g', etherealSlateStack, 'b', magicalesStack, '1', offensaStack, 's', lifeShardStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockEnchantmentGlyph, 1, 1), "1s1", "grg", "bob", 'o', transcendentBloodOrbStack, 'r', bloodRuneStack, 'g', etherealSlateStack, 'b', magicalesStack, '1', virtusStack, 's', soulShardStack);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.flint, 2, 0), 1, new ItemStack[]{new ItemStack(Blocks.gravel), new ItemStack(Items.flint)}, 1); AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.flint, 2, 0), 1, new ItemStack[]{new ItemStack(Blocks.gravel), new ItemStack(Items.flint)}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.grass), 2, new ItemStack[]{new ItemStack(Blocks.dirt), new ItemStack(Items.dye, 1, 15), new ItemStack(Items.wheat_seeds), new ItemStack(Items.wheat_seeds)}, 1); AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.grass), 2, new ItemStack[]{new ItemStack(Blocks.dirt), new ItemStack(Items.dye, 1, 15), new ItemStack(Items.wheat_seeds), new ItemStack(Items.wheat_seeds)}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.leather, 3, 0), 2, new ItemStack[]{new ItemStack(Items.rotten_flesh), new ItemStack(Items.rotten_flesh), new ItemStack(Items.rotten_flesh), waterBucketStack, new ItemStack(Items.flint)}, 1); AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.leather, 3, 0), 2, new ItemStack[]{new ItemStack(Items.rotten_flesh), new ItemStack(Items.rotten_flesh), new ItemStack(Items.rotten_flesh), waterBucketStack, new ItemStack(Items.flint)}, 1);
@ -1086,6 +1090,8 @@ public class AlchemicalWizardry
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.soul_sand, 3, 0), 3, new ItemStack[]{new ItemStack(Blocks.sand), new ItemStack(Blocks.sand), new ItemStack(Blocks.sand), waterBucketStack, weakBloodShardStack}, 3); AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.soul_sand, 3, 0), 3, new ItemStack[]{new ItemStack(Blocks.sand), new ItemStack(Blocks.sand), new ItemStack(Blocks.sand), waterBucketStack, weakBloodShardStack}, 3);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.mycelium, 1, 0), 5, new ItemStack[]{new ItemStack(Blocks.grass), new ItemStack(Blocks.brown_mushroom), new ItemStack(Blocks.red_mushroom)}, 2); AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.mycelium, 1, 0), 5, new ItemStack[]{new ItemStack(Blocks.grass), new ItemStack(Blocks.brown_mushroom), new ItemStack(Blocks.red_mushroom)}, 2);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.ice), 2, new ItemStack[]{waterBucketStack, new ItemStack(Items.snowball)}, 1); AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.ice), 2, new ItemStack[]{waterBucketStack, new ItemStack(Items.snowball)}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.potionitem, 1, 0), 1, new ItemStack[]{new ItemStack(Items.glass_bottle), new ItemStack(Blocks.cactus)}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.glass_bottle, 3), 1, new ItemStack[]{glassStack, glassStack, glassStack}, 1);
} }
@EventHandler @EventHandler

View file

@ -22,6 +22,7 @@ import WayofTime.alchemicalWizardry.common.block.BlockSpellEffect;
import WayofTime.alchemicalWizardry.common.block.BlockSpellEnhancement; import WayofTime.alchemicalWizardry.common.block.BlockSpellEnhancement;
import WayofTime.alchemicalWizardry.common.block.BlockSpellModifier; import WayofTime.alchemicalWizardry.common.block.BlockSpellModifier;
import WayofTime.alchemicalWizardry.common.block.BlockSpellParadigm; import WayofTime.alchemicalWizardry.common.block.BlockSpellParadigm;
import WayofTime.alchemicalWizardry.common.block.BlockStabilityGlyph;
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
import WayofTime.alchemicalWizardry.common.block.BlockWritingTable; import WayofTime.alchemicalWizardry.common.block.BlockWritingTable;
import WayofTime.alchemicalWizardry.common.block.BloodRune; import WayofTime.alchemicalWizardry.common.block.BloodRune;
@ -41,10 +42,12 @@ import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.BlockDemonChe
import WayofTime.alchemicalWizardry.common.items.ItemBlockCrystalBelljar; import WayofTime.alchemicalWizardry.common.items.ItemBlockCrystalBelljar;
import WayofTime.alchemicalWizardry.common.items.ItemBloodRuneBlock; import WayofTime.alchemicalWizardry.common.items.ItemBloodRuneBlock;
import WayofTime.alchemicalWizardry.common.items.ItemCrystalBlock; import WayofTime.alchemicalWizardry.common.items.ItemCrystalBlock;
import WayofTime.alchemicalWizardry.common.items.ItemEnchantmentGlyphBlock;
import WayofTime.alchemicalWizardry.common.items.ItemSpellEffectBlock; import WayofTime.alchemicalWizardry.common.items.ItemSpellEffectBlock;
import WayofTime.alchemicalWizardry.common.items.ItemSpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.items.ItemSpellEnhancementBlock;
import WayofTime.alchemicalWizardry.common.items.ItemSpellModifierBlock; import WayofTime.alchemicalWizardry.common.items.ItemSpellModifierBlock;
import WayofTime.alchemicalWizardry.common.items.ItemSpellParadigmBlock; import WayofTime.alchemicalWizardry.common.items.ItemSpellParadigmBlock;
import WayofTime.alchemicalWizardry.common.items.ItemStabilityGlyphBlock;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
/** /**
@ -94,6 +97,7 @@ public class ModBlocks
public static Block blockCrystal; public static Block blockCrystal;
public static Block blockMimic; public static Block blockMimic;
public static Block blockEnchantmentGlyph; public static Block blockEnchantmentGlyph;
public static Block blockStabilityGlyph;
public static void init() public static void init()
@ -136,6 +140,7 @@ public class ModBlocks
blockLifeEssence = new LifeEssenceBlock(); blockLifeEssence = new LifeEssenceBlock();
blockEnchantmentGlyph = new BlockEnchantmentGlyph(); blockEnchantmentGlyph = new BlockEnchantmentGlyph();
blockStabilityGlyph = new BlockStabilityGlyph();
} }
public static void registerBlocksInPre() public static void registerBlocksInPre()
@ -179,7 +184,8 @@ public class ModBlocks
GameRegistry.registerBlock(ModBlocks.blockDemonChest, "blockDemonChest"); GameRegistry.registerBlock(ModBlocks.blockDemonChest, "blockDemonChest");
GameRegistry.registerBlock(ModBlocks.blockCrystal, ItemCrystalBlock.class, "blockCrystal"); GameRegistry.registerBlock(ModBlocks.blockCrystal, ItemCrystalBlock.class, "blockCrystal");
GameRegistry.registerBlock(ModBlocks.blockMimic, "blockMimic"); GameRegistry.registerBlock(ModBlocks.blockMimic, "blockMimic");
GameRegistry.registerBlock(ModBlocks.blockEnchantmentGlyph, "blockEnchantmentGlyph"); GameRegistry.registerBlock(ModBlocks.blockEnchantmentGlyph, ItemEnchantmentGlyphBlock.class, "blockEnchantmentGlyph");
GameRegistry.registerBlock(ModBlocks.blockStabilityGlyph, ItemStabilityGlyphBlock.class, "blockStabilityGlyph");
} }
public static void registerBlocksInInit() public static void registerBlocksInInit()

View file

@ -417,7 +417,7 @@ public class SoulNetworkHandler
public static String getUsername(EntityPlayer player) public static String getUsername(EntityPlayer player)
{ {
return player.getDisplayName(); return player.getCommandSenderName();
} }
public static EntityPlayer getPlayerForUsername(String str) public static EntityPlayer getPlayerForUsername(String str)

View file

@ -7,8 +7,6 @@ import net.minecraftforge.client.event.sound.SoundEvent;
import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.ModBlocks;
import WayofTime.alchemicalWizardry.client.renderer.RenderHelper; import WayofTime.alchemicalWizardry.client.renderer.RenderHelper;
import WayofTime.alchemicalWizardry.common.ClientToServerPacketHandler;
import WayofTime.alchemicalWizardry.common.MessageKeyPressed;
import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.eventhandler.Event.Result; import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@ -23,12 +21,12 @@ public class ClientEventHandler
@SubscribeEvent @SubscribeEvent
public void onKeyInput(InputEvent.KeyInputEvent event) public void onKeyInput(InputEvent.KeyInputEvent event)
{ {
if(KeyBindings.omegaTest.isPressed()) // if(KeyBindings.omegaTest.isPressed())
{ // {
System.out.println("ping"); // System.out.println("ping");
// NewPacketHandler.INSTANCE.sendToServer(NewPacketHandler.getKeyboardPressPacket((byte)2)); //// NewPacketHandler.INSTANCE.sendToServer(NewPacketHandler.getKeyboardPressPacket((byte)2));
ClientToServerPacketHandler.INSTANCE.sendToServer(new MessageKeyPressed(MessageKeyPressed.Key.OMEGA_ACTIVE)); // ClientToServerPacketHandler.INSTANCE.sendToServer(new MessageKeyPressed(MessageKeyPressed.Key.OMEGA_ACTIVE));
} // }
} }
@SubscribeEvent @SubscribeEvent

View file

@ -110,7 +110,7 @@ public class ClientProxy extends CommonProxy
public void registerPostSideObjects() public void registerPostSideObjects()
{ {
BUEntries entries = new BUEntries(); BUEntries entries = new BUEntries();
entries.postInit(); // entries.postInit();
} }
@Override @Override

View file

@ -2,18 +2,14 @@ package WayofTime.alchemicalWizardry.client;
import net.minecraft.client.settings.KeyBinding; import net.minecraft.client.settings.KeyBinding;
import org.lwjgl.input.Keyboard;
import cpw.mods.fml.client.registry.ClientRegistry;
public class KeyBindings public class KeyBindings
{ {
public static KeyBinding omegaTest; public static KeyBinding omegaTest;
public static void init() public static void init()
{ {
omegaTest = new KeyBinding("key.ping", Keyboard.KEY_O, "key.categories.alchemicalwizardry"); // omegaTest = new KeyBinding("key.ping", Keyboard.KEY_O, "key.categories.alchemicalwizardry");
//
ClientRegistry.registerKeyBinding(omegaTest); // ClientRegistry.registerKeyBinding(omegaTest);
} }
} }

View file

@ -150,7 +150,6 @@ public class AlchemicalWizardryEventHooks
System.out.println("HP: " + hp); System.out.println("HP: " + hp);
APISpellHelper.setCurrentAdditionalHP(player, Math.max(0, hp)); APISpellHelper.setCurrentAdditionalHP(player, Math.max(0, hp));
NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getAddedHPPacket(Math.max(0, hp), APISpellHelper.getCurrentAdditionalMaxHP(player)), (EntityPlayerMP)player); NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getAddedHPPacket(Math.max(0, hp), APISpellHelper.getCurrentAdditionalMaxHP(player)), (EntityPlayerMP)player);
} }
} }
} }

View file

@ -1,8 +1,14 @@
package WayofTime.alchemicalWizardry.common.block; package WayofTime.alchemicalWizardry.common.block;
import java.util.List;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World; import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.omega.IEnchantmentGlyph; import WayofTime.alchemicalWizardry.common.omega.IEnchantmentGlyph;
@ -11,13 +17,16 @@ import cpw.mods.fml.relauncher.SideOnly;
public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph
{ {
public IIcon enchantability;
public IIcon enchantmentLevel;
public BlockEnchantmentGlyph() public BlockEnchantmentGlyph()
{ {
super(Material.iron); super(Material.iron);
setHardness(2.0F); setHardness(2.0F);
setResistance(5.0F); setResistance(5.0F);
setCreativeTab(AlchemicalWizardry.tabBloodMagic); setCreativeTab(AlchemicalWizardry.tabBloodMagic);
this.setBlockName("enchantmentGlypg"); this.setBlockName("enchantmentGlyph");
} }
@Override @Override
@ -25,17 +34,69 @@ public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph
public void registerBlockIcons(IIconRegister iconRegister) public void registerBlockIcons(IIconRegister iconRegister)
{ {
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:LargeBloodStoneBrick"); this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:LargeBloodStoneBrick");
this.enchantability = iconRegister.registerIcon("AlchemicalWizardry:GlyphEnchantability");
this.enchantmentLevel = iconRegister.registerIcon("AlchemicalWizardry:GlyphEnchantmentLevel");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta)
{
switch (meta)
{
case 0:
return enchantability;
case 1:
return enchantmentLevel;
default:
return this.blockIcon;
}
} }
@Override @Override
public int getSubtractedStabilityForFaceCount(World world, int x, int y, int z, int meta, int faceCount) public int getAdditionalStabilityForFaceCount(World world, int x, int y, int z, int meta, int faceCount)
{ {
return faceCount * 20; switch(meta)
{
case 0:
return -faceCount * 10;
case 1:
return -faceCount * 20;
default:
return -faceCount * 20;
}
} }
@Override @Override
public int getEnchantability(World world, int x, int y, int z, int meta) public int getEnchantability(World world, int x, int y, int z, int meta)
{ {
return 1; switch(meta)
{
case 0:
return 1;
default:
return 0;
}
} }
@Override
public int getEnchantmentLevel(World world, int x, int y, int z, int meta)
{
switch(meta)
{
case 1:
return 1;
default:
return 0;
}
}
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List)
{
for(int i=0; i<2; i++)
{
par3List.add(new ItemStack(par1, 1, i));
}
}
} }

View file

@ -0,0 +1,73 @@
package WayofTime.alchemicalWizardry.common.block;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.omega.IStabilityGlyph;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockStabilityGlyph extends Block implements IStabilityGlyph
{
public IIcon stability1;
public BlockStabilityGlyph()
{
super(Material.iron);
setHardness(2.0F);
setResistance(5.0F);
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
this.setBlockName("stabilityGlyph");
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister)
{
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:LargeBloodStoneBrick");
this.stability1 = iconRegister.registerIcon("AlchemicalWizardry:GlyphStability1");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta)
{
switch (meta)
{
case 0:
return stability1;
default:
return this.blockIcon;
}
}
@Override
public int getAdditionalStabilityForFaceCount(World world, int x, int y, int z, int meta, int faceCount)
{
switch(meta)
{
case 0:
return faceCount * 2;
default:
return faceCount;
}
}
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List)
{
for(int i=0; i<1; i++)
{
par3List.add(new ItemStack(par1, 1, i));
}
}
}

View file

@ -1,16 +1,15 @@
package WayofTime.alchemicalWizardry.common.commands; package WayofTime.alchemicalWizardry.common.commands;
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import java.util.List;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import net.minecraft.command.CommandBase; import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException; import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender; import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.server.MinecraftServer; import net.minecraft.server.MinecraftServer;
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
import java.util.List; import WayofTime.alchemicalWizardry.common.items.EnergyItems;
public class CommandBind extends CommandBase public class CommandBind extends CommandBase
{ {

View file

@ -1,18 +1,14 @@
package WayofTime.alchemicalWizardry.common.items; package WayofTime.alchemicalWizardry.common.items;
import WayofTime.alchemicalWizardry.AlchemicalWizardry; import java.util.ArrayList;
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import java.util.List;
import WayofTime.alchemicalWizardry.common.ItemType;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockLeavesBase; import net.minecraft.block.BlockLeavesBase;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -22,12 +18,16 @@ import net.minecraft.util.StatCollector;
import net.minecraft.util.Vec3; import net.minecraft.util.Vec3;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.ForgeHooks;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import java.util.ArrayList; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
import java.util.List; import WayofTime.alchemicalWizardry.common.ItemType;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import com.google.common.collect.HashMultiset; import com.google.common.collect.HashMultiset;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BoundAxe extends ItemAxe implements IBindable public class BoundAxe extends ItemAxe implements IBindable
{ {
public float efficiencyOnProperMaterial = 12.0F; public float efficiencyOnProperMaterial = 12.0F;

View file

@ -1,5 +1,24 @@
package WayofTime.alchemicalWizardry.common.items; package WayofTime.alchemicalWizardry.common.items;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
import WayofTime.alchemicalWizardry.common.ItemType; import WayofTime.alchemicalWizardry.common.ItemType;
@ -10,26 +29,6 @@ import com.google.common.collect.Multimap;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
import java.util.ArrayList;
import java.util.List;
public class BoundShovel extends ItemSpade implements IBindable public class BoundShovel extends ItemSpade implements IBindable
{ {

View file

@ -8,8 +8,6 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.boss.EntityDragon;
import net.minecraft.entity.boss.EntityWither;
import net.minecraft.entity.boss.IBossDisplayData; import net.minecraft.entity.boss.IBossDisplayData;
import net.minecraft.entity.monster.EntityEnderman; import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.entity.monster.EntitySlime; import net.minecraft.entity.monster.EntitySlime;

View file

@ -0,0 +1,42 @@
package WayofTime.alchemicalWizardry.common.items;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
public class ItemEnchantmentGlyphBlock extends ItemBlock
{
public ItemEnchantmentGlyphBlock(Block block)
{
super(block);
setHasSubtypes(true);
}
@Override
public String getUnlocalizedName(ItemStack itemstack)
{
String name = "";
switch (itemstack.getItemDamage())
{
case 0:
name = "enchantability";
break;
case 1:
name = "enchantmentLevel";
break;
default:
name = "broken";
}
return getUnlocalizedName() + "." + name;
}
@Override
public int getMetadata(int par1)
{
return par1;
}
}

View file

@ -0,0 +1,38 @@
package WayofTime.alchemicalWizardry.common.items;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
public class ItemStabilityGlyphBlock extends ItemBlock
{
public ItemStabilityGlyphBlock(Block block)
{
super(block);
setHasSubtypes(true);
}
@Override
public String getUnlocalizedName(ItemStack itemstack)
{
String name = "";
switch (itemstack.getItemDamage())
{
case 0:
name = "stability1";
break;
default:
name = "broken";
}
return getUnlocalizedName() + "." + name;
}
@Override
public int getMetadata(int par1)
{
return par1;
}
}

View file

@ -373,7 +373,14 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
this.setIsInvisible(itemStack, player.isPotionActive(Potion.invisibility.id)); this.setIsInvisible(itemStack, player.isPotionActive(Potion.invisibility.id));
if (itemStack.getItemDamage() > 0) this.repairArmour(world, player, itemStack);
return;
}
public void repairArmour(World world, EntityPlayer player, ItemStack itemStack)
{
if (itemStack.getItemDamage() > 0)
{ {
EnergyItems.checkAndSetItemOwner(itemStack, player); EnergyItems.checkAndSetItemOwner(itemStack, player);
@ -385,8 +392,6 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
} }
} }
} }
return;
} }
public void tickInternalInventory(ItemStack par1ItemStack, World par2World, EntityPlayer par3Entity, int par4, boolean par5) public void tickInternalInventory(ItemStack par1ItemStack, World par2World, EntityPlayer par3Entity, int par4, boolean par5)

View file

@ -23,6 +23,8 @@ import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenBase;
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -36,6 +38,8 @@ public abstract class OmegaArmour extends BoundArmour
protected boolean storeYLevel = false; protected boolean storeYLevel = false;
protected boolean storeSeesSky = false; protected boolean storeSeesSky = false;
public float reagentDrainPerDamage = 0.1f;
public OmegaArmour(int armorType) public OmegaArmour(int armorType)
{ {
super(armorType); super(armorType);
@ -94,13 +98,34 @@ public abstract class OmegaArmour extends BoundArmour
} }
} }
@Override
public void repairArmour(World world, EntityPlayer player, ItemStack itemStack)
{
if (itemStack.getItemDamage() > 0)
{
if (!player.capabilities.isCreativeMode)
{
if(EnergyItems.syphonBatteries(itemStack, player, itemStack.getItemDamage() * 75))
{
Reagent reagent = APISpellHelper.getPlayerReagentType(player);
float reagentAmount = APISpellHelper.getPlayerCurrentReagentAmount(player);
reagentAmount -= itemStack.getItemDamage() * reagentDrainPerDamage;
APISpellHelper.setPlayerCurrentReagentAmount(player, Math.max(0, reagentAmount));
itemStack.setItemDamage(0);
}
}
}
}
public void revertArmour(EntityPlayer player, ItemStack itemStack) public void revertArmour(EntityPlayer player, ItemStack itemStack)
{ {
ItemStack stack = this.getContainedArmourStack(itemStack); ItemStack stack = this.getContainedArmourStack(itemStack);
player.inventory.armorInventory[3-this.armorType] = stack; player.inventory.armorInventory[3-this.armorType] = stack;
} }
public ItemStack getSubstituteStack(ItemStack boundStack, int stability, int affinity, int enchantability, Random rand) public ItemStack getSubstituteStack(ItemStack boundStack, int stability, int affinity, int enchantability, int enchantmentLevel, Random rand)
{ {
ItemStack omegaStack = new ItemStack(this); ItemStack omegaStack = new ItemStack(this);
if(boundStack != null && boundStack.hasTagCompound()) if(boundStack != null && boundStack.hasTagCompound())
@ -110,13 +135,16 @@ public abstract class OmegaArmour extends BoundArmour
} }
this.setContainedArmourStack(omegaStack, boundStack); this.setContainedArmourStack(omegaStack, boundStack);
SoulNetworkHandler.checkAndSetItemOwner(omegaStack, SoulNetworkHandler.getOwnerName(boundStack)); SoulNetworkHandler.checkAndSetItemOwner(omegaStack, SoulNetworkHandler.getOwnerName(boundStack));
this.setItemEnchantability(omegaStack, 70); this.setItemEnchantability(omegaStack, Math.min(enchantability, 70));
List enchantList = new ArrayList(); List enchantList = new ArrayList();
for(int i=0; i<100; i++) int adjustedEnchantLevel = Math.min(enchantmentLevel, 30);
int additionalPasses = enchantmentLevel - adjustedEnchantLevel;
for(int i=0; i<1+additionalPasses; i++)
{ {
List lst = EnchantmentHelper.buildEnchantmentList(rand, omegaStack, 30); List lst = EnchantmentHelper.buildEnchantmentList(rand, omegaStack, adjustedEnchantLevel);
if(lst != null) if(lst != null)
{ {
enchantList.addAll(lst); enchantList.addAll(lst);

View file

@ -2,8 +2,8 @@ package WayofTime.alchemicalWizardry.common.omega;
import net.minecraft.world.World; import net.minecraft.world.World;
public interface IEnchantmentGlyph public interface IEnchantmentGlyph extends IStabilityGlyph
{ {
public int getSubtractedStabilityForFaceCount(World world, int x, int y, int z, int meta, int faceCount);
public int getEnchantability(World world, int x, int y, int z, int meta); public int getEnchantability(World world, int x, int y, int z, int meta);
public int getEnchantmentLevel(World world, int x, int y, int z, int meta);
} }

View file

@ -0,0 +1,8 @@
package WayofTime.alchemicalWizardry.common.omega;
import net.minecraft.world.World;
public interface IStabilityGlyph
{
public int getAdditionalStabilityForFaceCount(World world, int x, int y, int z, int meta, int faceCount);
}

View file

@ -38,7 +38,7 @@ public class OmegaParadigm
this.config = new ReagentRegenConfiguration(20, 10, 1); this.config = new ReagentRegenConfiguration(20, 10, 1);
} }
public boolean convertPlayerArmour(EntityPlayer player, int x, int y, int z, int stability, int affinity, int enchantability) public boolean convertPlayerArmour(EntityPlayer player, int x, int y, int z, int stability, int affinity, int enchantability, int enchantmentLevel)
{ {
ItemStack[] armours = player.inventory.armorInventory; ItemStack[] armours = player.inventory.armorInventory;
@ -49,12 +49,14 @@ public class OmegaParadigm
if(helmetStack != null && helmetStack.getItem() == ModItems.boundHelmet && chestStack != null && chestStack.getItem() == ModItems.boundPlate && leggingsStack != null && leggingsStack.getItem() == ModItems.boundLeggings && bootsStack != null && bootsStack.getItem() == ModItems.boundBoots) if(helmetStack != null && helmetStack.getItem() == ModItems.boundHelmet && chestStack != null && chestStack.getItem() == ModItems.boundPlate && leggingsStack != null && leggingsStack.getItem() == ModItems.boundLeggings && bootsStack != null && bootsStack.getItem() == ModItems.boundBoots)
{ {
System.out.println("Enchantability: " + enchantability);
long worldSeed = player.worldObj.getSeed(); long worldSeed = player.worldObj.getSeed();
Random rand = new Random(worldSeed + stability * (affinity + 7) * 94 + 84321*x - 17423*y + 76*z - 1623451*enchantability); Random rand = new Random(worldSeed + stability * (affinity + 7) * 94 + 84321*x - 17423*y + 76*z - 1623451*enchantability + 2 * enchantmentLevel);
ItemStack omegaHelmetStack = helmet.getSubstituteStack(helmetStack, stability, affinity, enchantability, rand); ItemStack omegaHelmetStack = helmet.getSubstituteStack(helmetStack, stability, affinity, enchantability, enchantmentLevel, rand);
ItemStack omegaChestStack = chestPiece.getSubstituteStack(chestStack, stability, affinity, enchantability, rand); ItemStack omegaChestStack = chestPiece.getSubstituteStack(chestStack, stability, affinity, enchantability, enchantmentLevel, rand);
ItemStack omegaLeggingsStack = leggings.getSubstituteStack(leggingsStack, stability, affinity, enchantability, rand); ItemStack omegaLeggingsStack = leggings.getSubstituteStack(leggingsStack, stability, affinity, enchantability, enchantmentLevel, rand);
ItemStack omegaBootsStack = boots.getSubstituteStack(bootsStack, stability, affinity, enchantability, rand); ItemStack omegaBootsStack = boots.getSubstituteStack(bootsStack, stability, affinity, enchantability, enchantmentLevel, rand);
armours[3] = omegaHelmetStack; armours[3] = omegaHelmetStack;
armours[2] = omegaChestStack; armours[2] = omegaChestStack;

View file

@ -7,7 +7,7 @@ import WayofTime.alchemicalWizardry.api.Int3;
public class OmegaStructureHandler public class OmegaStructureHandler
{ {
public static final OmegaStructureParameters emptyParam = new OmegaStructureParameters(0, 0); public static final OmegaStructureParameters emptyParam = new OmegaStructureParameters(0, 0, 0);
public static boolean isStructureIntact(World world, int x, int y, int z) public static boolean isStructureIntact(World world, int x, int y, int z)
{ {
@ -155,6 +155,7 @@ public class OmegaStructureHandler
int tally = 0; int tally = 0;
int enchantability = 0; int enchantability = 0;
int enchantmentLevel = 0;
for (int i = 0; i < 2 * range + 1; i++) for (int i = 0; i < 2 * range + 1; i++)
{ {
@ -198,23 +199,27 @@ public class OmegaStructureHandler
{ {
indTally++; indTally++;
} }
Block block = world.getBlock(x - range + i, y - range + j, z - range + k); Block block = world.getBlock(x - range + i, y - range + j, z - range + k);
int meta = 0; int meta = world.getBlockMetadata(x - range + i, y - range + j, z - range + k);
if(block instanceof IEnchantmentGlyph) if(block instanceof IEnchantmentGlyph)
{ {
tally -= ((IEnchantmentGlyph)block).getSubtractedStabilityForFaceCount(world, x-range+i, y-range+j, z-range+k, meta, indTally); tally += ((IEnchantmentGlyph)block).getAdditionalStabilityForFaceCount(world, x-range+i, y-range+j, z-range+k, meta, indTally);
enchantability += ((IEnchantmentGlyph)block).getEnchantability(world, x-range+i, y-range+j, z-range+k, meta); enchantability += ((IEnchantmentGlyph)block).getEnchantability(world, x-range+i, y-range+j, z-range+k, meta);
enchantmentLevel += ((IEnchantmentGlyph)block).getEnchantmentLevel(world, x-range+i, y-range+j, z-range+k, meta);
}else if(block instanceof IStabilityGlyph)
{
tally += ((IStabilityGlyph)block).getAdditionalStabilityForFaceCount(world, x-range+i, y-range+j, z-range+k, meta, indTally);
}else }else
{ {
tally += indTally; tally += indTally;
} }
} }
} }
} }
return new OmegaStructureParameters(tally, enchantability); return new OmegaStructureParameters(tally, enchantability, enchantmentLevel);
} }
public static OmegaStructureParameters getStructureStabilityFactor(World world, int x, int y, int z, int expLim) public static OmegaStructureParameters getStructureStabilityFactor(World world, int x, int y, int z, int expLim)

View file

@ -4,10 +4,12 @@ public class OmegaStructureParameters
{ {
public final int stability; public final int stability;
public final int enchantability; public final int enchantability;
public final int enchantmentLevel;
public OmegaStructureParameters(int stability, int enchantability) public OmegaStructureParameters(int stability, int enchantability, int enchantmentLevel)
{ {
this.stability = stability; this.stability = stability;
this.enchantability = enchantability; this.enchantability = enchantability;
this.enchantmentLevel = enchantmentLevel;
} }
} }

View file

@ -1,14 +1,21 @@
package WayofTime.alchemicalWizardry.common.rituals; package WayofTime.alchemicalWizardry.common.rituals;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.Int3;
import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler;
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
@ -23,7 +30,9 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
public class RitualEffectOmegaTest extends RitualEffect public class RitualEffectOmegaTest extends RitualEffect
{ {
public static final int tickDuration = 1 * 60 * 20; public static final boolean isTesting = true;
public static final int drainTotal = 32 * 1000;
@Override @Override
public void performEffect(IMasterRitualStone ritualStone) public void performEffect(IMasterRitualStone ritualStone)
{ {
@ -43,27 +52,106 @@ public class RitualEffectOmegaTest extends RitualEffect
OmegaStructureParameters param = OmegaStructureHandler.getStructureStabilityFactor(world, x, y, z, 5, new Int3(0,1,0)); OmegaStructureParameters param = OmegaStructureHandler.getStructureStabilityFactor(world, x, y, z, 5, new Int3(0,1,0));
int stab = param.stability; int stab = param.stability;
int enchantability = param.enchantability; int enchantability = param.enchantability;
int enchantmentLevel = param.enchantmentLevel;
System.out.println("Stability: " + stab); System.out.println("Stability: " + stab + ", Enchantability: " + enchantability + ", Enchantment Level: " + enchantmentLevel);
double range = 0.5; double range = 0.5;
List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, x + 0.5, y + 1.5, z + 0.5, range, range); List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, x + 0.5, y + 1.5, z + 0.5, range, range);
Reagent reagent = null;
Map<Reagent, Integer> reagentMap = new HashMap();
for(int i=0; i<4; i++)
{
Int3 jarLoc = this.getJarLocation(i);
TileEntity tile = world.getTileEntity(x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord);
if(tile instanceof IReagentHandler)
{
IReagentHandler container = (IReagentHandler)tile;
ReagentContainerInfo[] containerInfoArray = container.getContainerInfo(ForgeDirection.UP);
if(containerInfoArray == null)
{
continue;
}
for(ReagentContainerInfo containerInfo : containerInfoArray)
{
ReagentStack containedReagent = containerInfo.reagent;
if(containedReagent == null)
{
continue;
}
Reagent rea = containedReagent.reagent;
int amt = containedReagent.amount;
if(reagentMap.containsKey(rea))
{
reagentMap.put(rea, reagentMap.get(rea) + amt);
}else
{
reagentMap.put(rea, amt);
}
}
}
}
for(Entry<Reagent, Integer> entry : reagentMap.entrySet())
{
if(entry.getValue() >= drainTotal)
{
reagent = entry.getKey();
break;
}
}
if(reagent == null)
{
return;
}
int tickDuration = isTesting ? 20 * 30 : 15 * 20 * 60 + (int)((15 * 20 * 60) * Math.sqrt(stab / 700));
int affinity = 0;
for(EntityPlayer player : playerList) for(EntityPlayer player : playerList)
{ {
Reagent reagent = ReagentRegistry.aetherReagent;
int affinity = 0;
OmegaParadigm waterParadigm = OmegaRegistry.getParadigmForReagent(reagent); OmegaParadigm waterParadigm = OmegaRegistry.getParadigmForReagent(reagent);
if(waterParadigm != null && waterParadigm.convertPlayerArmour(player, x, y, z, stab, affinity, enchantability)) if(waterParadigm != null && waterParadigm.convertPlayerArmour(player, x, y, z, stab, affinity, enchantability, enchantmentLevel))
{ {
APISpellHelper.setPlayerCurrentReagentAmount(player, tickDuration); APISpellHelper.setPlayerCurrentReagentAmount(player, tickDuration);
APISpellHelper.setPlayerMaxReagentAmount(player, tickDuration); APISpellHelper.setPlayerMaxReagentAmount(player, tickDuration);
APISpellHelper.setPlayerReagentType(player, reagent); APISpellHelper.setPlayerReagentType(player, reagent);
APISpellHelper.setCurrentAdditionalMaxHP(player, waterParadigm.getMaxAdditionalHealth()); APISpellHelper.setCurrentAdditionalMaxHP(player, waterParadigm.getMaxAdditionalHealth());
NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getReagentBarPacket(reagent, APISpellHelper.getPlayerCurrentReagentAmount(player), APISpellHelper.getPlayerMaxReagentAmount(player)), (EntityPlayerMP)player); NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getReagentBarPacket(reagent, APISpellHelper.getPlayerCurrentReagentAmount(player), APISpellHelper.getPlayerMaxReagentAmount(player)), (EntityPlayerMP)player);
if(!isTesting)
{
int drainLeft = this.drainTotal;
for(int i = 0; i < 4; i++)
{
if(drainLeft <= 0)
{
break;
}
Int3 jarLoc = this.getJarLocation(i);
TileEntity tile = world.getTileEntity(x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord);
if(tile instanceof IReagentHandler)
{
IReagentHandler container = (IReagentHandler)tile;
ReagentStack drained = container.drain(ForgeDirection.UP, new ReagentStack(reagent, drainLeft), true);
if(drained != null)
{
drainLeft -= drained.amount;
world.markBlockForUpdate(x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord);
}
}
}
ritualStone.setActive(false);
}
break;
} }
} }
} }
@ -102,13 +190,13 @@ public class RitualEffectOmegaTest extends RitualEffect
switch(i) switch(i)
{ {
case 0: case 0:
return new Int3(-3,1,0); return new Int3(-3,0,0);
case 1: case 1:
return new Int3(3,1,0); return new Int3(3,0,0);
case 2: case 2:
return new Int3(0,1,-3); return new Int3(0,0,-3);
case 3: case 3:
return new Int3(0,1,3); return new Int3(0,0,3);
default: default:
return new Int3(0,0,0); return new Int3(0,0,0);
} }

View file

@ -4,18 +4,15 @@ import java.util.List;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.Packet; import net.minecraft.network.Packet;
import net.minecraft.potion.Potion; import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect; import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ChatComponentText; import net.minecraft.util.ChatComponentText;
import net.minecraft.util.StatCollector; import net.minecraft.util.StatCollector;
import net.minecraftforge.common.util.Constants;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidContainerRegistry;

View file

@ -1,17 +1,12 @@
package WayofTime.alchemicalWizardry.common.tileEntity; package WayofTime.alchemicalWizardry.common.tileEntity;
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.Packet; import net.minecraft.network.Packet;
import net.minecraft.tileentity.TileEntity; import WayofTime.alchemicalWizardry.common.NewPacketHandler;
import net.minecraftforge.common.util.Constants; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
public class TEPedestal extends TEInventory public class TEPedestal extends TEInventory
{ {

View file

@ -1,14 +1,9 @@
package WayofTime.alchemicalWizardry.common.tileEntity; package WayofTime.alchemicalWizardry.common.tileEntity;
import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; import java.util.ArrayList;
import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistryComponent; import java.util.List;
import WayofTime.alchemicalWizardry.common.IDemon;
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
import WayofTime.alchemicalWizardry.common.PlinthComponent;
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -18,9 +13,12 @@ import net.minecraft.network.Packet;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.Constants; import net.minecraftforge.common.util.Constants;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry;
import java.util.ArrayList; import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistryComponent;
import java.util.List; import WayofTime.alchemicalWizardry.common.IDemon;
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
import WayofTime.alchemicalWizardry.common.PlinthComponent;
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
public class TEPlinth extends TEInventory public class TEPlinth extends TEInventory
{ {

View file

@ -1,16 +1,11 @@
package WayofTime.alchemicalWizardry.common.tileEntity; package WayofTime.alchemicalWizardry.common.tileEntity;
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.Packet; import net.minecraft.network.Packet;
import net.minecraft.tileentity.TileEntity; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
import net.minecraftforge.common.util.Constants; import WayofTime.alchemicalWizardry.common.NewPacketHandler;
public class TESocket extends TEInventory public class TESocket extends TEInventory
{ {

View file

@ -1,24 +1,19 @@
package WayofTime.alchemicalWizardry.common.tileEntity; package WayofTime.alchemicalWizardry.common.tileEntity;
import java.util.Iterator;
import java.util.List;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.Packet;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.NewPacketHandler; import WayofTime.alchemicalWizardry.common.NewPacketHandler;
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.Packet;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.util.Constants;
import java.util.Iterator;
import java.util.List;
public class TETeleposer extends TEInventory public class TETeleposer extends TEInventory
{ {

View file

@ -1,15 +1,10 @@
package WayofTime.alchemicalWizardry.common.tileEntity; package WayofTime.alchemicalWizardry.common.tileEntity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory; import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.Constants;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.ModItems;

View file

@ -59,6 +59,9 @@ tile.crystalBlock.fullCrystal.name=Crystal Cluster
tile.crystalBlock.crystalBrick.name=Crystal Cluster Brick tile.crystalBlock.crystalBrick.name=Crystal Cluster Brick
tile.demonPortal.name=Demon Portal tile.demonPortal.name=Demon Portal
tile.demonChest.name=Demon's Chest tile.demonChest.name=Demon's Chest
tile.enchantmentGlyph.enchantability.name=Glyph of the Adept Enchanter
tile.enchantmentGlyph.enchantmentLevel.name=Glyph of Arcane Potential
tile.stabilityGlyph.stability1.name=Glyph of Rigid Stability
#Item Localization #Item Localization
item.weakBloodOrb.name=Weak Blood Orb item.weakBloodOrb.name=Weak Blood Orb
@ -203,6 +206,7 @@ item.itemAssassinSigil.name=Sigil of the Assassin
item.transcendentBloodOrb.name=Transcendent Blood Orb item.transcendentBloodOrb.name=Transcendent Blood Orb
item.itemMailCatalogue.name=Mail Order Catalogue item.itemMailCatalogue.name=Mail Order Catalogue
item.inputRoutingFocus.name=Input Routing Focus item.inputRoutingFocus.name=Input Routing Focus
item.bloodMagicBaseItem.EnderShard.name=Ender Shard
item.outputRoutingFocus.default.name=Default Output Routing Focus item.outputRoutingFocus.default.name=Default Output Routing Focus
item.outputRoutingFocus.modItem.name=Output Routing Focus (ModItem) item.outputRoutingFocus.modItem.name=Output Routing Focus (ModItem)
item.outputRoutingFocus.ignMeta.name=Output Routing Focus (Ignore Meta) item.outputRoutingFocus.ignMeta.name=Output Routing Focus (Ignore Meta)

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B