Jump to content

Recommended Posts

Posted

Hi,

I have error when i test my module

  Quote

-- Head --
Thread: Client thread
Stacktrace:
    at xyz.fusked.m0dules.mods.combat.AutoclickDroit.check(AutoclickDroit.java:77)
    at xyz.fusked.m0dules.mods.combat.AutoclickDroit.onTick(AutoclickDroit.java:99)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_9_AutoclickDroit_onTick_ClientTickEvent.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:49)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:140)
    at net.minecraftforge.fml.common.FMLCommonHandler.onPostClientTick(FMLCommonHandler.java:337)
 

Expand  
/*    */ package xyz.fusked.m0dules.mods.combat;

import java.lang.reflect.Method;
import java.util.Random;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.client.settings.GameSettings;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.item.Item;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import xyz.fusked.m0dules.Module;
import xyz.fusked.m0dules.Module.Category;
import xyz.fusked.m0dules.Module.Modules;
import xyz.fusked.utils.MouseUtil;
import xyz.fusked.utils.Timer;
import xyz.fusked.values.BooleanValue;
import xyz.fusked.values.NumberValue;

public class AutoclickDroit
  extends Module
{
  private NumberValue maxcps;
  private NumberValue mincps;
  private NumberValue jitterstren;
  private BooleanValue jitter;
  private BooleanValue inv;
  private long nextLeftUp;
  private long nextLeftDown;
  private long nextRightUp;
  private long nextRightDown;
  private long nextDrop;
  private long nextExhaust;
  private Timer timer;
  private Random random;
  private double dr0pR4t3;
  private boolean dr0pp1ng;
  private Method guiScreenMethod;
  
  public AutoclickDroit()
  {
    super("AutoClickerDroit", 0, Module.Category.COMBAT);
    this.maxcps = new NumberValue("MaxCPS", 12.0D, 1.0D, 20.0D);
    this.mincps = new NumberValue("MinCPS", 6.0D, 1.0D, 20.0D);
    this.jitterstren = new NumberValue("Jitter Strength", 0.5D, 0.1D, 2.0D);
    this.jitter = new BooleanValue("Jitter", false);
    this.inv = new BooleanValue("Inventory fill", false);
    this.timer = new Timer();
    this.random = new Random();
    addValue(this.maxcps);
    addValue(this.mincps);
    addValue(this.jitterstren);
    addBoolean(this.jitter);
    addBoolean(this.inv);
    try
    {
      this.guiScreenMethod = GuiScreen.class.getDeclaredMethod("mouseClicked", new Class[] { Integer.TYPE, Integer.TYPE, Integer.TYPE });
    }
    catch (NoSuchMethodException e)
    {
      e.printStackTrace();
    }
  }
  
  public boolean check(EntityPlayerSP playerSP)
  {
	  if ((playerSP.getHeldItemMainhand() != null) && (playerSP.getHeldItemMainhand().getItem() == Item.getItemById(322)) || (playerSP.getHeldItemOffhand().getItem() == Item.getItemById(322))){
          return false;
      }
    else
  if ((playerSP.getHeldItemMainhand() != null) && (playerSP.getHeldItemMainhand().getItem() instanceof ItemBlock)){
          return true;
      }
      else if ((playerSP.getHeldItemOffhand() != null) && (playerSP.getHeldItemOffhand().getItem() instanceof ItemBlock)){
          return true;
      }
      else if((playerSP.getHeldItemOffhand() != null) && (playerSP.getHeldItemOffhand().getItem() instanceof ItemBlock ) && (playerSP.getHeldItemMainhand().getItem() instanceof ItemFood )){
          return false;
      }
      else {
          return false;
      }
  }
  
  @SubscribeEvent
  public void onTick(TickEvent.ClientTickEvent ev3nt)
    throws Exception
  {
    if ((this.mc.currentScreen == null) && (check(this.mc.thePlayer)))
    {
      Mouse.poll();
      if (Mouse.isButtonDown(1))
      {
        if ((this.jitter.getState()) && (this.random.nextDouble() > 0.65D))
        {
          float jitterstrenght = (float)(this.jitterstren.getValue() * 0.5D);
          if (this.random.nextBoolean()) {
            this.mc.thePlayer.rotationYaw += this.random.nextFloat() * jitterstrenght;
          } else {
            this.mc.thePlayer.rotationYaw -= this.random.nextFloat() * jitterstrenght;
          }
          if (this.random.nextBoolean()) {
            this.mc.thePlayer.rotationPitch += (float)(this.random.nextFloat() * (jitterstrenght * 0.75D));
          } else {
            this.mc.thePlayer.rotationPitch -= (float)(this.random.nextFloat() * (jitterstrenght * 0.75D));
          }
        }
        if ((this.nextLeftDown > 0L) && (this.nextLeftUp > 0L))
        {
          if (System.currentTimeMillis() > this.nextLeftDown)
          {
            KeyBinding.setKeyBindState(this.mc.gameSettings.keyBindUseItem.getKeyCode(), true);
            KeyBinding.onTick(this.mc.gameSettings.keyBindUseItem.getKeyCode());
            MouseUtil.sendClick(0, true);
            generateLeftDelay();
          }
          else if (System.currentTimeMillis() > this.nextLeftUp)
          {
            KeyBinding.setKeyBindState(this.mc.gameSettings.keyBindUseItem.getKeyCode(), false);
            MouseUtil.sendClick(0, false);
          }
        }
        else {
          generateLeftDelay();
        }
        if (!Mouse.isButtonDown(0))
        {
          long n = 0L;
          this.nextRightUp = 0L;
          this.nextRightDown = 0L;
        }
      }
      else
      {
        long n2 = 0L;
        this.nextRightUp = 0L;
        this.nextRightDown = 0L;
        this.nextLeftUp = 0L;
        this.nextLeftDown = 0L;
      }
    }
    else if ((this.mc.currentScreen instanceof GuiInventory))
    {
      if ((Mouse.isButtonDown(1)) && ((Keyboard.isKeyDown(54)) || (Keyboard.isKeyDown(42))))
      {
        if (!this.inv.getState()) {
          return;
        }
        if ((this.nextLeftUp == 0L) || (this.nextLeftDown == 0L))
        {
          generateLeftDelay();
          return;
        }
        if (System.currentTimeMillis() > this.nextLeftDown)
        {
          generateLeftDelay();
          clickInventory(this.mc.currentScreen);
        }
      }
      else
      {
        long n3 = 0L;
        this.nextRightUp = 0L;
        this.nextRightDown = 0L;
        this.nextLeftUp = 0L;
        this.nextLeftDown = 0L;
      }
    }
  }
  
  private void generateLeftDelay()
  {
    if (this.mincps.getValue() > this.maxcps.getValue()) {
      return;
    }
    long d3l4y = (int)Math.round(900.0D / this.mincps.getValue() + this.random.nextDouble() * (this.maxcps.getValue() - this.mincps.getValue()));
    if (System.currentTimeMillis() > this.nextDrop)
    {
      if ((!this.dr0pp1ng) && (this.random.nextInt(100) >= 85))
      {
        this.dr0pp1ng = true;
        this.dr0pR4t3 = (1.1D + this.random.nextDouble() * 0.15D);
      }
      else
      {
        this.dr0pp1ng = false;
      }
      this.nextDrop = (System.currentTimeMillis() + 500L + this.random.nextInt(1500));
    }
    if (this.dr0pp1ng) {
      d3l4y *= this.dr0pR4t3;
    }
    if (System.currentTimeMillis() > this.nextExhaust)
    {
      if (this.random.nextInt(100) >= 80) {
        d3l4y += 50L + this.random.nextInt(150);
      }
      this.nextExhaust = (System.currentTimeMillis() + 500L + this.random.nextInt(1500));
    }
    this.nextLeftDown = (System.currentTimeMillis() + d3l4y);
    this.nextLeftUp = (System.currentTimeMillis() + d3l4y / 2L - this.random.nextInt(10));
  }
  
  private void clickInventory(GuiScreen screen)
  {
    int v4r1 = Mouse.getX() * screen.width / this.mc.displayWidth;
    int v4r2 = screen.height - Mouse.getY() * screen.height / this.mc.displayHeight - 1;
    int v4r3 = 0;
    try
    {
      this.guiScreenMethod.setAccessible(true);
      this.guiScreenMethod.invoke(screen, new Object[] { Integer.valueOf(v4r1), Integer.valueOf(v4r2), Integer.valueOf(0) });
      this.guiScreenMethod.setAccessible(false);
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
  }
}

Modding version is 1.9.4

 

Posted
  On 8/13/2018 at 4:02 PM, NqwSqw said:

Hi,

I have error when i test my module

/*    */ package xyz.fusked.m0dules.mods.combat;

import java.lang.reflect.Method;
import java.util.Random;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.client.settings.GameSettings;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.item.Item;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import xyz.fusked.m0dules.Module;
import xyz.fusked.m0dules.Module.Category;
import xyz.fusked.m0dules.Module.Modules;
import xyz.fusked.utils.MouseUtil;
import xyz.fusked.utils.Timer;
import xyz.fusked.values.BooleanValue;
import xyz.fusked.values.NumberValue;

public class AutoclickDroit
  extends Module
{
  private NumberValue maxcps;
  private NumberValue mincps;
  private NumberValue jitterstren;
  private BooleanValue jitter;
  private BooleanValue inv;
  private long nextLeftUp;
  private long nextLeftDown;
  private long nextRightUp;
  private long nextRightDown;
  private long nextDrop;
  private long nextExhaust;
  private Timer timer;
  private Random random;
  private double dr0pR4t3;
  private boolean dr0pp1ng;
  private Method guiScreenMethod;
  
  public AutoclickDroit()
  {
    super("AutoClickerDroit", 0, Module.Category.COMBAT);
    this.maxcps = new NumberValue("MaxCPS", 12.0D, 1.0D, 20.0D);
    this.mincps = new NumberValue("MinCPS", 6.0D, 1.0D, 20.0D);
    this.jitterstren = new NumberValue("Jitter Strength", 0.5D, 0.1D, 2.0D);
    this.jitter = new BooleanValue("Jitter", false);
    this.inv = new BooleanValue("Inventory fill", false);
    this.timer = new Timer();
    this.random = new Random();
    addValue(this.maxcps);
    addValue(this.mincps);
    addValue(this.jitterstren);
    addBoolean(this.jitter);
    addBoolean(this.inv);
    try
    {
      this.guiScreenMethod = GuiScreen.class.getDeclaredMethod("mouseClicked", new Class[] { Integer.TYPE, Integer.TYPE, Integer.TYPE });
    }
    catch (NoSuchMethodException e)
    {
      e.printStackTrace();
    }
  }
  
  public boolean check(EntityPlayerSP playerSP)
  {
	  if ((playerSP.getHeldItemMainhand() != null) && (playerSP.getHeldItemMainhand().getItem() == Item.getItemById(322)) || (playerSP.getHeldItemOffhand().getItem() == Item.getItemById(322))){
          return false;
      }
    else
  if ((playerSP.getHeldItemMainhand() != null) && (playerSP.getHeldItemMainhand().getItem() instanceof ItemBlock)){
          return true;
      }
      else if ((playerSP.getHeldItemOffhand() != null) && (playerSP.getHeldItemOffhand().getItem() instanceof ItemBlock)){
          return true;
      }
      else if((playerSP.getHeldItemOffhand() != null) && (playerSP.getHeldItemOffhand().getItem() instanceof ItemBlock ) && (playerSP.getHeldItemMainhand().getItem() instanceof ItemFood )){
          return false;
      }
      else {
          return false;
      }
  }
  
  @SubscribeEvent
  public void onTick(TickEvent.ClientTickEvent ev3nt)
    throws Exception
  {
    if ((this.mc.currentScreen == null) && (check(this.mc.thePlayer)))
    {
      Mouse.poll();
      if (Mouse.isButtonDown(1))
      {
        if ((this.jitter.getState()) && (this.random.nextDouble() > 0.65D))
        {
          float jitterstrenght = (float)(this.jitterstren.getValue() * 0.5D);
          if (this.random.nextBoolean()) {
            this.mc.thePlayer.rotationYaw += this.random.nextFloat() * jitterstrenght;
          } else {
            this.mc.thePlayer.rotationYaw -= this.random.nextFloat() * jitterstrenght;
          }
          if (this.random.nextBoolean()) {
            this.mc.thePlayer.rotationPitch += (float)(this.random.nextFloat() * (jitterstrenght * 0.75D));
          } else {
            this.mc.thePlayer.rotationPitch -= (float)(this.random.nextFloat() * (jitterstrenght * 0.75D));
          }
        }
        if ((this.nextLeftDown > 0L) && (this.nextLeftUp > 0L))
        {
          if (System.currentTimeMillis() > this.nextLeftDown)
          {
            KeyBinding.setKeyBindState(this.mc.gameSettings.keyBindUseItem.getKeyCode(), true);
            KeyBinding.onTick(this.mc.gameSettings.keyBindUseItem.getKeyCode());
            MouseUtil.sendClick(0, true);
            generateLeftDelay();
          }
          else if (System.currentTimeMillis() > this.nextLeftUp)
          {
            KeyBinding.setKeyBindState(this.mc.gameSettings.keyBindUseItem.getKeyCode(), false);
            MouseUtil.sendClick(0, false);
          }
        }
        else {
          generateLeftDelay();
        }
        if (!Mouse.isButtonDown(0))
        {
          long n = 0L;
          this.nextRightUp = 0L;
          this.nextRightDown = 0L;
        }
      }
      else
      {
        long n2 = 0L;
        this.nextRightUp = 0L;
        this.nextRightDown = 0L;
        this.nextLeftUp = 0L;
        this.nextLeftDown = 0L;
      }
    }
    else if ((this.mc.currentScreen instanceof GuiInventory))
    {
      if ((Mouse.isButtonDown(1)) && ((Keyboard.isKeyDown(54)) || (Keyboard.isKeyDown(42))))
      {
        if (!this.inv.getState()) {
          return;
        }
        if ((this.nextLeftUp == 0L) || (this.nextLeftDown == 0L))
        {
          generateLeftDelay();
          return;
        }
        if (System.currentTimeMillis() > this.nextLeftDown)
        {
          generateLeftDelay();
          clickInventory(this.mc.currentScreen);
        }
      }
      else
      {
        long n3 = 0L;
        this.nextRightUp = 0L;
        this.nextRightDown = 0L;
        this.nextLeftUp = 0L;
        this.nextLeftDown = 0L;
      }
    }
  }
  
  private void generateLeftDelay()
  {
    if (this.mincps.getValue() > this.maxcps.getValue()) {
      return;
    }
    long d3l4y = (int)Math.round(900.0D / this.mincps.getValue() + this.random.nextDouble() * (this.maxcps.getValue() - this.mincps.getValue()));
    if (System.currentTimeMillis() > this.nextDrop)
    {
      if ((!this.dr0pp1ng) && (this.random.nextInt(100) >= 85))
      {
        this.dr0pp1ng = true;
        this.dr0pR4t3 = (1.1D + this.random.nextDouble() * 0.15D);
      }
      else
      {
        this.dr0pp1ng = false;
      }
      this.nextDrop = (System.currentTimeMillis() + 500L + this.random.nextInt(1500));
    }
    if (this.dr0pp1ng) {
      d3l4y *= this.dr0pR4t3;
    }
    if (System.currentTimeMillis() > this.nextExhaust)
    {
      if (this.random.nextInt(100) >= 80) {
        d3l4y += 50L + this.random.nextInt(150);
      }
      this.nextExhaust = (System.currentTimeMillis() + 500L + this.random.nextInt(1500));
    }
    this.nextLeftDown = (System.currentTimeMillis() + d3l4y);
    this.nextLeftUp = (System.currentTimeMillis() + d3l4y / 2L - this.random.nextInt(10));
  }
  
  private void clickInventory(GuiScreen screen)
  {
    int v4r1 = Mouse.getX() * screen.width / this.mc.displayWidth;
    int v4r2 = screen.height - Mouse.getY() * screen.height / this.mc.displayHeight - 1;
    int v4r3 = 0;
    try
    {
      this.guiScreenMethod.setAccessible(true);
      this.guiScreenMethod.invoke(screen, new Object[] { Integer.valueOf(v4r1), Integer.valueOf(v4r2), Integer.valueOf(0) });
      this.guiScreenMethod.setAccessible(false);
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
  }
}

Modding version is 1.9.4

 

Expand  

Why are you using 1.9.4? Just update forge please, it makes modding so much easier.

Posted
  On 8/13/2018 at 4:28 PM, Big_Bad_E said:

What is line 77? Also if  the error is on an if statement space it out to find the problem/null.

Expand  
  Quote

77 : if ((playerSP.getHeldItemMainhand() != null) && (playerSP.getHeldItemMainhand().getItem() == Item.getItemById(322)) || (playerSP.getHeldItemOffhand().getItem() == Item.getItemById(322)))

99 : if ((this.mc.currentScreen == null) && (check(this.mc.thePlayer)))

Expand  

 

Posted (edited)

1) Don't use Item IDs

2) You never check that getHeldItemOffhand() isn't null

3) Your parens aren't correct

Edited by Draco18s

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Recently made a mod in Intellij for Forge 1.20.1 with everything seemingly working perfectly fine with 0 errors in Intellij although when I try to run it in-game the game crashes on startup and gives the error and now Im just confused as to what is causing this error.  The game crashed: initializing game Error: java.lang.RuntimeException: null Here is the full crash log: (excluding system details) ---- Minecraft Crash Report ---- // I let you down. Sorry :( Time: 2025-04-18 21:33:42 Description: Initializing game java.lang.RuntimeException: null     at net.minecraftforge.registries.GameData.postRegisterEvents(GameData.java:315) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}     at net.minecraftforge.common.ForgeStatesProvider.lambda$new$4(ForgeStatesProvider.java:25) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}     at net.minecraftforge.fml.ModLoader.handleInlineTransition(ModLoader.java:217) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}     at net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$19(ModLoader.java:209) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}     at java.util.Optional.ifPresent(Optional.java:178) ~[?:?] {}     at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:209) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}     at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$13(ModLoader.java:183) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}     at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {}     at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:183) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}     at net.minecraftforge.client.loading.ClientModLoader.lambda$begin$1(ClientModLoader.java:66) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}     at net.minecraftforge.client.loading.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:86) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}     at net.minecraftforge.client.loading.ClientModLoader.begin(ClientModLoader.java:66) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}     at net.minecraft.client.Minecraft.<init>(Minecraft.java:459) ~[client-1.20.1-20230612.114412-srg.jar%23158!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:182) ~[forge-47.4.0.jar:?] {re:classloading,pl:runtimedistcleaner:A}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}     at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}     at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~[fmlloader-1.20.1-47.4.0.jar:?] {}     at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99) ~[fmlloader-1.20.1-47.4.0.jar:?] {}     at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$makeService$0(CommonClientLaunchHandler.java:25) ~[fmlloader-1.20.1-47.4.0.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?] {}     Suppressed: net.minecraftforge.fml.ModLoadingException: Battle Music REFORGED (battlemusicreforged) encountered an error during the common_setup event phase §7java.lang.NoSuchMethodError: 'net.minecraft.sounds.SoundEvent net.minecraft.sounds.SoundEvent.createVariableRangeEvent(net.minecraft.resources.ResourceLocation)'         at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:125) ~[javafmllanguage-1.20.1-47.4.0.jar%23160!/:?] {}         at net.minecraftforge.fml.ModLoader.lambda$postEventWithWrapInModOrder$33(ModLoader.java:346) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}         at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {}         at net.minecraftforge.fml.ModList.forEachModInOrder(ModList.java:227) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}         at net.minecraftforge.fml.ModLoader.postEventWithWrapInModOrder(ModLoader.java:344) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}         at net.minecraftforge.fml.ModLoader.postEventWrapContainerInModOrder(ModLoader.java:337) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}         at net.minecraftforge.registries.GameData.postRegisterEvents(GameData.java:329) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}         at net.minecraftforge.common.ForgeStatesProvider.lambda$new$4(ForgeStatesProvider.java:25) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}         at net.minecraftforge.fml.ModLoader.handleInlineTransition(ModLoader.java:217) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}         at net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$19(ModLoader.java:209) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}         at java.util.Optional.ifPresent(Optional.java:178) ~[?:?] {}         at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:209) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}         at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$13(ModLoader.java:183) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}         at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {}         at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:183) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}         at net.minecraftforge.client.loading.ClientModLoader.lambda$begin$1(ClientModLoader.java:66) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}         at net.minecraftforge.client.loading.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:86) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}         at net.minecraftforge.client.loading.ClientModLoader.begin(ClientModLoader.java:66) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}         at net.minecraft.client.Minecraft.<init>(Minecraft.java:459) ~[client-1.20.1-20230612.114412-srg.jar%23158!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}         at net.minecraft.client.main.Main.main(Main.java:182) ~[forge-47.4.0.jar:?] {re:classloading,pl:runtimedistcleaner:A}         at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}         at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}         at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}         at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}         at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~[fmlloader-1.20.1-47.4.0.jar:?] {}         at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99) ~[fmlloader-1.20.1-47.4.0.jar:?] {}         at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$makeService$0(CommonClientLaunchHandler.java:25) ~[fmlloader-1.20.1-47.4.0.jar:?] {}         at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar:?] {}         at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar:?] {}         at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar:?] {}         at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar:?] {}         at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?] {}         at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?] {}         at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?] {}         at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?] {}     Caused by: java.lang.NoSuchMethodError: 'net.minecraft.sounds.SoundEvent net.minecraft.sounds.SoundEvent.createVariableRangeEvent(net.minecraft.resources.ResourceLocation)'         at com.testmod.battlemusic.ModSounds.lambda$registerSoundEvent$0(ModSounds.java:56) ~[battlemusic%20reforged%201.20.1.jar%23157!/:1.20.1-1.1.1] {re:classloading}         at net.minecraftforge.registries.DeferredRegister.lambda$addEntries$1(DeferredRegister.java:386) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}         at net.minecraftforge.registries.RegisterEvent.register(RegisterEvent.java:59) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading,pl:eventbus:A}         at net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:386) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}         at net.minecraftforge.registries.DeferredRegister$EventDispatcher.handleEvent(DeferredRegister.java:328) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}         at net.minecraftforge.registries.__EventDispatcher_handleEvent_RegisterEvent.invoke(.dynamic) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading,pl:eventbus:B}         at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) ~[eventbus-6.0.5.jar%2387!/:?] {}         at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.5.jar%2387!/:?] {}         at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.5.jar%2387!/:?] {}         at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:121) ~[javafmllanguage-1.20.1-47.4.0.jar%23160!/:?] {}         ... 34 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Suspected Mods: NONE Stacktrace:     at net.minecraftforge.registries.GameData.postRegisterEvents(GameData.java:315) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}     at net.minecraftforge.common.ForgeStatesProvider.lambda$new$4(ForgeStatesProvider.java:25) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}     at net.minecraftforge.fml.ModLoader.handleInlineTransition(ModLoader.java:217) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}     at net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$19(ModLoader.java:209) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}     at java.util.Optional.ifPresent(Optional.java:178) ~[?:?] {}     at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:209) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}     at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$13(ModLoader.java:183) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}     at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {}     at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:183) ~[fmlcore-1.20.1-47.4.0.jar%23159!/:?] {}     at net.minecraftforge.client.loading.ClientModLoader.lambda$begin$1(ClientModLoader.java:66) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}     at net.minecraftforge.client.loading.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:86) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}     at net.minecraftforge.client.loading.ClientModLoader.begin(ClientModLoader.java:66) ~[forge-1.20.1-47.4.0-universal.jar%23163!/:?] {re:classloading}     at net.minecraft.client.Minecraft.<init>(Minecraft.java:459) ~[client-1.20.1-20230612.114412-srg.jar%23158!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} Stacktrace:     at net.minecraft.client.main.Main.main(Main.java:182) ~[forge-47.4.0.jar:?] {re:classloading,pl:runtimedistcleaner:A}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}     at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}     at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~[fmlloader-1.20.1-47.4.0.jar:?] {}     at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99) ~[fmlloader-1.20.1-47.4.0.jar:?] {}     at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$makeService$0(CommonClientLaunchHandler.java:25) ~[fmlloader-1.20.1-47.4.0.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?] {} I presume it has something to do with the createVariableRangeEvent sound event   
    • hi everyone, these weeks I wanted to use forge 1.16.5 on my Mac M4 as some know this problem was already there in 2020 when apple decided to create its own processors. this problem would be that when I open forge 1.16.5 in the launcher I get this screen after 5/3 years how to solve it
  • Topics

×
×
  • Create New...

Important Information

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