generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to 1.20.4 and convert Quilt module to Fabric
- Loading branch information
Showing
35 changed files
with
206 additions
and
265 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 |
---|---|---|
|
@@ -17,4 +17,3 @@ run/ | |
generated/ | ||
.architectury-transformer/ | ||
*.jar | ||
quilt/.quilt |
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
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,7 +1,7 @@ | ||
dependencies { | ||
modImplementation libs.quilt.loader | ||
modImplementation libs.fabric.loader | ||
} | ||
|
||
architectury.common 'quilt', 'forge' | ||
architectury.common 'fabric', 'forge' | ||
|
||
loom.accessWidenerPath.set file('src/main/resources/emcutils.accesswidener') |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
File renamed without changes.
41 changes: 41 additions & 0 deletions
41
fabric/src/main/java/coffee/waffle/emcutils/fabric/EMCUtilsFabric.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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package coffee.waffle.emcutils.fabric; | ||
|
||
import coffee.waffle.emcutils.Util; | ||
import coffee.waffle.emcutils.event.TooltipCallback; | ||
import coffee.waffle.emcutils.feature.VaultScreen; | ||
import eu.midnightdust.lib.config.MidnightConfig; | ||
import net.fabricmc.api.ClientModInitializer; | ||
import net.fabricmc.fabric.api.client.item.v1.ItemTooltipCallback; | ||
import net.fabricmc.fabric.api.resource.ResourceManagerHelper; | ||
import net.fabricmc.loader.api.FabricLoader; | ||
import net.fabricmc.loader.api.ModContainer; | ||
import net.minecraft.client.gui.screen.ingame.HandledScreens; | ||
|
||
import static coffee.waffle.emcutils.Util.LOG; | ||
import static coffee.waffle.emcutils.Util.MODID; | ||
import static coffee.waffle.emcutils.Util.id; | ||
import static net.fabricmc.fabric.api.resource.ResourcePackActivationType.NORMAL; | ||
|
||
public class EMCUtilsFabric implements ClientModInitializer { | ||
|
||
@Override | ||
public void onInitializeClient() { | ||
MidnightConfig.init(MODID, ConfigImpl.class); | ||
|
||
ModContainer mod = FabricLoader.getInstance().getModContainer(MODID).get(); | ||
|
||
// These don't work in dev for whatever reason, but work in prod | ||
ResourceManagerHelper.registerBuiltinResourcePack(id("dark-ui-vault"), mod, NORMAL); | ||
ResourceManagerHelper.registerBuiltinResourcePack(id("vt-dark-vault"), mod, NORMAL); | ||
|
||
Util.runResidenceCollector(); | ||
|
||
HandledScreens.register(VaultScreen.GENERIC_9X7, VaultScreen::new); | ||
|
||
ItemTooltipCallback.EVENT.register((stack, context, lines) -> { | ||
TooltipCallback.ITEM.invoker().append(stack, lines, context); | ||
}); | ||
|
||
LOG.info("Initialized " + MODID); | ||
} | ||
} |
Oops, something went wrong.