Work on a seeecret project

This commit is contained in:
WayofTime 2014-04-17 07:06:28 -04:00
parent 97b90eaf63
commit 6e4de4f6e9
58 changed files with 3504 additions and 42 deletions

View file

@ -26,6 +26,7 @@ public class CommonProxy
{
public static String ITEMS_PNG = "/WayofTime/alchemicalWizardry/items.png";
public static String BLOCK_PNG = "/WayofTime/alchemicalWizardry/block.png";
public static int manualGuiID = -1;
// Client stuff
public void registerRenderers()

View file

@ -103,9 +103,7 @@ public class EnergyItems extends Item implements IBindable
public static boolean syphonWhileInContainer(ItemStack ist, int damageToBeDone)
{
SoulNetworkHandler.syphonFromNetwork(ist, damageToBeDone);
return true;
return SoulNetworkHandler.syphonFromNetwork(ist, damageToBeDone)!=0;
}
public static boolean canSyphonInContainer(ItemStack ist, int damageToBeDone)

View file

@ -31,13 +31,25 @@ public class SacrificialDagger extends Item
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SacrificialDagger");
if(AlchemicalWizardry.wimpySettings)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem");
}else
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SacrificialDagger");
}
}
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{
par3List.add("Just a prick of the");
par3List.add("finger will suffice...");
if(AlchemicalWizardry.wimpySettings)
{
par3List.add(">:(");
}else
{
par3List.add("Just a prick of the");
par3List.add("finger will suffice...");
}
}
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)

View file

@ -0,0 +1,71 @@
package WayofTime.alchemicalWizardry.common.items.books;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemEditableBook;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.nbt.NBTTagString;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.client.GuiManual;
import cpw.mods.fml.client.FMLClientHandler;
public class ItemBloodArchives extends ItemEditableBook
{
public static ItemStack book1Stack;
public ItemBloodArchives(int par1)
{
super(par1);
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
}
public static void initBooks()
{
ItemStack tomeStack = new ItemStack(Item.writableBook);
NBTTagList bookPages = new NBTTagList("pages");
bookPages.appendTag(new NBTTagString("1", "Insert text here."));
bookPages.appendTag(new NBTTagString("2", "Insert moar text here."));
tomeStack.setTagInfo("pages", bookPages);
tomeStack.setTagInfo("author", new NBTTagString("author", "WayofTime"));
tomeStack.setTagInfo("title", new NBTTagString("title", "Blood Book"));
tomeStack.itemID = Item.writtenBook.itemID;
book1Stack = tomeStack.copy();
}
@Override
public ItemStack onItemRightClick (ItemStack stack, World world, EntityPlayer player)
{
player.openGui(AlchemicalWizardry.instance, 2, world, 0, 0, 0);
//FMLClientHandler.instance().displayGuiScreen(player, new GuiManual(stack, getData(stack)));
/*Side side = FMLCommonHandler.instance().getEffectiveSide();
if (side.isClient())
FMLClientHandler.instance().displayGuiScreen(player, new GuiManual(player.getCurrentEquippedItem(), getManualFromStack(stack)));*/
return stack;
}
// @Override
// @SideOnly(Side.CLIENT)
// public void getSubItems(int id, CreativeTabs creativeTab, List list)
// {
// list.add(book1Stack);
// }
// private BookData getData (ItemStack stack)
// {
// switch (stack.getItemDamage())
// {
// case 0:
// return TProxyClient.manualData.beginner;
// case 1:
// return TProxyClient.manualData.toolStation;
// case 2:
// return TProxyClient.manualData.smeltery;
// default:
// return TProxyClient.manualData.diary;
// }
// }
}

View file

@ -38,7 +38,7 @@ public class RitualEffectAnimalGrowth extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -33,7 +33,7 @@ public class RitualEffectApiaryOverclock extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -35,7 +35,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -37,7 +37,7 @@ public class RitualEffectBiomeChanger extends RitualEffect
data = new LifeEssenceNetwork(owner);
worldSave.setItemData(owner, data);
}
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int cooldown = ritualStone.getCooldown();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();

View file

@ -34,7 +34,7 @@ public class RitualEffectContainment extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -35,7 +35,7 @@ public class RitualEffectCrushing extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
if (world.getWorldTime() % 40 != 0)
{

View file

@ -32,7 +32,7 @@ public class RitualEffectEnhancedAlchemy extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -41,7 +41,7 @@ public class RitualEffectExpulsion extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -32,7 +32,7 @@ public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fal
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -36,7 +36,7 @@ public class RitualEffectFeatheredKnife extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -31,7 +31,7 @@ public class RitualEffectFlight extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -33,7 +33,7 @@ public class RitualEffectGrowth extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -35,7 +35,7 @@ public class RitualEffectHealing extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -32,7 +32,7 @@ public class RitualEffectInterdiction extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -35,7 +35,7 @@ public class RitualEffectJumping extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -32,7 +32,7 @@ public class RitualEffectLava extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -35,7 +35,7 @@ public class RitualEffectLeap extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -33,7 +33,7 @@ public class RitualEffectMagnetic extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -41,7 +41,7 @@ public class RitualEffectSoulBound extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -33,7 +33,7 @@ public class RitualEffectSummonMeteor extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -33,7 +33,7 @@ public class RitualEffectSupression extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -42,7 +42,7 @@ public class RitualEffectUnbinding extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -31,7 +31,7 @@ public class RitualEffectWater extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -37,7 +37,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();

View file

@ -209,4 +209,10 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
{
return this.zCoord;
}
@Override
public World getWorld()
{
return this.getWorldObj();
}
}

View file

@ -733,6 +733,7 @@ public class TEWritingTable extends TileEntity implements ISidedInventory
if (getStackInSlot(6) == null)
{
if (worldTime % 4 == 0)
{
PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, getParticlePacket(xCoord, yCoord, zCoord, (short) 1));

View file

@ -1,13 +1,16 @@
package WayofTime.alchemicalWizardry.common.tileEntity.gui;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.client.ClientProxy;
import WayofTime.alchemicalWizardry.client.GuiManual;
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer;
import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable;
import cpw.mods.fml.common.network.IGuiHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class GuiHandler implements IGuiHandler
{
@ -34,6 +37,13 @@ public class GuiHandler implements IGuiHandler
{
return new ContainerTeleposer(player.inventory, (TETeleposer) tileEntity);
}
// case 2:
// {
// ItemStack stack = player.getCurrentEquippedItem();
// return new GuiManual(stack, ClientProxy.getManualFromStack(stack));
// }
}
return null;
@ -66,6 +76,12 @@ public class GuiHandler implements IGuiHandler
}
break;
case 2:
{
ItemStack stack = player.getCurrentEquippedItem();
return new GuiManual(stack, ClientProxy.getManualFromStack(stack));
}
}
return null;