Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/14-develop' into 15-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ZekerZhayard committed Mar 18, 2023
2 parents 755f764 + f5b1989 commit f3f80a1
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 32 deletions.
34 changes: 31 additions & 3 deletions .github/ISSUE_TEMPLATE/report_bug.en_US.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
name: Report Bug
description: Report a bug and help us improve CustomSkinLoader
labels: [ bug ]
title: "[Bug] "
body:
- type: markdown
attributes:
value: |
Here is the Report Bug issue for CustomSkinLoader
With a red asterisk for the mandatory items
Please keep the work order content neat and tidy, do not paste the contents of the log file directly onto the work order, it will look very messy and unattractive work orders
- type: textarea
id: description
attributes:
Expand All @@ -18,6 +25,10 @@ body:
label: Steps to reproduce
description: How do you trigger this bug?
render: bash
value: |
1.
2.
3.
validations:
required: true
- type: input
Expand All @@ -27,15 +38,32 @@ body:
description: |
The files are in the folder `<minecraft-directory>/crash-reports`
[Generate URL](https://mclo.gs)
placeholder: "https://"
placeholder: "https://mclo.gs/xxxxxx"
- type: input
id: csl-log
attributes:
label: Link to CustomSkinLoader.log if applicable
description: |
The path to the file is `<minecraft-directory>/CustomSkinLoader/CustomSkinLoader.log`.
[Generate URL](https://mclo.gs)
placeholder: "https://"
placeholder: "https://mclo.gs/xxxxxx"
- type: input
id: latest-log
attributes:
label: Link to latest.log if applicable
description: |
The path to the file is `<minecraft-directory>/logs/latest.log`.
[Generate URL](https://mclo.gs)
placeholder: "https://mclo.gs/xxxxxx"
- type: input
id: forge-log
attributes:
label: "[Only Forge User] Link to debug.log (=>1.12.2) or fml-client-latest.log (=<1.12.2) if applicable"
description: |
The path to the file is `<minecraft-directory>/logs/debug.log` or `<minecraft-directory>/logs/fml-client-latest.log`.
if your mod loader isn't `Forge`, URL can set empty
[Generate URL](https://mclo.gs)
placeholder: "https://mclo.gs/xxxxxx"
- type: input
id: mod-version
attributes:
Expand All @@ -56,7 +84,7 @@ body:
- Quilt
- Fabric
- Forge
- <without loader>
- <without mod loader>
validations:
required: true
- type: dropdown
Expand Down
33 changes: 31 additions & 2 deletions .github/ISSUE_TEMPLATE/report_bug.zh_CN.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
name: 提交问题
description: 报告问题以帮助我们改进CustomSkinLoader
labels: [ bug ]
title: "[Bug] "
body:
- type: markdown
attributes:
value: |
你好,这里是 `CustomSkinLoader`
标注红色星号的为必填项
以及,保持工单干净整洁,不要直接将日志内容粘贴到工单上,比如粘贴到描述内是不行的
- type: textarea
id: description
attributes:
Expand All @@ -17,6 +24,10 @@ body:
label: 复现步骤
description: 请问你是如何触发这个问题的
render: bash
value: |
1.
2.
3.
validations:
required: true
- type: input
Expand All @@ -25,16 +36,34 @@ body:
label: 崩溃报告查看地址
description: |
在游戏目录下的 `crash-reports` 文件夹下,里面找最近的报告生成时间
客户端若无崩溃则直接填写 `客户端无崩溃`
[生成连接](https://mclo.gs)
placeholder: "https://"
placeholder: "https://mclo.gs/xxxxxx"
- type: input
id: csl-log
attributes:
label: CustomSkinLoader.log 查看地址
description: |
文件路径:`<游戏路径>/CustomSkinLoader/CustomSkinLoader.log`.
[生成连接](https://mclo.gs)
placeholder: "https://"
placeholder: "https://mclo.gs/xxxxxx"
- type: input
id: latest-log
attributes:
label: latest.log 查看地址
description: |
文件路径:`<游戏路径>/logs/latest.log`.
[生成连接](https://mclo.gs)
placeholder: "https://mclo.gs/xxxxxx"
- type: input
id: forge-log
attributes:
label: "[仅Forge用户] debug.log (=>1.12.2) 或者 fml-client-latest.log (=<1.12.2) 查看地址"
description: |
文件路径:`<游戏路径>/logs/debug.log` 或者 `<游戏路径>/logs/fml-client-latest.log`.
若没有使用 `Forge` 加载器的,可以不填写
[生成连接](https://mclo.gs)
placeholder: "https://mclo.gs/xxxxxx"
- type: input
id: mod-version
attributes:
Expand Down
23 changes: 10 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ There are the available versions in different environments below:
| | Forge | Fabric |
|:-----------------------:|:-----------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------:|
| Runtime Environment | forge-1.8-11.14.0.1237 ~ 1.13.2-25.0.22<br/> forge-1.13.2-25.0.42 ~ latest | fabric-loader-0.4.3+build.134 ~ latest<br/> Minecraft 18w43b ~ latest<br/> *fabric-api is not required* |
| Development Environment | ForgeGradle-2.1-SNAPSHOT ~ latest<br/> forge-1.8-11.14.3.1503 ~ 1.12.2-14.23.5.2855<br/> forge-1.13.2-25.0.198 ~ latest | fabric-loom-(?) ~ latest<br/> fabric-loader-0.12.0 ~ latest<br/> Minecraft 18w49a ~ latest<br/> *fabric-api is not required* |
| Development Environment | ForgeGradle-2.1-SNAPSHOT ~ latest<br/> forge-1.8-11.14.3.1503 ~ 1.12.2-14.23.5.2860<br/> forge-1.13.2-25.0.198 ~ latest | fabric-loom-(?) ~ latest<br/> fabric-loader-0.12.0 ~ latest<br/> Minecraft 18w49a ~ latest<br/> *fabric-api is not required* |

### Preliminary steps for testing local builds
1. Create a new empty minecraft development environment.
Expand All @@ -31,7 +31,7 @@ There are the available versions in different environments below:
Forge 1.17.1 ~ latest: ./local-repo/mods/CustomSkinLoader_ForgeActive/${version}
Fabric: ./local-repo/mods/CustomSkinLoader_Fabric/${version}
```
*`${version}` should be repalced with something like `14.15-SNAPSHOT-00` manually*
*`${version}` should be repalced with something like `15.0-SNAPSHOT-00` manually*
1. Create a pom file in the same folder:
- Forge 1.8 ~ 1.16.5: `CustomSkinLoader_ForgeLegacy-${version}.pom`
```xml
Expand All @@ -40,7 +40,7 @@ There are the available versions in different environments below:
<modelVersion>4.0.0</modelVersion>
<groupId>mods</groupId>
<artifactId>CustomSkinLoader_ForgeLegacy</artifactId>
<!-- `${version}` should be repalced with something like `14.15-SNAPSHOT-00` manually -->
<!-- `${version}` should be repalced with something like `15.0-SNAPSHOT-00` manually -->
<version>${version}</version>
</project>
```
Expand All @@ -51,7 +51,7 @@ There are the available versions in different environments below:
<modelVersion>4.0.0</modelVersion>
<groupId>mods</groupId>
<artifactId>CustomSkinLoader_ForgeActive</artifactId>
<!-- `${version}` should be repalced with something like `14.15-SNAPSHOT-00` manually -->
<!-- `${version}` should be repalced with something like `15.0-SNAPSHOT-00` manually -->
<version>${version}</version>
</project>
```
Expand All @@ -62,7 +62,7 @@ There are the available versions in different environments below:
<modelVersion>4.0.0</modelVersion>
<groupId>mods</groupId>
<artifactId>CustomSkinLoader_Fabric</artifactId>
<!-- `${version}` should be repalced with something like `14.15-SNAPSHOT-00` manually -->
<!-- `${version}` should be repalced with something like `15.0-SNAPSHOT-00` manually -->
<version>${version}</version>
</project>
```
Expand All @@ -71,25 +71,22 @@ There are the available versions in different environments below:
1. Add below contents to `build.gradle`:
```gradle
dependencies {
deobfCompile "mods:CustomSkinLoader_ForgeLegacy:14.15-SNAPSHOT-00"
deobfCompile "mods:CustomSkinLoader_ForgeLegacy:15.0-SNAPSHOT-00"
}
minecraft {
clientRunArgs += ["--tweakClass", "customskinloader.forge.ForgeDevTweaker", "--username", "<Your username>"]
}
```
1. Run `./gradlew setupDecompWorkspace eclipse` command.
1. Due to the run configurations which generated by ForgeGradle 2 has not been compatible with IntelliJ IDEA 2020 and above, we recommend to install [Eclipser](https://plugins.jetbrains.com/plugin/7153-eclipser) plugin. It can convert Eclipse run configurations to IDEA. (Right click to `*.launch` file in project folder, then select `Convert with Eclipser`, then a new IDEA run configuration will be created.)
1. For IDEA, open `Run/Debug Configurations` dialog, change classpath of module to the name contains `.main`.
1. Add `--tweakClass customskinloader.forge.ForgeDevTweaker --username <Your username>` to CLI arguments in `Run/Debug Configurations` dialog.
1. Run `./gradlew setupDecompWorkspace` command.
1. Then you can debug the mod in IDE or through `./gradlew runClient` command.

### For ForgeGradle 3.x ~ 5.x ( forge-1.12.2-14.23.5.2851 ~ latest )
1. Add below contents to `build.gradle`:
```gradle
dependencies {
implementation fg.deobf("mods:CustomSkinLoader_ForgeLegacy:14.15-SNAPSHOT-00") // Only required for MinecraftForge 1.8 ~ 1.16.5
implementation fg.deobf("mods:CustomSkinLoader_ForgeActive:14.15-SNAPSHOT-00") // Only required for MinecraftForge 1.17.1 ~ latest
implementation fg.deobf("mods:CustomSkinLoader_ForgeLegacy:15.0-SNAPSHOT-00") // Only required for MinecraftForge 1.8 ~ 1.16.5
implementation fg.deobf("mods:CustomSkinLoader_ForgeActive:15.0-SNAPSHOT-00") // Only required for MinecraftForge 1.17.1 ~ latest
}
minecraft {
Expand All @@ -107,7 +104,7 @@ There are the available versions in different environments below:
1. Add below contents to `build.gradle`:
```gradle
dependencies {
modImplementation "mods:CustomSkinLoader_Fabric:14.15-SNAPSHOT-00"
modImplementation "mods:CustomSkinLoader_Fabric:15.0-SNAPSHOT-00"
}
tasks.runClient {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public String getUrl() {
return this.info.url;
}

public String getRawUrl() {
return super.getUrl();
}

@Override
public String getHash() {
return this.info.hash;
Expand Down
10 changes: 5 additions & 5 deletions Common/src/main/java/customskinloader/fake/FakeSkinManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ public static Object[] createThreadDownloadImageData(ImmutableList<Object> list,
FakeMinecraftProfileTexture fakeProfileTexture = (FakeMinecraftProfileTexture) profileTexture;
ResourceLocation resourcelocation = fakeProfileTexture.getResourceLocation();
if (fakeProfileTexture.getResourceLocation() != null) {
params[0] = ((FakeMinecraftProfileTexture) profileTexture).getCacheFile();
params[0] = fakeProfileTexture.getCacheFile();
if (params[params.length - 2] instanceof Boolean) {
params[params.length - 2] = true;
}
params[params.length - 1] = fakeManager.new BaseBuffer(skinAvailableCallback, textureType, resourcelocation, profileTexture);
params[params.length - 1] = fakeManager.new BaseBuffer(skinAvailableCallback, textureType, resourcelocation, fakeProfileTexture);
}
}
return params;
Expand Down Expand Up @@ -139,9 +139,9 @@ private class BaseBuffer implements IImageBuffer {
private SkinManager.SkinAvailableCallback callback;
private MinecraftProfileTexture.Type type;
private ResourceLocation location;
private MinecraftProfileTexture texture;
private FakeMinecraftProfileTexture texture;

public BaseBuffer(SkinManager.SkinAvailableCallback callback, MinecraftProfileTexture.Type type, ResourceLocation location, MinecraftProfileTexture texture) {
public BaseBuffer(SkinManager.SkinAvailableCallback callback, MinecraftProfileTexture.Type type, ResourceLocation location, FakeMinecraftProfileTexture texture) {
switch (type) {
case SKIN: this.buffer = new FakeSkinBuffer(); break;
case CAPE: this.buffer = new FakeCapeBuffer(location); break;
Expand Down Expand Up @@ -169,7 +169,7 @@ public void skinAvailable() {
Map<String, String> metadata = Maps.newHashMap();
String type = ((FakeSkinBuffer) buffer).judgeType();
metadata.put("model", type);
texture = new MinecraftProfileTexture(texture.getUrl(), metadata);
texture = new FakeMinecraftProfileTexture(texture.getRawUrl(), metadata);
FakeSkinManager.this.modelCache.put(location, texture);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Fabric/build.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
minecraft_version=1.14
minecraft_full_versions=1.14-Snapshot,1.14,1.14.1,1.14.2,1.14.3,1.14.4,1.15-Snapshot,1.15,1.15.1,1.15.2,1.16-Snapshot,1.16,1.16.1,1.16.2,1.16.3,1.16.4,1.16.5,1.17-Snapshot,1.17,1.17.1,1.18-Snapshot,1.18,1.18.1,1.18.2,1.19-Snapshot,1.19,1.19.1,1.19.2,1.19.3
minecraft_full_versions=1.14-Snapshot,1.14,1.14.1,1.14.2,1.14.3,1.14.4,1.15-Snapshot,1.15,1.15.1,1.15.2,1.16-Snapshot,1.16,1.16.1,1.16.2,1.16.3,1.16.4,1.16.5,1.17-Snapshot,1.17,1.17.1,1.18-Snapshot,1.18,1.18.1,1.18.2,1.19-Snapshot,1.19,1.19.1,1.19.2,1.19.3,1.19.4
java_full_versions=8,9,10,11,12,13,14,15,16,17,18
#forge gradle needs forge version
forge_mc_version=1.12.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ public class DevEnvRemapper extends SimpleRemapper {
Lists.newArrayList("customskinloader.fake.itf.FakeInterfaceManager")
)
);
remappedClasses.put(
"net.minecraft.class_1060",
new AbstractMap.SimpleEntry<>(
Lists.newArrayList("customskinloader.fake.itf.IFakeTextureManager$V1", "customskinloader.fake.itf.IFakeTextureManager$V2"),
Lists.newArrayList("customskinloader.fake.itf.FakeInterfaceManager")
)
);
remappedClasses.put(
"net.minecraft.class_3298",
new AbstractMap.SimpleEntry<>(
Expand Down
2 changes: 1 addition & 1 deletion Forge/Active/build.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
minecraft_version=1.17.1
minecraft_full_versions=1.17.1,1.18,1.18.1,1.18.2,1.19,1.19.1,1.19.2,1.19.3
minecraft_full_versions=1.17.1,1.18,1.18.1,1.18.2,1.19,1.19.1,1.19.2,1.19.3,1.19.4
java_full_versions=16,17,18
#forge gradle needs forge version
forge_mc_version=1.12.2
Expand Down

0 comments on commit f3f80a1

Please sign in to comment.