Skip to content

Commit

Permalink
Branding, and fix small bugs that causes crash.
Browse files Browse the repository at this point in the history
  • Loading branch information
heipiao233 committed Sep 27, 2023
1 parent 1c03791 commit b92f19f
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 26 deletions.
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,31 @@

[中文](README.zh_hans.md) | English

## Icon
![Icon](src/main/resources/assets/pillow/icon.png)

Credits: [Desmos](https://www.desmos.com/)

Make $a=\frac{\sqrt{5}+1}{2}, b=\frac{a+1}{4}$

Creating Points in a Planar Cartesian Coordinate System:

$A(0, a), B(1, a), C(1, 0), D(0, 0), E(0, a-b), F(1, b)$,
Connect $BE, CF, DF$

Connect $AE, AC, BD $ as PillowMC icons

Connect $AE, AC $is the Pillow Mod Loader icon

Connect $BD $and make $CG $cross $G $to make the extension line of $CG $pass through $A $as the Shear API icon

## Run Quilt and Fancy Mod Loader on ModLauncher together

This mod can let Quilt and Fancy Mod Loader run on the top of ModLauncher with Minecraft obfuscated with Searge name.
This mod can let Quilt Loader and Fancy Mod Loader run on the top of ModLauncher with Minecraft obfuscated with Searge name.

## Developing Status
Almost done. All modules in QSL and QFAPI worked well, except biome API.

## Installing

_Not developed yet._
Expand All @@ -23,6 +45,6 @@ _Not opened yet._

This project is licensed under [MIT License](License.txt).

Quilt loader is licensed under [Apache](License.Quilt.txt).
Quilt Loader is licensed under [Apache](License.Quilt.txt).

Fancy Mod Loader is licensed under [LGPL 2.1](License.FancyModLoader.txt).
8 changes: 7 additions & 1 deletion README.zh_hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ _绝非机翻译名_

## 图标
![Icon](src/main/resources/assets/pillow/icon.png)

鸣谢: [Desmos](https://www.desmos.com/)

令 $a=\frac{\sqrt{5}+1}{2}, b=\frac{a+1}{4}$

在平面直角坐标系中作点
Expand All @@ -26,7 +29,10 @@ $A(0, a), B(1, a), C(1, 0), D(0, 0), E(0, a-b), F(1, b)$,

## 运行在 ModLauncher 上的 Quilt 和 Fancy Mod Loader

这个模组会让 Quilt 和 Fancy Mod Loader 在 ModLauncher 上和以 Searge 名混淆的 Minecraft 运行。
这个模组会让 Quilt 加载器和 Fancy Mod Loader 在 ModLauncher 上和以 Searge 名混淆的 Minecraft 运行。

## 开发进度
几乎已经完成。目前除了生物群系 API 不兼容,QSL 和 QFAPI 各个模块均正常工作。

## 安装

Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ plugins {
// apply plugin: 'org.spongepowered.mixin'


version = "0.1-SNAPSHOT"
version = "0.1.0"
group = 'net.pillowmc' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'pillow'

Expand Down Expand Up @@ -128,11 +128,11 @@ jar {
manifest {
attributes([
"Specification-Title" : "pillow",
"Specification-Vendor" : "heipiao",
"Specification-Vendor" : "pillowmc",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : "heipiao",
"Implementation-Vendor" : "pillowmc",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"MixinConnector": "net.pillowmc.pillow.asm.PillowConnector"
])
Expand All @@ -144,11 +144,11 @@ task langproviderJar(type: Jar) {
manifest {
attributes([
"Specification-Title" : "pillow",
"Specification-Vendor" : "heipiao",
"Specification-Vendor" : "pillowmc",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : "heipiao",
"Implementation-Vendor" : "pillowmc",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"FMLModType" : "LANGPROVIDER",
"Automatic-Module-Name" : "pillowlp"
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/net/pillowmc/pillow/PillowLogCategory.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import org.quiltmc.loader.impl.util.log.LogCategory;

public class PillowLogCategory {
public static final LogCategory CORE = LogCategory.createCustom("Pillow", "CORE");
public static final LogCategory LOADING = LogCategory.createCustom("Pillow", "LOADING");
public static final LogCategory SCAN = LogCategory.createCustom("Pillow", "SCAN");
public static final LogCategory SPLASH = LogCategory.createCustom("Pillow", "SPLASH");
public static final LogCategory CORE = LogCategory.createCustom("Pillow Loader", "CORE");
public static final LogCategory LOADING = LogCategory.createCustom("Pillow Loader", "LOADING");
public static final LogCategory SCAN = LogCategory.createCustom("Pillow Loader", "SCAN");
public static final LogCategory SPLASH = LogCategory.createCustom("Pillow Loader", "SPLASH");
}
5 changes: 2 additions & 3 deletions src/main/java/net/pillowmc/pillow/asm/PillowConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public void connect() {
PillowTransformationService.unsafe.putObject(getClass(), PillowTransformationService.offset, pillow);
var mappings=QuiltLauncherBase.getLauncher().getMappingConfiguration().getMappings();
// QuiltMixinBootstrap.init
System.setProperty("mixin.env.remapRefMap", "true");
try {
// RemapperAdapter remapper = new RemapperAdapter(RemapperUtils.create(mappings, PillowNamingContext.fromName, PillowNamingContext.toName)){
// @Override
Expand All @@ -41,9 +40,9 @@ public void connect() {
// };
MixinIntermediaryDevRemapper remapper = new MixinIntermediaryDevRemapper(mappings, PillowNamingContext.fromName, PillowNamingContext.toName);
MixinEnvironment.getDefaultEnvironment().getRemappers().add(remapper);
Log.info(LogCategory.MIXIN, "Loaded Pillow mappings for mixin remapper!");
Log.info(LogCategory.MIXIN, "Loaded Pillow Loader mappings for mixin remapper!");
} catch (Exception e) {
Log.error(LogCategory.MIXIN, "Pillow environment setup error - the game will probably crash soon!");
Log.error(LogCategory.MIXIN, "Pillow Loader environment setup error - the game will probably crash soon!");
e.printStackTrace();
}
QuiltMixinBootstrap.init(QuiltLauncherBase.getLauncher().getEnvironmentType(), QuiltLoaderImpl.INSTANCE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.jetbrains.annotations.NotNull;
import org.quiltmc.loader.api.ModContainer;
import org.quiltmc.loader.impl.QuiltLoaderImpl;
import org.quiltmc.loader.impl.config.QuiltConfigImpl;
import org.quiltmc.loader.impl.filesystem.DelegatingUrlStreamHandlerFactory;
import org.quiltmc.loader.impl.filesystem.QuiltJoinedFileSystemProvider;
import org.quiltmc.loader.impl.filesystem.QuiltMemoryFileSystemProvider;
Expand Down Expand Up @@ -138,6 +139,7 @@ public void initialize(IEnvironment environment) {
loader.load();
loader.freeze();
QuiltLoaderImpl.INSTANCE.loadAccessWideners();
QuiltConfigImpl.init();
}

@Override
Expand All @@ -164,7 +166,7 @@ public void onLoad(IEnvironment env, Set<String> otherServices) {
return List.of(
Utils.getSide() == EnvType.CLIENT ? new ClientEntryPointTransformer()
: new ServerEntryPointTransformer(),
new RemapModTransformer(),
// new RemapModTransformer(),
new AWTransformer());
}

Expand All @@ -174,7 +176,7 @@ public static JarMetadata createJarMetadata(SecureJar sj, String name) {

private GameProvider provider;
private final List<Path> cp = new ArrayList<>();
public static List<String> NO_LOAD_MODS = List.of("pillow", "forge", "minecraft", "java");
public static List<String> NO_LOAD_MODS = List.of("pillow-loader", "forge", "minecraft", "java");

// QuiltLauncher start

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class RemapModTransformer implements ITransformer<ClassNode> {
}
}
if (null == cn) return input;
var cnSrg = remapper.map(cn);
for (FieldNode node : input.fields) {
if (node.visibleAnnotations == null) continue;
for (AnnotationNode ann : node.visibleAnnotations) {
Expand All @@ -69,7 +70,7 @@ public class RemapModTransformer implements ITransformer<ClassNode> {
} else if (ann.desc.startsWith("Lorg/spongepowered/asm/mixin/injection")) {
var methods = (List<String>)ann.values.get(ann.values.indexOf("method") + 1);
for (int i = 0; i < methods.size(); i++) {
methods.set(i, cn + "." + methods.get(i));
methods.set(i, cnSrg + "." + methods.get(i));
}
}
}
Expand Down
Binary file modified src/main/resources/assets/pillow/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/main/resources/assets/pillow/lang/zh_cn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"modmenu.nameTranslation.pillow-loader": "枕头模组加载器",
"modmenu.descriptionTranslation.pillow-loader": "让 Quilt 加载器和 NeoForge 使用的 FML 在 ModLauncher 上和以 Searge 名混淆的 Minecraft 运行。",
"modmenu.nameTranslation.pillowmc": "枕头项目",
"modmenu.descriptionTranslation.pillowmc": "玩几乎所有你想玩的模组。"
}
21 changes: 13 additions & 8 deletions src/main/resources/quilt.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,31 @@
"schema_version": 1,
"quilt_loader": {
"group": "net.pillowmc",
"id": "pillow",
"id": "pillow-loader",
"version": "${version}",
"metadata": {
"name": "Pillow Mod Loader",
"description": "The mod-loader that works on Forge.",
"description": "Allows Quilt Loader and FML work on ModLauncher with Searge obfuscated Minecraft, which NeoForge uses.",
"contributors": {
"PillowMC": "Owner",
"QuiltMC (credits only)": "Quilt Owner"
"PillowMC": "Owner"
},
"contact": {
"homepage": "https://pillowmc.github.io",
"issues": "https://github.com/PillowMC/Pillow/issues",
"sources": "https://github.com/PillowMC/Pillow",
"quilt_homepage": "https://quiltmc.org",
"quilt_issues": "https://github.com/QuiltMC/quilt-loader/issues",
"quilt_sources": "https://github.com/QuiltMC/quilt-loader"
"sources": "https://github.com/PillowMC/Pillow"
},
"license": "MIT",
"icon": "assets/pillow/icon.png"
},
"intermediate_mappings": "net.fabricmc:intermediary"
},
"modmenu": {
"parent": {
"id": "pillowmc",
"name": "The PillowMC Project",
"description": "Put almost all mods you like together.",
"icon": "assets/pillow/icon_pillowmc.png",
"update_checker": false
}
}
}

0 comments on commit b92f19f

Please sign in to comment.