Jump to content

TheGudBIAS

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by TheGudBIAS

  1. I used the fully qualified name and it still didn't work. I decided to get a bytecode shower and I noticed there was no mention to the method I was targeting. It was inside a lambda expression. I tried another method outside the expression and it worked. Edit: the reason was that it injected code AFTER the method call. I didn't notice the "need to store value" thing. I switched to INVOKE with a shift to AFTER
  2. I have used mixins once before, and it was with @At RETURN, so it worked fine. Now im trying to use it as INVOKE, and the compilation is successful, but the client crashes almost on startup (just a couple seconds after running runClient) Im trying to inject the method finishConversion inside the ZombieVillager class. This is my Mixin class important stuff: import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.monster.ZombieVillager; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(ZombieVillager.class) public class ZombieVillagerCures { @Inject(method = "finishConversion", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/world/entity/LivingEntity;addEffect(Lnet/minecraft/world/effect/MobEffectInstance;)Z")) private void addZombieVillagerCuredAmmount(ServerLevel level, CallbackInfo info) { System.out.println("The Mixin Worked!!! " + level); } // Lnet/minecraft/world/entity/LivingEntity;addEffect(Lnet/minecraft/world/effect/MobEffectInstance;)Z } I'm sure the issue lies in the @At cuz other @At values work fine. Its probably the fully qualified name thing. idk how to get it in VS code
  3. I'm wayy less skilled than you i bet, but maybe u could try to just convert one into the other?
  4. im a new modder. i want to add some stuff i need to load when i join a world into the config file, but idk how. Is this even possible? to add a new config or redo the whole config file after the original was loaded?
  5. Is there a way to add new configs or at least edit existing lists of ones mid-game? that is, after the initial config registration and loading was done.
×
×
  • Create New...

Important Information

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