Jump to content

[Solved][1.7.2] Gradle Build org.lwjgl.opengl package not found


gokiburi

Recommended Posts

Solution:

What I WAS doing: Creating new project folders with my src and resources folders along with build.gradle, gradlew, gradlew.bat and the gradle folder.

 

What I WASN'T doing: Copying the build folder from the original forge setup as well. This is important because it contained the natives that need to exist for the mod to reference to successfully build.

 

Once I put the build folder into the project folder the build worked immediately. Shoutouts to GotoLink for the solution.

 

Original Post:

I managed to update one of my basic 1.6.2 mods to 1.7.2 using the new forge gradle build system, but I'm running into issues updating the rest of them for this reason:

 

error: package org.lwjgl.opengl does not exist import org.lwjgl.opengl.GL11;

 

used mainly in Block rendering functions to push, pop, rotate, scale etc.

 

Should I not be using org.lwjgl.opengl.GL11 functions? What should I be using if not?

 

Example GL11 usage:

GL11.glPushMatrix();
GL11.glScalef(1.0F, -1.0F, -1.0F);
GL11.glRotatef(-90, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);

 

Am I missing a classpath or compile line in my gradle build file? I don't have a reference anywhere to org.lwjgl as the other mod I updated didn't need one.

 

My build.gradle:

buildscript {
repositories {
	mavenCentral()
	maven {
		name = "forge"
		url = "http://files.minecraftforge.net/maven"
	}
	maven {
		name = "sonatype"
		url = "https://oss.sonatype.org/content/repositories/snapshots/"
	}
}
dependencies {
	 classpath 'net.minecraftforge.gradle:ForgeGradle:1.1-SNAPSHOT'
}
}

apply plugin: 'forge'
minecraft{version = "1.7.2-10.12.0.1034"}
version = "1.7.2-1.0"
archivesBaseName = project.projectDir.name
sourceSets.main{
java{
	srcDirs 'src'
}
resources{
	srcDirs 'resources'
}
}
processResources {
from(sourceSets.main.resources.srcDirs) {
	include 'mcmod.info'
	expand 'version':project.version, 'mcversion':project.minecraft.version
}

from(sourceSets.main.resources.srcDirs) {
	exclude 'mcmod.info'
}
}

 

I'm not really sure where to go from here; I can update all my mods to 1.7.2 and they'll run from eclipse, but I can't get gradle to build them.

Link to comment
Share on other sites

OpenGl is a native for Minecraft, you should see them in the build/natives folder.

If you don't, run gradlew setupDevWorkspace --refresh-dependencies

 

That does it. It was not immediately obvious to me what needed to be copied or what was being used from the original forge setup folder. I coped the build folder over and it built immediately without error. Thanks GotoLink. I'll update my main post with the solution.

Link to comment
Share on other sites

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



×
×
  • Create New...

Important Information

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