Jump to content

larsgerrits

Members
  • Posts

    3462
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by larsgerrits

  1. 1.7.10 is no longer suported on this forum. Update if you want help.
  2. You didn't really supply us with any information. What Forge version are you using? Are you using any mods? Which mods? What are your JVM arguments? Your previous post got locked because you were using 1.7.10. You say it's also happening on 1.9 and 1.12, so post stuff related to those versions, and not 1.7.10.
  3. 1.7.10 is no longer supported on this forum. Please update if you want help.
  4. That's not how it works. OP might have his question answered, and now knows how to apply potion effects. But he doesn't know how to figure out what do next time. Next time he has a question he will go to the forums immediately and ask a question, instead of looking themselves first, because people like you give them the answers. That's not how learning works.
  5. Post the full FML log (%profile_directory%/logs/fml-client-latest.log). However, this is most likely an issue with Optifine, so please try to run your game without it as well.
  6. 1.7.10 is no longer supported on this forum. Please update if you want help.
  7. 1.7.10 is no longer suported on this forum. Please update if you want help.
  8. You call ItemStackHandler#getStackInSlot instead of NonNullIList#get to get stuff out of your inventory. Instead of using the IInventory#getInventoryStackLimit method, you should override ItemStackHandler#getSlotLimit inside of an (anonymous) subclass of ItemStackHandler. Take a look at my previous edit for a link in which I do the same.
  9. Yes. Not only remove the "implements IInventory", but also every method you have to override from that. The only issues you'll have are in your TileEntityPestle#craftItem method and the ContainerPestle class. Take a look at my TileEntity class, it has an ItemStackHandler with anonymous subclass: https://gist.github.com/Larsg310/0bafea64ccac7280f32158dc52ead2a2
  10. Not really. It's way easier actually. Remove everything related to IInventory, and make a single instance of ItemStackHandler: public ItemStackHandler inventory = new ItemStackHandler(INVENTORY_SIZE); Everything related to the inventory is now inside that, and you can call various methods to interact with it. If you want other machines to be able to manipulate your inventory, look at the docs to see how to expose your capability.
  11. I told you this: If you don't want to check every tick, don't implement ITickable. If you use an ItemStackHandler (again, use it instead of IInventory), you can make an anonymous subclass (is that what you call it?) or a normal subclass and override the ItemStackHandler#onContentsChanged method to call the TileEntityPestle#craftItem method.
  12. Everywhere you want to trigger the crafting of the Item. If you want pestle to check for a crafting recipe every tick implement the ITickable interface on your TileEntityPestle and call it in the ITickable#update method. That was in response to @loordgek for suggesting the recipe class is at fault because of a hash-based solution. I told him that most likely wasn't the issue, as you aren't using the HashMap#contains*() functions to check for recipes, and so you never check based on the hash of the ItemStack.
  13. FurnaceRecipes uses a HashMap themselves so that's not the issue, because you never actually compare the hashcodes of the ItemStacks (HashMap#contains*()), just the ItemStacks themselves (going through the entry Set and compare them yourself).
  14. Don't make a custom launcher. If you really want to make a custom launcher, do it like the Twitch/Curse launcher: manage the profiles in there, when you press "Play", open the official Minecraft launcher with a profile and let the official launcher do the work.
  15. 1) Don't useIInventory. Use an IItemhandler (ItemStackHandler for most use-cases). 2) You never call TileEntityPestle#craftItem.
  16. There's the FMLServerStoppingEvent you could use, however, based on your idea there might be a better option. What exactly do you want to do?
  17. (ItemStack)this.inventory.get(0).isEmpty() Well... you can cast a boolean to an ItemStack because a boolean isn't an ItemStack... You probably wanted to cast the result ofinventory.get(0) to ItemStack, and check that ItemStack#isEmpty().
  18. Nothing of what you've said helps us in any way, only that we know that there's an error. Please post the full output of gradlew setupDecompWorkspace.
  19. Do you know how to make a basic Item? If you don't, do that first. Do you know how to override methods? If you don't, learn Java first (without Minecraft).
  20. What exactly are you having trouble with? Show what you've tried.
  21. Override Item::hasContainerItem(ItemStack) to return true, and override Item::getContainerItem(ItemStack) to return the crafting output.
  22. Your OBJ model needs to have an MTL file associated with it.
  23. The entire file. Not those files. Also, remove Optifine.
  24. Ok, so in your Referenced Libraries, should be a file called forgeSrc-***-***.jar. Open that Jar, in eclipse, and there are all the Minecraft classes.
  25. Please, show a screenshot of your package explorer. Including the external libraries.
×
×
  • Create New...

Important Information

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