Skip to content

Commit

Permalink
why
Browse files Browse the repository at this point in the history
And I forgot to commit 3.0.1...
  • Loading branch information
Past Ennui committed Sep 24, 2020
1 parent ea84a16 commit 95c4280
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradlepublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 14
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 14
java-version: 8
- name: Build with Gradle
run: gradle build
- name: Upload build artifacts
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ org.gradle.jvmargs = -Xmx1G

# Fabric Properties, check these on http://modmuss50.me/fabric.html
minecraft_version = 1.16.3
yarn_mappings = 1.16.3+build.7
yarn_mappings = 1.16.3+build.12
loader_version = 0.9.3+build.207

# Mod Properties
mod_version = 3.0.0+1.16.3
mod_version = 3.0.2+1.16.3
maven_group = io.github.joaoh1
archives_base_name = boringbackgrounds

# Dependencies
fabric_version = 0.20.2+build.402-1.16
fabric_version = 0.21.0+build.407-1.16
fiber_version = 0.23.0-2
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class BoringBackgroundsLoader implements SimpleResourceReloadListener<Map
public CompletableFuture<Map<Map<Identifier, Integer>, Boolean>> load(ResourceManager manager, Profiler profiler, Executor executor) {
return CompletableFuture.supplyAsync(() -> {
Gson gson = new GsonBuilder().create();
Collection<Identifier> resources = manager.findResources("backgrounds", filename -> filename == "background_settings.json");
Collection<Identifier> resources = manager.findResources("backgrounds", filename -> filename.contentEquals("background_settings.json"));
Map<Identifier, Integer> map = new HashMap<>();
boolean randomizeOnNewScreen = false;
for (Identifier identifier : resources) {
Expand All @@ -60,7 +60,9 @@ public CompletableFuture<Map<Map<Identifier, Integer>, Boolean>> load(ResourceMa
BackgroundUtils.logger.error("[Boring Backgrounds] Failed to load the background settings! The following error has been printed: " + e);
}
}
return Map.of(map, randomizeOnNewScreen);
Map<Map<Identifier, Integer>, Boolean> returnedMap = new HashMap<>();
returnedMap.put(map, randomizeOnNewScreen);
return returnedMap;
}, executor);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class TextureManagerMixin {
)
private void redirectBackgroundTexture(Identifier id, CallbackInfo info, AbstractTexture abstractTexture) {
// If the identifier is the same as the background texture, hijack it and change it to the chosen texture
if (id == DrawableHelper.BACKGROUND_TEXTURE) {
if (id == DrawableHelper.OPTIONS_BACKGROUND_TEXTURE) {
abstractTexture = new ResourceTexture(BackgroundUtils.backgroundTexture);
this.registerTexture(id, abstractTexture);
abstractTexture.bindTexture();
Expand Down

0 comments on commit 95c4280

Please sign in to comment.