Receiving Helpdesk

do you need to delete meta inf for forge

by Monserrate Marks Published 3 years ago Updated 2 years ago

Do you need to delete META INF for Forge? If you add or change classes within the JAR (as some single-player mods do - less of an issue with Forge/ModLoader), then the signature is invalidated, and the JVM will not load the JAR. Hence the need to remove the META-INF information if the JAR is changed. Click to see full answer.

When you do tamper with it by installing mods, the signature becomes invalid and Minecraft won't start at all. By deleting the META-INF directory, you remove the signature completely. Depending on your security settings, you might get an "unknown publisher" warning, but you'll be able to run it.Aug 1, 2011

Full Answer

Do I need to remove META-INF?

However, if META-INF is not in the .jar, you shouldn't need to worry about it, as the addition of mods requires it to be removed anyways. If you have installed mods in the past, you should have removed it then.

Are there any mods that don't require forge?

There are very few mods that are Forge independent. Optifine is one example. But the vast majority (pretty much every mod you want to play) is built off of Forge and requires it to work. I would predict you have about a 0.01% chance of getting Dynamic Surroundings to work without Forge or majorly rewriting the mod.

How do I add a Maven-artifact dependency to a forge project?

If your dependency is just a regular dependency, without following the Forge format for that (it does not have the Maven-Artifact manifest entry), then you can add this manually, by putting the manifest for the dependency in your own manifest (described in the last paragraph of the documentation ).

What is META-INF and how do I use it?

META-INF contains a signature file (.SF) that accounts for all the files within the JAR and their checksums, and Mojang's actual signature (.RSA). When that signature checks out, you know it wasn't tampered with and comes from the source that signed it (in this case, Mojang).

Can I delete META-INF folder?

If you remove META-INF from a jar then there is no MANIFEST. MF and so java -jar can't find the main class. You can create jars without META-INF but when you are going to execute a jar a META-INF/MANIFEST. MF is required.Feb 1, 2014

What is the purpose of Meta-INF folder?

The META-INF directory, if it exists, is used to store package and extension configuration data, including security, versioning, extension and services.

Where is the META-INF folder Minecraft?

jar is located in %appdata%\. minecraft\bin , and can be opened using many archive readers (such as 7zip, Jzip, WinRAR, etc.) as Schism mentioned. META-INF should be contained within this .Apr 18, 2013

What is the meta-INF maven folder?

By default, Maven generated archives include the META-INF/maven directory, which contains the pom. xml file used to build the archive, and a pom. properties file that includes some basic properties in a small, easier to read format.

Is Meta-INF required?

The point is that META-INF should be considered an internal Java meta directory. Don't mess with it! Any files you want to include with your JAR should be placed in some other sub-directory or at the root of the JAR itself.

What is difference between web-INF and META-INF?

The META-INF directory is private and can't be accessed from the outside. On the other hand, it also contains the WEB-INF public directory with all the static web resources, including HTML pages, images, and JS files. Moreover, it contains the web. xml file, servlet classes, and libraries.Mar 31, 2019

How do I delete Meta-INF?

You must open minecraft. jar in a program which can edit . zip files (such as 7-zip), then delete the META-INF folder as you would anything else. This should not require administrator privileges, as minecraft.Aug 21, 2011

What is Maven war plugin?

The WAR Plugin is responsible for collecting all artifact dependencies, classes and resources of the web application and packaging them into a web application archive.Sep 5, 2021

What is Maven Shade plugin?

This plugin provides the capability to package the artifact in an uber-jar, including its dependencies and to shade - i.e. rename - the packages of some of the dependencies.

Where do Maven project files go?

properties files can be placed in a src/main/resources directory. The files/folders in this directory will be copied to the root level of the jarW (or other similar package) that is generated for the project.

Thumbz

I just want to know what it is, why's it's there, and why I'm always deleting it. Also, if anyone could give me the terminal code (Mac)to do it all at once, I'd love that. It's kind of a pain to unarchive, delete META, rearchive, and rename jar every time.

desht

Sounds like more of a Minecraft modding question than a plugin development question, but...

Thumbz

Well, I suppose I don't really need to delete it, and I've been deleting it from my homemade bukkit plugins. I must have wasted at least 3 hours of my unarchiving, deleting, rearchiving, renaming... I bet I'm not the only one too.

devilquak

If you have a Mac, I would use the Minecraft Jar tool to instantly load a version of your minecraft.jar onto your desktop and drop your mod files in it, then instantly re-compress it into a .jar file. It makes life so much easier.

Milkywayz

I develop on mac and never once bothered to delete meta-inf from my plugins. No problems have ever stemmed from not doing so at least as far as i know.

TheGoldenProof

Not really sure how any of this dependency stuff works but I kind of have an idea. My build.gradle doesn't have a "jar" section, so do I add it my self? Where is /META-INF? I don't understand what this maven stuff is and a have a very vague understanding of what a repository is from submitting bug reports on git.

Terrails

META-INF file is used for ATs, doesn't have to do anything with Maven.

diesieben07

META-INF file is used for ATs, doesn't have to do anything with Maven.

TheGoldenProof

so the {addedMod}.meta would be the manifest for the new mod. where is the manifest for my mod?

diesieben07

No... no no no! That code you quoted goes in your build.gradle and it will set the manifest for you. You do not need to edit your jar manually.

TheGoldenProof

yeah I finally figured it out after reading everything a couple of times.

Cadiboo

Can you mark your topic as solved and post your final solution for future people please?

Mightydanp

i have my at in src\main\resources\META-INF....... when i do a build the at does not get included into the jar so it crashes if you try and play it, i would really like to know what i am doing wrong.

Mightydanp

the crashlog basicly says that it cannot find a field and that field is mad public in my _at file.

diesieben07

And this people is why Access Transformers are a pain in the butt to use. Seriously, it's not worth the hassle.

Mightydanp

Darco is it really that easy ?do i need to put that in the same class that the field is in

EverythingGames

Darco is it really that easy ?do i need to put that in the same class that the field is in

Mightydanp

at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)

diesieben07

You have to store the result of findField (most likely in a static final field). Then call setAccessible on it and re-use that same Field instance.

image
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9