Skip to content

Commit 0d4126d

Browse files
committed
Merge 1.18 into 1.19.2
2 parents 27d831e + 4159644 commit 0d4126d

File tree

4 files changed

+67
-15
lines changed

4 files changed

+67
-15
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Bug Report
2+
description: "For reporting bugs and other defects"
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: >-
7+
**Note: This issue tracker is not intended for support requests!** If you need help with crashes or other issues, then
8+
you should [ask on our Discord server](https://discord.gg/rN9Y7caguP) instead. Unless you are certain that you
9+
have found a defect, and you are able to point to where the problem is, you should not open an issue.
10+
<br><br>
11+
Additionally, please make sure you have done the following:
12+
13+
- **Have you ensured that all of your mods (including ModernFix) are up-to-date?** The latest version of ModernFix
14+
can always be found [on Modrinth](https://modrinth.com/mod/modernfix).
15+
16+
- **Have you used the [search tool](https://github.com/embeddedt/ModernFix/issues) to check whether your issue
17+
has already been reported?** If it has been, then consider adding more information to the existing issue instead.
18+
19+
- **Have you determined the minimum set of instructions to reproduce the issue?** If your problem only occurs
20+
with other mods installed, then you should narrow down exactly which mods are causing the issue. Please do not
21+
provide your entire list of mods to us and expect that we will be able to figure out the problem.
22+
- type: textarea
23+
id: description
24+
attributes:
25+
label: Bug Description
26+
description: >-
27+
Use this section to describe the issue you are experiencing in as much depth as possible. The description should
28+
explain what behavior you were expecting, and why you believe the issue to be a bug. If the issue you are reporting
29+
only occurs with specific mods installed, then provide the name and version of each mod.
30+
31+
**Hint:** If you have any screenshots, videos, or other information that you feel is necessary to
32+
explain the issue, you can attach them here.
33+
- type: textarea
34+
id: description-reproduction-steps
35+
attributes:
36+
label: Reproduction Steps
37+
description: >-
38+
Provide as much information as possible on how to reproduce this bug. Make sure your instructions are as clear and
39+
concise as possible, because other people will need to be able to follow your guide in order to re-create the issue.
40+
41+
**Hint:** A common way to fill this section out is to write a step-by-step guide.
42+
validations:
43+
required: true
44+
- type: textarea
45+
id: log-file
46+
attributes:
47+
label: Log File
48+
description: >-
49+
**Hint:** You can usually find the log files within the folder `.minecraft/logs`. Most often, you will want the `latest.log`
50+
file, since that file belongs to the last played session of the game.
51+
placeholder: >-
52+
Drag-and-drop the log file here.
53+
validations:
54+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: For help with other issues, join our Discord community
4+
url: https://discord.gg/rN9Y7caguP
5+
about: This is the best option for getting help with mod installation, performance issues, and any other support inquiries
6+
# Copied from https://github.com/CaffeineMC/sodium-fabric#community

fabric/src/main/java/org/embeddedt/modernfix/platform/fabric/ModernFixPlatformHooksImpl.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,11 @@ public boolean isDedicatedServer() {
3838
return FabricLoader.getInstance().getEnvironmentType() == EnvType.SERVER;
3939
}
4040

41-
private static String verString;
41+
private static final String verString = FabricLoader.getInstance().getModContainer("modernfix")
42+
.map(mfModContainer -> mfModContainer.getMetadata().getVersion().getFriendlyString())
43+
.orElse("[unknown]");
4244

4345
public String getVersionString() {
44-
if(verString == null) {
45-
ModContainer mfModContainer = FabricLoader.getInstance().getModContainer("modernfix").get();
46-
verString = mfModContainer.getMetadata().getVersion().getFriendlyString();
47-
}
4846
return verString;
4947
}
5048

forge/src/main/java/org/embeddedt/modernfix/platform/forge/ModernFixPlatformHooksImpl.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
import java.lang.reflect.Field;
4444
import java.nio.file.Path;
4545
import java.util.Map;
46-
import java.util.Objects;
46+
import java.util.Optional;
4747
import java.util.function.Consumer;
4848

4949
public class ModernFixPlatformHooksImpl implements ModernFixPlatformHooks {
@@ -55,17 +55,11 @@ public boolean isDedicatedServer() {
5555
return FMLLoader.getDist().isDedicatedServer();
5656
}
5757

58-
private static String verString;
58+
private static final String verString = Optional.ofNullable(
59+
ModernFixMixinPlugin.class.getPackage().getImplementationVersion())
60+
.orElse("[unknown]");
5961

6062
public String getVersionString() {
61-
if(verString == null) {
62-
try {
63-
verString = ModernFixMixinPlugin.class.getPackage().getImplementationVersion();
64-
Objects.requireNonNull(verString);
65-
} catch(Throwable e) {
66-
verString = "[unknown]";
67-
}
68-
}
6963
return verString;
7064
}
7165

0 commit comments

Comments
 (0)