https://github.com/squeek502/appleskin
Food-related HUD improvements for Minecraft (AppleCore without the core)
https://github.com/squeek502/appleskin
minecraft-mod
Last synced: 13 days ago
JSON representation
Food-related HUD improvements for Minecraft (AppleCore without the core)
- Host: GitHub
- URL: https://github.com/squeek502/appleskin
- Owner: squeek502
- License: unlicense
- Created: 2016-08-13T06:16:07.000Z (almost 9 years ago)
- Default Branch: 1.16-forge
- Last Pushed: 2025-04-05T00:06:08.000Z (about 2 months ago)
- Last Synced: 2025-04-08T13:07:39.639Z (about 2 months ago)
- Topics: minecraft-mod
- Language: Java
- Homepage: https://www.curseforge.com/minecraft/mc-mods/appleskin
- Size: 890 KB
- Stars: 353
- Watchers: 8
- Forks: 69
- Open Issues: 66
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[AppleSkin](https://minecraft.curseforge.com/projects/appleskin)
===========Minecraft mod that adds various food-related HUD improvements formerly provided by [AppleCore](https://github.com/squeek502/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=``` 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`:
```groovy
repositories {
maven { url "https://maven.ryanliptak.com/" }
}
```and add this to your `dependencies` block:
```groovy
compileOnly fg.deobf("squeek.appleskin:appleskin-forge::api")
```where `` 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:
```java
private void clientInit(final FMLClientSetupEvent event) {
if (ModList.get().isLoaded("appleskin")) {
MinecraftForge.EVENT_BUS.register(new AppleSkinEventHandler());
}
}
```and the `AppleSkinEventHandler` class:
```java
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`:
```groovy
runtimeOnly fg.deobf("squeek.appleskin:appleskin-forge:")
```while replacing `` as mentioned above.