Jump to content

bigbaddevil6

Members
  • Posts

    87
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    Trying To learn.

bigbaddevil6's Achievements

Stone Miner

Stone Miner (3/8)

2

Reputation

  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?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.