• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

squeek502/AppleSkin: Food-related HUD improvements for Minecraft (AppleCore with ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

squeek502/AppleSkin

开源软件地址(OpenSource Url):

https://github.com/squeek502/AppleSkin

开源编程语言(OpenSource Language):

Java 100.0%

开源软件介绍(OpenSource Introduction):

AppleSkin

Minecraft mod that adds various food-related HUD improvements formerly provided by AppleCore (basically, AppleCore without the core).

Features

  • Adds food value information to tooltips:

  • Adds a visualization of saturation and exhaustion to the HUD:

  • Adds a visualization of potential hunger/saturation restored while holding food:

  • Adds a visualization of potential health restored while holding food:

  • Adds hunger/saturation/exhaustion info to the debug overlay (F3)
  • Syncs the value of saturation and exhaustion to the client.

Building AppleSkin

  1. Clone the repository
  2. Open a command line and execute gradlew build

Note: To give the build a version number, use gradlew build -Pversion=<version> instead (example: gradlew build -Pversion=1.0.0).


For Mod Developers

Note: These instructions are Forge-specific. For Fabric, see the instructions in the relevant -fabric branch.

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 build.gradle:

repositories {
	maven { url "https://maven.ryanliptak.com/" }
}

and add this to your dependencies block:

compileOnly fg.deobf("squeek.appleskin:appleskin-forge:<version>:api")

where <version> is replaced by the appropriate version found here:

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 appleskin is loaded. Here's an example implementation:

In your @Mod annotated class:

private void clientInit(final FMLClientSetupEvent event) {
    if (ModList.get().isLoaded("appleskin")) {
        MinecraftForge.EVENT_BUS.register(new AppleSkinEventHandler());
    }
}

and the AppleSkinEventHandler class:

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 squeek.appleskin.api.event package for all the possible events that can be registered)


Note: if you want to test with the full AppleSkin mod in your development environment, you can also add the following to your dependencies:

runtimeOnly fg.deobf("squeek.appleskin:appleskin-forge:<version>")

while replacing <version> as mentioned above.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
McEx/McEx: Minecraft server written in Elixir发布时间:2022-08-17
下一篇:
Incendo/Hyperverse: A Minecraft world management plugin发布时间:2022-08-17
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap