Jump to content

Luis_ST

Members
  • Posts

    5704
  • Joined

  • Last visited

  • Days Won

    72

Everything posted by Luis_ST

  1. DeferredRegisty ForgeRegistries#POTIONS for an effect, ForgeRegistries#POTION_TYPES -> for a potion
  2. and what exactly do I have to check this map for
  3. you have to tell minecraft where to find the texture for your model use this as a practical example
  4. you need to stitch the texture in the TextureStitchEvent.Pre
  5. I fixed it, thank you for your help
  6. If I look at the AnnotationData and the methods you have listed, I cannot find a usable method since I can't do anything with the target/class type, the name of the target doesn't help with fields and methods either. what does the map contain, the AnnotationData#getAnnotationData returns
  7. with which method do I get the object which has the annotation
  8. I have a custom recipe system, I use annotations to register the recipe methods faster and easier, which currently only works in classes that extend my recipe helper. I would like to extend this to all classes that have an annotation similar to the event registration of forge. I also need the classes for a config system in which I add an annotation to a fields and these are automatically added to my config, the implementaion is not perfect/finished but here is a small example: @ConfigValue(valueName = "example", comment = "This is an example") public static int example;
  9. you return the actual method in the method that does not work and is there a reason why you are not using the code feature?
  10. define "isn't working", and show what you tried
  11. As the title says i need all classes of my mod, because i want to output them firstly on the console (for debugging), and secondly for a custom registration of recipes. I looked at the code from forge for the AutomaticEventSubscriber registration and understand it only partially. I also have this code that gives me a ModFileScanData: ModList.get().getModFileById(Nero.MOD_ID).getFile().getScanResult() ModFileScanData has the getClasses method, which unfortunately gives me an unusable class, because I don't get any classes or anything back from a ClassData is there a way to get all classes of my mod?
  12. try adding MatrixStack#push (before your render code) and MatrixStack#pop (after your render code): matrixStack.push(); your code matrixStack.pop();
  13. then I have no idea Edit: I will look at the whole thing again as soon as possible, i will find a usable solution for your problem, i hope.
  14. do something like that: replaced <capability> with the following: and you should have something like this for your capability somewhere: @CapabilityInject(IEnergyStorage.class) public static Capability<IEnergyStorage> ENERGY = null; stack.getCapability(<capability>, null).orElseThrow(NullPointerException::new); Edit: I just saw that you are using CapabilityEnergy#ENERGY for your capability (should work too)
  15. if I understand your item code correctly you want to add the energy to the item as information if this is correct you can get your energy with ItemStack#getCapability
  16. and where exactly is your problem now?
  17. show the class where you need it, and normally you use CompoundNBT to save data
  18. yes you probably don't use mojang mappings, which is why the methods have different names. (and update to a newer version there is no reason to use an "outdated" version) did not use my suggestion but the one from @diesieben07, isEnabled the better solution for your project
  19. use the Container#clicked method, check whether something has changed after clicking (item before clicked != item after clicked)
  20. the container / inventory is not updated when you add / remove the backpack. a container is created when it is opened and saved when it is closed. between opening and closing the slot size is not updated. the simplest solution would be to close the container and reopen it
  21. Use the PotionColorCalculationEvent, check whether the effects of the event match those of your potion, if this is the case you can set the color in the event
  22. used reflection or overwrite the enchachantment this is an example of how you overwrite an enchantment Note: overwriting vanilla objects can lead to problems if a second mod overwrites the same object
  23. I have created a common config that works, but the values that I save in the config change the order each time the game is started. this is the config Now my question is there a way to prevent this, or give the values a fixed sequence?
×
×
  • Create New...

Important Information

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