Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by XxArchangelz

  1. look, this is what I use and it works just fine. package archangel.necromancy.item; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import archangel.necromancy.Necromancy; import archangel.necromancy.lib.GuiIds; import archangel.necromancy.lib.Strings; public class ItemNecronomicon extends ItemNC { public ItemNecronomicon(int id) { super(id); this.setUnlocalizedName(Strings.NECRONOMICON_NAME); this.setCreativeTab(Necromancy.tabsNecro); maxStackSize = 1; } @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) { if (!world.isRemote) { entityPlayer.openGui(Necromancy.instance, GuiIds.NECRONOMICON, entityPlayer.worldObj, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ); } return itemStack; } } This pretty much makes it so when this item in hand is right-clicked, it will open a gui defined in my guihandler (GuiIds) class. This ONLY allows you to open the gui, you still need to make a container class, a gui class and set this up in your proxy
  2. You have to pastebin us what the crash says, or we cannot help you with this.
  3. That only changes the GUI if I rightclick with the item in hand, I need it to switch as I place the item in the slot which I had working, but it only changes after reopening the gui with the item already in the slot
  4. I'm using a custom rendered item though so I have two image files (one with one without), I got it working in the ModelAltar class, but when you disconnect/reconnect the block shows up as it were empty then switches back to having a book when you right click it opening the gui.
  5. Okay I see, I got that all working now thanks so much. I have one last problem. I made it in my proxy to switch GUI's if an item is present with a similar method and separate gui classes, but the gui only switches after opening and closing the gui. Where would I have to do this to make it work instantly?
  6. Okay so now how would I call the texture from my sprites class? I have been trying to figure out a way to get that working, but It wants me to make the method a string.
  7. Oh duh my bad, I thought that was the entire thing so I never put it with the method. Now with SLOT_NO, I'm thinking that means SlotNecronomicon from my container class that is set to only allow a certain item in the slot, should be placed there, or no? Because when I try that it tells me that it cannot be resolved to a variable, so would I need to make a variable for it, and like how? Also when I try to call the texture file assigned in my Sprites class, it throws me an error because the method is an int and to call it from my sprites class would require it be a string.
  8. I'm getting errors on blockAccess being unable to be resolved, and the variables. Is that something missing from the TileEntity class?
  9. I'm sorry not entirely sure what I am doing. I have this for my block class I don't know if I'm putting this correctly, but I am getting syntax errors on the variables and I don't know how to word it to make it change the texture and the gui when the item is present.
  10. I have 2 items, a tile entity/block/container and a container/item. I have it so far that the block (altar) will only accept the item (book), but I want to have it so that when the book is present in the altar, the block will render a different model and the gui will switch (if book is in slot make altar have book on top and new gui otherwise show original gui with empty slot and empty altar without book) I figure I need to do if statements but I don't know where and how to go about it. I was thinking it needed to be in GuiAltar or ItemAltarRender but I don't know. GuiAltar ItemAltarRender I don't know squat about OpenGL and i'm still fairly new to modding so I am trying to learn as much as I can to better myself as modding and java. Thanks for the help
  11. NINJA EDIT I figured it all out. The solution is to create a custom slot (non vanilla slot) and specify it in the class to only allow said items example the slot inside container class
  12. I figured it out and fixed the shift right click crash I use But I don't entirely understand it and I still cannot restrict ONLY allowing a specific item into the slot
  13. I have a tile entity/container for a block and I want to be able to restrict what can go in its inventory slot to a specific item in my mod, but for the life of me I cannot figure out how. I also have it so that shift clicking crashes the game (not supposed to happen ) and I can see that I need to have something like public boolean mergeItemStack(itemStack, start, end, backwards) But I don't know exactly where to put it and what it does. Here is my tile entity class and the container class
  14. Awesome then, Thank you so much for the help. It will have to be server side, odds are I will have more questions but I will try to figure this out. Again thank you so much
  15. How would I go about doing that? I'm sorry I just don't see ANY tutorials whatsoever for making GUI's for items in forge. The best I found was modloader and I would prefer not using modloader. I'm trying to basically have it like in thaumcraft where you will open a book and it will have instructions/recipes to the things the player will be doing, as well as the book being used in a receptacle and when the book is in the receptacle you will have a new gui extending from the block that will act as a container/tile entity. I'm not sure if what I am trying to do with the book requires it to be a tile entity or a container, and what code is required to set it up in the guiscreen/proxy/item class or where to find references on how to do it. I have it working perfectly with the block acting as a container and it has its gui but this has me completely stumped.
  16. Right, but now if its an item and I don't plan on it having a container, wouldn't I just need the GUI class and the handler? I'm sorry I'm new and completely lost trying to get this to work
  17. I have that much so far in the item class, I'm just clueless to the structure/methods I need to use in the guihandler (client / server functions like for tile entity and container )
  18. I figured out the GuiHandler and everything to get a block gui working, but I can't figure out the procedure for the handler for an item.
  19. I'm fairly sure you will have to rewrite everything if you don't have the .java files.
  20. Actually I don't, I thought I made one. Would that be whats messing this all up on me?
  21. What are you saying, that you only have the source files to your mod? If so install the latest forge and put your source files inside of forge/mcp/src/minecraft and run eclipse or whatever you use.
  22. java.lang.ClassNotFoundException: net.trito.stc.TritoCraftBase There is something wrong with that class in net/trito/stc/. See if you are referencing everything correctly and such. We can't really help if its only a crash report.
  23. Any help? I would prefer to not have any mod loader references in my code.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.