summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2015-04-29 13:57:06 +0100
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2015-04-29 13:57:06 +0100
commitb9ca797621e116f65aff916f5d4d485a93be1abf (patch)
tree4437c5de43b68bda66e8d1fc6539f2c03995ff12 /src
parent4774926ed9703b000ecbcff69636dd7ea4abf5d6 (diff)
- Removed the Jewel Altar
- Improved Ritual
Diffstat (limited to 'src')
-rw-r--r--src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java11
-rw-r--r--src/main/java/darkknight/jewelrycraft/block/BlockJewelAltar.java164
-rw-r--r--src/main/java/darkknight/jewelrycraft/block/BlockList.java7
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/GuiGuide.java11
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/gui/GuiTabBlocks.java28
-rw-r--r--src/main/java/darkknight/jewelrycraft/events/EntityEventHandler.java5
-rw-r--r--src/main/java/darkknight/jewelrycraft/recipes/CraftingRecipes.java1
-rw-r--r--src/main/java/darkknight/jewelrycraft/tileentity/TileEntityAltar.java90
-rw-r--r--src/main/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java121
-rw-r--r--src/main/java/darkknight/jewelrycraft/util/Variables.java2
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/altar_bottom.pngbin391 -> 0 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/altar_side.pngbin3220 -> 0 bytes
-rw-r--r--src/main/resources/assets/jewelrycraft2/textures/blocks/altar_top.pngbin3125 -> 0 bytes
-rw-r--r--src/main/resources/mcmod.info2
14 files changed, 138 insertions, 304 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java b/src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java
index ae6cb6d..b08dc22 100644
--- a/src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java
+++ b/src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java
@@ -57,8 +57,7 @@ public class JewelrycraftMod
public static NBTTagCompound clientData = new NBTTagCompound();
public static File liquidsConf;
public static SimpleNetworkWrapper netWrapper;
- public static boolean fancyRender;
-// List<String> authorList = new ArrayList<String>();
+ public static boolean fancyRender = false;
/**
* Pre initialization of mod stuff.
@@ -69,7 +68,6 @@ public class JewelrycraftMod
@EventHandler
public void preInit(FMLPreInitializationEvent e) throws IOException
{
-// ModMetadata metadata = e.getModMetadata();
dir = e.getModConfigurationDirectory();
ConfigHandler.INSTANCE.loadConfig(e);
BlockList.preInit(e);
@@ -80,13 +78,6 @@ public class JewelrycraftMod
EntityList.preInit(e);
VillageHandler.preInit(e);
EventList.preInit(e);
-// authorList.add("OnyxDarkKnight");
-// metadata.autogenerated = false;
-// metadata.authorList = authorList;
-// metadata.description = "Jewelrycraft 2 is a mod about creating jewellery and imbuing them with mystical powers. However, they have both positives and negatives. There are also curses, some good, some bad. Maybe acquiring some wouldn't be that bad.";
-// metadata.credits = "domi1819, MrCompost, pau101, bspkrs, DamienHazard";
-// metadata.url = "http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2414865-jewelrycraft-2-customizable-jewelry-with-special";
-// metadata.logoFile = "/FullSmelter.png";
}
@EventHandler
diff --git a/src/main/java/darkknight/jewelrycraft/block/BlockJewelAltar.java b/src/main/java/darkknight/jewelrycraft/block/BlockJewelAltar.java
deleted file mode 100644
index e0a43bc..0000000
--- a/src/main/java/darkknight/jewelrycraft/block/BlockJewelAltar.java
+++ /dev/null
@@ -1,164 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.item.ItemList;
-import darkknight.jewelrycraft.tileentity.TileEntityAltar;
-
-public class BlockJewelAltar extends BlockContainer
-{
- @SideOnly (Side.CLIENT)
- private IIcon altarSide;
- @SideOnly (Side.CLIENT)
- private IIcon altarBottom;
- @SideOnly (Side.CLIENT)
- private IIcon altarTop;
-
- /**
- *
- */
- public BlockJewelAltar()
- {
- super(Material.iron);
- }
-
- /**
- * @param par0
- * @return
- */
- public static boolean isNormalCube(int par0)
- {
- return true;
- }
-
- /**
- * @param par1IconRegister
- */
- @Override
- public void registerBlockIcons(IIconRegister par1IconRegister)
- {
- altarSide = par1IconRegister.registerIcon(getTextureName() + "_" + "side");
- altarBottom = par1IconRegister.registerIcon(getTextureName() + "_" + "bottom");
- altarTop = par1IconRegister.registerIcon(getTextureName() + "_" + "top");
- }
-
- /**
- * @param par1
- * @param par2
- * @return
- */
- @Override
- public IIcon getIcon(int par1, int par2)
- {
- return par1 == 1 ? altarTop : par1 == 0 ? altarBottom : altarSide;
- }
-
- /**
- * @param world
- * @param i
- * @param j
- * @param k
- * @param entityPlayer
- * @param par6
- * @param par7
- * @param par8
- * @param par9
- * @return
- */
- @Override
- public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityPlayer, int par6, float par7, float par8, float par9)
- {
- TileEntityAltar te = (TileEntityAltar)world.getTileEntity(i, j, k);
- ItemStack item = entityPlayer.inventory.getCurrentItem();
- if (te != null && !world.isRemote){
- if (item != null && item != new ItemStack(Item.getItemById(0), 0, 0) && (item.getItem() == ItemList.ring || item.getItem() == ItemList.necklace) && !te.hasObject){
- te.object = item.copy();
- item.stackSize = 0;
- te.playerName = entityPlayer.getDisplayName();
- te.isDirty = true;
- te.markDirty();
- te.hasObject = true;
- }
- if (te.object != null && te.object != new ItemStack(Item.getItemById(0), 0, 0) && te.hasObject && entityPlayer.isSneaking()){
- entityPlayer.inventory.addItemStackToInventory(te.object);
- te.object = new ItemStack(Item.getItemById(0), 0, 0);
- te.playerName = "";
- te.isDirty = true;
- te.markDirty();
- te.hasObject = false;
- }
- }
- return true;
- }
-
- /**
- * @param world
- * @param i
- * @param j
- * @param k
- * @param player
- */
- @Override
- public void onBlockClicked(World world, int i, int j, int k, EntityPlayer player)
- {
- TileEntityAltar te = (TileEntityAltar)world.getTileEntity(i, j, k);
- if (te != null && !world.isRemote) if (te.object != null && te.object != new ItemStack(Item.getItemById(0), 0, 0)){}
- }
-
- /**
- * @param world
- * @param x
- * @param y
- * @param z
- * @param stack
- */
- public void dropItem(World world, double x, double y, double z, ItemStack stack)
- {
- EntityItem entityitem = new EntityItem(world, x + 0.5D, y + 1.5D, z + 0.5D, stack);
- entityitem.motionX = 0;
- entityitem.motionZ = 0;
- entityitem.motionY = 0.11000000298023224D;
- world.spawnEntityInWorld(entityitem);
- }
-
- /**
- * @param world
- * @param i
- * @param j
- * @param k
- * @param block
- * @param par6
- */
- @Override
- public void breakBlock(World world, int i, int j, int k, Block block, int par6)
- {
- TileEntityAltar te = (TileEntityAltar)world.getTileEntity(i, j, k);
- if (te != null && te.object != null && te.object != new ItemStack(Item.getItemById(0), 0, 0)){
- dropItem(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, te.object);
- world.removeTileEntity(i, j, k);
- }
- super.breakBlock(world, i, j, k, block, par6);
- }
-
- /**
- * @param world
- * @param var2
- * @return
- */
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityAltar();
- }
-}
diff --git a/src/main/java/darkknight/jewelrycraft/block/BlockList.java b/src/main/java/darkknight/jewelrycraft/block/BlockList.java
index 5051074..a02b264 100644
--- a/src/main/java/darkknight/jewelrycraft/block/BlockList.java
+++ b/src/main/java/darkknight/jewelrycraft/block/BlockList.java
@@ -9,8 +9,6 @@ import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.item.ItemList;
-import darkknight.jewelrycraft.tileentity.TileEntityAltar;
import darkknight.jewelrycraft.tileentity.TileEntityBlockShadow;
import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
import darkknight.jewelrycraft.tileentity.TileEntityHandPedestal;
@@ -24,7 +22,7 @@ import darkknight.jewelrycraft.util.Variables;
public class BlockList
{
- public static Block shadowOre, smelter, molder, displayer, jewelCraftingTable, shadowBlock, shadowEye, jewelAltar, handPedestal, shadowHand, midasTouchBlock;
+ public static Block shadowOre, smelter, molder, displayer, jewelCraftingTable, shadowBlock, shadowEye, handPedestal, shadowHand, midasTouchBlock;
public static BlockMoltenMetal moltenMetal;
public static Fluid moltenMetalFluid;
private static boolean isInitialized = false;
@@ -37,7 +35,6 @@ public class BlockList
displayer = new BlockDisplayer(Material.iron).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".displayer").setCreativeTab(JewelrycraftMod.jewelrycraft);
jewelCraftingTable = new BlockJewelrsCraftingTable(Material.rock).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".jewelCraftingTable").setCreativeTab(JewelrycraftMod.jewelrycraft);
shadowBlock = new BlockShadow().setHardness(5.0F).setResistance(7.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":blockShadow").setBlockName(Variables.MODID + ".blockShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- jewelAltar = new BlockJewelAltar().setHardness(5.0F).setResistance(2.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":altar").setBlockName(Variables.MODID + ".altar").setCreativeTab(JewelrycraftMod.jewelrycraft);
shadowEye = new BlockShadowEye().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowEye").setCreativeTab(JewelrycraftMod.jewelrycraft);
handPedestal = new BlockHandPedestal(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".handPedestal").setCreativeTab(JewelrycraftMod.jewelrycraft);
shadowHand = new BlockShadowHand(Material.rock).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowHand").setCreativeTab(JewelrycraftMod.jewelrycraft).setBlockUnbreakable();
@@ -52,7 +49,6 @@ public class BlockList
GameRegistry.registerBlock(molder, "Molder");
GameRegistry.registerBlock(jewelCraftingTable, "jewelCraftingTable");
GameRegistry.registerBlock(displayer, "Displayer");
- GameRegistry.registerBlock(jewelAltar, "Altar");
GameRegistry.registerBlock(shadowEye, "Shadow Eye");
GameRegistry.registerBlock(handPedestal, "Stone Bricks Pedestal");
GameRegistry.registerBlock(shadowHand, "Shadow Hand");
@@ -64,7 +60,6 @@ public class BlockList
GameRegistry.registerTileEntity(TileEntityJewelrsCraftingTable.class, Variables.MODID + ":table");
GameRegistry.registerTileEntity(TileEntityDisplayer.class, Variables.MODID + ":displayer");
GameRegistry.registerTileEntity(TileEntityBlockShadow.class, Variables.MODID + ":blockShadow");
- GameRegistry.registerTileEntity(TileEntityAltar.class, Variables.MODID + ":altar");
GameRegistry.registerTileEntity(TileEntityShadowEye.class, Variables.MODID + ":shadowEye");
GameRegistry.registerTileEntity(TileEntityHandPedestal.class, Variables.MODID + ":handPedestal");
GameRegistry.registerTileEntity(TileEntityShadowHand.class, Variables.MODID + ":shadowHand");
diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiGuide.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiGuide.java
index 2e97a02..b3cfef4 100644
--- a/src/main/java/darkknight/jewelrycraft/client/gui/GuiGuide.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiGuide.java
@@ -136,14 +136,17 @@ public class GuiGuide extends GuiContainer
GL11.glDisable(GL11.GL_LIGHTING);
EntityItem entityitem = new EntityItem(world, 0.0D, 0.0D, 0.0D, item);
entityitem.hoverStart = 0.0F;
- if (item.isItemEqual(new ItemStack(BlockList.jewelAltar))) y -= 4;
+ if (item.isItemEqual(new ItemStack(BlockList.smelter))){
+ y -= 3;
+ x += 1;
+ }
GL11.glTranslatef(x, y, 100);
float scale = 30F;
GL11.glScalef(-scale, scale, scale);
if (activeIcon != null && item.isItemEqual(activeIcon)) GL11.glRotatef(rot, 0, 1, 0);
- if (item.isItemEqual(new ItemStack(BlockList.jewelAltar))){
- GL11.glRotatef(160.0F, 1.0F, 0.0F, 0.0F);
- GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
+ if (item.isItemEqual(new ItemStack(BlockList.smelter))){
+ GL11.glScalef(1.5F, 1.5F, 1.5F);
+ GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
}else if (item.isItemEqual(new ItemStack(BlockList.handPedestal))){
GL11.glScalef(1.2F, 1.2F, 1.2F);
GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabBlocks.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabBlocks.java
index 11a5158..478d5fe 100644
--- a/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabBlocks.java
+++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiTabBlocks.java
@@ -27,7 +27,7 @@ public class GuiTabBlocks extends GuiTab
@Override
public ItemStack getIcon()
{
- return new ItemStack(BlockList.jewelAltar);
+ return new ItemStack(BlockList.smelter);
}
/**
@@ -96,46 +96,38 @@ public class GuiTabBlocks extends GuiTab
Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text);
break;
case 13:
- text = "This block can store any jewellery in it and activate their effects as it were a player. To do that simply right click the block with a jewellery. Crouch +";
- Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.jewelAltar), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.wool, 1, 5), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.nether_brick), new ItemStack(Blocks.wool, 1, 5), new ItemStack(Blocks.nether_brick), new ItemStack(Blocks.nether_brick), new ItemStack(Blocks.nether_brick), new ItemStack(Blocks.nether_brick));
- break;
- case 14:
- text = "Right Click to retreive the jewellery.";
- Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text);
- break;
- case 15:
text = "The Storage Displayer, as the name suggests, can store a large amount (Up to: " + Integer.MAX_VALUE + ") of a single item/block placed in it. It will";
Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.displayer), null, new ItemStack(Items.iron_ingot), null, new ItemStack(Items.iron_ingot), new ItemStack(Items.iron_ingot), new ItemStack(Items.iron_ingot), new ItemStack(Blocks.emerald_block), new ItemStack(Blocks.emerald_block), new ItemStack(Blocks.emerald_block));
break;
- case 16:
+ case 14:
text = "display all possible infromation about the object in it, such as the name, durability, enchantments etc. To store something in it simply right click with that object on it and the whole amount of items or blocks you are holding will be immediately stored inside.";
Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text);
break;
- case 17:
+ case 15:
text = "If a displayer already contains an item and you have that in your inventory, you can simply hold right click on it with an empty hand to add all of your items of that type from your inventory. To retrieve a single item just left click the block. If you wish to";
Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text);
break;
- case 18:
+ case 16:
text = "get a whole stack, Crouch + Left Click on it. In creative mode you can simply hold Right Click on a displayer containing an object and it will add 64 of it with every right click, without it being in your inventory.";
Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text);
break;
- case 19:
+ case 17:
text = "This mysterious shaped block is used in the ritual. The acient ones claimed it had the power to travel through worlds. They would use these to offer";
Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.handPedestal), new ItemStack(Blocks.cobblestone_wall), new ItemStack(Blocks.cobblestone_wall), new ItemStack(Blocks.cobblestone_wall), null, new ItemStack(Blocks.stonebrick), null, new ItemStack(Blocks.stone_slab, 1, 5), new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stone_slab, 1, 5));
break;
- case 20:
+ case 18:
text = "sacrifices to 'The Dark One' in exchange for unimaginable powers.";
Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text);
break;
- case 21:
+ case 19:
text = "The Cursed Eye is an ancient artifact also known as 'The Dark One's Eye'. It is part of the sacrifice ritual the ancient ones talk about. Be careful";
Page.addCraftingRecipeTextPage(gui, gui.getLeft() + xPos, gui.getTop(), false, text, x, y, true, new ItemStack(BlockList.shadowEye), new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Items.ender_eye), new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Blocks.stonebrick));
break;
- case 22:
+ case 20:
text = "though, for He sees everything. To see how to create the ritual look in the Ritual tab. One you created the ritual, simple place a piece of jewelery in the middle pedestal and your modifiers of choice in the other ones (you don't need to put an item in every single pedestal). After";
Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text);
break;
- case 23:
+ case 21:
text = "you do that simply right click the eye to activate the ritual. Be careful not to leave the premise or you'll die! When the ritual is done, Shift+Right Click on the central hand pedestal to retrieve your newly modified item!";
Page.addTextPage(gui, gui.getLeft() + xPos, gui.getTop(), text);
break;
@@ -150,7 +142,7 @@ public class GuiTabBlocks extends GuiTab
@Override
public int getMaxPages()
{
- return 23;
+ return 21;
}
/**
diff --git a/src/main/java/darkknight/jewelrycraft/events/EntityEventHandler.java b/src/main/java/darkknight/jewelrycraft/events/EntityEventHandler.java
index 9b6e9c7..06fb53a 100644
--- a/src/main/java/darkknight/jewelrycraft/events/EntityEventHandler.java
+++ b/src/main/java/darkknight/jewelrycraft/events/EntityEventHandler.java
@@ -311,10 +311,7 @@ public class EntityEventHandler
entityitem.motionZ = 0;
entityitem.motionY = 0.11000000298023224D;
event.player.worldObj.spawnEntityInWorld(entityitem);
- List players = MinecraftServer.getServer().getConfigurationManager().playerEntityList;
- Iterator plrs = players.iterator();
- while (plrs.hasNext())
- ((EntityPlayerMP)plrs.next()).addChatComponentMessage(new ChatComponentText("<" + event.player.getDisplayName() + "> This is MY item! MINE! I will NEVER give it to you! Mine! Mine! MINE!"));
+ MinecraftServer.getServer().getConfigurationManager().sendChatMsg(new ChatComponentText("<" + event.player.getDisplayName() + "> This is MY item! MINE! I will NEVER give it to you! Mine! Mine! MINE!"));
event.setCanceled(true);
}
}
diff --git a/src/main/java/darkknight/jewelrycraft/recipes/CraftingRecipes.java b/src/main/java/darkknight/jewelrycraft/recipes/CraftingRecipes.java
index 53229f3..2bda05e 100644
--- a/src/main/java/darkknight/jewelrycraft/recipes/CraftingRecipes.java
+++ b/src/main/java/darkknight/jewelrycraft/recipes/CraftingRecipes.java
@@ -45,7 +45,6 @@ public class CraftingRecipes
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockList.jewelCraftingTable), "xxx", "y y", "y y", 'x', Blocks.planks, 'y', Blocks.stone));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockList.displayer, 2), " x ", "xxx", "yyy", 'x', Items.iron_ingot, 'y', Blocks.emerald_block));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockList.shadowBlock, 1), "xxx", "xxx", "xxx", 'x', ItemList.shadowIngot));
- GameRegistry.addRecipe(new ItemStack(BlockList.jewelAltar, 1), "sws", "bwb", "bbb", 's', Blocks.end_stone, 'w', new ItemStack(Blocks.wool, 1, 5), 'b', Blocks.nether_brick);
// Smelting
GameRegistry.addSmelting(BlockList.shadowOre, new ItemStack(ItemList.shadowIngot), 1.5f);
GameRegistry.addSmelting(new ItemStack(ItemList.clayMolds, 1, 0), new ItemStack(ItemList.molds, 1, 0), 0.2F);
diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityAltar.java b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityAltar.java
deleted file mode 100644
index f490456..0000000
--- a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityAltar.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package darkknight.jewelrycraft.tileentity;
-
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.NetworkManager;
-import net.minecraft.network.Packet;
-import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
-import net.minecraft.tileentity.TileEntity;
-
-public class TileEntityAltar extends TileEntity
-{
- public ItemStack object;
- public boolean isDirty, hasObject;
- public String playerName;
-
- /**
- *
- */
- public TileEntityAltar()
- {
- hasObject = false;
- object = new ItemStack(Item.getItemById(0), 0, 0);
- isDirty = false;
- playerName = "";
- }
-
- /**
- * @param nbt
- */
- @Override
- public void writeToNBT(NBTTagCompound nbt)
- {
- super.writeToNBT(nbt);
- NBTTagCompound tag = new NBTTagCompound();
- object.writeToNBT(tag);
- nbt.setTag("object", tag);
- nbt.setBoolean("hasObject", hasObject);
- nbt.setString("playerName", playerName);
- }
-
- /**
- * @param nbt
- */
- @Override
- public void readFromNBT(NBTTagCompound nbt)
- {
- super.readFromNBT(nbt);
- object = new ItemStack(Item.getItemById(0), 0, 0);
- object.readFromNBT(nbt.getCompoundTag("object"));
- hasObject = nbt.getBoolean("hasObject");
- playerName = nbt.getString("playerName");
- }
-
- /**
- *
- */
- @SuppressWarnings ("rawtypes")
- @Override
- public void updateEntity()
- {
- super.updateEntity();
- if (isDirty){
- worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
- isDirty = false;
- }
- }
-
- /**
- * @return
- */
- @Override
- public Packet getDescriptionPacket()
- {
- NBTTagCompound nbttagcompound = new NBTTagCompound();
- writeToNBT(nbttagcompound);
- return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbttagcompound);
- }
-
- /**
- * @param net
- * @param packet
- */
- @Override
- public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
- {
- readFromNBT(packet.func_148857_g());
- worldObj.func_147479_m(xCoord, yCoord, zCoord);
- }
-}
diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java
index 5174d44..1f7371c 100644
--- a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java
+++ b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityShadowEye.java
@@ -1,6 +1,7 @@
package darkknight.jewelrycraft.tileentity;
import java.util.ArrayList;
+import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
@@ -10,7 +11,10 @@ import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import darkknight.jewelrycraft.block.BlockHandPedestal;
import darkknight.jewelrycraft.block.BlockList;
@@ -70,11 +74,17 @@ public class TileEntityShadowEye extends TileEntity
{
super.updateEntity();
boolean valid = isValidStructure(worldObj, xCoord, yCoord, zCoord, blockMetadata);
- if (active) timer--;
+ boolean canStartRitual = valid && ((TileEntityHandPedestal)worldObj.getTileEntity(xCoord, yCoord - 3, zCoord)).heldItemStack != null && getNumberOfItems(worldObj, xCoord, yCoord, zCoord) > 0;
+ if (active){
+ timer--;
+ if(canStartRitual && canChangePedestals(worldObj, xCoord, yCoord, zCoord) && opening == 4) changePedestals(worldObj, xCoord, yCoord, zCoord);
+ }
+
if (active && target != null && this.getDistanceFrom(target.posX, target.posY, target.posZ) > 30D){
active = false;
timer = -1;
shouldAddData = false;
+ revertPedestals(worldObj, xCoord, yCoord, zCoord);
}
if (opening == 4 && timer <= 0) active = false;
if (!active && timer <= 0 && opening != 1){
@@ -88,16 +98,23 @@ public class TileEntityShadowEye extends TileEntity
addData(worldObj, xCoord, yCoord, zCoord);
TileEntityHandPedestal target = (TileEntityHandPedestal)worldObj.getTileEntity(xCoord, yCoord - 3, zCoord);
if (target != null && target.getHeldItemStack() != null) JewelryNBT.addModifiers(target.getHeldItemStack(), pedestalItems);
+ revertPedestals(worldObj, xCoord, yCoord, zCoord);
}
if (active && timer <= 0){
if (opening < 4){
opening++;
timer = 20;
}
- if (valid && opening == 4) timer = ConfigHandler.RITUAL_TIME;
- else if (!valid){
+ if (canStartRitual && opening == 4) timer = ConfigHandler.RITUAL_TIME;
+ else if (!canStartRitual){
+ shouldAddData = false;
active = false;
timer = -1;
+ if (!worldObj.isRemote){
+ JewelrycraftUtil.addCursePoints(target, 50);
+ target.addChatMessage(new ChatComponentText(EnumChatFormatting.BLACK + "The Shadows don't like to be disturbed for no reason!"));
+ target.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_PURPLE + "You feel a strange aura encumbering you."));
+ }
}
}
for(Object player: worldObj.getEntitiesWithinAABB(EntityPlayer.class, getRenderBoundingBox().expand(10D, 10D, 10D)))
@@ -228,6 +245,101 @@ public class TileEntityShadowEye extends TileEntity
addPedestalInfo((TileEntityHandPedestal)world.getTileEntity(x - 2, y - 3, z + 4));
}
+ public int getNumberOfItems(World world, int x, int y, int z)
+ {
+ int items = 0;
+ if (((TileEntityHandPedestal)world.getTileEntity(x + 2, y - 3, z - 4)).heldItemStack != null) items++;
+ if (((TileEntityHandPedestal)world.getTileEntity(x - 4, y - 3, z + 2)).heldItemStack != null) items++;
+ if (((TileEntityHandPedestal)world.getTileEntity(x, y - 3, z - 5)).heldItemStack != null) items++;
+ if (((TileEntityHandPedestal)world.getTileEntity(x - 2, y - 3, z - 4)).heldItemStack != null) items++;
+ if (((TileEntityHandPedestal)world.getTileEntity(x - 4, y - 3, z - 2)).heldItemStack != null) items++;
+ if (((TileEntityHandPedestal)world.getTileEntity(x - 5, y - 3, z)).heldItemStack != null) items++;
+ if (((TileEntityHandPedestal)world.getTileEntity(x + 4, y - 3, z - 2)).heldItemStack != null) items++;
+ if (((TileEntityHandPedestal)world.getTileEntity(x + 5, y - 3, z)).heldItemStack != null) items++;
+ if (((TileEntityHandPedestal)world.getTileEntity(x + 4, y - 3, z + 2)).heldItemStack != null) items++;
+ if (((TileEntityHandPedestal)world.getTileEntity(x + 2, y - 3, z + 4)).heldItemStack != null) items++;
+ if (((TileEntityHandPedestal)world.getTileEntity(x, y - 3, z + 5)).heldItemStack != null) items++;
+ if (((TileEntityHandPedestal)world.getTileEntity(x - 2, y - 3, z + 4)).heldItemStack != null) items++;
+ return items;
+ }
+
+ public boolean canChangePedestals(World world, int x, int y, int z)
+ {
+ if (world.getBlock(x, y - 3, z) != BlockList.handPedestal) return false;
+ if (world.getBlock(x + 2, y - 3, z - 4) != BlockList.handPedestal) return false;
+ if (world.getBlock(x - 4, y - 3, z + 2) != BlockList.handPedestal) return false;
+ if (world.getBlock(x, y - 3, z - 5) != BlockList.handPedestal) return false;
+ if (world.getBlock(x - 2, y - 3, z - 4) != BlockList.handPedestal) return false;
+ if (world.getBlock(x - 4, y - 3, z - 2) != BlockList.handPedestal) return false;
+ if (world.getBlock(x - 5, y - 3, z) != BlockList.handPedestal) return false;
+ if (world.getBlock(x + 4, y - 3, z - 2) != BlockList.handPedestal) return false;
+ if (world.getBlock(x + 5, y - 3, z) != BlockList.handPedestal) return false;
+ if (world.getBlock(x + 4, y - 3, z + 2) != BlockList.handPedestal) return false;
+ if (world.getBlock(x + 2, y - 3, z + 4) != BlockList.handPedestal) return false;
+ if (world.getBlock(x, y - 3, z + 5) != BlockList.handPedestal) return false;
+ if (world.getBlock(x - 2, y - 3, z + 4) != BlockList.handPedestal) return false;
+ return true;
+ }
+
+ public void changePedestals(World world, int x, int y, int z)
+ {
+ changeHand(world, x, y - 3, z);
+ changeHand(world, x + 2, y - 3, z - 4);
+ changeHand(world, x - 4, y - 3, z + 2);
+ changeHand(world, x, y - 3, z - 5);
+ changeHand(world, x - 2, y - 3, z - 4);
+ changeHand(world, x - 4, y - 3, z - 2);
+ changeHand(world, x - 5, y - 3, z);
+ changeHand(world, x + 4, y - 3, z - 2);
+ changeHand(world, x + 5, y - 3, z);
+ changeHand(world, x + 4, y - 3, z + 2);
+ changeHand(world, x + 2, y - 3, z + 4);
+ changeHand(world, x, y - 3, z + 5);
+ changeHand(world, x - 2, y - 3, z + 4);
+ }
+
+ public void changeHand(World world, int x, int y, int z)
+ {
+ int l = world.getBlockMetadata(x, y, z);
+ world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(world.getBlock(x, y, z)));
+ TileEntityShadowHand tile = new TileEntityShadowHand();
+ if(((TileEntityHandPedestal)world.getTileEntity(x, y, z)).heldItemStack != null) tile.setHeldItemStack(((TileEntityHandPedestal)world.getTileEntity(x, y, z)).heldItemStack.copy());
+ if(tile.heldItemStack != null) tile.closeHand();
+ ((TileEntityHandPedestal)world.getTileEntity(x, y, z)).removeHeldItemStack();
+ world.setBlock(x, y, z, BlockList.shadowHand, l, 2);
+ world.setTileEntity(x, y, z, tile);
+ }
+
+ public void revertPedestals(World world, int x, int y, int z)
+ {
+ revertHand(world, x, y - 3, z);
+ revertHand(world, x + 2, y - 3, z - 4);
+ revertHand(world, x - 4, y - 3, z + 2);
+ revertHand(world, x, y - 3, z - 5);
+ revertHand(world, x - 2, y - 3, z - 4);
+ revertHand(world, x - 4, y - 3, z - 2);
+ revertHand(world, x - 5, y - 3, z);
+ revertHand(world, x + 4, y - 3, z - 2);
+ revertHand(world, x + 5, y - 3, z);
+ revertHand(world, x + 4, y - 3, z + 2);
+ revertHand(world, x + 2, y - 3, z + 4);
+ revertHand(world, x, y - 3, z + 5);
+ revertHand(world, x - 2, y - 3, z + 4);
+ }
+
+ public void revertHand(World world, int x, int y, int z)
+ {
+ int l = world.getBlockMetadata(x, y, z);
+ world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(BlockList.handPedestal));
+ world.playSoundEffect(x, y + 0.5F, z, "step.wood", 1F, 1F);
+ TileEntityHandPedestal tile = new TileEntityHandPedestal();
+ if(((TileEntityShadowHand)world.getTileEntity(x, y, z)).heldItemStack != null) tile.setHeldItemStack(((TileEntityShadowHand)world.getTileEntity(x, y, z)).heldItemStack.copy());
+ if(tile.heldItemStack != null) tile.closeHand();
+ ((TileEntityShadowHand)world.getTileEntity(x, y, z)).removeHeldItemStack();
+ world.setBlock(x, y, z, BlockList.handPedestal, l, 2);
+ world.setTileEntity(x, y, z, tile);
+ }
+
/**
* @param pedestal
*/
@@ -254,8 +366,7 @@ public class TileEntityShadowEye extends TileEntity
}
pedestal.removeHeldItemStack();
pedestal.openHand();
- }
- else if(pedestal != null && target != null) JewelrycraftUtil.addCursePoints(target, 20);
+ }else if (pedestal != null && target != null) JewelrycraftUtil.addCursePoints(target, 20);
}
/**
diff --git a/src/main/java/darkknight/jewelrycraft/util/Variables.java b/src/main/java/darkknight/jewelrycraft/util/Variables.java
index 2a4259d..14d1795 100644
--- a/src/main/java/darkknight/jewelrycraft/util/Variables.java
+++ b/src/main/java/darkknight/jewelrycraft/util/Variables.java
@@ -6,7 +6,7 @@ public class Variables
{
public static final String MODID = "jewelrycraft2";
public static final String MODNAME = "Jewelrycraft 2";
- public static final String VERSION = "1.0.2";
+ public static final String VERSION = "1.0.3";
public static final String PACKET_CHANNEL = "jewelrycraft2";
public static final String CONFIG_GUI = "darkknight.jewelrycraft.config.ConfigGuiFactory";
diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_bottom.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_bottom.png
deleted file mode 100644
index 7ca4c6a..0000000
--- a/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_bottom.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_side.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_side.png
deleted file mode 100644
index 3a69977..0000000
--- a/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_side.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_top.png b/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_top.png
deleted file mode 100644
index 39210c3..0000000
--- a/src/main/resources/assets/jewelrycraft2/textures/blocks/altar_top.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info
index b8c3b3b..95917f1 100644
--- a/src/main/resources/mcmod.info
+++ b/src/main/resources/mcmod.info
@@ -4,7 +4,7 @@
"modid": "jewelrycraft2",
"name": "Jewelrycraft 2",
"description": "Jewelrycraft 2 is a mod about creating jewellery and imbuing them with mystical powers. However, they have both positives and negatives. There are also curses, some good, some bad. Maybe acquiring some wouldn't be that bad.",
- "version": "1.0.2",
+ "version": "1.0.3",
"mcversion": "1.7.10",
"url": "http://www.minecraftforum.net/forums/topic/2414865",
"updateUrl": "",