开源软件名称(OpenSource Name):squeek502/AppleSkin开源软件地址(OpenSource Url):https://github.com/squeek502/AppleSkin开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):AppleSkinMinecraft mod that adds various food-related HUD improvements formerly provided by AppleCore (basically, AppleCore without the core). Features
Building AppleSkin
Note: To give the build a version number, use For Mod Developers
If followed, the directions below will make it so that your mod's Maven dependencies won't include AppleSkin at all, and your mod will load fine with or without AppleSkin installed. To compile against the AppleSkin API, include the following in your repositories {
maven { url "https://maven.ryanliptak.com/" }
} and add this to your compileOnly fg.deobf("squeek.appleskin:appleskin-forge:<version>:api") where https://maven.ryanliptak.com/squeek/appleskin/appleskin-forge Once you're compiling against the AppleSkin API, you can create an event handler and only register it when In your private void clientInit(final FMLClientSetupEvent event) {
if (ModList.get().isLoaded("appleskin")) {
MinecraftForge.EVENT_BUS.register(new AppleSkinEventHandler());
}
} and the public class AppleSkinEventHandler
{
@SubscribeEvent
public void onPreTooltipEvent(TooltipOverlayEvent.Pre event) {
// hide the tooltip for regular apples
if (event.itemStack.getItem() == Items.APPLE) {
event.setCanceled(true);
}
}
} (see the Note: if you want to test with the full AppleSkin mod in your development environment, you can also add the following to your runtimeOnly fg.deobf("squeek.appleskin:appleskin-forge:<version>") while replacing |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论