Skip to content

Commit

Permalink
Bump NeoGradle, fix access-modifier misplacement. UserDev will now al…
Browse files Browse the repository at this point in the history
…so require a recent NG to align with this. (#1068)
  • Loading branch information
shartte authored Jun 8, 2024
1 parent a5c0363 commit 696c4a4
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ accesstransformers_version=10.0.1
coremods_version=6.0.4
eventbus_version=8.0.1
modlauncher_version=11.0.2
securejarhandler_version=3.0.7
securejarhandler_version=3.0.8
bootstraplauncher_version=2.0.2
asm_version=9.5
installer_version=2.1.+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
GlStateManager._vertexAttribPointer(p_167048_, p_167043_, p_167044_, false, p_167045_, p_167046_);
@@ -186,6 +_,10 @@
@OnlyIn(Dist.CLIENT)
interface SetupState {
public interface SetupState {
void setupBufferState(int p_167053_, int p_167054_, int p_167055_, long p_167056_, int p_167057_, int p_167058_);
+ }
+
Expand Down
13 changes: 6 additions & 7 deletions patches/net/minecraft/client/gui/Gui.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -379,19 +379,18 @@
+ this.layerManager.initModdedLayers();
+ }
+
public @OnlyIn(Dist.CLIENT)
- static enum HeartType {
+ static enum HeartType implements net.neoforged.neoforge.common.IExtensibleEnum {
@OnlyIn(Dist.CLIENT)
- public static enum HeartType {
+ public static enum HeartType implements net.neoforged.neoforge.common.IExtensibleEnum {
CONTAINER(
new ResourceLocation("hud/heart/container"),
new ResourceLocation("hud/heart/container_blinking"),
@@ -1407,7 +_,24 @@
@@ -1406,8 +_,23 @@
} else {
gui$hearttype = NORMAL;
}

+ // Neo: Allow mods to override the heart type with a custom one.
+ gui$hearttype = net.neoforged.neoforge.event.EventHooks.firePlayerHeartTypeEvent(p_168733_, gui$hearttype);
+
return gui$hearttype;
+ }
+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@
+ return com.google.common.collect.ImmutableList.copyOf(overrides);
}

public @OnlyIn(Dist.CLIENT)
@OnlyIn(Dist.CLIENT)
7 changes: 3 additions & 4 deletions projects/neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ installerProfile {
}

minecraft {
// FML looks for this mod id to find the minecraft classes
modIdentifier 'minecraft'

accessTransformers {
file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')
}
Expand Down Expand Up @@ -227,10 +230,6 @@ artifacts {
}
}

minecraft {
modIdentifier 'minecraft'
}

publishing {
publications.create('NeoForge', MavenPublication) {
groupId = project.group
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pluginManagement {
}

plugins {
id 'net.neoforged.gradle.platform' version '7.0.136'
id 'net.neoforged.gradle.platform' version '7.0.142'
}

rootProject.name = rootDir.name
Expand Down
3 changes: 1 addition & 2 deletions tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ afterEvaluate {
args.set(outputIndex+1, file('src/generated/resources/').absolutePath);
programArguments.set(args);
}
runs.junit.modSources = runs.junit.modSources.get().stream()
.filter { it != sourceSets.main }.toList()
runs.junit.modSources.all().get().values().remove(sourceSets.main)
}

license {
Expand Down

0 comments on commit 696c4a4

Please sign in to comment.