Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jihuayu committed Aug 31, 2020
1 parent dba6b98 commit 39e125a
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions fabric115/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,6 @@ publishing {
// mavenLocal()
}
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void onInitializeClient() {
return;
}
}
FileDownloadManager t = new FileDownloadManager(URL, "i18n.zip", path);
FileDownloadManager t = new FileDownloadManager(URL, "Minecraft-Mod-Language-Modpack.zip", path);
t.setSuccessTask(() -> {
try {
MinecraftClient.getInstance().reloadResources();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import java.util.Set;

public class I18nUpdateModPackFinder implements ResourcePackProvider {
public static final I18nUpdateModPackFinder RESOUCE = new I18nUpdateModPackFinder("Resource Pack", new File(System.getProperty("user.home") + "/.i18n/"+ SharedConstants.getGameVersion().getName().replaceAll("(.+\\..+)\\..+","$1") +"/i18n.zip"));
public static final I18nUpdateModPackFinder RESOUCE = new I18nUpdateModPackFinder("Resource Pack", new File(System.getProperty("user.home") + "/.i18n/"+ SharedConstants.getGameVersion().getName().replaceAll("(.+\\..+)\\..+","$1") +"/Minecraft-Mod-Language-Modpack.zip"));

private final File loaderDirectory;
private I18nUpdateModPackFinder(String type, File loaderDirectory) {
Expand All @@ -26,7 +26,7 @@ public static void init(Set<ResourcePackProvider> set){

@Override
public <T extends ResourcePackProfile> void register(Map<String, T> registry, ResourcePackProfile.Factory<T> factory) {
final String packName = "i18n";
final String packName = "Minecraft-Mod-Language-Modpack";
final T packInfo = ResourcePackProfile.of(packName, true, () -> new ZipResourcePack(loaderDirectory), factory, ResourcePackProfile.InsertionPosition.TOP);
if (packInfo != null) {
registry.put(packName,packInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.util.function.Consumer;

public class I18nUpdateModPackFinder implements ResourcePackProvider {
public static final I18nUpdateModPackFinder RESOUCE = new I18nUpdateModPackFinder("Resource Pack", new File(System.getProperty("user.home") + "/.i18n/"+ SharedConstants.getGameVersion().getName().replaceAll("(.+\\..+)\\..+","$1") +"/i18n.zip"));
public static final I18nUpdateModPackFinder RESOUCE = new I18nUpdateModPackFinder("Resource Pack", new File(System.getProperty("user.home") + "/.i18n/"+ SharedConstants.getGameVersion().getName().replaceAll("(.+\\..+)\\..+","$1") +"/Minecraft-Mod-Language-Modpack.zip"));

private final File loaderDirectory;
private I18nUpdateModPackFinder(String type, File loaderDirectory) {
Expand All @@ -23,7 +23,7 @@ public static void init(Set<ResourcePackProvider> set){

@Override
public void register(Consumer<ResourcePackProfile> consumer, ResourcePackProfile.Factory factory) {
final String packName = "i18n";
final String packName = "Minecraft-Mod-Language-Modpack";
final ResourcePackProfile packInfo = ResourcePackProfile.of(packName, true, () -> new ZipResourcePack(loaderDirectory), factory, ResourcePackProfile.InsertionPosition.TOP, ResourcePackSource.field_25347);
if (packInfo != null) {
consumer.accept(packInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static void onClientStarting(FMLClientSetupEvent event) {
return;
}
}
FileDownloadManager t = new FileDownloadManager(URL, "i18n.zip", path);
FileDownloadManager t = new FileDownloadManager(URL, "Minecraft-Mod-Language-Modpack.zip", path);
t.setSuccessTask(() -> {
try {
Minecraft.getInstance().reloadResources();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

public final class I18nUpdateModPackFinder implements IPackFinder {

public static final I18nUpdateModPackFinder RESOUCE = new I18nUpdateModPackFinder("Resource Pack", new File(System.getProperty("user.home") + "/.i18n/"+ MCPVersion.getMCVersion().replaceAll("(.+\\..+)\\..+","$1") +"/i18n.zip"));
public static final I18nUpdateModPackFinder RESOUCE = new I18nUpdateModPackFinder("Resource Pack", new File(System.getProperty("user.home") + "/.i18n/"+ MCPVersion.getMCVersion().replaceAll("(.+\\..+)\\..+","$1") +"/Minecraft-Mod-Language-Modpack.zip"));

private final File loaderDirectory;

Expand All @@ -24,7 +24,7 @@ public static void init(){
}
@Override
public <T extends ResourcePackInfo> void addPackInfosToMap (Map<String, T> packs, IFactory<T> factory) {
final String packName = "i18n";
final String packName = "Minecraft-Mod-Language-Modpack";
final T packInfo = ResourcePackInfo.createResourcePack(packName, true, () -> new FilePack(loaderDirectory), factory, ResourcePackInfo.Priority.TOP);
if (packInfo != null) {
packs.put(packName,packInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

public final class I18nUpdateModPackFinder implements IPackFinder {

public static final I18nUpdateModPackFinder RESOUCE = new I18nUpdateModPackFinder("Resource Pack", new File(System.getProperty("user.home") + "/.i18n/"+ MCPVersion.getMCVersion().replaceAll("(.+\\..+)\\..+","$1")+"/i18n.zip"));
public static final I18nUpdateModPackFinder RESOUCE = new I18nUpdateModPackFinder("Resource Pack", new File(System.getProperty("user.home") + "/.i18n/"+ MCPVersion.getMCVersion().replaceAll("(.+\\..+)\\..+","$1")+"/Minecraft-Mod-Language-Modpack.zip"));

private final File loaderDirectory;

Expand All @@ -24,7 +24,7 @@ public static void init(){
}
@Override
public <T extends ResourcePackInfo> void func_230230_a_(Consumer<T> packs, IFactory<T> factory) {
final String packName = "i18n";
final String packName = "Minecraft-Mod-Language-Modpack";
final T packInfo = ResourcePackInfo.createResourcePack(packName, true, () -> new FilePack(loaderDirectory), factory, ResourcePackInfo.Priority.TOP, IPackNameDecorator.field_232625_a_);
System.out.println(packInfo);
if (packInfo != null) {
Expand Down

0 comments on commit 39e125a

Please sign in to comment.