Skip to content

Commit

Permalink
Port to 1.21.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Dianliang233 committed Dec 12, 2024
1 parent bcb995c commit 659917b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 177 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

plugins {
id("architectury-plugin") version "3.4-SNAPSHOT"
id("dev.architectury.loom") version "1.7-SNAPSHOT" apply false
id("dev.architectury.loom") version "1.9-SNAPSHOT" apply false
java
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ private void fetchImage(SearchProvider.Suggestion suggestion) {
var textureId = id(hash);

assert this.client != null;
if (this.client.getTextureManager().getOrDefault(textureId, null) != null) return;
if (this.client.getTextureManager().getTexture(textureId) != null) return;

this.executor.execute(() -> this.textures.add(textureId));
byte[] imageArray = HttpUtil.loadAndCacheFile(imageUrl).join();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void render(DrawContext DrawContext, int index, int y, int x, int rowWidt
String hash = Hex.encodeHexString(md.digest(imageUrl.getBytes(StandardCharsets.UTF_8)));
var identifier = id(hash);

AbstractTexture texture = client.getTextureManager().getOrDefault(identifier, null);
AbstractTexture texture = client.getTextureManager().getTexture(identifier);
return texture != null ? identifier : null;
}).orElse(null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.google.common.collect.HashBiMap;
import com.mojang.logging.LogUtils;
import net.minecraft.resource.JsonDataLoader;
import net.minecraft.resource.ResourceFinder;
import net.minecraft.resource.ResourceManager;
import net.minecraft.util.Identifier;
import net.minecraft.util.profiler.Profiler;
Expand All @@ -27,7 +28,7 @@ public class WikiFamilyManager extends JsonDataLoader<WikiFamily> {
private Map<String, WikiIndividual> activeWikis = new HashMap<>();

public WikiFamilyManager() {
super(WikiFamily.CODEC, PATH);
super(WikiFamily.CODEC, ResourceFinder.json(PATH));
}

/**
Expand Down
18 changes: 9 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ archives_base_name=heywiki
maven_group=wiki.minecraft.heywiki
enabled_platforms=fabric,neoforge
enabled_platforms_snapshot=fabric
mod_version=1.7.2+1.21.3
mod_version=1.7.2+1.21.4
# Loader versions
minecraft_version=1.21.3
minecraft_version_range=1.21.2,1.21.3
yarn_mappings=1.21.3+build.2
minecraft_version=1.21.4
minecraft_version_range=1.21.4
yarn_mappings=1.21.4+build.2
fabric_loader_version=0.16.9
fabric_api_version=0.109.0+1.21.3
neoforge_version=21.3.40-beta
fabric_api_version=0.111.0+1.21.4
neoforge_version=21.4.18-beta
# Dependency versions
architectury_version=14.0.4
cloth_config_version=16.0.141
architectury_version=15.0.1
cloth_config_version=17.0.142
rei_version=17.0.790
emi_version=1.1.18+1.21.1
jei_minecraft_version=1.21.1
jei_version=19.21.0.247
modmenu_version=12.0.0-beta.1
modmenu_version=13.0.0-beta.1
mcbrowser_version=1.1.5
mcef_version=2.1.6-1.21.1

0 comments on commit 659917b

Please sign in to comment.