Jump to content

Tavi007

Members
  • Posts

    145
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Tavi007's Achievements

Creeper Killer

Creeper Killer (4/8)

2

Reputation

  1. Create a class that implements TooltipComponent, which holds the data necessary for the rendering. Create a class that implements ClientTooltipComponent. This class should have a public constructor with only your TooltipComponent implementation as argument. Use RegisterClientTooltipComponentFactoriesEvent, so the game knows which ClientTooltipComponentneeds to be created, when an item has the TooltipComponent added to it. You can use the previosly mentioned constructor as your factory method. Add your TooltipComponent to the tooltip render pipeline with RenderTooltipEvent.GatherComponents. This is at least how I solved it. Anyone can correct me, if I made an error.
  2. Hey. I'm updating my mod to the newer minecraft version and I now have to register damage type for my custom damage sources. As far as I know forge doesn't provide a DeferredRegister nor a register event (at least i did not find one yet). All I found was this other thread here, with basically the same question and I tried to code the same approach. Here is the link to my code where I try to register the damage types https://github.com/Tavi007/ElementalCombat/blob/master/src/main/java/Tavi007/ElementalCombat/init/DamageTypeList.java I know, that I'm not calling the bootstrap method myself anywhere, mostly because I don't know where and when to call it and how to get the needed BootstapContext. Does anybody know more or can guide me to a proper implementation of the damage type registering?
  3. Hey! Thank you for the help. I could resolve the issue described in my opening post, but now have a different issue (something along the lines of main mod class not found. I get the same error for a fresh project with forge 45.1.2. The funny thing is, that I don't get any problems when running the dev environment with intellij. Even the issue from the opening post doesn't happen with intellij... So for now I will have to learn a new IDE so I won't get annoyed to much lol.
  4. Bump, since I still need help. Out of curiosity I tried to run the example mod provided in a fresh new mod setup for forge 45.1.2 and I ended up with the exact same stacktrace. Now I'm quite puzzled since the fresh setup should be working, I suppose, but it isn't for me. I have no idea how to start debugging, since I don't even know what minecraft/forge is trying to do here. Down below you can find the full debug log.
  5. Hey all, I'm currently updating my mod from 19.3 to 19.4 and after fixing all the normal issues like changes to the DamageSource and so on I was finally ready to run the mod. However on start I encounter following the RuntimeException: Exception in thread "main" java.lang.module.ResolutionException: Module elementalcombat contains package Tavi007.ElementalCombat.api, module main exports package Tavi007.ElementalCombat.api to elementalcombat at java.base/java.lang.module.Resolver.resolveFail(Resolver.java:901) at java.base/java.lang.module.Resolver.failTwoSuppliers(Resolver.java:807) at java.base/java.lang.module.Resolver.checkExportSuppliers(Resolver.java:736) at java.base/java.lang.module.Resolver.finish(Resolver.java:380) at java.base/java.lang.module.Configuration.<init>(Configuration.java:140) at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:494) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.ModuleLayerHandler.buildLayer(ModuleLayerHandler.java:75) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.TransformationServicesHandler.buildTransformingClassLoader(TransformationServicesHandler.java:60) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:106) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:78) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) I suppose something is wrong with my gradle setup, but I didn't really change anything here except update the version. In 19.3 everything was working fine... Does anybody know where I messed up? The link to the gradle file: https://github.com/Tavi007/ElementalCombat/blob/master/build.gradle
  6. sorry, i clicked on the wrong sub forum. Will reopen a new thread there....
  7. Hey all, I'm currently updating my mod from 19.3 to 19.4 and after fixing all the normal issues like changes to the DamageSource and so on I was finally ready to run the mod. However on start I encounter following the RuntimeException: Exception in thread "main" java.lang.module.ResolutionException: Module elementalcombat contains package Tavi007.ElementalCombat.api, module main exports package Tavi007.ElementalCombat.api to elementalcombat at java.base/java.lang.module.Resolver.resolveFail(Resolver.java:901) at java.base/java.lang.module.Resolver.failTwoSuppliers(Resolver.java:807) at java.base/java.lang.module.Resolver.checkExportSuppliers(Resolver.java:736) at java.base/java.lang.module.Resolver.finish(Resolver.java:380) at java.base/java.lang.module.Configuration.<init>(Configuration.java:140) at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:494) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.ModuleLayerHandler.buildLayer(ModuleLayerHandler.java:75) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.TransformationServicesHandler.buildTransformingClassLoader(TransformationServicesHandler.java:60) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:106) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:78) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) I suppose something is wrong with my gradle setup, but I didn't really change anything here except update the version. In 19.3 everything was working fine... Does anybody know where I messed up? The link to the gradle file: https://github.com/Tavi007/ElementalCombat/blob/master/build.gradle
  8. So after a lot of trial and error and using google i actually found a solution here: https://github.com/SpongePowered/MixinGradle/issues/40 Apparently it's a known problem and for now the best work around is to apply the plugin in a certain order: apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.spongepowered.mixin' apply plugin: 'eclipse' At least that worked for me
  9. I always run 'gradlew genEclipseRuns --refresh-dependencies' and 'gradlew eclipse' to create a working eclipse project. But you might be right, that I also need badpackets, since I can't find it in the Referenced Libraries. Well i was not sure, what causes the error and this forum is the best place to get any advice. So thanks for the hint anyway
  10. I'm in the process of updating my mod to newer minecraft versions. Part of the mod is interacting with the mod wthit (the newest fork of waila), so of cause I added the mod api as compileOnly dependency while the actual mod itself is a runtimeOnly dependency. (You can see the dependency part of my build.gradle file here and the properties file here). This set up did work fine up to minecraft version 1.17.1, but since the 1.18.2 and 1.19.3 version I run into exception when running the mod with eclipse. Exception in thread "main" java.lang.module.ResolutionException: Modules wthit and wthit_api export package mcp.mobius.waila.api.__internal__ to module minecraft at java.base/java.lang.module.Resolver.resolveFail(Resolver.java:901) at java.base/java.lang.module.Resolver.failTwoSuppliers(Resolver.java:815) at java.base/java.lang.module.Resolver.checkExportSuppliers(Resolver.java:736) at java.base/java.lang.module.Resolver.finish(Resolver.java:380) at java.base/java.lang.module.Configuration.<init>(Configuration.java:140) at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:494) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.ModuleLayerHandler.buildLayer(ModuleLayerHandler.java:75) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.TransformationServicesHandler.buildTransformingClassLoader(TransformationServicesHandler.java:60) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:104) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) I can build the mod jar just fine and test it by running it directly with forge launcher (aka adding it to custom modpack), but debugging like this is annoying af. So is my gradle set up incorrectly or is the wthit dependency faulty? Anyhow what can I do to fix it?
  11. Nevermind. Someone on discord helped me out. The Solution is to use a DerefferdRegister, that uses the minecraft namespace public static final DeferredRegister<Enchantment> VANILLA_ENCHANTMENTS = DeferredRegister.create(ForgeRegistries.ENCHANTMENTS, "minecraft"); public static final RegistryObject<Enchantment> FIRE_PROTECTION = VANILLA_ENCHANTMENTS.register("fire_protection", () -> new ElementalResistanceEnchantment(ElementalResistanceEnchantment.Type.FIRE)); public static final RegistryObject<Enchantment> PROJECTILE_PROTECTION = VANILLA_ENCHANTMENTS.register("projectile_protection", () -> new StyleResistanceEnchantment(StyleResistanceEnchantment.Type.PROJECTILE)); public static final RegistryObject<Enchantment> BLAST_PROTECTION = VANILLA_ENCHANTMENTS.register("blast_protection", () -> new StyleResistanceEnchantment(StyleResistanceEnchantment.Type.EXPLOSION));
  12. Hello. I'm currently updating my mod to 1.19 and have trouble with overriding vanilla enchantments by registering my own enchantment with the same ResourceLocation as the vanilla one. Previously I was using @SubscribeEvent public static void registerEnchantments(Register<Enchantment> event) { // overwriting of vanilla enchantments ElementalCombat.LOGGER.info("Expected overrides"); event.getRegistry() .register( new ElementalResistanceEnchantment(ElementalResistanceEnchantment.Type.FIRE).setRegistryName(Enchantments.FIRE_PROTECTION.getRegistryName())); event.getRegistry() .register(new StyleResistanceEnchantment(StyleResistanceEnchantment.Type.PROJECTILE) .setRegistryName(Enchantments.PROJECTILE_PROTECTION.getRegistryName())); event.getRegistry() .register( new StyleResistanceEnchantment(StyleResistanceEnchantment.Type.EXPLOSION).setRegistryName(Enchantments.BLAST_PROTECTION.getRegistryName())); } but apparently this event was removed. I found the a general RegisterEvent class, but I'm not sure how to properly use it. Also the method Enchantment#getRegistryName from the vanilla class seems to be removed, so I won't get the correct ResourceLocation from it anymore... Can someone help me please?
  13. Ahhh. I understand now what you mean. This clears my confusion.
  14. Thanks. I will look into it. Do all particle with BasicParticleType have this brown tint? This is kinda unexpected...
  15. Registriation: https://github.com/Tavi007/ElementalCombat/blob/master/src/main/java/Tavi007/ElementalCombat/init/ParticleList.java I use the BasicParticleType from vanilla Minecraft.
×
×
  • Create New...

Important Information

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