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


  • Posts

  • Joined

  • Last visited

Everything posted by bigbaddevil6

  1. Ok I was having issues trying to get my TileEntity to always be checking to make sure if the item is there.It is always checking the craftMatrix but not the tileEntity for updates when it calls the recipe. It will do fine when you first try the recipe, but I can still take a tool back out and since there isnt a listener for the item being there or not, it allows the crafting recipe until the craftMatrix updates again to make the call to check the slots of the tileEntity. At the moment im studying more java concepts outside of MC.
  2. What is the listener that calls the detectAndSendChanges().
  3. When I looked at all the other examples that how it was shown and src code from other mods it's what I saw. I also only want the crafting grid to act like a normal crafting grid but bigger, so it was also why not do it like the already made crafting table add a TileEntity to it.
  4. The are both of the same inventory its for a 5x5 crafting table that has 4 Tile entity slots the rest is just like a normal crafting table, share the same container. Unless there is a piece to this I am missing I would believed they are already linked because it need to add the TileEntity slots to the container so it can use its logic along with its crafting counter part. Their constructors both grab the same location from the Gui Handler.
  5. Yea, thats what I'm trying to do is get it so the recipe can check the appropriate TileEntity. Obviously I don't have it setup properly. I understand the idea that its checking some tileEntity that isn't linked to it because it is just a recipe checker that take data from the crafting manager and tell the crafting manager if it was valid or not and that is it. it doesn't know where it is. What if instead of doing it the way I been trying to do it, because even I think it seems like a stupid idea the more I think of it. What if I do the check in the FindMatchingRecipe() of the craftingManager since its already passed the current inventory and world, or even in that matter do it in the container since they are already linked and have it checked there during the craftResult. By the way I bet you are raging at me, but I do much appreciate your time. Not often will people sit and explain why of what you are doing is wrong.
  6. What kind of axe? a normal minecraft axe? A axe that cuts down the whole tree like a Lumber Axe from Tinkers Construct?
  7. Ok, so what would I have to do to properly make an instance of the class. I realized my error when I made mine because the one I looked at was in the main method, when you make an instance of your mod, that has annotations, and that I created the variable entityInstance but never assigned anything to it, so its null. I agree that is basic Java. I was in a rush when I did that and didn't stop to look at what I had done. So with that in mind and stopping to think about it for a while. Wouldn't I pass the itself into that variable once it has been gotten from the world. Then I would take that and be able to get information from it.
  8. is it basic java? I've done two college classes specializing in Java beginner and advanced, and they have never mentioned stuff like this. Only how to use interfaces, inheritance, queues, stacks, and all the lesser stuff how making objects and general java rules... Where would you suggest I learn more about these issues, besides the Java trails. I know you say you can't learn programming from modding and understand why, I use it as a way to put into action what skills I do have. In return Minecraft beats the hell out of me for trying it seems. I always hear people say learn basic Java and I for the most part think I do know basic Java. I was able to do bukkit/spigot plugins in Java for a while without much hassle. Is it more of a "How to Develop a game" that I should learn? More of the rules of java? Find a better college because this one doesn't have a higher Java class to take and the one I did take doesn't seem valuable. I don't know. Kind of at a loss here.
  9. That is the updated method for the HasToolInSlot(). I am having this method get called in Shaped Recipe class. I can't make this method static because of items[] not being able to be static. So I always thought if you have to reference a non static variable or method to make a instance of the class that contains them and pass that along with what ever you need. So I did and threw another null pointer.... updated Shaped Recipe class The check in the Shaped Recipe if(!TileEntityProtoTable.entityInstance.hasToolInSlot()){ return false; } Instance line in TileEntity public static TileEntityProtoTable entityInstance;
  10. No, thats been sovled. I got that figured out. The issue is I'm trying to pass the non static method to a class because items[] can not be static. So I would just pass an instance of the TileEntity with the method in it correct?
  11. so basically its throwing a null before it can check for null, since I'm calling .getItem() on the slot and nothing is there to even grab a comparison. Edit: I made a check to see if items[0] is null. Now I got to redo my check because I found out that you can't make items[] a static variable because something else messes with it if you do and wont let you split the stack properly. So I got to redo how my hasToolInSlot works...
  12. Oops thought I added the crash log The call for the method is in the checkMatch() within the Shaped Recipe class line 74 in my IDE.
  13. So I was debating if I should alter the recipe manager, but then thought that it wasn't necessary since they only just need to be there and not in any specific order or anything. The whole Idea is that when I do a crafting event, I want to check to see if there are the right tools that would be an instance of ModTool. The ModTool class hasn't been made yet otherwise I would post it with my other code. Once the crafting was finished it would take damage. This is for a 5x5 crafting table that has 4 TileEntity slots. The crafting works and the TileEntity portion saves the items like it suppose to, but when I go to check to see if the item in the slot is valid, it throws a null pointer. I check for a null as well. So must be something I'm missing TileEntity Container Crafting Manager Shaped Recipe that has the check in it for the hasToolInSlot Crash Log
  14. Yea... sounds tricky, although I think I may have an understanding of what you mean by it, would it be something along the lines of making two methods in the Container called buildContainer() and buildTileEntity() to handle the different types and making of different slots then call them accordingly?
  15. So I take it the method I was trying wont work then. Hmmm two inventories, that sound tricky.
  16. The overall block has only 4 slots out of 30 that are TileEntity. When the block was originally made it acted like a normal 5X5 crafting table that spewed out the items. Now I have 4 extra slots that are a TileEntity
  17. sorry... just throwing me off cause its only partially acts as a tile entity.
  18. Oh so I would get the world for it in the GuiHandler. Like how you would for a furnace or machine.
  19. I provided code in my last thread http://www.minecraftforge.net/forum/index.php/topic,25281.msg128794.html#msg128794 before that code I had none to show. Just asking concept designs. Although I do admit I failed providing the code this time around. Here is the Container Here is the TileEntity that acts for the slots
  20. I been working on a crafting bench that has slots that extends TileEntity. The issue is that even with those the items still get removed when the bench is closed. So I must be missing what makes the items stay/remove from the TileEntity vs. Container. Anyone care to enlighten me?
  21. Yea, I got the slots and I made my own version of Slot called SlotTool(mainly to make sure that only instances of my tool can go into it). I did have it where all items took damage but didn't like the concept. I would like to have it where you add the tools to the recipe as such: this.addRecipe(new ItemStack(ModItems.goggles), new Object[]{" ", " G G ", "GPLPG", " G G ", " ", "SW", PH", 'G', Items.gold_ingot, 'P', Blocks.glass_pane 'L', Items.leather, 'S', ModItems.screwdriver, 'W', ModItems.saw, 'P', ModItems.pliers, 'H', ModItems.hammer}); The "SW" and "PH" refer to the bottom right 4 slots. That way I can easily determine what tools are needed for what recipe. The issue is I'm not sure how to point the findMatchingRecipe() to search those 4 slots for the tools. This is currently how the slots are defined. At the moment ignore that they are not in a for loop. Mainly making sure this all works before optimizing it. Would it be better to add them to the craft matrix slots or keep them separate like how they are.
  22. I have been working on a Prototyping table(A 5x5 crafting bench with 4 tool slots). I have an issue, plus trying to figure out if I want to continue it this way. 1. How do I get it so that the 4 separate slots act as TileEntity slots so that the 4 tools can go in there and stay there but are needed to do a recipe that will have them take damage. Kinda like how the Thaumcraft Crafting table does with its wand. 2. Since it seems like it may be a hassle to split between a Container and TileEntity like asked above, What would be the appropriate way to make the whole table a 5x5 crafting TileEntity where it just keeps all items in there. Like I said above, I'm deciding to keep it like I have it in question 1, or to learn how to change it to act differently entirely. Here is an idea of what the Table looks like to get a better idea:
  23. Thanks, saw it in the javaDocs, but there was no definition on what it did.
  24. So I have a method that checked the slots for specific items in a TileEntity. I was using the onInventoryChanged() to fire the checks on the slots only when the inventory was changed. Whats the appropriate way to update that to 1.7?
  • Create New...

Important Information

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