Jump to content

shadowfacts

Forge Modder
  • Posts

    588
  • Joined

  • Last visited

Everything posted by shadowfacts

  1. Sort through the list and check the output to remove the one you want. Psuedo-code: List<IRecipe> toRemove; CraftingManager.getInstance().getRecipeList().stream().filter(recipe -> recipe.getOutput.equals(yourThingy)).forEach(toRemove::add); toRemove.stream().forEach(CraftingManager.getInstance().getRecipeList()::remove);
  2. You could try using the FMLMissingMappings event to automatically replace any instances of your old blocks/items with the new ones.
  3. Is this in a normal env or a deobfuscated one? And is this problem happening because of a mod you wrote?
  4. No... The case of the mod ID is used for everything. In some cases, the operating system doesn't care about the case, which may be what you're encountering. You should use the same case everywhere you use your mod ID.
  5. There are a _huge_ number of existing, established launchers and a great number of them allow anyone to upload packs. Use one of those. Minecraft is weird and finicky and it is far more effort to create your own launcher than use an existing one. I know because I built the Temporal Reality one, and I didn't even write the launching code myself, I used a library.
  6. To setup a project SDK you need to go to the first tab of the Project Structure window (under the File menu). In the first tab there is a dropdown that is used to select which JDK you want to use. If you haven't used IntelliJ before, it has no knowledge of any JDKs installed on your computer. Press the New... button and select the home of the JDK installation you wish to use for your project.
  7. Side note: You don't need an IFMLLoadingPlugin to use an Access Transformer.
  8. Side note: You don't need to use an Object[], you can just pass them directly to the method.
  9. There is no tool to magically update an old mod. More changes in different versions than just mappings. If you want to update an old mod, you'll have to do as larsgerrits said. Obtain the source code (preferably by completely legal means), make any necessary changes, and then recompile it.
  10. Why on (or off) Earth would you want a lang file in your config?!
  11. [me=shadowfacts]facedesks[/me] I fixed it! I can't believe that something so simple and obvious cause this.
  12. If by "throwing a fit" you mean crashing or throwing an exception, you need to provide the crash report or stack trace of the exception.
  13. Unfortunately, this has not fixed the problem. I should clarify that at the end of the readFromNBT method, my TE has all the correct values, at some point after that they are lost.
  14. If you want other energy using blocks to be able to actively pull from your solar panel, your current implementation will work fine. If you want your solar panel to actively push into adjacent RF accepting blocks, you will need to add some code. In the updatEntity method of your TE you will need to iterate over all the valid directions, and for each direction, check if the tile entity is A) not null, B) an IEnergyReceiver, and C) can connect on that side. If all of these conditions are true, you can call receiveEnergy on the TileEntity with the correct amount of energy. Side note: If you wanted to improve upon this implementation, you could only check 1 direction every tick (instead of all 6 every tick) to improve on server-side performance a bit. Example: @Override public void updateEntity() { // generate if (storage.getEnergyStored() > 0) { // is there energy to send for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { TileEntity te = world.getTileEntity(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ); if (te instanceof IEnergyReceiver) { IEnergyReceiver receiver = (IEnergyReceiver)te; int toExtract = receiver.receiveEnergy(dir.getOpposite(), extractEnergy(dir, MAX_EXTRACT, true), false); extractEnergy(dir, toExtract, false); } } } }
  15. I am currently making a fairly simple mod, it adds only one thing, barrels for liquid storage. It is functionally complete except for one, very important, bug. After I leave and re-enter the world, the fluid has not saved. I've confirmed that at the the end of writeToNBT and readFromNBT the tag compound does contain all the correct values, however, the fluid still is not restored on world load. My code is here on GitHub, any help/advice that anyone can offer would be greatly appreciated.
  16. You don't need to replace the vanilla block, you can just modify it. Blocks.log.setRequiresTool();
  17. It is a hidden folder (it starts with a . ) so it isn't visible in Finder by default. You can either enable viewing hidden folders, use Cmd-Shift-G to go to the folder (~/.gradle/) or just use the Terminal application.
  18. Inside of your last if statement, cancel the event with event.setCanceled(true).
  19. There is a very handy plugin for IntelliJ IDEA called ASM Bytecode Outline which allows you to view the ASM and bytecode versions of classes inside IDEA.
  20. VikeStep did a very good which not only explains how to use ASM in the context of Minecraft modding, but also explains a lot of things about the JVM that you should understand before using ASM.
  21. Erm, diesieben, ItemArmour extends ItemArmor. There's a u in one and not the other.
  22. Why do you want to make a core mod? Core mods have the potential to completely break everything and should only be used as a last resort.
  23. 1. You have to show your code. 2. You have a method calls itself that calls itself that calls itself that calls itself that calls itself, ad infinitum. This is causing the StackOverflowError because you are continually adding things to the stack but never removing them. Side note, Failender, it's a different problem, 1 problem per thread.
  24. Wat. Do you mean you want to intercept when the chest is right-clicked? Your chest? The vanilla chest?
×
×
  • Create New...

Important Information

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