Skip to content

Commit

Permalink
We get to main menu now :)
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n committed Nov 10, 2023
1 parent 98e2f9f commit 5ec5409
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 10 deletions.
34 changes: 34 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ plugins {
id "de.undercouch.download"
}

evaluationDependsOn(":libs:markdown")

sourceSets {
main {
java {
Expand Down Expand Up @@ -292,6 +294,38 @@ def commonSystemProperties = [
'appeng.tests': 'true',
]

// NG hacks to add our deps to the legacy classpath
// If anything changes here you have to delete the build folder for the neoforge:...:writeMinecraftClasspath task
import net.neoforged.gradle.userdev.runtime.tasks.ClasspathSerializer

def libSrcSets = [
project(":libs:markdown").sourceSets.main
]

def legacyCPLibs = [
"io.methvin:directory-watcher:${directory_watcher_version}",
"org.yaml:snakeyaml:${snakeyaml_version}",
"com.google.flatbuffers:flatbuffers-java:${flatbuffers_version}",
"org.bytedeco:ffmpeg-platform:6.0-1.5.9",
]

tasks.withType(ClasspathSerializer).configureEach {
legacyCPLibs.each { lib ->
def libArtifact = lib.split(":")[1]
def libVersion = lib.split(":")[2]
def libJar = libArtifact + "-" + libVersion + ".jar"

def libFile = project.configurations.runtimeClasspath.find({
return it.name.equals(libJar)
})

it.inputFiles.from libFile
}
libSrcSets.each { srcSet ->
it.inputFiles.from srcSet.output
}
}

def commonRunProperties = {
workingDirectory = project.file('run')
// jvmArgs "--add-opens", "java.base/sun.security.util=ALL-UNNAMED"
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ artifact_basename=appliedenergistics2-neoforge
minecraft_release=1.20
minecraft_version=1.20.2
minecraft_version_range=[1.20.2,1.20.3)
neoforge_version=20.2.3-beta
neoforge_version_range=[20.2.3-beta,)
neoforge_version=20.2.43-beta
neoforge_version_range=[20.2.43-beta,)

#########################################################
# Provided APIs #
Expand Down Expand Up @@ -55,7 +55,7 @@ org.gradle.daemon=false

# Temp fix for Spotless / Remove Unused Imports:
# https://github.com/diffplug/spotless/issues/834
org.gradle.jvmargs=-Xmx2G \
org.gradle.jvmargs=-Xmx4G \
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pluginManagement {
mavenCentral()
}
plugins {
id 'net.neoforged.gradle.userdev' version '7.0.33'
id 'net.neoforged.gradle.userdev' version '7.0.41'
id 'com.diffplug.spotless' version '5.12.4'
id 'io.github.juuxel.loom-quiltflower' version '1.10.0'
id 'com.github.johnrengelman.shadow' version '7.0.0'
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/appeng/core/AppEngClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public void modelRegistryEvent(RegisterGeometryLoaders event) {
}

private void wheelEvent(final InputEvent.MouseScrollingEvent me) {
if (me.getScrollDelta() == 0) {
if (me.getScrollDeltaY() == 0) {
return;
}

Expand All @@ -293,7 +293,7 @@ private void wheelEvent(final InputEvent.MouseScrollingEvent me) {
final boolean offHand = player.getItemInHand(InteractionHand.OFF_HAND).getItem() instanceof IMouseWheelItem;

if (mainHand || offHand) {
NetworkHandler.instance().sendToServer(new MouseWheelPacket(me.getScrollDelta() > 0));
NetworkHandler.instance().sendToServer(new MouseWheelPacket(me.getScrollDeltaY() > 0));
me.setCanceled(true);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/META-INF/MANIFEST.MF

This file was deleted.

4 changes: 3 additions & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ modId="ae2"
version="0.0.0"
displayName="Applied Energistics 2"
description="A Mod about Matter, Energy and using them to conquer the world.."
mixin="ae2.mixins.json"

[[mixins]]
config="ae2.mixins.json"

[[dependencies.ae2]]
modId="neoforge"
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/ae2.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"required": true,
"minVersion": "0.8.3",
"package": "appeng.mixins",
"refmap": "ae2.mixins.refmap.json",
"compatibilityLevel": "JAVA_11",
"plugin": "appeng.mixins.ConfigPlugin",
"mixins": [
Expand Down

0 comments on commit 5ec5409

Please sign in to comment.