Jump to content

Recommended Posts

Posted (edited)

Hi all! I'm new in the forum, I hope I'm writing in the correct section. Anyway, I'm triying to start Minecraft forge by command line but I constantly get this error:

java.lang.RuntimeException: Patcher expecting non-empty class data file for net.minecraft.entity.projectile.EntityThrowable, but received empty, your vanilla jar may be corrupt.

I already tried changing the 1.10.2.jar file with another but the issue persist; I also tried using a clean installation of minecraft and forge to check that both libraries and assets weren't corrupt. Any suggestion? Here my entire command: https://pastebin.com/7ekFNffH 

 

Ps: the vanilla version start without any issue

Edited by Tito Tigi
Posted
1 hour ago, diesieben07 said:

What is this "custom launcher" you speak of?

It is a launcher developed by me to be used for my community.

Currently I have structured the launcher folder like this:

LauncherFolder/
         |- Libs/
         |    |- "All the jar files used as libraries"
         |
         |- Assets/
         |    |- "the copy of Minecraft assets folder"
         |
         |- 1.10.2.jar

I have no idea on how to resolve this problem...

Posted
1 minute ago, diesieben07 said:

Yes, you are dealing with very sensitive things here.

  1. User's authentication data for their Mojang account.
  2. Mojang's verification that the game is not pirated.

For what benefit? Yet another launcher that does the same thing every other one does? No, please stop.

  1. The authentication is done in full respect of the user privacy
  2. I already managed to get the access token to verify that the game is not pirated

So the only problem is that I get this error without knowing the reason. 

To answer your last question, I want to make a launcher ONLY for my community, easier than the others like twitch launcher (I'm excluding Technick Launcher and ATLauncher because they need a lot of authorization to upload a modpack).

This launcher will only show modpacks only for the community servers, nothing more.

Posted
Just now, diesieben07 said:

Yes, it already does much more.

 

Did you get someone to look at your code to verify that it's correct? Do you have systems in place to audit this code on a regular basis to make sure it does not contain security issues?

Moreover, a lawyer could probably sue you for violating Mojang's EULA regarding their website (you are not allowed to write software that imitates the website in any way). Note, I am not a lawyer, but regardless this is a terrible idea.

Don't ask for user credentials that are not for your service. Never ever.

Yes, I have other developer working with me and the code is actually correct. I have systems to prevent security systems, like md5 encryption and access token storage instead of the password (as suggested to do by mojang). Why are you talking about a website? I'm just developing a launcher and it is actually legal: I'm not modifying or redistributing Minecraft, I'm just starting it using another software and that is legal.

I think I have not insulted you, so I don't know why you are angry with me.

Note, I'm not an English native speaker and probably I have misunderstood your intention :) 

Posted

Do NOT make other launchers. Mojang has EXPLICITLY said they do not want people entering their login details into other services.

There is a reason why the Twitch app loads the vanilla launcher.

You will not get any help for this here.

  • Like 1

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • You probably used jd-gui to open it, didn't you? Nothing wrong with that, I also made that mistake, except that Notch was a smart guy and he obfuscated the code. That's why you only see files called "a", "b", "c" and then a file that combines them all. As I said, use RetroMCP to deobfuscate the code so that you will 100% understand it and be able to navigate it.
    • Decompiling minecraft indev, infdev, alpha, beta or whichever legacy version is really easy. I'm not a plug, I just also got interested in modding legacy versions (Infdev to be specific). Use https://github.com/MCPHackers/RetroMCP-Java Once you install their client and the Zulu Architecture that they say they recommend (or use your own Java). I encountered some problems, so I run it with: "java -jar RetroMCP-Java-CLI.jar". You should run it in a seperate folder (not in downloads), otherwise the files and folders will go all over the place. How to use RetroMCP: Type setup (every time you want change version), copy-paste the version number from their list (they support indev), write "decompile" and done! The code will now be deobfuscated and filenames will be normal, instead of "a", "b" and "c"! Hope I helped you, but I don't expect you to reply, as this discussion is 9 years old! What a piece of history!  
    • I know that this may be a basic question, but I am very new to modding. I am trying to have it so that I can create modified Vanilla loot tables that use a custom enchantment as a condition (i.e. enchantment present = item). However, I am having trouble trying to implement this; the LootItemRandomChanceWithEnchantedBonusCondition constructor needs a Holder<Enchantment> and I am unable to use the getOrThrow() method on the custom enchantment declared in my mod's enchantments class. Here is what I have so far in the GLM:   protected void start(HolderLookup.Provider registries) { HolderLookup.RegistryLookup<Enchantment> registrylookup = registries.lookupOrThrow(Registries.ENCHANTMENT); LootItemRandomChanceWithEnchantedBonusCondition lootItemRandomChanceWithEnchantedBonusCondition = new LootItemRandomChanceWithEnchantedBonusCondition(0.0f, LevelBasedValue.perLevel(0.07f), registrylookup.getOrThrow(*enchantment here*)); this.add("nebu_from_deepslate", new AddItemModifier(new LootItemCondition[]{ LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.DEEPSLATE).build(), LootItemRandomChanceCondition.randomChance(0.25f).build(), lootItemRandomChanceWithEnchantedBonusCondition }, OrichalcumItems.NEBU.get())); }   Inserting Enchantments.[vanilla enchantment here] actually works but trying to declare an enchantment from my custom enchantments class as [mod enchantment class].[custom enchantment] does not work even though they are both a ResourceKey and are registered in Registries.ENCHANTMENT. Basically, how would I go about making it so that a custom enchantment declared as a ResourceKey<Enchantment> of value ResourceKey.create(Registries.ENCHANTMENT, ResourceLocation.fromNamespaceAndPath([modid], [name])), declared in a seperate enchantments class, can be used in the LootItemRandomChanceWithEnchantedBonusCondition constructor as a Holder? I can't use getOrThrow() because there is no level or block entity/entity in the start() method and it is running as datagen. It's driving me nuts.
    • Hi here is an update. I was able to fix the code so my mod does not crash Minecraft. Please understand that I am new to modding but I honestly am having a hard time understanding how anyone can get this to work without having extensive programming and debugging experience as well as searching across the Internet, multiple gen AI bots (claude, grok, openai), and examining source code hidden in the gradle directory and in various github repositories. I guess I am wrong because clearly there are thousands of mods so maybe I am just a newbie. Ok, rant over, here is a step by step summary so others can save the 3 days it took me to figure this out.   1. First, I am using forge 54.1.0 and Minecraft 1.21.4 2. I am creating a mod to add a shotgun to Minecraft 3. After creating the mod and compiling it, I installed the .jar file to the proper directory in Minecraft and used 1.21.4-forge-54.1.0 4. The mod immediately crashed with the error: Caused by: java.lang.NullPointerException: Item id not set 5. Using the stack trace, I determined that the Exception was being thrown from the net.minecraft.world.item.Item.Properties class 6. It seems that there are no javadocs for this class, so I used IntelliJ which was able to provide a decompiled version of the class, which I then examined to see the source of the error. Side question: Are there javadocs? 7. This method, specifically, was the culprit: protected String effectiveDescriptionId() {      return this.descriptionId.get(Objects.requireNonNull(this.id, "Item id not set"));  } 8. Now my quest was to determine how to set this.id. Looking at the same source file, I determined there was another method:  public Item.Properties setId(ResourceKey<Item> pId) {             this.id = pId;             return this;   } 9. So now, I need to figure out how to call setId(). This required working backwards a bit. Starting from the constructor, I stubbed out the variable p which is of type Item.Properties public static final RegistryObject<Item> SHOTGUN = ITEMS.register("shotgun", () -> new ShotgunItem(p)); Rather than putting this all on one line, I split it up for readability like this: private static final Item.Properties p = new Item.Properties().useItemDescriptionPrefix().setId(rk); Here is was the missing function, setId(), which takes a type of ResourceKey<Item>. My next problem is that due to the apparent lack of documentation (I tried searching the docs on this site) I could not determine the full import path to ResourceKey. I did some random searching on the Internet and stumbled across a Github repository which gave two clues: import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; Then I created the rk variable like this: private static ResourceKey<Item> rk = ResourceKey.create(Registries.ITEM, ResourceLocation.parse("modid:shotgunmod")); And now putting it all together in order: private static ResourceKey<Item> rk = ResourceKey.create(Registries.ITEM, ResourceLocation.parse("modid:shotgunmod")); private static final Item.Properties p = new Item.Properties().useItemDescriptionPrefix().setId(rk); public static final RegistryObject<Item> SHOTGUN = ITEMS.register("shotgun", () -> new ShotgunItem(p)); This compiled and the mod no longer crashes. I still have more to do on it, but hopefully this will save someone hours. I welcome any feedback and if I missed some obvious modding resource or tutorial that has this information. If not, I might suggest we add it somewhere for people trying to write a mod that doesn't crash. Thank you !!!  
  • Topics

×
×
  • Create New...

Important Information

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