Compare commits

...

4 commits

Author SHA1 Message Date
Sollace
57754d8dec
Change christmas check to include the 24th - 26th Closes #299 2025-01-05 12:28:59 +01:00
Sollace
ec8f92e151
Update hdskins
# Conflicts:
#	gradle.properties
2024-12-17 17:59:46 +01:00
Sollace
e21ce62631
Merge branch '1.20.1' into 1.20.2 2024-07-31 15:13:32 +02:00
Sollace
c78cf32bd4
Fix build 2024-07-31 15:13:14 +02:00
4 changed files with 15 additions and 11 deletions

View file

@ -1,15 +1,15 @@
buildscript {
dependencies {
classpath 'com.github.dexman545:Outlet:1.3.10'
classpath 'com.github.dexman545:Outlet:1.6.1'
}
}
plugins {
id 'fabric-loom' version '1.5-SNAPSHOT'
id 'maven-publish'
id 'com.modrinth.minotaur' version '2.+'
id 'org.ajoberstar.reckon' version '0.13.0'
id 'org.ajoberstar.reckon' version '0.13.1'
}
apply plugin: 'dex.plugins.outlet'
apply plugin: 'io.github.dexman545.outlet'
java {
toolchain {

View file

@ -22,5 +22,5 @@ org.gradle.daemon=false
# Dependencies
modmenu_version=8.0.0
kirin_version=1.16.1+1.20.2
hd_skins_version=6.11.2+1.20.2
hd_skins_version=6.12.4+1.20.2
mson_version=1.9.3+1.20.2

View file

@ -11,6 +11,7 @@ import com.minelittlepony.hdskins.client.*;
import com.minelittlepony.hdskins.client.gui.GuiSkins;
import com.minelittlepony.hdskins.client.gui.player.DummyPlayer;
import com.minelittlepony.hdskins.client.gui.player.skins.PlayerSkins.PlayerSkin;
import com.minelittlepony.hdskins.client.profile.SkinLoader.ProvidedSkins;
import com.minelittlepony.hdskins.profile.SkinType;
import com.mojang.authlib.GameProfile;
@ -75,7 +76,7 @@ public class MineLPHDSkins extends SkinsProxy implements ClientModInitializer {
});
}
static Optional<Pony> getPony(PlayerSkins.Layer layer) {
static Optional<Pony> getPony(PlayerSkinLayers.Layer layer) {
return layer
.getSkin(SkinType.SKIN)
.map(Pony.getManager()::getPony);
@ -103,8 +104,9 @@ public class MineLPHDSkins extends SkinsProxy implements ClientModInitializer {
if (entity instanceof AbstractClientPlayerEntity player) {
return PlayerSkins.of(player)
.map(PlayerSkins::combined)
.map(PlayerSkins.Layer::getProvidedSkinTypes)
.map(PlayerSkins::layers)
.map(PlayerSkinLayers::combined)
.map(PlayerSkinLayers.Layer::getProvidedSkinTypes)
.orElseGet(Set::of);
}
@ -132,13 +134,16 @@ public class MineLPHDSkins extends SkinsProxy implements ClientModInitializer {
}
}
return Optional.of(player).flatMap(PlayerSkins::of).map(PlayerSkins::combined).flatMap(skins -> skins.getSkin(type));
return Optional.of(player).flatMap(PlayerSkins::of)
.map(PlayerSkins::layers)
.map(PlayerSkinLayers::combined).flatMap(skins -> skins.getSkin(type));
}
@Override
public Identifier getSkinTexture(GameProfile profile) {
return HDSkins.getInstance().getProfileRepository()
.getNow(profile)
.load(profile)
.getNow(ProvidedSkins.EMPTY)
.getSkin(SkinType.SKIN)
.orElseGet(() -> super.getSkinTexture(profile));
}

View file

@ -23,10 +23,9 @@ public class DeerAntlers extends WearableGear {
dayChecked = true;
Calendar cal = Calendar.getInstance();
dayResult = cal.get(Calendar.MONTH) == Calendar.DECEMBER
&& cal.get(Calendar.DAY_OF_MONTH) == 25;
&& Math.abs(cal.get(Calendar.DAY_OF_MONTH) - 25) < 2;
}
return dayResult;
}