generated from JamCoreModding/template-mod
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
301e2d4
commit 0063ed2
Showing
60 changed files
with
1,334 additions
and
1,986 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
- Clean up the ModMenu code, assumes a ModMenu version greater than 9.1.0 is installed otherwise | ||
config screens are dependant on mod load order (fixes #6). | ||
- Port to 1.20.6 | ||
- Remove Forge and Quilt support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,17 @@ | ||
<center><img src="https://raw.githubusercontent.com/JamCoreModding/JamLib/1.20.2-multiloader/common/src/main/resources/assets/jamlib/icon.png" align="center" width="128px"/></center> | ||
![JamLib: The platform-agnostic library used in all of JamCore's mods](https://cdn.jamalam.tech/mod-assets/jamlib-banner.png) | ||
|
||
<center> | ||
<div align="center"> | ||
|
||
# JamLib | ||
[Report Issues](https://github.com/JamCoreModding/jamlib) • [Chat on Discord](https://discord.jamalam.tech) • [CurseForge](https://curseforge.com/minecraft/mc-mods/jamlib) • [Modrinth](https://modrinth.com/mod/jamlib) | ||
|
||
</center> | ||
</div> | ||
|
||
<center> | ||
<img alt="forge" height="20" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/supported/forge_vector.svg"> | ||
<img alt="fabric" height="20" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/supported/fabric_vector.svg"> | ||
<img alt="quilt" height="20" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/supported/quilt_vector.svg"> | ||
</center> | ||
JamLib provides: | ||
|
||
JamLib is the platform-agnostic, Architectury based library used in all of our mods. | ||
- Platform abstractions | ||
- A JSON5 config API | ||
- A mod repost (9minecraft etc.) checker | ||
|
||
## Features | ||
Comprehensive documentation can be found [here](https://docs.jamalam.tech/jamlib/getting-started/). | ||
|
||
- [x] Config using JSON5 | ||
|
||
## Developers | ||
|
||
<center><a href="https://docs.jamalam.tech"><img alt="forge" height="20" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/documentation/generic_vector.svg"></a></center> | ||
|
||
You are free to use JamLib in any mod you wish. API breaking changes will only be made between Minecraft versions - I | ||
can't guarantee it will only be with sem-ver minor Minecraft versions though, as Mojang is making a lot of changes in ' | ||
patch' | ||
versions at the moment. | ||
|
||
<center><a href="https://bisecthosting.com/jamalam"><img src="https://www.bisecthosting.com/partners/custom-banners/982884df-e307-4b8d-b8c2-9f1868a1f13a.webp" height="120"></a></center> | ||
[![Rent a server with Bisect Hosting: Use Code jamalam to get 25% off](https://www.bisecthosting.com/partners/custom-banners/e0cc6668-0d29-40ff-9820-4d4f5433198a.webp)](https://bisecthosting.com/jamalam) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 18 additions & 17 deletions
35
common/src/main/java/io/github/jamalam360/jamlib/JamLibClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,34 @@ | ||
package io.github.jamalam360.jamlib; | ||
|
||
import static io.github.jamalam360.jamlib.JamLib.JAR_RENAMING_CHECKER; | ||
|
||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.minecraft.ChatFormatting; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.player.LocalPlayer; | ||
import net.minecraft.network.chat.Component; | ||
|
||
import static io.github.jamalam360.jamlib.JamLib.JAR_RENAMING_CHECKER; | ||
|
||
@Environment(EnvType.CLIENT) | ||
public class JamLibClient { | ||
public static void onPlayerJoin(LocalPlayer player) { | ||
if (player != Minecraft.getInstance().player) { | ||
return; | ||
} | ||
|
||
if (JAR_RENAMING_CHECKER.getSuspiciousJarsToNotifyAbout().isEmpty()) { | ||
return; | ||
} | ||
public static void onPlayerJoin(LocalPlayer player) { | ||
if (player != Minecraft.getInstance().player) { | ||
return; | ||
} | ||
|
||
if (JAR_RENAMING_CHECKER.getSuspiciousJarsToNotifyAbout().isEmpty()) { | ||
return; | ||
} | ||
|
||
player.displayClientMessage(Component.translatable("text.jamlib.renamed_1", Component.translatable("text.jamlib.renamed_1.1").withStyle(ChatFormatting.RED)), false); | ||
player.displayClientMessage(Component.translatable("text.jamlib.renamed_1", Component.translatable("text.jamlib.renamed_1.1").withStyle(ChatFormatting.RED)), false); | ||
|
||
for (String jar : JAR_RENAMING_CHECKER.getSuspiciousJarsToNotifyAbout()) { | ||
player.displayClientMessage(Component.literal(" - " + jar).withStyle(ChatFormatting.GRAY), false); | ||
} | ||
for (String jar : JAR_RENAMING_CHECKER.getSuspiciousJarsToNotifyAbout()) { | ||
player.displayClientMessage(Component.literal(" - " + jar).withStyle(ChatFormatting.GRAY), false); | ||
} | ||
|
||
player.displayClientMessage(Component.translatable("text.jamlib.renamed_2", Component.translatable("text.jamlib.renamed_2.1").withStyle(ChatFormatting.YELLOW), Component.translatable("text.jamlib.renamed_2.2").withStyle(ChatFormatting.RED), Component.translatable("text.jamlib.renamed_2.3").withStyle(ChatFormatting.RED), Component.translatable("text.jamlib.renamed_2.4").withStyle(ChatFormatting.GOLD), Component.translatable("text.jamlib.renamed_2.5").withStyle(ChatFormatting.GOLD)), false); | ||
player.displayClientMessage(Component.translatable("text.jamlib.renamed_3", Component.translatable("text.jamlib.renamed_3.1").withStyle(ChatFormatting.GRAY)), false); | ||
JAR_RENAMING_CHECKER.afterNotify(); | ||
} | ||
player.displayClientMessage(Component.translatable("text.jamlib.renamed_2", Component.translatable("text.jamlib.renamed_2.1").withStyle(ChatFormatting.YELLOW), Component.translatable("text.jamlib.renamed_2.2").withStyle(ChatFormatting.RED), Component.translatable("text.jamlib.renamed_2.3").withStyle(ChatFormatting.RED), Component.translatable("text.jamlib.renamed_2.4").withStyle(ChatFormatting.GOLD), Component.translatable("text.jamlib.renamed_2.5").withStyle(ChatFormatting.GOLD)), false); | ||
player.displayClientMessage(Component.translatable("text.jamlib.renamed_3", Component.translatable("text.jamlib.renamed_3.1").withStyle(ChatFormatting.GRAY)), false); | ||
JAR_RENAMING_CHECKER.afterNotify(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.