Compare commits

...

92 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
Sollace
4ef2d4ab54
Merge branch '1.20.1' into 1.20.2
# Conflicts:
#	src/main/java/com/minelittlepony/client/model/part/PonyEars.java
2024-04-26 21:02:12 +01:00
Sollace
82a89eb1ba
Apply changeling pony ears fix from 1.20.2+ 2024-04-26 21:01:08 +01:00
Sollace
8bf3bc38a4
Remove patch that only applies to 1.20.1 2024-04-26 20:59:39 +01:00
Sollace
e01580f804
Merge branch '1.20.1' into 1.20.2 2024-04-26 20:55:50 +01:00
­Sollace
040105c792
New Crowdin updates (#275)
* New translations en_us.json (English (upside down))
* New translations en_us.json (Pirate English)
* New translations en_us.json (English, United Kingdom)
* New translations en_us.json (LOLCAT)
* New translations en_us.json (Anglish)
* New translations en_us.json (German)
* New translations en_us.json (Afrikaans)
2024-04-26 20:38:00 +01:00
­Sollace
18591c0720
New Crowdin updates (#274)
* New translations en_us.json (German)

* New translations en_us.json (Russian)
2024-04-09 16:07:34 +01:00
Sollace
31a9a9b0e6
New Crowdin updates (#273)
# Conflicts:
#	src/main/resources/assets/minelittlepony/lang/ru_ru.json
2024-04-09 14:19:51 +01:00
­Sollace
c46cbea872
Update Crowdin configuration file 2024-04-09 14:19:03 +01:00
­Sollace
299a81088c
New Crowdin updates (#273) 2024-04-09 14:17:19 +01:00
­Sollace
bdc807b102 Update Crowdin configuration file 2024-04-09 14:08:12 +01:00
­Sollace
e149e926d2
Update README.md 2024-04-09 13:32:07 +01:00
­Sollace
4d55f546bb
Update Crowdin configuration file 2024-04-09 13:32:01 +01:00
­Sollace
c0e4620355
Update README.md 2024-04-09 13:31:18 +01:00
­Sollace
a3ea4f5982 Update Crowdin configuration file 2024-04-09 13:25:43 +01:00
Sollace
39f4a7d26d
Update dependencies 2024-04-06 15:17:02 +01:00
Sollace
71518d9478
Update dependencies 2024-04-06 15:12:19 +01:00
Sollace
dfa9ce8977
Fix giant scale 2024-03-05 12:25:36 +00:00
Sollace
0d97f6b9d4
Fix giant scale 2024-03-05 12:24:54 +00:00
Sollace
76211930d5
Fixed not all wearables being detected 2024-03-05 12:10:15 +00:00
Sollace
a40b55e142
Fix the leg issue 2024-02-24 16:36:03 +00:00
Sollace
aa08f12320
Add mson to the depends block (almost forgot this) 2024-02-09 19:47:31 +00:00
Sollace
f3cc92dee6
Fix typo 2024-02-09 19:45:42 +00:00
Sollace
9c8d6d0a86
Actually use the dynamic depends blocks 2024-02-09 19:45:34 +00:00
Sollace
8ce2fc4e6d
Update mson 2024-02-09 19:39:12 +00:00
Sollace
7da44b879c
Fix various transformations for when a pony is lying down but not sleeping 2024-02-09 19:34:10 +00:00
Sollace
f5bfa14bb1
Increase time required before a pony will lie down 2024-02-09 19:34:05 +00:00
Sollace
d392b204a3
Update mson 2024-02-09 19:32:22 +00:00
Sollace
21a33ebc76
Temp fix for an hdskins bug 2024-02-09 19:25:44 +00:00
Sollace
0895e94053
Fix various transformations for when a pony is lying down but not sleeping 2024-02-09 19:25:23 +00:00
Sollace
387c9307d0
Increase time required before a pony will lie down 2024-02-09 19:24:49 +00:00
Sollace
475e96726e
Update mson 2024-02-09 17:40:15 +00:00
Sollace
9d65185fcd
Update skins pack 2024-02-09 16:57:40 +00:00
Sollace
c365c141ef
Update mson one last time 2023-12-08 17:23:42 +00:00
Sollace
a94137fda9
1.20.2-rc1 -> 1.20.2 2023-12-08 17:23:34 +00:00
Sollace
34087bd105
Update mson to fix sodium compatibility 2023-12-07 21:49:33 +00:00
Sollace
cb423186e7
Fix reformed changelings' ears 2023-12-07 21:48:10 +00:00
Sollace
af99765bf2
Fix lighting on pony butts 2023-12-07 21:47:59 +00:00
Sollace
1faa192f33
Add nirik skin type 2023-12-07 21:47:49 +00:00
Sollace
b9baba84de
Update skin pack 2023-12-07 21:47:22 +00:00
Sollace
814dac6414
Fix seapony skins. Might have been a simpler issue than I thought 2023-12-06 15:18:39 +00:00
Sollace
667ce0ce4b
Parse pony data on the client thread executor, and don't send unparsed pony data responses to a consenting server. Rather wait for the data to resolve and let the entity send it normally.
# Conflicts:
#	src/main/java/com/minelittlepony/api/events/Channel.java
#	src/main/java/com/minelittlepony/client/util/render/NativeUtil.java
2023-10-29 21:39:25 +00:00
Sollace
8832beac32
Parse pony data on the client thread executor, and don't send unparsed pony data responses to a consenting server. Rather wait for the data to resolve and let the entity send it normally. 2023-10-27 22:09:55 +01:00
Sollace
4de3f3daa2
Fix constant logging when playing on a multiplayer server that doesn't register for receiving pony data packets
# Conflicts:
#	src/main/java/com/minelittlepony/api/events/Channel.java
#	src/main/java/com/minelittlepony/client/render/EquineRenderManager.java
2023-10-24 01:16:53 +01:00
Sollace
9064272771
Fix constant logging when playing on a multiplayer server that doesn't register for receiving pony data packets 2023-10-24 01:12:36 +01:00
Sollace
011ceedafe
Update version range 2023-10-06 19:33:46 +01:00
Sollace
2ed7f91786
Only replace a layer if it has a compatible buffer format. Should fix #254 2023-10-06 18:51:45 +01:00
Sollace
d011c11689
Only replace a layer if it has a compatible buffer format. Should fix #254 2023-10-06 18:51:20 +01:00
Sollace
060c4abfff
Ponies can now lie down by holding crouch and not moving 2023-10-06 00:48:11 +01:00
Sollace
9f77999baf
Fixed tiny silly ponies reverting to normal villagers when they grow up
# Conflicts:
#	src/main/java/com/minelittlepony/client/render/entity/npc/textures/SillyPonyTextureSupplier.java
2023-10-06 00:47:45 +01:00
Sollace
fa0c903c0f
Fixed magic not rendering for items held by other entities 2023-10-06 00:45:48 +01:00
Sollace
a7acd2a1c1
More fixes 2023-10-06 00:45:19 +01:00
Sollace
101b2bd20c
Fixed mobs' arms sticking too far up when sitting in a boat
# Conflicts:
#	src/main/java/com/minelittlepony/client/model/IMobModel.java
2023-10-06 00:40:04 +01:00
Sollace
9334836aa7
Disable shadow position changing
# Conflicts:
#	src/main/java/com/minelittlepony/client/render/entity/PlayerPonyRenderer.java
2023-10-06 00:38:52 +01:00
Sollace
a69140b761
fixes 2023-10-06 00:38:46 +01:00
Sollace
50ce9f92d1
Fixed left ear rotating incorrectly 2023-10-06 00:36:50 +01:00
Sollace
971f3623cf
Fixed pony skin data not being reliably sent to servers
# Conflicts:
#	src/main/java/com/minelittlepony/api/pony/network/fabric/Channel.java
#	src/main/java/com/minelittlepony/client/compat/hdskins/DummyPony.java
#	src/main/java/com/minelittlepony/client/mixin/MixinClientPlayerEntity.java
#	src/main/java/com/minelittlepony/client/render/EquineRenderManager.java
2023-10-06 00:35:33 +01:00
Sollace
24e220bb29
Allow armor to render with translucency 2023-10-06 00:23:08 +01:00
Sollace
f8b21e78ba
Update settings.gradle 2023-10-06 00:20:19 +01:00
Sollace
131bc7cb3f
Fixed armour models loading from the incorrect directory 2023-10-06 00:20:05 +01:00
Sollace
31857e2de0
The direction a pony's head faces when lying in a bed is now determined by which way you're looking when you climb in 2023-10-06 00:19:42 +01:00
Sollace
d3a5c80981
Fixed trident animation. Closes #250 2023-10-06 00:18:09 +01:00
Sollace
be5382ebad
Fixed bat ponies' wings rotating incorrectly and move them up a bit 2023-10-06 00:17:58 +01:00
Sollace
3ae6a48204
Fixed horns not glowing 2023-10-06 00:17:01 +01:00
Sollace
4717c9e458
Ponies can now lie down by holding crouch and not moving 2023-10-05 20:42:31 +01:00
Sollace
e31ee1c53b
Fixed tiny silly ponies reverting to normal villagers when they grow up 2023-10-05 20:28:29 +01:00
Sollace
509f6477f2
Fixed magic not rendering for items held by other entities 2023-10-05 20:22:09 +01:00
Sollace
3322e7eaff
Fixed model visibility not updating for mobs 2023-10-05 20:21:50 +01:00
Sollace
4904c78e01
Fixed mob placement in boats 2023-10-05 20:05:07 +01:00
Sollace
8dad366317
Fixed mobs' arms sticking too far up when sitting in a boat 2023-10-05 20:04:55 +01:00
Sollace
b1869c824e
Disable shadow position changing 2023-10-05 19:53:14 +01:00
Sollace
72ff58015d
Fixed left ear rotating incorrectly 2023-10-05 19:52:03 +01:00
Sollace
76a2e043b7
Clean up the EquineRendermanager (should fix some crashing issues with null seapony models) 2023-10-05 19:46:40 +01:00
横刀天笑(Knife smile)
f54cd5682d
update zh_cn.json (#253) 2023-09-28 14:40:34 +01:00
Sollace
26aa16d684
Fixed pony skin data not being reliably sent to servers 2023-09-28 14:38:39 +01:00
Sollace
9f280f79eb
Move SkinsProxy to the api package and decouple from the implementations a little better 2023-09-28 14:07:36 +01:00
Sollace
b538174933
Clean up the code a little bit 2023-09-28 13:48:52 +01:00
Sollace
f70ec0996c
Fixed buffer overflow 2023-09-28 13:48:14 +01:00
Sollace
c2337058f6
Update russian translation 2023-09-27 17:41:20 +01:00
Sollace
1c4fa62676
Update translations 2023-09-27 17:38:32 +01:00
Sollace
f5603b05b7
Update dependencies 2023-09-27 17:28:30 +01:00
Sollace
ca728ded81
Allow armor to render with translucency 2023-09-27 12:11:20 +01:00
Sollace
24a8afc508
Change mixed humans skins option to a dual skin mode and add a priority trigger pixel to facilitate skin sorting 2023-09-27 02:00:18 +01:00
Sollace
6013fa2ad5
Add experimental option to skip hd skins when showing players as humans 2023-09-27 01:27:20 +01:00
Sollace
2c6c23d05c
Fix typo 2023-09-27 01:18:26 +01:00
Sollace
0f9e865dc4
Update hdskins 2023-09-26 21:13:16 +01:00
Sollace
15274aba2b
Fixed settings screen background not rendering correctly 2023-09-26 20:22:52 +01:00
Sollace
429cdb644e
Update kirin 2023-09-26 20:22:38 +01:00
Sollace
5cf082d28d
Update settings.gradle 2023-09-26 19:56:27 +01:00
82 changed files with 997 additions and 472 deletions

View file

@ -6,6 +6,7 @@
[![Modrinth](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.modrinth.com%2Fv2%2Fproject%2Fmine-little-pony%2Fversion&query=%24%5B0%5D.version_number&label=modrinth)](https://modrinth.com/mod/mine-little-pony) [![Modrinth](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.modrinth.com%2Fv2%2Fproject%2Fmine-little-pony%2Fversion&query=%24%5B0%5D.version_number&label=modrinth)](https://modrinth.com/mod/mine-little-pony)
[![Discord Server](https://img.shields.io/discord/182490536119107584.svg?color=blueviolet)](https://discord.gg/HbJSFyu) [![Discord Server](https://img.shields.io/discord/182490536119107584.svg?color=blueviolet)](https://discord.gg/HbJSFyu)
![License](https://img.shields.io/github/license/MineLittlePony/MineLittlePony) ![License](https://img.shields.io/github/license/MineLittlePony/MineLittlePony)
[![Crowdin](https://badges.crowdin.net/mine-little-pony/localized.svg)](https://crowdin.com/project/mine-little-pony)
![](https://img.shields.io/badge/api-fabric-orange.svg) ![](https://img.shields.io/badge/api-fabric-orange.svg)
Turns players and mobs into ponies. Turns players and mobs into ponies.

View file

@ -1,15 +1,15 @@
buildscript { buildscript {
dependencies { dependencies {
classpath 'com.github.dexman545:Outlet:1.3.10' classpath 'com.github.dexman545:Outlet:1.6.1'
} }
} }
plugins { plugins {
id 'fabric-loom' version '1.3-SNAPSHOT' id 'fabric-loom' version '1.5-SNAPSHOT'
id 'maven-publish' id 'maven-publish'
id 'com.modrinth.minotaur' version '2.+' 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 { java {
toolchain { toolchain {
@ -86,7 +86,9 @@ processResources {
expand "version": project.version.toString(), expand "version": project.version.toString(),
"minecraftVersion": project.minecraft_version_range, "minecraftVersion": project.minecraft_version_range,
"loaderVersion": ">=${project.loader_version}", "loaderVersion": ">=${project.loader_version}",
"fabricVersion": ">=${project.fabric_version}" "fabricVersion": ">=${project.fabric_version}",
"kirinVersion": ">=${project.kirin_version}",
"msonVersion": ">=${project.mson_version}"
} }
from 'LICENSE' from 'LICENSE'

3
crowdin.yml Normal file
View file

@ -0,0 +1,3 @@
files:
- source: src/main/resources/assets/minelittlepony/lang/en_us.json
translation: /%original_path%/%locale_with_underscore%.%file_extension%

View file

@ -3,10 +3,10 @@ org.gradle.daemon=false
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/develop # check these on https://fabricmc.net/develop
minecraft_version=1.20.2-rc1 minecraft_version=1.20.2
yarn_mappings=1.20.2-rc1+build.2 yarn_mappings=1.20.2+build.4
loader_version=0.14.22 loader_version=0.15.1
fabric_version=0.88.5+1.20.2 fabric_version=0.91.1+1.20.2
# Mod Properties # Mod Properties
group=com.minelittlepony group=com.minelittlepony
@ -20,7 +20,7 @@ org.gradle.daemon=false
modrinth_project_id=JBjInUXM modrinth_project_id=JBjInUXM
# Dependencies # Dependencies
modmenu_version=8.0.0-beta.1 modmenu_version=8.0.0
kirin_version=1.16.0-beta.1+1.20.2 kirin_version=1.16.1+1.20.2
hd_skins_version=6.11.0-beta.3+1.20.2 hd_skins_version=6.12.4+1.20.2
mson_version=1.9.0-beta.1 mson_version=1.9.3+1.20.2

View file

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View file

@ -1,14 +1,8 @@
pluginManagement { pluginManagement {
repositories { repositories {
mavenCentral() mavenCentral()
maven { maven { name 'Fabric'; url 'https://maven.fabricmc.net/' }
name = 'Fabric' maven { name 'Jitpack'; url 'https://jitpack.io' }
url = 'https://maven.fabricmc.net/'
}
maven {
name = 'Jitpack'
url = 'https://jitpack.io'
}
gradlePluginPortal() gradlePluginPortal()
} }
} }

2
skins

@ -1 +1 @@
Subproject commit 8987db558b16657245ab8d0b98be366f46dc157c Subproject commit 45dfe1101b4506077b3d3f2246b08c9b485735eb

View file

@ -54,6 +54,11 @@ public class PonyConfig extends Config {
.addComment("Helps to prevent entities from vanishing when they're in long stacks"); .addComment("Helps to prevent entities from vanishing when they're in long stacks");
public final Setting<Boolean> horsieMode = value("settings", "horsieMode", false) public final Setting<Boolean> horsieMode = value("settings", "horsieMode", false)
.addComment("Enables the alternative horsey models from the April Fools 2023 update"); .addComment("Enables the alternative horsey models from the April Fools 2023 update");
public final Setting<Boolean> mixedHumanSkins = value("settings", "dualSkinMode", false)
.addComment("(Experimental) Use priority to decide between displaying the HDSkins' texture, or vanilla mojang server skin")
.addComment("(Experimental) eg. On pony level = HUMANS")
.addComment("(Experimental) Any time both skins resolve to the same race (eg. on pony-level HUMANS, or if both are ponies)")
.addComment("(Experimental) the skin with the highest priority will be chosen.");;
public final Setting<SizePreset> sizeOverride = value("debug", "sizeOverride", SizePreset.UNSET) public final Setting<SizePreset> sizeOverride = value("debug", "sizeOverride", SizePreset.UNSET)
.addComment("Overrides pony sizes") .addComment("Overrides pony sizes")
@ -69,6 +74,7 @@ public class PonyConfig extends Config {
public final Setting<Boolean> flappyElytras = value("customisation", "flappyElytras", false) public final Setting<Boolean> flappyElytras = value("customisation", "flappyElytras", false)
.addComment("Pegasi will use their wings to fly even when they're wearing an elytra"); .addComment("Pegasi will use their wings to fly even when they're wearing an elytra");
public final Setting<Boolean> noFun = value("customisation", "noFun", false) public final Setting<Boolean> noFun = value("customisation", "noFun", false)
.addComment("Disables certain easter eggs and secrets (party pooper)") .addComment("Disables certain easter eggs and secrets (party pooper)")
.addComment("Turning this off may help with compatibility in some cases"); .addComment("Turning this off may help with compatibility in some cases");

View file

@ -8,28 +8,24 @@ import net.fabricmc.fabric.api.networking.v1.PacketByteBufs;
import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents; import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
import net.fabricmc.loader.api.FabricLoader; import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.client.MinecraftClient;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import com.minelittlepony.api.pony.Pony;
import com.minelittlepony.api.pony.PonyData; import com.minelittlepony.api.pony.PonyData;
@Environment(EnvType.CLIENT) @Environment(EnvType.CLIENT)
public class Channel { public class Channel {
private static final Identifier CLIENT_PONY_DATA = new Identifier("minelittlepony", "pony_data"); private static final Identifier CLIENT_PONY_DATA = new Identifier("minelittlepony", "pony_data");
private static final Identifier REQUEST_PONY_DATA = new Identifier("minelittlepony", "request_pony_data"); private static final Identifier REQUEST_PONY_DATA = new Identifier("minelittlepony", "request_pony_data");
private static final Logger LOGGER = LogManager.getLogger("MineLittlePony:Networking");
private static final Logger LOGGER = LogManager.getLogger("MineLittlePony");
private static boolean registered; private static boolean registered;
public static void bootstrap() { public static void bootstrap() {
ClientLoginConnectionEvents.INIT.register((handler, client) -> { ClientLoginConnectionEvents.INIT.register((handler, client) -> {
registered = false; registered = false;
LOGGER.info("Resetting registered flag");
}); });
ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> { ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> {
LOGGER.info("Sending consent packet to " + handler.getPlayer().getName().getString()); LOGGER.info("Sending consent packet to " + handler.getPlayer().getName().getString());
@ -38,13 +34,8 @@ public class Channel {
}); });
ClientPlayNetworking.registerGlobalReceiver(REQUEST_PONY_DATA, (client, handler, ignored, sender) -> { ClientPlayNetworking.registerGlobalReceiver(REQUEST_PONY_DATA, (client, handler, ignored, sender) -> {
if (client.player != null) {
Pony pony = Pony.getManager().getPony(client.player);
registered = true; registered = true;
LOGGER.info("Server has just consented"); LOGGER.info("Server has just consented");
sender.sendPacket(CLIENT_PONY_DATA, MsgPonyData.write(pony.metadata(), PacketByteBufs.create()));
}
}); });
ServerPlayNetworking.registerGlobalReceiver(CLIENT_PONY_DATA, (server, player, ignore, buffer, ignore2) -> { ServerPlayNetworking.registerGlobalReceiver(CLIENT_PONY_DATA, (server, player, ignore, buffer, ignore2) -> {
PonyData packet = MsgPonyData.read(buffer); PonyData packet = MsgPonyData.read(buffer);
@ -54,20 +45,19 @@ public class Channel {
}); });
} }
public static void broadcastPonyData(PonyData packet) { public static boolean isRegistered() {
return registered;
}
public static boolean broadcastPonyData(PonyData packet) {
if (!isRegistered()) {
return false;
}
if (FabricLoader.getInstance().getEnvironmentType() != EnvType.CLIENT) { if (FabricLoader.getInstance().getEnvironmentType() != EnvType.CLIENT) {
throw new RuntimeException("Client packet send called by the server"); throw new RuntimeException("Client packet send called by the server");
} }
if (!registered) {
if (MinecraftClient.getInstance().isInSingleplayer() || MinecraftClient.getInstance().isIntegratedServerRunning()) {
LOGGER.info("Sending pony skin data over as we are either in single-player or lan");
} else {
LOGGER.info("Skipping network packet as the server has not consented");
return;
}
}
ClientPlayNetworking.send(CLIENT_PONY_DATA, MsgPonyData.write(packet, PacketByteBufs.create())); ClientPlayNetworking.send(CLIENT_PONY_DATA, MsgPonyData.write(packet, PacketByteBufs.create()));
return true;
} }
} }

View file

@ -23,6 +23,7 @@ public class MsgPonyData {
new MsgSize(buffer), new MsgSize(buffer),
buffer.readInt(), buffer.readInt(),
buffer.readBoolean(), buffer.readBoolean(),
buffer.readVarInt(),
Flags.read(Wearable.NONE, buffer) Flags.read(Wearable.NONE, buffer)
); );
} }
@ -34,13 +35,24 @@ public class MsgPonyData {
buffer.writeEnumConstant(data.tailLength()); buffer.writeEnumConstant(data.tailLength());
buffer.writeEnumConstant(data.tailShape()); buffer.writeEnumConstant(data.tailShape());
buffer.writeEnumConstant(data.gender()); buffer.writeEnumConstant(data.gender());
new MsgSize(data.size()).toBuffer(buffer); write(data.size(), buffer);
buffer.writeInt(data.glowColor()); buffer.writeInt(data.glowColor());
buffer.writeBoolean(data.noSkin()); buffer.writeBoolean(data.noSkin());
buffer.writeVarInt(data.priority());
data.gear().write(buffer); data.gear().write(buffer);
return buffer; return buffer;
} }
private static void write(Size size, PacketByteBuf buffer) {
buffer.writeInt(size.ordinal());
buffer.writeString(size.name());
buffer.writeFloat(size.shadowSize());
buffer.writeFloat(size.scaleFactor());
buffer.writeFloat(size.eyeHeightFactor());
buffer.writeFloat(size.eyeDistanceFactor());
buffer.writeFloat(size.colorCode());
}
private record MsgSize ( private record MsgSize (
int ordinal, int ordinal,
String name, String name,
@ -49,23 +61,8 @@ public class MsgPonyData {
float eyeHeightFactor, float eyeHeightFactor,
float eyeDistanceFactor, float eyeDistanceFactor,
int colorCode) implements Size { int colorCode) implements Size {
MsgSize(Size size) {
this(size.ordinal(), size.name(), size.shadowSize(), size.scaleFactor(), size.eyeHeightFactor(), size.eyeDistanceFactor(), size.colorCode());
}
MsgSize(PacketByteBuf buffer) { MsgSize(PacketByteBuf buffer) {
this(buffer.readInt(), buffer.readString(32767), buffer.readFloat(), buffer.readFloat(), buffer.readFloat(), buffer.readFloat(), buffer.readInt()); this(buffer.readInt(), buffer.readString(), buffer.readFloat(), buffer.readFloat(), buffer.readFloat(), buffer.readFloat(), buffer.readInt());
}
public void toBuffer(PacketByteBuf buffer) {
buffer.writeInt(ordinal);
buffer.writeString(name);
buffer.writeFloat(shadowSize);
buffer.writeFloat(scaleFactor);
buffer.writeFloat(eyeHeightFactor);
buffer.writeFloat(eyeDistanceFactor);
buffer.writeFloat(colorCode);
} }
@Override @Override

View file

@ -36,9 +36,15 @@ public final class MobPosingHelper {
if (islookAngleRight(move)) { if (islookAngleRight(move)) {
rotateArmHolding(rightArm, 1, model.getSwingAmount(), ticks); rotateArmHolding(rightArm, 1, model.getSwingAmount(), ticks);
if (model.getAttributes().isSitting) {
rightArm.pitch += 0.6F;
}
PartUtil.shift(rightArm, 0.5F, 1.5F, 3); PartUtil.shift(rightArm, 0.5F, 1.5F, 3);
} else { } else {
rotateArmHolding(leftArm, -1, model.getSwingAmount(), ticks); rotateArmHolding(leftArm, -1, model.getSwingAmount(), ticks);
if (model.getAttributes().isSitting) {
leftArm.pitch += 0.6F;
}
PartUtil.shift(leftArm, -0.5F, 1.5F, 3); PartUtil.shift(leftArm, -0.5F, 1.5F, 3);
} }
} }

View file

@ -2,7 +2,6 @@ package com.minelittlepony.api.model;
import com.minelittlepony.api.config.PonyConfig; import com.minelittlepony.api.config.PonyConfig;
import com.minelittlepony.api.pony.*; import com.minelittlepony.api.pony.*;
import com.minelittlepony.client.*;
import com.minelittlepony.common.util.animation.Interpolator; import com.minelittlepony.common.util.animation.Interpolator;
import com.minelittlepony.util.MathUtil; import com.minelittlepony.util.MathUtil;
@ -10,6 +9,7 @@ import java.util.*;
import net.minecraft.client.render.entity.model.BipedEntityModel.ArmPose; import net.minecraft.client.render.entity.model.BipedEntityModel.ArmPose;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.*; import net.minecraft.util.*;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
@ -152,6 +152,11 @@ public class ModelAttributes {
isSitting = PonyPosture.isSitting(entity); isSitting = PonyPosture.isSitting(entity);
isSleeping = entity.isAlive() && entity.isSleeping();; isSleeping = entity.isAlive() && entity.isSleeping();;
isLyingDown = isSleeping; isLyingDown = isSleeping;
if (entity instanceof PlayerEntity) {
boolean moving = entity.getVelocity().multiply(1, 0, 1).length() == 0 && entity.isSneaking();
isLyingDown |= getMainInterpolator().interpolate("lyingDown", moving ? 10 : 0, 200) >= 9;
}
isCrouching = !isLyingDown && !isSitting && mode == Mode.THIRD_PERSON && PonyPosture.isCrouching(pony, entity); isCrouching = !isLyingDown && !isSitting && mode == Mode.THIRD_PERSON && PonyPosture.isCrouching(pony, entity);
isFlying = !isLyingDown && mode == Mode.THIRD_PERSON && PonyPosture.isFlying(entity); isFlying = !isLyingDown && mode == Mode.THIRD_PERSON && PonyPosture.isFlying(entity);
isGliding = entity.isFallFlying(); isGliding = entity.isFallFlying();

View file

@ -18,14 +18,14 @@ import java.util.function.Consumer;
/** /**
* Container class for the various models and their associated piece of armour. * Container class for the various models and their associated piece of armour.
*/ */
public class ModelWrapper<T extends LivingEntity, M extends PonyModel<?>> { public class Models<T extends LivingEntity, M extends PonyModel<?>> {
@Nullable @Nullable
private final MsonModel.Factory<PonyArmourModel<T>> armorFactory; private final MsonModel.Factory<PonyArmourModel<T>> armorFactory;
private final Map<ModelKey<PonyArmourModel<?>>, PonyArmourModel<T>> armor = new HashMap<>(); private final Map<ModelKey<PonyArmourModel<?>>, PonyArmourModel<T>> armor = new HashMap<>();
private final M body; private final M body;
public ModelWrapper(PlayerModelKey<T, ? super M> playerModelKey, boolean slimArms, @Nullable Consumer<M> initializer) { public Models(PlayerModelKey<T, ? super M> playerModelKey, boolean slimArms, @Nullable Consumer<M> initializer) {
this.armorFactory = playerModelKey.armorFactory(); this.armorFactory = playerModelKey.armorFactory();
this.body = playerModelKey.getKey(slimArms).createModel(); this.body = playerModelKey.getKey(slimArms).createModel();
if (initializer != null) { if (initializer != null) {
@ -33,7 +33,7 @@ public class ModelWrapper<T extends LivingEntity, M extends PonyModel<?>> {
} }
} }
public ModelWrapper(ModelKey<M> key) { public Models(ModelKey<M> key) {
this.armorFactory = null; this.armorFactory = null;
this.body = key.createModel(); this.body = key.createModel();
} }
@ -49,7 +49,7 @@ public class ModelWrapper<T extends LivingEntity, M extends PonyModel<?>> {
})); }));
} }
public ModelWrapper<T, M> applyMetadata(PonyData meta) { public Models<T, M> applyMetadata(PonyData meta) {
body.setMetadata(meta); body.setMetadata(meta);
armor.values().forEach(a -> a.setMetadata(meta)); armor.values().forEach(a -> a.setMetadata(meta));
return this; return this;

View file

@ -2,4 +2,6 @@ package com.minelittlepony.api.model;
public interface PreviewModel { public interface PreviewModel {
boolean forceSeapony(); boolean forceSeapony();
boolean forceNirik();
} }

View file

@ -11,6 +11,9 @@ import java.util.*;
public final class DefaultPonySkinHelper { public final class DefaultPonySkinHelper {
public static final Identifier STEVE = new Identifier("minelittlepony", "textures/entity/player/wide/steve_pony.png"); public static final Identifier STEVE = new Identifier("minelittlepony", "textures/entity/player/wide/steve_pony.png");
public static final Identifier SEAPONY_SKIN_TYPE_ID = new Identifier("minelp", "seapony");
public static final Identifier NIRIK_SKIN_TYPE_ID = new Identifier("minelp", "nirik");
private static final Map<SkinTextures, SkinTextures> SKINS = new HashMap<>(); private static final Map<SkinTextures, SkinTextures> SKINS = new HashMap<>();
public static SkinTextures getTextures(SkinTextures original) { public static SkinTextures getTextures(SkinTextures original) {
@ -27,7 +30,7 @@ public final class DefaultPonySkinHelper {
} }
public static String getModelType(UUID id) { public static String getModelType(UUID id) {
SkinTextures textures = DefaultSkinHelper.getTexture(id); SkinTextures textures = DefaultSkinHelper.getSkinTextures(id);
return getModelType(Pony.getManager().getPony(textures.texture(), id).race(), textures.model()); return getModelType(Pony.getManager().getPony(textures.texture(), id).race(), textures.model());
} }

View file

@ -49,13 +49,25 @@ public record PonyData (
* rather than a user-uploaded one. * rather than a user-uploaded one.
*/ */
boolean noSkin, boolean noSkin,
/**
* (Experimental) Priority.
* Used to decide which skin to use when dual skin mode is active.
* Provides an optional tie-breaker when the client has to decide between displaying
* either the HDSkins texture or vanilla texture given both are otherwise acceptable.
*
* Any time both skins resolve to the same race (eg. on pony-level HUMANS, or if both are ponies)
* the skin with the highest priority will be chosen.
*
* If both have the same priority, HD Skins' texture will always be used (old default).
*/
int priority,
/** /**
* Gets the trigger pixel values as they appeared in the underlying image. * Gets the trigger pixel values as they appeared in the underlying image.
*/ */
Map<String, TValue<?>> attributes Map<String, TValue<?>> attributes
) implements Comparable<PonyData> { ) implements Comparable<PonyData> {
public static final int DEFAULT_MAGIC_COLOR = 0x4444aa; public static final int DEFAULT_MAGIC_COLOR = 0x4444aa;
private static final Function<Race, PonyData> OF_RACE = Util.memoize(race -> new PonyData(race, TailLength.FULL, TailShape.STRAIGHT, Gender.MARE, SizePreset.NORMAL, DEFAULT_MAGIC_COLOR, true, Wearable.EMPTY_FLAGS)); private static final Function<Race, PonyData> OF_RACE = Util.memoize(race -> new PonyData(race, TailLength.FULL, TailShape.STRAIGHT, Gender.MARE, SizePreset.NORMAL, DEFAULT_MAGIC_COLOR, true, 0, Wearable.EMPTY_FLAGS));
public static final PonyData NULL = OF_RACE.apply(Race.HUMAN); public static final PonyData NULL = OF_RACE.apply(Race.HUMAN);
public static PonyData emptyOf(Race race) { public static PonyData emptyOf(Race race) {
@ -71,18 +83,20 @@ public record PonyData (
TriggerPixel.SIZE.read(image), TriggerPixel.SIZE.read(image),
TriggerPixel.GLOW.read(image), TriggerPixel.GLOW.read(image),
noSkin, noSkin,
TriggerPixel.PRIORITY.read(image),
TriggerPixel.WEARABLES.read(image) TriggerPixel.WEARABLES.read(image)
); );
} }
public PonyData(Race race, TailLength tailLength, TailShape tailShape, Gender gender, Size size, int glowColor, boolean noSkin, Flags<Wearable> wearables) { public PonyData(Race race, TailLength tailLength, TailShape tailShape, Gender gender, Size size, int glowColor, boolean noSkin, int priority, Flags<Wearable> wearables) {
this(race, tailLength, tailShape, gender, size, glowColor, wearables, noSkin, Util.make(new TreeMap<>(), map -> { this(race, tailLength, tailShape, gender, size, glowColor, wearables, noSkin, priority, Util.make(new TreeMap<>(), map -> {
map.put("race", race); map.put("race", race);
map.put("tailLength", tailLength); map.put("tailLength", tailLength);
map.put("tailShape", tailShape); map.put("tailShape", tailShape);
map.put("gender", gender); map.put("gender", gender);
map.put("size", size); map.put("size", size);
map.put("magic", new TValue.Numeric(glowColor)); map.put("magic", new TValue.Numeric(glowColor));
map.put("priority", new TValue.Numeric(priority));
map.put("gear", wearables); map.put("gear", wearables);
}) })
); );

View file

@ -2,8 +2,6 @@ package com.minelittlepony.api.pony;
import com.minelittlepony.api.pony.meta.Race; import com.minelittlepony.api.pony.meta.Race;
import com.minelittlepony.api.model.PreviewModel; import com.minelittlepony.api.model.PreviewModel;
import com.minelittlepony.client.SkinsProxy;
import com.minelittlepony.client.render.entity.AquaticPlayerPonyRenderer;
import java.util.Optional; import java.util.Optional;
@ -101,7 +99,26 @@ public final class PonyPosture {
} }
return Pony.getManager().getPony(entity).filter(pony -> { return Pony.getManager().getPony(entity).filter(pony -> {
return (pony.race() == Race.SEAPONY return (pony.race() == Race.SEAPONY
|| (entity instanceof AbstractClientPlayerEntity player && SkinsProxy.instance.getSkin(AquaticPlayerPonyRenderer.SKIN_TYPE_ID, player).isPresent()) || (entity instanceof AbstractClientPlayerEntity player && SkinsProxy.instance.getSkin(DefaultPonySkinHelper.SEAPONY_SKIN_TYPE_ID, player).isPresent())
);
}).isPresent();
}
public static boolean isNirikModifier(LivingEntity entity) {
if (entity instanceof PreviewModel preview) {
return preview.forceNirik();
}
return false;
}
public static boolean hasNirikForm(LivingEntity entity) {
if (entity instanceof PreviewModel preview) {
return preview.forceNirik();
}
return Pony.getManager().getPony(entity).filter(pony -> {
return (pony.race() == Race.KIRIN
&& (entity instanceof AbstractClientPlayerEntity player && SkinsProxy.instance.getSkin(DefaultPonySkinHelper.NIRIK_SKIN_TYPE_ID, player).isPresent())
); );
}).isPresent(); }).isPresent();
} }

View file

@ -1,40 +1,27 @@
package com.minelittlepony.client; package com.minelittlepony.api.pony;
import com.minelittlepony.common.client.gui.ScrollContainer;
import com.minelittlepony.common.client.gui.Tooltip;
import com.minelittlepony.common.client.gui.element.Button;
import com.mojang.authlib.GameProfile; import com.mojang.authlib.GameProfile;
import java.util.Optional; import java.util.Optional;
import java.util.Set; import java.util.Set;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.network.AbstractClientPlayerEntity; import net.minecraft.client.network.AbstractClientPlayerEntity;
import net.minecraft.client.texture.PlayerSkinProvider; import net.minecraft.client.texture.PlayerSkinProvider;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import org.jetbrains.annotations.Nullable; /**
* Proxy handler for getting player skin data from HDSkins
*/
public class SkinsProxy { public class SkinsProxy {
public static SkinsProxy instance = new SkinsProxy(); public static SkinsProxy instance = new SkinsProxy();
@Nullable
public Identifier getSkinTexture(GameProfile profile) { public Identifier getSkinTexture(GameProfile profile) {
PlayerSkinProvider skins = MinecraftClient.getInstance().getSkinProvider(); PlayerSkinProvider skins = MinecraftClient.getInstance().getSkinProvider();
return skins.getSkinTextures(profile).texture(); return skins.getSkinTextures(profile).texture();
} }
public void renderOption(Screen screen, @Nullable Screen parent, int row, int RIGHT, ScrollContainer content) {
content.addButton(new Button(RIGHT, row += 20, 150, 20))
.setEnabled(false)
.getStyle()
.setTooltip(Tooltip.of("minelp.options.skins.hdskins.disabled", 200))
.setText("minelp.options.skins.hdskins.open");
}
public Optional<Identifier> getSkin(Identifier skinTypeId, AbstractClientPlayerEntity player) { public Optional<Identifier> getSkin(Identifier skinTypeId, AbstractClientPlayerEntity player) {
return Optional.empty(); return Optional.empty();
} }

View file

@ -30,14 +30,6 @@ public record Flags<T extends Enum<T> & TValue<T>> (
return new Flags<>(def, values, buffer.readInt()); return new Flags<>(def, values, buffer.readInt());
} }
public static <T> List<T> flags(T[] values, boolean[] flags) {
List<T> wears = new ArrayList<>();
for (int i = 0; i < values.length; i++) {
if (flags[i]) wears.add(values[i]);
}
return wears;
}
public void write(PacketByteBuf buffer) { public void write(PacketByteBuf buffer) {
buffer.writeCollection(values, (buf, value) -> buf.writeInt(value.ordinal())); buffer.writeCollection(values, (buf, value) -> buf.writeInt(value.ordinal()));
buffer.writeInt(colorCode); buffer.writeInt(colorCode);

View file

@ -41,4 +41,9 @@ public interface Size extends TValue<Size> {
* A scale factor used to alter the camera's distance. * A scale factor used to alter the camera's distance.
*/ */
float eyeDistanceFactor(); float eyeDistanceFactor();
/**
* The trigger pixel colour corresponding to this size.
*/
int colorCode();
} }

View file

@ -22,6 +22,7 @@ public interface TriggerPixel<T> {
TriggerPixel<Size> SIZE = ofOptions(3, 0, SizePreset.NORMAL, SizePreset.values()); TriggerPixel<Size> SIZE = ofOptions(3, 0, SizePreset.NORMAL, SizePreset.values());
TriggerPixel<Integer> GLOW = ofColor(0, 1); TriggerPixel<Integer> GLOW = ofColor(0, 1);
TriggerPixel<Flags<Wearable>> WEARABLES = ofFlags(1, 1, Wearable.EMPTY_FLAGS, Wearable.values()); TriggerPixel<Flags<Wearable>> WEARABLES = ofFlags(1, 1, Wearable.EMPTY_FLAGS, Wearable.values());
TriggerPixel<Integer> PRIORITY = ofColor(2, 2);
static <T extends TValue<T>> TriggerPixel<T> ofOptions(int x, int y, T def, T[] options) { static <T extends TValue<T>> TriggerPixel<T> ofOptions(int x, int y, T def, T[] options) {
MAX_COORDS.x = Math.max(MAX_COORDS.x, x); MAX_COORDS.x = Math.max(MAX_COORDS.x, x);
@ -61,8 +62,8 @@ public interface TriggerPixel<T> {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
Set<T> values = EnumSet.noneOf((Class<T>)def.def().getClass()); Set<T> values = EnumSet.noneOf((Class<T>)def.def().getClass());
if (flagReader.readFlag(ColorHelper.Argb.getRed(color), values) if (flagReader.readFlag(ColorHelper.Argb.getRed(color), values)
|| flagReader.readFlag(ColorHelper.Argb.getGreen(color), values) | flagReader.readFlag(ColorHelper.Argb.getGreen(color), values)
|| flagReader.readFlag(ColorHelper.Argb.getBlue(color), values)) { | flagReader.readFlag(ColorHelper.Argb.getBlue(color), values)) {
return new Flags<>(def.def(), values, color & 0x00FFFFFF); return new Flags<>(def.def(), values, color & 0x00FFFFFF);
} }
return def; return def;

View file

@ -106,7 +106,7 @@ public class MineLittlePony implements ClientModInitializer {
} }
if ((mainMenu || inGame) && keyBinding.isPressed()) { if ((mainMenu || inGame) && keyBinding.isPressed()) {
client.setScreen(new PonySettingsscreen(client.currentScreen)); client.setScreen(new PonySettingsScreen(client.currentScreen));
} }
} }
@ -120,7 +120,7 @@ public class MineLittlePony implements ClientModInitializer {
if (show) { if (show) {
int y = hasHdSkins ? 75 : 50; int y = hasHdSkins ? 75 : 50;
Button button = buttons.addButton(new Button(screen.width - 50, screen.height - y, 20, 20)) Button button = buttons.addButton(new Button(screen.width - 50, screen.height - y, 20, 20))
.onClick(sender -> MinecraftClient.getInstance().setScreen(new PonySettingsscreen(screen))); .onClick(sender -> MinecraftClient.getInstance().setScreen(new PonySettingsScreen(screen)));
button.getStyle() button.getStyle()
.setIcon(new TextureSprite() .setIcon(new TextureSprite()
.setPosition(2, 2) .setPosition(2, 2)

View file

@ -79,16 +79,16 @@ public class PonyManagerImpl implements PonyManager, SimpleSynchronousResourceRe
@Override @Override
public Pony getBackgroundPony(@Nullable UUID uuid) { public Pony getBackgroundPony(@Nullable UUID uuid) {
if (config.ponyLevel.get() == PonyLevel.PONIES) { if (config.ponyLevel.get() == PonyLevel.PONIES) {
return loadPony(MineLittlePony.getInstance().getVariatedTextures().get(VariatedTextureSupplier.BACKGROUND_PONIES_POOL, uuid).orElse(DefaultSkinHelper.getTexture(uuid).texture()), true); return loadPony(MineLittlePony.getInstance().getVariatedTextures().get(VariatedTextureSupplier.BACKGROUND_PONIES_POOL, uuid).orElse(DefaultSkinHelper.getSkinTextures(uuid).texture()), true);
} }
return loadPony(DefaultSkinHelper.getTexture(uuid).texture(), true); return loadPony(DefaultSkinHelper.getSkinTextures(uuid).texture(), true);
} }
@Nullable @Nullable
private Identifier getSkin(LivingEntity entity) { private Identifier getSkin(LivingEntity entity) {
if (entity instanceof PlayerEntity player) { if (entity instanceof PlayerEntity player) {
if (player.getGameProfile() != null && player instanceof AbstractClientPlayerEntity clientPlayer) { if (player.getGameProfile() != null && player instanceof AbstractClientPlayerEntity clientPlayer) {
return clientPlayer.method_52814().texture(); return clientPlayer.getSkinTextures().texture();
} }
} else { } else {
if (MineLittlePony.getInstance().getRenderDispatcher().getPonyRenderer(entity) != null) { if (MineLittlePony.getInstance().getRenderDispatcher().getPonyRenderer(entity) != null) {

View file

@ -24,7 +24,7 @@ import org.jetbrains.annotations.Nullable;
* In-Game options menu. * In-Game options menu.
* *
*/ */
public class PonySettingsscreen extends GameGui { public class PonySettingsScreen extends GameGui {
private static final String OPTIONS_PREFIX = "minelp.options."; private static final String OPTIONS_PREFIX = "minelp.options.";
private static final String PONY_LEVEL = OPTIONS_PREFIX + "ponylevel"; private static final String PONY_LEVEL = OPTIONS_PREFIX + "ponylevel";
private static final String MOB_PREFIX = "minelp.mobs."; private static final String MOB_PREFIX = "minelp.mobs.";
@ -35,13 +35,21 @@ public class PonySettingsscreen extends GameGui {
public static final Text SCALE_SHOW = Text.translatable("minelp.debug.scale.sa"); public static final Text SCALE_SHOW = Text.translatable("minelp.debug.scale.sa");
public static final Text SCALE_MIN = Text.translatable("minelp.debug.scale.min"); public static final Text SCALE_MIN = Text.translatable("minelp.debug.scale.min");
public static HorseButtonFactory buttonFactory = (screen, parent, row, RIGHT, content) -> {
content.addButton(new Button(RIGHT, row += 20, 150, 20))
.setEnabled(false)
.getStyle()
.setTooltip(Tooltip.of("minelp.options.skins.hdskins.disabled", 200))
.setText("minelp.options.skins.hdskins.open");
};
private final PonyConfig config = PonyConfig.getInstance(); private final PonyConfig config = PonyConfig.getInstance();
private final ScrollContainer content = new ScrollContainer(); private final ScrollContainer content = new ScrollContainer();
private final boolean hiddenOptions; private final boolean hiddenOptions;
public PonySettingsscreen(@Nullable Screen parent) { public PonySettingsScreen(@Nullable Screen parent) {
super(Text.literal(OPTIONS_PREFIX + "title"), parent); super(Text.literal(OPTIONS_PREFIX + "title"), parent);
content.margin.top = 30; content.margin.top = 30;
content.margin.bottom = 30; content.margin.bottom = 30;
@ -156,7 +164,7 @@ public class PonySettingsscreen extends GameGui {
row += 15; row += 15;
content.addButton(new Label(RIGHT, row)).getStyle().setText("minelp.options.skins"); content.addButton(new Label(RIGHT, row)).getStyle().setText("minelp.options.skins");
SkinsProxy.instance.renderOption(this, parent, row, RIGHT, content); buttonFactory.renderOption(this, parent, row, RIGHT, content);
} }
public Text describeCurrentScale(AbstractSlider<Float> sender) { public Text describeCurrentScale(AbstractSlider<Float> sender) {
@ -186,7 +194,6 @@ public class PonySettingsscreen extends GameGui {
@Override @Override
public void render(DrawContext context, int mouseX, int mouseY, float tickDelta) { public void render(DrawContext context, int mouseX, int mouseY, float tickDelta) {
renderBackground(context, mouseX, mouseY, tickDelta);
super.render(context, mouseX, mouseY, tickDelta); super.render(context, mouseX, mouseY, tickDelta);
content.render(context, mouseX, mouseY, tickDelta); content.render(context, mouseX, mouseY, tickDelta);
} }
@ -195,4 +202,8 @@ public class PonySettingsscreen extends GameGui {
public void removed() { public void removed() {
config.save(); config.save();
} }
public interface HorseButtonFactory {
void renderOption(Screen screen, @Nullable Screen parent, int row, int RIGHT, ScrollContainer content);
}
} }

View file

@ -4,7 +4,6 @@ import net.minecraft.client.world.ClientWorld;
import com.minelittlepony.api.model.PreviewModel; import com.minelittlepony.api.model.PreviewModel;
import com.minelittlepony.api.pony.*; import com.minelittlepony.api.pony.*;
import com.minelittlepony.client.render.EquineRenderManager;
import com.minelittlepony.hdskins.client.gui.player.*; import com.minelittlepony.hdskins.client.gui.player.*;
import com.minelittlepony.hdskins.client.gui.player.skins.PlayerSkins; import com.minelittlepony.hdskins.client.gui.player.skins.PlayerSkins;
@ -13,20 +12,20 @@ import java.util.UUID;
/** /**
* Dummy model used for the skin uploading screen. * Dummy model used for the skin uploading screen.
*/ */
class DummyPony extends DummyPlayer implements PreviewModel, PonyManager.ForcedPony, EquineRenderManager.RegistrationHandler { class DummyPony extends DummyPlayer implements PreviewModel, PonyManager.ForcedPony {
public DummyPony(ClientWorld world, PlayerSkins<?> textures) { public DummyPony(ClientWorld world, PlayerSkins<?> textures) {
super(world, textures); super(world, textures);
setUuid(UUID.randomUUID()); // uuid must be random so animations aren't linked between the two previews setUuid(UUID.randomUUID()); // uuid must be random so animations aren't linked between the two previews
} }
@Override
public boolean shouldUpdateRegistration(Pony pony) {
return false;
}
@Override @Override
public boolean forceSeapony() { public boolean forceSeapony() {
return getTextures().getPosture().getActiveSkinType() == MineLPHDSkins.seaponySkinType; return getTextures().getPosture().getActiveSkinType() == MineLPHDSkins.seaponySkinType;
} }
@Override
public boolean forceNirik() {
return getTextures().getPosture().getActiveSkinType() == MineLPHDSkins.nirikSkinType;
}
} }

View file

@ -1,6 +1,6 @@
package com.minelittlepony.client.compat.hdskins; package com.minelittlepony.client.compat.hdskins;
import com.minelittlepony.client.PonySettingsscreen; import com.minelittlepony.client.PonySettingsScreen;
import com.minelittlepony.client.MineLittlePony; import com.minelittlepony.client.MineLittlePony;
import com.minelittlepony.common.client.gui.dimension.Bounds; import com.minelittlepony.common.client.gui.dimension.Bounds;
import com.minelittlepony.common.client.gui.element.Button; import com.minelittlepony.common.client.gui.element.Button;
@ -41,9 +41,9 @@ class GuiSkinsMineLP extends GuiSkins {
@Override @Override
protected void initServerPreviewButtons(Bounds area) { protected void initServerPreviewButtons(Bounds area) {
if (!(parent instanceof PonySettingsscreen)) { if (!(parent instanceof PonySettingsScreen)) {
addButton(new Button(area.right() - 20, area.bottom() + 5, 20, 20)) addButton(new Button(area.right() - 20, area.bottom() + 5, 20, 20))
.onClick(sender -> client.setScreen(new PonySettingsscreen(this))) .onClick(sender -> client.setScreen(new PonySettingsScreen(this)))
.getStyle() .getStyle()
.setIcon(new TextureSprite() .setIcon(new TextureSprite()
.setPosition(2, 2) .setPosition(2, 2)

View file

@ -1,7 +1,8 @@
package com.minelittlepony.client.compat.hdskins; package com.minelittlepony.client.compat.hdskins;
import com.minelittlepony.api.pony.Pony; import com.minelittlepony.api.config.PonyConfig;
import com.minelittlepony.api.pony.PonyData; import com.minelittlepony.api.config.PonyLevel;
import com.minelittlepony.api.pony.*;
import com.minelittlepony.api.pony.meta.Wearable; import com.minelittlepony.api.pony.meta.Wearable;
import com.minelittlepony.common.client.gui.ScrollContainer; import com.minelittlepony.common.client.gui.ScrollContainer;
import com.minelittlepony.common.client.gui.element.Button; import com.minelittlepony.common.client.gui.element.Button;
@ -10,6 +11,7 @@ import com.minelittlepony.hdskins.client.*;
import com.minelittlepony.hdskins.client.gui.GuiSkins; import com.minelittlepony.hdskins.client.gui.GuiSkins;
import com.minelittlepony.hdskins.client.gui.player.DummyPlayer; import com.minelittlepony.hdskins.client.gui.player.DummyPlayer;
import com.minelittlepony.hdskins.client.gui.player.skins.PlayerSkins.PlayerSkin; 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.minelittlepony.hdskins.profile.SkinType;
import com.mojang.authlib.GameProfile; import com.mojang.authlib.GameProfile;
@ -27,7 +29,6 @@ import net.minecraft.item.Items;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import com.minelittlepony.client.*; import com.minelittlepony.client.*;
import com.minelittlepony.client.render.entity.AquaticPlayerPonyRenderer;
/** /**
* All the interactions with HD Skins. * All the interactions with HD Skins.
@ -35,14 +36,17 @@ import com.minelittlepony.client.render.entity.AquaticPlayerPonyRenderer;
public class MineLPHDSkins extends SkinsProxy implements ClientModInitializer { public class MineLPHDSkins extends SkinsProxy implements ClientModInitializer {
static SkinType seaponySkinType; static SkinType seaponySkinType;
static SkinType nirikSkinType;
static final Map<SkinType, Wearable> wearableTypes = new HashMap<>(); static final Map<SkinType, Wearable> wearableTypes = new HashMap<>();
@Override @Override
public void onInitializeClient() { public void onInitializeClient() {
SkinsProxy.instance = this; SkinsProxy.instance = this;
PonySettingsScreen.buttonFactory = this::renderOption;
seaponySkinType = SkinType.register(AquaticPlayerPonyRenderer.SKIN_TYPE_ID, Items.COD_BUCKET.getDefaultStack()); seaponySkinType = SkinType.register(DefaultPonySkinHelper.SEAPONY_SKIN_TYPE_ID, Items.COD_BUCKET.getDefaultStack());
nirikSkinType = SkinType.register(DefaultPonySkinHelper.NIRIK_SKIN_TYPE_ID, Items.LAVA_BUCKET.getDefaultStack());
Wearable.REGISTRY.values().forEach(wearable -> { Wearable.REGISTRY.values().forEach(wearable -> {
if (wearable != Wearable.NONE) { if (wearable != Wearable.NONE) {
wearableTypes.put(SkinType.register(wearable.getId(), Items.BUNDLE.getDefaultStack()), wearable); wearableTypes.put(SkinType.register(wearable.getId(), Items.BUNDLE.getDefaultStack()), wearable);
@ -56,10 +60,29 @@ public class MineLPHDSkins extends SkinsProxy implements ClientModInitializer {
// Ponify the skins GUI. // Ponify the skins GUI.
GuiSkins.setSkinsGui(GuiSkinsMineLP::new); GuiSkins.setSkinsGui(GuiSkinsMineLP::new);
}); });
HDSkins.getInstance().getSkinPrioritySorter().addSelector((skinType, playerSkins) -> {
if (skinType == SkinType.SKIN && PonyConfig.getInstance().mixedHumanSkins.get()) {
Optional<Pony> hdPony = getPony(playerSkins.hd());
Optional<Pony> vanillaPony = getPony(playerSkins.vanilla());
if (hdPony.isPresent() && vanillaPony.isPresent()
&& vanillaPony.get().metadata().priority() > hdPony.get().metadata().priority()
&& (PonyConfig.getInstance().ponyLevel.get() == PonyLevel.HUMANS || vanillaPony.get().metadata().race().isHuman() == hdPony.get().metadata().race().isHuman())) {
return playerSkins.vanilla();
}
}
return playerSkins.combined();
});
} }
@Override static Optional<Pony> getPony(PlayerSkinLayers.Layer layer) {
public void renderOption(Screen screen, @Nullable Screen parent, int row, int RIGHT, ScrollContainer content) { return layer
.getSkin(SkinType.SKIN)
.map(Pony.getManager()::getPony);
}
private void renderOption(Screen screen, @Nullable Screen parent, int row, int RIGHT, ScrollContainer content) {
content.addButton(new Button(RIGHT, row += 20, 150, 20)) content.addButton(new Button(RIGHT, row += 20, 150, 20))
.onClick(button -> MinecraftClient.getInstance().setScreen( .onClick(button -> MinecraftClient.getInstance().setScreen(
parent instanceof GuiSkins ? parent : GuiSkins.create(screen, HDSkins.getInstance().getSkinServerList()) parent instanceof GuiSkins ? parent : GuiSkins.create(screen, HDSkins.getInstance().getSkinServerList())
@ -80,10 +103,11 @@ public class MineLPHDSkins extends SkinsProxy implements ClientModInitializer {
} }
if (entity instanceof AbstractClientPlayerEntity player) { if (entity instanceof AbstractClientPlayerEntity player) {
PlayerSkins skins = PlayerSkins.of(player); return PlayerSkins.of(player)
if (skins != null) { .map(PlayerSkins::layers)
return skins.getProvidedSkinTypes(); .map(PlayerSkinLayers::combined)
} .map(PlayerSkinLayers.Layer::getProvidedSkinTypes)
.orElseGet(Set::of);
} }
return Set.of(); return Set.of();
@ -110,13 +134,16 @@ public class MineLPHDSkins extends SkinsProxy implements ClientModInitializer {
} }
} }
return Optional.of(player).map(PlayerSkins::of).map(skins -> skins.getSkin(type)); return Optional.of(player).flatMap(PlayerSkins::of)
.map(PlayerSkins::layers)
.map(PlayerSkinLayers::combined).flatMap(skins -> skins.getSkin(type));
} }
@Override @Override
public Identifier getSkinTexture(GameProfile profile) { public Identifier getSkinTexture(GameProfile profile) {
return HDSkins.getInstance().getProfileRepository() return HDSkins.getInstance().getProfileRepository()
.getNow(profile) .load(profile)
.getNow(ProvidedSkins.EMPTY)
.getSkin(SkinType.SKIN) .getSkin(SkinType.SKIN)
.orElseGet(() -> super.getSkinTexture(profile)); .orElseGet(() -> super.getSkinTexture(profile));
} }

View file

@ -31,6 +31,9 @@ class PonifiedDualCarouselWidget extends DualCarouselWidget {
if (type == MineLPHDSkins.seaponySkinType) { if (type == MineLPHDSkins.seaponySkinType) {
return NativeImageFilters.GREYSCALE.load(SeaponyRenderer.SEAPONY, SeaponyRenderer.SEAPONY, getExclusion()); return NativeImageFilters.GREYSCALE.load(SeaponyRenderer.SEAPONY, SeaponyRenderer.SEAPONY, getExclusion());
} }
if (type == MineLPHDSkins.nirikSkinType) {
return super.getDefaultSkin(SkinType.SKIN, modelVariant);
}
Wearable wearable = MineLPHDSkins.wearableTypes.getOrDefault(type, Wearable.NONE); Wearable wearable = MineLPHDSkins.wearableTypes.getOrDefault(type, Wearable.NONE);

View file

@ -3,11 +3,11 @@ package com.minelittlepony.client.compat.modmenu;
import com.terraformersmc.modmenu.api.ConfigScreenFactory; import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi; import com.terraformersmc.modmenu.api.ModMenuApi;
import com.minelittlepony.client.PonySettingsscreen; import com.minelittlepony.client.PonySettingsScreen;
public class MineLPModMenuFactory implements ModMenuApi { public class MineLPModMenuFactory implements ModMenuApi {
@Override @Override
public ConfigScreenFactory<?> getModConfigScreenFactory() { public ConfigScreenFactory<?> getModConfigScreenFactory() {
return PonySettingsscreen::new; return PonySettingsScreen::new;
} }
} }

View file

@ -9,7 +9,6 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityDimensions; import net.minecraft.entity.EntityDimensions;
import net.minecraft.entity.EntityPose; import net.minecraft.entity.EntityPose;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
@ -20,8 +19,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity implements EquineRenderManager.RegistrationHandler { abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity implements EquineRenderManager.RegistrationHandler {
public MixinClientPlayerEntity() { super(null, null); } public MixinClientPlayerEntity() { super(null, null); }
@Nullable private final EquineRenderManager.SyncedPony syncedPony = new EquineRenderManager.SyncedPony();
private Pony pony;
@Inject(method = "startRiding(Lnet/minecraft/entity/Entity;Z)Z", at = @At("RETURN")) @Inject(method = "startRiding(Lnet/minecraft/entity/Entity;Z)Z", at = @At("RETURN"))
private void onStartRiding(Entity entity, boolean bl, CallbackInfoReturnable<Boolean> info) { private void onStartRiding(Entity entity, boolean bl, CallbackInfoReturnable<Boolean> info) {
@ -34,12 +32,8 @@ abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity implem
} }
@Override @Override
public boolean shouldUpdateRegistration(Pony pony) { public EquineRenderManager.SyncedPony getSyncedPony() {
if (this.pony != pony && (this.pony == null || this.pony.metadata().compareTo(pony.metadata()) != 0)) { return syncedPony;
this.pony = pony.immutableCopy();
return true;
}
return false;
} }
@Override @Override

View file

@ -26,7 +26,7 @@ abstract class MixinDefaultSkinHelper {
} }
} }
@Inject(method = "getTexture(Ljava/util/UUID;)Lnet/minecraft/client/util/SkinTextures;", @Inject(method = "getSkinTextures(Ljava/util/UUID;)Lnet/minecraft/client/util/SkinTextures;",
at = @At("RETURN"), at = @At("RETURN"),
cancellable = true) cancellable = true)
private static void onGetTexture(UUID uuid, CallbackInfoReturnable<SkinTextures> cir) { private static void onGetTexture(UUID uuid, CallbackInfoReturnable<SkinTextures> cir) {

View file

@ -366,6 +366,7 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
case NECK: return neck; case NECK: return neck;
case TAIL: case TAIL:
case LEGS: case LEGS:
case BACK:
case BODY: return body; case BODY: return body;
} }
} }
@ -622,8 +623,11 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
stack.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(180)); stack.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(180));
} }
boolean crouching = attributes.isCrouching;
if (attributes.isLyingDown && !attributes.isSleeping) { if (attributes.isLyingDown && !attributes.isSleeping) {
stack.translate(0, 1.35F, 0); stack.translate(0, 1.35F, 0);
attributes.isCrouching = sneaking;
} }
if (attributes.isHorsey) { if (attributes.isHorsey) {
@ -637,5 +641,7 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
} }
PonyTransformation.forSize(getSize()).transform(this, part, stack); PonyTransformation.forSize(getSize()).transform(this, part, stack);
attributes.isCrouching = crouching;
} }
} }

View file

@ -51,7 +51,7 @@ public abstract class ClientPonyModel<T extends LivingEntity> extends MsonPlayer
child = entity.isBaby(); child = entity.isBaby();
attributes.updateLivingState(entity, pony, mode); attributes.updateLivingState(entity, pony, mode);
PonyModelPrepareCallback.EVENT.invoker().onPonyModelPrepared(entity, this, mode); PonyModelPrepareCallback.EVENT.invoker().onPonyModelPrepared(entity, this, mode);
sneaking = attributes.isCrouching; sneaking = attributes.isCrouching && !attributes.isLyingDown;
riding = attributes.isSitting; riding = attributes.isSitting;
} }

View file

@ -7,7 +7,7 @@ import net.minecraft.util.Identifier;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import com.minelittlepony.api.model.ModelWrapper; import com.minelittlepony.api.model.Models;
import com.minelittlepony.api.model.PonyModel; import com.minelittlepony.api.model.PonyModel;
import com.minelittlepony.client.model.armour.PonyArmourModel; import com.minelittlepony.client.model.armour.PonyArmourModel;
import com.minelittlepony.mson.api.*; import com.minelittlepony.mson.api.*;
@ -31,12 +31,12 @@ public record PlayerModelKey<T extends LivingEntity, M extends Model & PonyModel
return slimArms ? alexKey : steveKey; return slimArms ? alexKey : steveKey;
} }
public <E extends T, N extends M> ModelWrapper<E, N> create(boolean slimArms) { public <E extends T, N extends M> Models<E, N> create(boolean slimArms) {
return create(slimArms, null); return create(slimArms, null);
} }
@SuppressWarnings({"rawtypes", "unchecked"}) @SuppressWarnings({"rawtypes", "unchecked"})
public <E extends T, N extends M> ModelWrapper<E, N> create(boolean slimArms, @Nullable Consumer<N> initializer) { public <E extends T, N extends M> Models<E, N> create(boolean slimArms, @Nullable Consumer<N> initializer) {
return new ModelWrapper(this, slimArms, initializer); return new Models(this, slimArms, initializer);
} }
} }

View file

@ -23,10 +23,9 @@ public class DeerAntlers extends WearableGear {
dayChecked = true; dayChecked = true;
Calendar cal = Calendar.getInstance(); Calendar cal = Calendar.getInstance();
dayResult = cal.get(Calendar.MONTH) == Calendar.DECEMBER 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; return dayResult;
} }

View file

@ -6,6 +6,7 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import com.minelittlepony.api.model.SubModel; import com.minelittlepony.api.model.SubModel;
import com.minelittlepony.api.pony.meta.Race;
import com.minelittlepony.api.model.ModelAttributes; import com.minelittlepony.api.model.ModelAttributes;
import com.minelittlepony.mson.api.*; import com.minelittlepony.mson.api.*;
import com.minelittlepony.mson.api.model.PartBuilder; import com.minelittlepony.mson.api.model.PartBuilder;
@ -29,6 +30,12 @@ public class PonyEars implements SubModel, MsonModel {
@Override @Override
public void setPartAngles(ModelAttributes attributes, float limbAngle, float limbSpeed, float bodySwing, float animationProgress) { public void setPartAngles(ModelAttributes attributes, float limbAngle, float limbSpeed, float bodySwing, float animationProgress) {
right.resetTransform(); right.resetTransform();
left.resetTransform();
if (attributes.metadata.race() == Race.CHANGEDLING
|| attributes.metadata.race() == Race.CHANGELING) {
return;
}
limbSpeed = MathHelper.clamp(limbSpeed, 0, 1); limbSpeed = MathHelper.clamp(limbSpeed, 0, 1);

View file

@ -0,0 +1,33 @@
package com.minelittlepony.client.render;
import net.minecraft.client.render.*;
import net.minecraft.client.render.RenderLayer.MultiPhaseParameters;
import net.minecraft.util.Identifier;
import net.minecraft.util.Util;
import java.util.function.BiFunction;
public class ArmorRenderLayers extends RenderPhase {
private ArmorRenderLayers() {
super(null, null, null);
}
private static final BiFunction<Identifier, Boolean, RenderLayer> ARMOR_TRANSLUCENT_NO_CULL = Util.memoize((texture, decal) -> {
return RenderLayer.of(decal ? "armor_decal_translucent_no_cull" : "armor_translucent_no_cull",
VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, VertexFormat.DrawMode.QUADS, 256, true, false, MultiPhaseParameters.builder()
.program(ARMOR_CUTOUT_NO_CULL_PROGRAM)
.texture(new RenderPhase.Texture(texture, false, false))
.transparency(TRANSLUCENT_TRANSPARENCY)
.cull(DISABLE_CULLING)
.lightmap(ENABLE_LIGHTMAP)
.overlay(ENABLE_OVERLAY_COLOR)
.layering(VIEW_OFFSET_Z_LAYERING)
.depthTest(decal ? EQUAL_DEPTH_TEST : LEQUAL_DEPTH_TEST)
.build(true)
);
});
public static RenderLayer getArmorTranslucentNoCull(Identifier texture, boolean decal) {
return ARMOR_TRANSLUCENT_NO_CULL.apply(texture, decal);
}
}

View file

@ -12,6 +12,7 @@ import com.minelittlepony.util.MathUtil;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import java.util.Objects; import java.util.Objects;
import java.util.function.Function;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
@ -22,42 +23,42 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import org.jetbrains.annotations.Nullable;
public class EquineRenderManager<T extends LivingEntity, M extends EntityModel<T> & PonyModel<T>> { public class EquineRenderManager<T extends LivingEntity, M extends EntityModel<T> & PonyModel<T>> {
private ModelWrapper<T, M> playerModel; private Models<T, M> models;
@Nullable
private Function<T, Models<T, M>> modelsLookup;
private final PonyRenderContext<T, M> renderer; private final PonyRenderContext<T, M> context;
private final Transformer<T> transformer;
private final FrustrumCheck<T> frustrum = new FrustrumCheck<>(this); private final FrustrumCheck<T> frustrum;
public static void disableModelRenderProfile() { public static void disableModelRenderProfile() {
RenderSystem.disableBlend(); RenderSystem.disableBlend();
} }
public EquineRenderManager(PonyRenderContext<T, M> renderer) { public EquineRenderManager(PonyRenderContext<T, M> context, Transformer<T> transformer, Models<T, M> models) {
this.renderer = renderer; this.context = context;
} this.transformer = transformer;
this.models = models;
public PonyRenderContext<T, M> getContext() { frustrum = new FrustrumCheck<>(context);
return renderer; context.setModel(models.body());
}
public ModelWrapper<T, M> getModelWrapper() {
return playerModel;
}
public M getModel() {
return playerModel.body();
} }
@SuppressWarnings({"rawtypes", "unchecked"}) @SuppressWarnings({"rawtypes", "unchecked"})
public ModelWrapper<T, M> setModel(ModelKey<? super M> key) { public EquineRenderManager(PonyRenderContext<T, M> context, Transformer<T> transformer, ModelKey<? super M> key) {
return setModel(new ModelWrapper(key)); this(context, transformer, new Models(key));
} }
public ModelWrapper<T, M> setModel(ModelWrapper<T, M> wrapper) { public void setModelsLookup(@Nullable Function<T, Models<T, M>> modelsLookup) {
playerModel = wrapper; this.modelsLookup = modelsLookup;
return wrapper; }
public Models<T, M> getModels() {
return models;
} }
public Frustum getFrustrum(T entity, Frustum vanilla) { public Frustum getFrustrum(T entity, Frustum vanilla) {
@ -71,7 +72,61 @@ public class EquineRenderManager<T extends LivingEntity, M extends EntityModel<T
return frustrum.withCamera(entity, vanilla); return frustrum.withCamera(entity, vanilla);
} }
public float getRenderYaw(T entity, float rotationYaw, float partialTicks) { public void preRender(T entity, ModelAttributes.Mode mode) {
Pony pony = context.getEntityPony(entity);
if (modelsLookup != null) {
models = modelsLookup.apply(entity);
context.setModel(models.body());
}
models.applyMetadata(pony.metadata());
models.body().updateLivingState(entity, pony, mode);
if (entity instanceof PlayerEntity player && entity instanceof RegistrationHandler handler) {
handler.getSyncedPony().synchronize(player, pony);
}
}
public void setupTransforms(T entity, MatrixStack stack, float ageInTicks, float rotationYaw, float tickDelta) {
float s = getScaleFactor();
stack.scale(s, s, s);
if (entity.hasVehicle() && entity.getVehicle() instanceof LivingEntity livingVehicles) {
PonyRenderContext<LivingEntity, ?> renderer = MineLittlePony.getInstance().getRenderDispatcher().getPonyRenderer(livingVehicles);
if (renderer != null) {
// negate vanilla translations so the rider begins at the ridees feet.
stack.translate(0, -livingVehicles.getHeight(), 0);
Pony pony = context.getEntityPony(entity);
if (!pony.race().isHuman()) {
renderer.getInternalRenderer().translateRider(livingVehicles, renderer.getEntityPony(livingVehicles), entity, pony, stack, tickDelta);
}
}
}
if (entity instanceof PlayerEntity) {
if (getModels().body().getAttributes().isSitting) {
stack.translate(0, 0.125D, 0);
}
}
rotationYaw = getMountedYaw(entity, rotationYaw, tickDelta);
transformer.setupTransforms(entity, stack, ageInTicks, rotationYaw, tickDelta);
PonyPosture.of(getModels().body().getAttributes()).apply(entity, getModels().body(), stack, rotationYaw, tickDelta, 1);
}
private void translateRider(T entity, Pony pony, LivingEntity passenger, Pony passengerPony, MatrixStack stack, float tickDelta) {
if (!passengerPony.race().isHuman()) {
float yaw = MathUtil.interpolateDegress((float)entity.prevY, (float)entity.getY(), tickDelta);
models.applyMetadata(pony.metadata());
models.body().transform(BodyPart.BACK, stack);
PonyPosture.of(models.body().getAttributes()).apply(entity, getModels().body(), stack, yaw, tickDelta, -1);
}
}
private float getMountedYaw(T entity, float rotationYaw, float partialTicks) {
if (entity.hasVehicle()) { if (entity.hasVehicle()) {
Entity mount = entity.getVehicle(); Entity mount = entity.getVehicle();
if (mount instanceof LivingEntity) { if (mount instanceof LivingEntity) {
@ -82,76 +137,20 @@ public class EquineRenderManager<T extends LivingEntity, M extends EntityModel<T
return rotationYaw; return rotationYaw;
} }
public void preRenderCallback(T entity, MatrixStack stack, float ticks) {
updateModel(entity, ModelAttributes.Mode.THIRD_PERSON);
float s = getScaleFactor();
stack.scale(s, s, s);
translateRider(entity, stack, ticks);
}
private void translateRider(T entity, MatrixStack stack, float ticks) {
if (entity.hasVehicle() && entity.getVehicle() instanceof LivingEntity) {
LivingEntity ridingEntity = (LivingEntity) entity.getVehicle();
PonyRenderContext<LivingEntity, ?> renderer = MineLittlePony.getInstance().getRenderDispatcher().getPonyRenderer(ridingEntity);
if (renderer != null) {
// negate vanilla translations so the rider begins at the ridees feet.
stack.translate(0, -ridingEntity.getHeight(), 0);
Pony riderPony = renderer.getEntityPony(ridingEntity);
renderer.translateRider(ridingEntity, riderPony, entity, renderer.getEntityPony(entity), stack, ticks);
}
}
}
public void setupTransforms(T entity, MatrixStack stack, float yaw, float tickDelta) {
PonyPosture.of(getModel().getAttributes()).apply(entity, getModel(), stack, yaw, tickDelta, 1);
}
public void applyPostureRiding(T entity, MatrixStack stack, float yaw, float tickDelta) {
PonyPosture.of(getModel().getAttributes()).apply(entity, getModel(), stack, yaw, tickDelta, -1);
}
public Pony updateModel(T entity, ModelAttributes.Mode mode) {
Pony pony = renderer.getEntityPony(entity);
playerModel.applyMetadata(pony.metadata());
if (pony.hasMetadata() && entity instanceof RegistrationHandler && ((RegistrationHandler)entity).shouldUpdateRegistration(pony)) {
entity.calculateDimensions();
PlayerEntity clientPlayer = MinecraftClient.getInstance().player;
if (clientPlayer != null) {
if (Objects.equals(entity, clientPlayer) || Objects.equals(((PlayerEntity)entity).getGameProfile(), clientPlayer.getGameProfile())) {
Channel.broadcastPonyData(pony.metadata());
}
}
PonyDataCallback.EVENT.invoker().onPonyDataAvailable((PlayerEntity)entity, pony.metadata(), EnvType.CLIENT);
}
getModel().updateLivingState(entity, pony, mode);
return pony;
}
public float getScaleFactor() { public float getScaleFactor() {
return getModel().getSize().scaleFactor(); return getModels().body().getSize().scaleFactor();
} }
public float getShadowSize() { public float getShadowSize() {
return getModel().getSize().shadowSize(); return getModels().body().getSize().shadowSize();
} }
public double getNamePlateYOffset(T entity) { public double getNamePlateYOffset(T entity) {
// We start by negating the height calculation done by mahjong. // We start by negating the height calculation done by mahjong.
float y = -(entity.getHeight() + 0.5F); float y = -(entity.getHeight() + 0.5F);
// Then we add our own offsets. // Then we add our own offsets.
y += getModel().getAttributes().visualHeight * getScaleFactor() + 0.25F; y += getModels().body().getAttributes().visualHeight * getScaleFactor() + 0.25F;
if (entity.isSneaking()) { if (entity.isSneaking()) {
y -= 0.25F; y -= 0.25F;
@ -168,7 +167,48 @@ public class EquineRenderManager<T extends LivingEntity, M extends EntityModel<T
return y; return y;
} }
public interface Transformer<T extends LivingEntity> {
void setupTransforms(T entity, MatrixStack stack, float ageInTicks, float rotationYaw, float partialTicks);
}
public interface RegistrationHandler { public interface RegistrationHandler {
boolean shouldUpdateRegistration(Pony pony); SyncedPony getSyncedPony();
}
public interface ModelHolder<T extends LivingEntity, M extends EntityModel<T> & PonyModel<T>> {
void setModel(M model);
}
public static class SyncedPony {
@Nullable
private Pony lastRenderedPony;
@Nullable
private Pony lastTransmittedPony;
public void synchronize(PlayerEntity player, Pony pony) {
boolean changed = pony.compareTo(lastRenderedPony) != 0;
if (changed) {
lastRenderedPony = pony;
player.calculateDimensions();
}
if (!(player instanceof PreviewModel)) {
@Nullable
PlayerEntity clientPlayer = MinecraftClient.getInstance().player;
if (Channel.isRegistered() && pony.compareTo(lastTransmittedPony) != 0) {
if (clientPlayer != null && (Objects.equals(player, clientPlayer) || Objects.equals(player.getGameProfile(), clientPlayer.getGameProfile()))) {
if (Channel.broadcastPonyData(pony.metadata())) {
lastTransmittedPony = pony;
}
}
}
if (changed) {
PonyDataCallback.EVENT.invoker().onPonyDataAvailable(player, pony.metadata(), EnvType.CLIENT);
}
}
}
} }
} }

View file

@ -19,11 +19,11 @@ public class FrustrumCheck<T extends LivingEntity> extends Frustum {
private Frustum vanilla; private Frustum vanilla;
private final EquineRenderManager<T, ?> renderer; private final PonyRenderContext<T, ?> context;
public FrustrumCheck(EquineRenderManager<T, ?> render) { public FrustrumCheck(PonyRenderContext<T, ?> context) {
super(new Matrix4f(), new Matrix4f()); super(new Matrix4f(), new Matrix4f());
renderer = render; this.context = context;
} }
public Frustum withCamera(T entity, Frustum vanillaFrustrum) { public Frustum withCamera(T entity, Frustum vanillaFrustrum) {
@ -34,7 +34,7 @@ public class FrustrumCheck<T extends LivingEntity> extends Frustum {
@Override @Override
public boolean isVisible(Box bounds) { public boolean isVisible(Box bounds) {
return vanilla.isVisible(PonyBounds.getBoundingBox(renderer.getContext().getEntityPony(entity), entity)); return vanilla.isVisible(PonyBounds.getBoundingBox(context.getEntityPony(entity), entity));
} }
@Override @Override

View file

@ -11,11 +11,9 @@ import net.minecraft.client.render.item.ItemRenderer;
import net.minecraft.client.render.model.json.ModelTransformationMode; import net.minecraft.client.render.model.json.ModelTransformationMode;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.CrossbowItem; import net.minecraft.item.CrossbowItem;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.screen.PlayerScreenHandler; import net.minecraft.screen.PlayerScreenHandler;
import net.minecraft.util.Identifier;
import net.minecraft.util.UseAction; import net.minecraft.util.UseAction;
import net.minecraft.util.math.RotationAxis; import net.minecraft.util.math.RotationAxis;
import net.minecraft.world.World; import net.minecraft.world.World;
@ -24,11 +22,10 @@ public class LevitatingItemRenderer {
private VertexConsumerProvider getProvider(Pony pony, VertexConsumerProvider renderContext) { private VertexConsumerProvider getProvider(Pony pony, VertexConsumerProvider renderContext) {
final int color = pony.metadata().glowColor(); final int color = pony.metadata().glowColor();
return layer -> { return layer -> {
Identifier texture = RenderLayerUtil.getTexture(layer).orElse(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE); if (layer.getVertexFormat() != VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL) {
if (texture == ItemRenderer.ENTITY_ENCHANTMENT_GLINT || texture == ItemRenderer.ITEM_ENCHANTMENT_GLINT) {
return renderContext.getBuffer(layer); return renderContext.getBuffer(layer);
} }
return renderContext.getBuffer(MagicGlow.getColoured(texture, color)); return renderContext.getBuffer(MagicGlow.getColoured(RenderLayerUtil.getTexture(layer).orElse(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE), color));
}; };
} }
@ -37,10 +34,11 @@ public class LevitatingItemRenderer {
*/ */
public void renderItem(ItemRenderer itemRenderer, @Nullable LivingEntity entity, ItemStack stack, ModelTransformationMode mode, boolean left, MatrixStack matrix, VertexConsumerProvider renderContext, @Nullable World world, int lightUv, int posLong) { public void renderItem(ItemRenderer itemRenderer, @Nullable LivingEntity entity, ItemStack stack, ModelTransformationMode mode, boolean left, MatrixStack matrix, VertexConsumerProvider renderContext, @Nullable World world, int lightUv, int posLong) {
if (entity instanceof PlayerEntity && (mode.isFirstPerson() || mode == ModelTransformationMode.THIRD_PERSON_LEFT_HAND || mode == ModelTransformationMode.THIRD_PERSON_RIGHT_HAND)) { if (mode.isFirstPerson()
|| mode == ModelTransformationMode.THIRD_PERSON_LEFT_HAND
Pony pony = Pony.getManager().getPony((PlayerEntity)entity); || mode == ModelTransformationMode.THIRD_PERSON_RIGHT_HAND
) {
Pony.getManager().getPony(entity).ifPresentOrElse(pony -> {
matrix.push(); matrix.push();
boolean doMagic = PonyConfig.getInstance().fpsmagic.get() && pony.hasMagic(); boolean doMagic = PonyConfig.getInstance().fpsmagic.get() && pony.hasMagic();
@ -63,6 +61,9 @@ public class LevitatingItemRenderer {
} }
matrix.pop(); matrix.pop();
}, () -> {
itemRenderer.renderItem(entity, stack, mode, left, matrix, renderContext, world, lightUv, OverlayTexture.DEFAULT_UV, posLong);
});
} else { } else {
itemRenderer.renderItem(entity, stack, mode, left, matrix, renderContext, world, lightUv, OverlayTexture.DEFAULT_UV, posLong); itemRenderer.renderItem(entity, stack, mode, left, matrix, renderContext, world, lightUv, OverlayTexture.DEFAULT_UV, posLong);
} }

View file

@ -16,8 +16,8 @@ import java.util.function.BiFunction;
import java.util.function.Supplier; import java.util.function.Supplier;
public abstract class MagicGlow extends RenderPhase { public abstract class MagicGlow extends RenderPhase {
private MagicGlow(String name, Runnable beginAction, Runnable endAction) { private MagicGlow() {
super(name, beginAction, endAction); super(null, null, null);
} }
private static final Supplier<RenderLayer> MAGIC = Suppliers.memoize(() -> { private static final Supplier<RenderLayer> MAGIC = Suppliers.memoize(() -> {
@ -54,7 +54,6 @@ public abstract class MagicGlow extends RenderPhase {
} }
private static class Colored extends Texture { private static class Colored extends Texture {
private final float red; private final float red;
private final float green; private final float green;
private final float blue; private final float blue;

View file

@ -1,13 +1,10 @@
package com.minelittlepony.client.render; package com.minelittlepony.client.render;
import com.minelittlepony.api.model.BodyPart;
import com.minelittlepony.api.model.PonyModel; import com.minelittlepony.api.model.PonyModel;
import com.minelittlepony.api.model.gear.Gear; import com.minelittlepony.api.model.gear.Gear;
import com.minelittlepony.api.pony.Pony; import com.minelittlepony.api.pony.Pony;
import com.minelittlepony.util.MathUtil;
import net.minecraft.client.render.entity.model.EntityModel; import net.minecraft.client.render.entity.model.EntityModel;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
public interface PonyRenderContext<T extends LivingEntity, M extends EntityModel<T> & PonyModel<T>> extends Gear.Context<T, M> { public interface PonyRenderContext<T extends LivingEntity, M extends EntityModel<T> & PonyModel<T>> extends Gear.Context<T, M> {
@ -16,19 +13,5 @@ public interface PonyRenderContext<T extends LivingEntity, M extends EntityModel
EquineRenderManager<T, M> getInternalRenderer(); EquineRenderManager<T, M> getInternalRenderer();
/** void setModel(M model);
* Called by riders to have their transportation adjust their position.
*/
default void translateRider(T entity, Pony entityPony, LivingEntity passenger, Pony passengerPony, MatrixStack stack, float ticks) {
if (!passengerPony.race().isHuman()) {
float yaw = MathUtil.interpolateDegress((float)entity.prevY, (float)entity.getY(), ticks);
getInternalRenderer().getModelWrapper().applyMetadata(entityPony.metadata());
M model = getInternalRenderer().getModelWrapper().body();
model.transform(BodyPart.BACK, stack);
getInternalRenderer().applyPostureRiding(entity, stack, yaw, ticks);
}
}
} }

View file

@ -3,11 +3,9 @@ package com.minelittlepony.client.render;
import java.util.function.Function; import java.util.function.Function;
import com.minelittlepony.api.model.PonyModel; import com.minelittlepony.api.model.PonyModel;
import com.minelittlepony.api.pony.Pony; import com.minelittlepony.api.pony.*;
import com.minelittlepony.api.pony.PonyPosture;
import com.minelittlepony.client.mixin.MixinEntityRenderers; import com.minelittlepony.client.mixin.MixinEntityRenderers;
import com.minelittlepony.client.render.entity.AquaticPlayerPonyRenderer; import com.minelittlepony.client.render.entity.*;
import com.minelittlepony.client.render.entity.PlayerPonyRenderer;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
@ -48,16 +46,25 @@ public class PonyRenderDispatcher {
player -> { player -> {
return !Pony.getManager().getPony(player).race().isHuman() return !Pony.getManager().getPony(player).race().isHuman()
&& PonyPosture.hasSeaponyForm(player) && PonyPosture.hasSeaponyForm(player)
&& player.method_52814().model() == armShape; && player.getSkinTextures().model() == armShape;
}, },
context -> new AquaticPlayerPonyRenderer(context, armShape == SkinTextures.Model.SLIM) context -> new AquaticPlayerPonyRenderer(context, armShape == SkinTextures.Model.SLIM)
); );
Mson.getInstance().getEntityRendererRegistry().registerPlayerRenderer(
new Identifier("minelittlepony", "nirik/" + armShape.getName()),
player -> {
return !Pony.getManager().getPony(player).race().isHuman()
&& PonyPosture.hasNirikForm(player)
&& player.getSkinTextures().model() == armShape;
},
context -> new FormChangingPlayerPonyRenderer(context, armShape == SkinTextures.Model.SLIM, DefaultPonySkinHelper.NIRIK_SKIN_TYPE_ID, PonyPosture::isNirikModifier)
);
Mson.getInstance().getEntityRendererRegistry().registerPlayerRenderer( Mson.getInstance().getEntityRendererRegistry().registerPlayerRenderer(
new Identifier("minelittlepony", "land/" + armShape.getName()), new Identifier("minelittlepony", "land/" + armShape.getName()),
player -> { player -> {
return !Pony.getManager().getPony(player).race().isHuman() return !Pony.getManager().getPony(player).race().isHuman()
&& !PonyPosture.hasSeaponyForm(player) && !PonyPosture.hasSeaponyForm(player) && !PonyPosture.hasNirikForm(player)
&& player.method_52814().model() == armShape; && player.getSkinTextures().model() == armShape;
}, },
context -> new PlayerPonyRenderer(context, armShape == SkinTextures.Model.SLIM) context -> new PlayerPonyRenderer(context, armShape == SkinTextures.Model.SLIM)
); );

View file

@ -3,8 +3,8 @@ package com.minelittlepony.client.render.blockentity.skull;
import com.minelittlepony.api.config.PonyConfig; import com.minelittlepony.api.config.PonyConfig;
import com.minelittlepony.api.config.PonyLevel; import com.minelittlepony.api.config.PonyLevel;
import com.minelittlepony.api.pony.Pony; import com.minelittlepony.api.pony.Pony;
import com.minelittlepony.api.pony.SkinsProxy;
import com.minelittlepony.api.pony.meta.Race; import com.minelittlepony.api.pony.meta.Race;
import com.minelittlepony.client.SkinsProxy;
import com.minelittlepony.client.model.*; import com.minelittlepony.client.model.*;
import com.minelittlepony.client.render.blockentity.skull.PonySkullRenderer.ISkull; import com.minelittlepony.client.render.blockentity.skull.PonySkullRenderer.ISkull;
import com.mojang.authlib.GameProfile; import com.mojang.authlib.GameProfile;
@ -45,7 +45,7 @@ public class PlayerPonySkull implements ISkull {
return skin; return skin;
} }
return DefaultSkinHelper.getTexture(profile).texture(); return DefaultSkinHelper.getSkinTextures(profile).texture();
} }
return DefaultSkinHelper.getTexture(); return DefaultSkinHelper.getTexture();

View file

@ -1,5 +1,6 @@
package com.minelittlepony.client.render.entity; package com.minelittlepony.client.render.entity;
import com.minelittlepony.api.model.ModelAttributes;
import com.minelittlepony.api.model.PonyModel; import com.minelittlepony.api.model.PonyModel;
import com.minelittlepony.api.pony.Pony; import com.minelittlepony.api.pony.Pony;
import com.minelittlepony.api.pony.meta.Wearable; import com.minelittlepony.api.pony.meta.Wearable;
@ -29,7 +30,7 @@ import net.minecraft.util.Identifier;
public abstract class AbstractPonyRenderer<T extends MobEntity, M extends EntityModel<T> & PonyModel<T> & ModelWithArms> extends MobEntityRenderer<T, M> implements PonyRenderContext<T, M> { public abstract class AbstractPonyRenderer<T extends MobEntity, M extends EntityModel<T> & PonyModel<T> & ModelWithArms> extends MobEntityRenderer<T, M> implements PonyRenderContext<T, M> {
protected final EquineRenderManager<T, M> manager = new EquineRenderManager<>(this); protected final EquineRenderManager<T, M> manager;
private final Map<Wearable, Identifier> wearableTextures = new EnumMap<>(Wearable.class); private final Map<Wearable, Identifier> wearableTextures = new EnumMap<>(Wearable.class);
@ -39,7 +40,7 @@ public abstract class AbstractPonyRenderer<T extends MobEntity, M extends Entity
public AbstractPonyRenderer(EntityRendererFactory.Context context, ModelKey<? super M> key, TextureSupplier<T> texture, float scale) { public AbstractPonyRenderer(EntityRendererFactory.Context context, ModelKey<? super M> key, TextureSupplier<T> texture, float scale) {
super(context, null, 0.5F); super(context, null, 0.5F);
this.model = manager.setModel(key).body(); this.manager = new EquineRenderManager<>(this, super::setupTransforms, key);
this.texture = texture; this.texture = texture;
this.scale = scale; this.scale = scale;
addFeatures(context); addFeatures(context);
@ -64,24 +65,17 @@ public abstract class AbstractPonyRenderer<T extends MobEntity, M extends Entity
@Override @Override
public void render(T entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) { public void render(T entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) {
manager.preRender(entity, ModelAttributes.Mode.THIRD_PERSON);
if (manager.getModels().body() instanceof BipedEntityModel model) {
model.setVisible(true);
}
super.render(entity, entityYaw, tickDelta, stack, renderContext, lightUv); super.render(entity, entityYaw, tickDelta, stack, renderContext, lightUv);
DebugBoundingBoxRenderer.render(getEntityPony(entity), this, entity, stack, renderContext, tickDelta); DebugBoundingBoxRenderer.render(getEntityPony(entity), this, entity, stack, renderContext, tickDelta);
} }
@Override @Override
protected void setupTransforms(T entity, MatrixStack stack, float ageInTicks, float rotationYaw, float partialTicks) { protected void setupTransforms(T entity, MatrixStack stack, float ageInTicks, float rotationYaw, float partialTicks) {
manager.preRenderCallback(entity, stack, partialTicks); manager.setupTransforms(entity, stack, ageInTicks, rotationYaw, partialTicks);
if (getModel() instanceof PlayerEntityModel) {
((PlayerEntityModel<?>)getModel()).setVisible(true);
}
if (getModel().getAttributes().isSitting) {
stack.translate(0, 0.125D, 0);
}
rotationYaw = manager.getRenderYaw(entity, rotationYaw, partialTicks);
super.setupTransforms(entity, stack, ageInTicks, rotationYaw, partialTicks);
manager.setupTransforms(entity, stack, rotationYaw, partialTicks);
} }
@Override @Override
@ -100,7 +94,7 @@ public abstract class AbstractPonyRenderer<T extends MobEntity, M extends Entity
if (!entity.hasVehicle()) { if (!entity.hasVehicle()) {
stack.translate(0, 0, -entity.getWidth() / 2); // move us to the center of the shadow stack.translate(0, 0, -entity.getWidth() / 2); // move us to the center of the shadow
} else { } else {
stack.translate(0, -entity.getRidingOffset(entity.getVehicle()), 0); stack.translate(0, entity.getRidingOffset(entity.getVehicle()), 0);
} }
stack.scale(scale, scale, scale); stack.scale(scale, scale, scale);
@ -117,8 +111,7 @@ public abstract class AbstractPonyRenderer<T extends MobEntity, M extends Entity
@Override @Override
public Identifier getDefaultTexture(T entity, Wearable wearable) { public Identifier getDefaultTexture(T entity, Wearable wearable) {
return wearableTextures.computeIfAbsent(wearable, w -> { return wearableTextures.computeIfAbsent(wearable, w -> {
Identifier texture = getTexture(entity); Identifier texture = getTexture(entity).withPath(path -> path.split("\\.")[0] + "_" + wearable.name().toLowerCase(Locale.ROOT) + ".png");
texture = new Identifier(texture.getNamespace(), texture.getPath().split("\\.")[0] + "_" + wearable.name().toLowerCase(Locale.ROOT) + ".png");
if (MinecraftClient.getInstance().getResourceManager().getResource(texture).isPresent()) { if (MinecraftClient.getInstance().getResourceManager().getResource(texture).isPresent()) {
return texture; return texture;
@ -127,6 +120,11 @@ public abstract class AbstractPonyRenderer<T extends MobEntity, M extends Entity
}); });
} }
@Override
public void setModel(M model) {
this.model = model;
}
@Override @Override
public EquineRenderManager<T, M> getInternalRenderer() { public EquineRenderManager<T, M> getInternalRenderer() {
return manager; return manager;

View file

@ -1,10 +1,8 @@
package com.minelittlepony.client.render.entity; package com.minelittlepony.client.render.entity;
import com.minelittlepony.api.model.PreviewModel; import com.minelittlepony.api.model.PreviewModel;
import com.minelittlepony.api.pony.Pony; import com.minelittlepony.api.pony.*;
import com.minelittlepony.api.pony.PonyPosture;
import com.minelittlepony.api.pony.meta.Race; import com.minelittlepony.api.pony.meta.Race;
import com.minelittlepony.client.SkinsProxy;
import com.minelittlepony.util.MathUtil; import com.minelittlepony.util.MathUtil;
import net.minecraft.client.network.AbstractClientPlayerEntity; import net.minecraft.client.network.AbstractClientPlayerEntity;
@ -12,68 +10,48 @@ import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.EntityRendererFactory; import net.minecraft.client.render.entity.EntityRendererFactory;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.particle.ParticleTypes; import net.minecraft.particle.ParticleTypes;
import net.minecraft.util.Arm;
import net.minecraft.util.Identifier;
public class AquaticPlayerPonyRenderer extends PlayerPonyRenderer { public class AquaticPlayerPonyRenderer extends FormChangingPlayerPonyRenderer {
public static final Identifier SKIN_TYPE_ID = new Identifier("minelp", "seapony");
private boolean wet;
public AquaticPlayerPonyRenderer(EntityRendererFactory.Context context, boolean slim) { public AquaticPlayerPonyRenderer(EntityRendererFactory.Context context, boolean slim) {
super(context, slim); super(context, slim, DefaultPonySkinHelper.SEAPONY_SKIN_TYPE_ID, PonyPosture::isSeaponyModifier);
}
@Override
public Identifier getTexture(AbstractClientPlayerEntity player) {
if (wet) {
return SkinsProxy.instance.getSkin(SKIN_TYPE_ID, player).orElseGet(() -> super.getTexture(player));
}
return super.getTexture(player);
} }
@Override @Override
public void render(AbstractClientPlayerEntity player, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int light) { public void render(AbstractClientPlayerEntity player, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int light) {
updateSeaponyState(player);
super.render(player, entityYaw, tickDelta, stack, renderContext, light); super.render(player, entityYaw, tickDelta, stack, renderContext, light);
if (!(player instanceof PreviewModel) && wet && player.getVelocity().length() > 0.1F) { if (!(player instanceof PreviewModel) && transformed && player.getVelocity().length() > 0.1F) {
double x = player.getEntityWorld().getRandom().nextTriangular(player.getX(), 1); double x = player.getEntityWorld().getRandom().nextTriangular(player.getX(), 1);
double y = player.getEntityWorld().getRandom().nextTriangular(player.getY(), 1); double y = player.getEntityWorld().getRandom().nextTriangular(player.getY(), 1);
double z = player.getEntityWorld().getRandom().nextTriangular(player.getZ(), 1); double z = player.getEntityWorld().getRandom().nextTriangular(player.getZ(), 1);
player.getEntityWorld().addParticle(ParticleTypes.BUBBLE, x, y, z, 0, 0, 0); player.getEntityWorld().addParticle(ParticleTypes.BUBBLE, x, y, z, 0, 0, 0);
} }
} }
@Override
protected Race getPlayerRace(AbstractClientPlayerEntity entity, Pony pony) { protected Race getPlayerRace(AbstractClientPlayerEntity entity, Pony pony) {
Race race = super.getPlayerRace(entity, pony); Race race = super.getPlayerRace(entity, pony);
return wet ? Race.SEAPONY : race == Race.SEAPONY ? Race.UNICORN : race; return PonyPosture.isSeaponyModifier(entity) ? Race.SEAPONY : race == Race.SEAPONY ? Race.UNICORN : race;
} }
@Override @Override
protected void setupTransforms(AbstractClientPlayerEntity entity, MatrixStack stack, float ageInTicks, float rotationYaw, float partialTicks) { protected void setupTransforms(AbstractClientPlayerEntity player, MatrixStack stack, float ageInTicks, float rotationYaw, float partialTicks) {
if (wet) { if (PonyPosture.isSeaponyModifier(player)) {
stack.translate(0, 0.6, 0); stack.translate(0, 0.6, 0);
if (entity.isInSneakingPose()) { if (player.isInSneakingPose()) {
stack.translate(0, 0.125, 0); stack.translate(0, 0.125, 0);
} }
} }
super.setupTransforms(entity, stack, ageInTicks, rotationYaw, partialTicks); super.setupTransforms(player, stack, ageInTicks, rotationYaw, partialTicks);
} }
@Override @Override
protected void renderArm(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, AbstractClientPlayerEntity player, Arm side) { protected void updateForm(AbstractClientPlayerEntity player) {
updateSeaponyState(player); super.updateForm(player);
super.renderArm(stack, renderContext, lightUv, player, side);
}
private void updateSeaponyState(AbstractClientPlayerEntity player) {
wet = PonyPosture.isSeaponyModifier(player);
if (!(player instanceof PreviewModel)) { if (!(player instanceof PreviewModel)) {
float state = wet ? 100 : 0; float state = transformed ? 100 : 0;
float interpolated = getInternalRenderer().getModel().getAttributes().getMainInterpolator().interpolate("seapony_state", state, 5); float interpolated = getInternalRenderer().getModels().body().getAttributes().getMainInterpolator().interpolate("seapony_state", state, 5);
if (!MathUtil.compareFloats(interpolated, state)) { if (!MathUtil.compareFloats(interpolated, state)) {
double x = player.getEntityWorld().getRandom().nextTriangular(player.getX(), 1); double x = player.getEntityWorld().getRandom().nextTriangular(player.getX(), 1);

View file

@ -0,0 +1,50 @@
package com.minelittlepony.client.render.entity;
import com.minelittlepony.api.pony.*;
import java.util.function.Predicate;
import net.minecraft.client.network.AbstractClientPlayerEntity;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.EntityRendererFactory;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.Arm;
import net.minecraft.util.Identifier;
public class FormChangingPlayerPonyRenderer extends PlayerPonyRenderer {
protected boolean transformed;
private final Identifier alternateFormSkinId;
private final Predicate<AbstractClientPlayerEntity> formModifierPredicate;
public FormChangingPlayerPonyRenderer(EntityRendererFactory.Context context,
boolean slim, Identifier alternateFormSkinId, Predicate<AbstractClientPlayerEntity> formModifierPredicate) {
super(context, slim);
this.alternateFormSkinId = alternateFormSkinId;
this.formModifierPredicate = formModifierPredicate;
}
@Override
public Identifier getTexture(AbstractClientPlayerEntity player) {
if (transformed) {
return SkinsProxy.instance.getSkin(alternateFormSkinId, player).orElseGet(() -> super.getTexture(player));
}
return super.getTexture(player);
}
@Override
public void render(AbstractClientPlayerEntity player, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int light) {
super.render(player, entityYaw, tickDelta, stack, renderContext, light);
updateForm(player);
}
@Override
protected void renderArm(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, AbstractClientPlayerEntity player, Arm side) {
super.renderArm(stack, renderContext, lightUv, player, side);
updateForm(player);
}
protected void updateForm(AbstractClientPlayerEntity player) {
transformed = formModifierPredicate.test(player);
}
}

View file

@ -1,11 +1,11 @@
package com.minelittlepony.client.render.entity; package com.minelittlepony.client.render.entity;
import com.minelittlepony.api.model.ModelAttributes; import com.minelittlepony.api.model.ModelAttributes;
import com.minelittlepony.api.model.ModelWrapper; import com.minelittlepony.api.model.Models;
import com.minelittlepony.api.pony.Pony; import com.minelittlepony.api.pony.Pony;
import com.minelittlepony.api.pony.SkinsProxy;
import com.minelittlepony.api.pony.meta.Race; import com.minelittlepony.api.pony.meta.Race;
import com.minelittlepony.api.pony.meta.Wearable; import com.minelittlepony.api.pony.meta.Wearable;
import com.minelittlepony.client.SkinsProxy;
import com.minelittlepony.client.model.*; import com.minelittlepony.client.model.*;
import com.minelittlepony.client.render.DebugBoundingBoxRenderer; import com.minelittlepony.client.render.DebugBoundingBoxRenderer;
import com.minelittlepony.client.render.PonyRenderContext; import com.minelittlepony.client.render.PonyRenderContext;
@ -27,24 +27,22 @@ import net.minecraft.client.render.entity.feature.*;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.Text; import net.minecraft.text.Text;
import net.minecraft.util.*; import net.minecraft.util.*;
import net.minecraft.util.math.*;
public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRenderContext<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> { public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRenderContext<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> {
private final Function<Race, Models<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>>> modelsCache;
protected final EquineRenderManager<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> manager = new EquineRenderManager<>(this); protected final EquineRenderManager<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> manager;
private final Function<Race, ModelWrapper<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>>> modelsCache;
public PlayerPonyRenderer(EntityRendererFactory.Context context, boolean slim) { public PlayerPonyRenderer(EntityRendererFactory.Context context, boolean slim) {
super(context, slim); super(context, slim);
modelsCache = Util.memoize(race -> ModelType.getPlayerModel(race).create(slim)); modelsCache = Util.memoize(race -> ModelType.getPlayerModel(race).create(slim));
manager = new EquineRenderManager<>(this, super::setupTransforms, modelsCache.apply(Race.EARTH));
manager.setModelsLookup(entity -> modelsCache.apply(getPlayerRace(entity, getEntityPony(entity))));
addLayers(context); addLayers(context);
} }
@SuppressWarnings({"unchecked", "rawtypes"}) @SuppressWarnings({"unchecked", "rawtypes"})
protected void addLayers(EntityRendererFactory.Context context) { protected void addLayers(EntityRendererFactory.Context context) {
// remove vanilla features (keep modded ones) // remove vanilla features (keep modded ones)
// TODO: test with https://github.com/Globox1997/BackSlot
features.removeIf(feature -> { features.removeIf(feature -> {
return feature instanceof ArmorFeatureRenderer return feature instanceof ArmorFeatureRenderer
|| feature instanceof PlayerHeldItemFeatureRenderer || feature instanceof PlayerHeldItemFeatureRenderer
@ -71,22 +69,22 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRend
@Override @Override
protected void scale(AbstractClientPlayerEntity entity, MatrixStack stack, float tickDelta) { protected void scale(AbstractClientPlayerEntity entity, MatrixStack stack, float tickDelta) {
if (manager.getModel().getAttributes().isSitting && entity.hasVehicle()) { if (manager.getModels().body().getAttributes().isSitting && entity.hasVehicle()) {
stack.translate(0, entity.getRidingOffset(entity.getVehicle()), 0); stack.translate(0, entity.getRidingOffset(entity.getVehicle()), 0);
} }
} }
@Override @Override
public void render(AbstractClientPlayerEntity entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) { public void render(AbstractClientPlayerEntity entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) {
Pony pony = getEntityPony(entity);
model = manager.setModel(modelsCache.apply(getPlayerRace(entity, pony))).body();
// EntityModelFeatures: We have to force it to use our models otherwise EMF overrides it and breaks pony rendering // EntityModelFeatures: We have to force it to use our models otherwise EMF overrides it and breaks pony rendering
manager.preRender(entity, ModelAttributes.Mode.THIRD_PERSON);
shadowRadius = manager.getShadowSize(); shadowRadius = manager.getShadowSize();
super.render(entity, entityYaw, tickDelta, stack, renderContext, lightUv); super.render(entity, entityYaw, tickDelta, stack, renderContext, lightUv);
DebugBoundingBoxRenderer.render(pony, this, entity, stack, renderContext, tickDelta); DebugBoundingBoxRenderer.render(getEntityPony(entity), this, entity, stack, renderContext, tickDelta);
// Translate the shadow position after everything is done // Translate the shadow position after everything is done
// (shadows are drawn after us) // (shadows are drawn after us)
/*
if (!entity.hasVehicle() && !entity.isSleeping()) { if (!entity.hasVehicle() && !entity.isSleeping()) {
float yaw = MathHelper.lerpAngleDegrees(tickDelta, entity.prevBodyYaw, entity.bodyYaw); float yaw = MathHelper.lerpAngleDegrees(tickDelta, entity.prevBodyYaw, entity.bodyYaw);
float l = entity.getWidth() / 2 * manager.getScaleFactor(); float l = entity.getWidth() / 2 * manager.getScaleFactor();
@ -95,6 +93,8 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRend
stack.translate(0, 0, -l); stack.translate(0, 0, -l);
stack.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(yaw)); stack.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(yaw));
} }
*/
} }
protected Race getPlayerRace(AbstractClientPlayerEntity entity, Pony pony) { protected Race getPlayerRace(AbstractClientPlayerEntity entity, Pony pony) {
@ -103,10 +103,7 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRend
@Override @Override
protected void setupTransforms(AbstractClientPlayerEntity entity, MatrixStack stack, float ageInTicks, float rotationYaw, float partialTicks) { protected void setupTransforms(AbstractClientPlayerEntity entity, MatrixStack stack, float ageInTicks, float rotationYaw, float partialTicks) {
manager.preRenderCallback(entity, stack, partialTicks); manager.setupTransforms(entity, stack, ageInTicks, rotationYaw, partialTicks);
rotationYaw = manager.getRenderYaw(entity, rotationYaw, partialTicks);
super.setupTransforms(entity, stack, ageInTicks, rotationYaw, partialTicks);
manager.setupTransforms(entity, stack, rotationYaw, partialTicks);
} }
@Override @Override
@ -145,9 +142,7 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRend
} }
protected void renderArm(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, AbstractClientPlayerEntity player, Arm side) { protected void renderArm(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, AbstractClientPlayerEntity player, Arm side) {
Pony pony = getEntityPony(player); manager.preRender(player, ModelAttributes.Mode.FIRST_PERSON);
model = manager.setModel(modelsCache.apply(getPlayerRace(player, pony))).body();
manager.updateModel(player, ModelAttributes.Mode.FIRST_PERSON);
stack.push(); stack.push();
float reflect = side == Arm.LEFT ? 1 : -1; float reflect = side == Arm.LEFT ? 1 : -1;
@ -155,7 +150,7 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRend
stack.translate(reflect * 0.1F, -0.54F, 0); stack.translate(reflect * 0.1F, -0.54F, 0);
Identifier texture = getTexture(player); Identifier texture = getTexture(player);
Identifier playerSkin = player.method_52814().texture(); Identifier playerSkin = player.getSkinTextures().texture();
VertexConsumerProvider interceptedContext = layer -> { VertexConsumerProvider interceptedContext = layer -> {
return renderContext.getBuffer(RenderLayerUtil return renderContext.getBuffer(RenderLayerUtil
.getTexture(layer) .getTexture(layer)
@ -179,6 +174,11 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRend
return getEntityPony(player).texture(); return getEntityPony(player).texture();
} }
@Override
public void setModel(ClientPonyModel<AbstractClientPlayerEntity> model) {
this.model = model;
}
@Override @Override
public EquineRenderManager<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> getInternalRenderer() { public EquineRenderManager<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> getInternalRenderer() {
return manager; return manager;
@ -192,7 +192,7 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRend
@Override @Override
public Identifier getDefaultTexture(AbstractClientPlayerEntity entity, Wearable wearable) { public Identifier getDefaultTexture(AbstractClientPlayerEntity entity, Wearable wearable) {
return SkinsProxy.instance.getSkin(wearable.getId(), entity).orElseGet(() -> { return SkinsProxy.instance.getSkin(wearable.getId(), entity).orElseGet(() -> {
if (wearable.isSaddlebags() && getInternalRenderer().getModel().getRace().supportsLegacySaddlebags()) { if (wearable.isSaddlebags() && getInternalRenderer().getModels().body().getRace().supportsLegacySaddlebags()) {
return getTexture(entity); return getTexture(entity);
} }

View file

@ -11,7 +11,7 @@ import net.minecraft.entity.EquipmentSlot;
import net.minecraft.entity.decoration.ArmorStandEntity; import net.minecraft.entity.decoration.ArmorStandEntity;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import com.minelittlepony.api.model.ModelWrapper; import com.minelittlepony.api.model.Models;
import com.minelittlepony.api.pony.PonyData; import com.minelittlepony.api.pony.PonyData;
import com.minelittlepony.api.pony.meta.Race; import com.minelittlepony.api.pony.meta.Race;
import com.minelittlepony.client.model.ModelType; import com.minelittlepony.client.model.ModelType;
@ -60,7 +60,7 @@ public class PonyStandRenderer extends ArmorStandEntityRenderer {
} }
class Armour extends ArmorFeatureRenderer<ArmorStandEntity, ArmorStandArmorEntityModel, ArmorStandArmorEntityModel> { class Armour extends ArmorFeatureRenderer<ArmorStandEntity, ArmorStandArmorEntityModel, ArmorStandArmorEntityModel> {
private final ModelWrapper<ArmorStandEntity, EarthPonyModel<ArmorStandEntity>> pony = ModelType.EARTH_PONY.<ArmorStandEntity, EarthPonyModel<ArmorStandEntity>>create(false); private final Models<ArmorStandEntity, EarthPonyModel<ArmorStandEntity>> pony = ModelType.EARTH_PONY.<ArmorStandEntity, EarthPonyModel<ArmorStandEntity>>create(false);
public Armour(FeatureRendererContext<ArmorStandEntity, ArmorStandArmorEntityModel> renderer, EntityRendererFactory.Context context) { public Armour(FeatureRendererContext<ArmorStandEntity, ArmorStandArmorEntityModel> renderer, EntityRendererFactory.Context context) {
super(renderer, super(renderer,

View file

@ -2,6 +2,7 @@ package com.minelittlepony.client.render.entity;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import com.minelittlepony.api.model.ModelAttributes;
import com.minelittlepony.client.mixin.IResizeable; import com.minelittlepony.client.mixin.IResizeable;
import com.minelittlepony.client.model.ModelType; import com.minelittlepony.client.model.ModelType;
import com.minelittlepony.client.model.entity.GuardianPonyModel; import com.minelittlepony.client.model.entity.GuardianPonyModel;
@ -52,7 +53,7 @@ public class SeaponyRenderer extends GuardianEntityRenderer {
@Override @Override
public void render(GuardianEntity entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) { public void render(GuardianEntity entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) {
ponyRenderer.manager.preRenderCallback(entity, stack, tickDelta); ponyRenderer.manager.preRender(entity, ModelAttributes.Mode.THIRD_PERSON);
float height = entity.getStandingEyeHeight(); float height = entity.getStandingEyeHeight();
@ -61,4 +62,9 @@ public class SeaponyRenderer extends GuardianEntityRenderer {
super.render(entity, entityYaw, tickDelta, stack, renderContext, lightUv); super.render(entity, entityYaw, tickDelta, stack, renderContext, lightUv);
((IResizeable)entity).setStandingEyeHeight(height); ((IResizeable)entity).setStandingEyeHeight(height);
} }
@Override
protected void setupTransforms(GuardianEntity entity, MatrixStack stack, float ageInTicks, float rotationYaw, float partialTicks) {
ponyRenderer.manager.setupTransforms(entity, stack, ageInTicks, rotationYaw, partialTicks);
}
} }

View file

@ -38,6 +38,6 @@ public class ZomponyRenderer<Zombie extends HostileEntity> extends PonyRenderer<
} }
public static ZomponyRenderer<GiantEntity> giant(EntityRendererFactory.Context context) { public static ZomponyRenderer<GiantEntity> giant(EntityRendererFactory.Context context) {
return new ZomponyRenderer<>(context, TextureSupplier.of(ZOMBIE), 3); return new ZomponyRenderer<>(context, TextureSupplier.of(ZOMBIE), 6.8F);
} }
} }

View file

@ -1,6 +1,6 @@
package com.minelittlepony.client.render.entity.feature; package com.minelittlepony.client.render.entity.feature;
import com.minelittlepony.api.model.ModelWrapper; import com.minelittlepony.api.model.Models;
import com.minelittlepony.api.model.PonyModel; import com.minelittlepony.api.model.PonyModel;
import com.minelittlepony.client.render.PonyRenderContext; import com.minelittlepony.client.render.PonyRenderContext;
@ -45,10 +45,10 @@ public abstract class AbstractPonyFeature<T extends LivingEntity, M extends Enti
@Override @Override
public final M getContextModel() { public final M getContextModel() {
return context.getInternalRenderer().getModel(); return context.getInternalRenderer().getModels().body();
} }
protected ModelWrapper<T, M> getModelWrapper() { protected Models<T, M> getModelWrapper() {
return context.getInternalRenderer().getModelWrapper(); return context.getInternalRenderer().getModels();
} }
} }

View file

@ -1,8 +1,9 @@
package com.minelittlepony.client.render.entity.feature; package com.minelittlepony.client.render.entity.feature;
import com.minelittlepony.api.model.ModelWrapper; import com.minelittlepony.api.model.Models;
import com.minelittlepony.api.model.PonyModel; import com.minelittlepony.api.model.PonyModel;
import com.minelittlepony.client.model.armour.*; import com.minelittlepony.client.model.armour.*;
import com.minelittlepony.client.render.ArmorRenderLayers;
import com.minelittlepony.client.render.PonyRenderContext; import com.minelittlepony.client.render.PonyRenderContext;
import com.minelittlepony.common.util.Color; import com.minelittlepony.common.util.Color;
@ -28,7 +29,7 @@ public class ArmourFeature<T extends LivingEntity, M extends EntityModel<T> & Po
@Override @Override
public void render(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, T entity, float limbDistance, float limbAngle, float tickDelta, float age, float headYaw, float headPitch) { public void render(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, T entity, float limbDistance, float limbAngle, float tickDelta, float age, float headYaw, float headPitch) {
ModelWrapper<T, M> pony = getModelWrapper(); Models<T, M> pony = getModelWrapper();
for (EquipmentSlot i : EquipmentSlot.values()) { for (EquipmentSlot i : EquipmentSlot.values()) {
if (i.getType() == EquipmentSlot.Type.ARMOR) { if (i.getType() == EquipmentSlot.Type.ARMOR) {
@ -39,7 +40,7 @@ public class ArmourFeature<T extends LivingEntity, M extends EntityModel<T> & Po
} }
public static <T extends LivingEntity, V extends PonyArmourModel<T>> void renderArmor( public static <T extends LivingEntity, V extends PonyArmourModel<T>> void renderArmor(
ModelWrapper<T, ? extends PonyModel<T>> pony, MatrixStack matrices, Models<T, ? extends PonyModel<T>> pony, MatrixStack matrices,
VertexConsumerProvider renderContext, int light, T entity, VertexConsumerProvider renderContext, int light, T entity,
float limbDistance, float limbAngle, float limbDistance, float limbAngle,
float age, float headYaw, float headPitch, float age, float headYaw, float headPitch,
@ -95,7 +96,7 @@ public class ArmourFeature<T extends LivingEntity, M extends EntityModel<T> & Po
} }
private static VertexConsumer getArmorConsumer(VertexConsumerProvider provider, Identifier texture, boolean glint) { private static VertexConsumer getArmorConsumer(VertexConsumerProvider provider, Identifier texture, boolean glint) {
return ItemRenderer.getArmorGlintConsumer(provider, RenderLayer.getArmorCutoutNoCull(texture), false, glint); return ItemRenderer.getArmorGlintConsumer(provider, ArmorRenderLayers.getArmorTranslucentNoCull(texture, false), false, glint);
} }
private static VertexConsumer getTrimConsumer(VertexConsumerProvider provider, ArmorMaterial material, ArmorTrim trim, ArmourLayer layer, boolean glint) { private static VertexConsumer getTrimConsumer(VertexConsumerProvider provider, ArmorMaterial material, ArmorTrim trim, ArmourLayer layer, boolean glint) {
@ -103,9 +104,8 @@ public class ArmourFeature<T extends LivingEntity, M extends EntityModel<T> & Po
Sprite sprite = armorTrimsAtlas.getSprite( Sprite sprite = armorTrimsAtlas.getSprite(
layer == ArmourLayer.INNER ? trim.getLeggingsModelId(material) : trim.getGenericModelId(material) layer == ArmourLayer.INNER ? trim.getLeggingsModelId(material) : trim.getGenericModelId(material)
); );
RenderLayer renderLayer = ArmorRenderLayers.getArmorTranslucentNoCull(TexturedRenderLayers.ARMOR_TRIMS_ATLAS_TEXTURE, trim.getPattern().value().decal());
return sprite.getTextureSpecificVertexConsumer( return sprite.getTextureSpecificVertexConsumer(ItemRenderer.getDirectItemGlintConsumer(provider, renderLayer, true, glint));
ItemRenderer.getDirectItemGlintConsumer(provider, TexturedRenderLayers.getArmorTrims(trim.getPattern().value().decal()), true, glint)
);
} }
} }

View file

@ -26,13 +26,16 @@ public class CapeFeature<M extends ClientPonyModel<AbstractClientPlayerEntity>>
M model = getModelWrapper().body(); M model = getModelWrapper().body();
if (!player.isInvisible() if (!player.isInvisible()
&& player.isPartVisible(PlayerModelPart.CAPE) && player.method_52814().capeTexture() != null && player.isPartVisible(PlayerModelPart.CAPE) && player.getSkinTextures().capeTexture() != null
&& player.getEquippedStack(EquipmentSlot.CHEST).getItem() != Items.ELYTRA) { && player.getEquippedStack(EquipmentSlot.CHEST).getItem() != Items.ELYTRA) {
stack.push(); stack.push();
model.transform(BodyPart.BODY, stack);
stack.translate(0, 0.24F, 0); stack.translate(0, 0.24F, 0);
if (model.getAttributes().isLyingDown) {
stack.translate(0, -0.05F, 0);
}
model.transform(BodyPart.BODY, stack);
model.getBodyPart(BodyPart.BODY).rotate(stack); model.getBodyPart(BodyPart.BODY).rotate(stack);
double capeX = MathHelper.lerp(tickDelta, player.capeX, player.prevCapeX) - MathHelper.lerp(tickDelta, player.prevX, player.getX()); double capeX = MathHelper.lerp(tickDelta, player.capeX, player.prevCapeX) - MathHelper.lerp(tickDelta, player.prevX, player.getX());
@ -64,7 +67,7 @@ public class CapeFeature<M extends ClientPonyModel<AbstractClientPlayerEntity>>
stack.multiply(RotationAxis.POSITIVE_Z.rotationDegrees(180)); stack.multiply(RotationAxis.POSITIVE_Z.rotationDegrees(180));
stack.multiply(RotationAxis.POSITIVE_X.rotationDegrees(90)); stack.multiply(RotationAxis.POSITIVE_X.rotationDegrees(90));
VertexConsumer vertices = renderContext.getBuffer(RenderLayer.getEntitySolid(player.method_52814().capeTexture())); VertexConsumer vertices = renderContext.getBuffer(RenderLayer.getEntitySolid(player.getSkinTextures().capeTexture()));
model.renderCape(stack, vertices, lightUv, OverlayTexture.DEFAULT_UV); model.renderCape(stack, vertices, lightUv, OverlayTexture.DEFAULT_UV);
stack.pop(); stack.pop();
} }

View file

@ -36,7 +36,7 @@ public class DJPon3Feature<T extends AbstractClientPlayerEntity, M extends Entit
deadMau5.setVisible(true); deadMau5.setVisible(true);
VertexConsumer vertices = renderContext.getBuffer(deadMau5.getLayer(entity.method_52814().texture())); VertexConsumer vertices = renderContext.getBuffer(deadMau5.getLayer(entity.getSkinTextures().texture()));
deadMau5.render(stack, vertices, OverlayTexture.DEFAULT_UV, lightUv, limbDistance, limbAngle, tickDelta, 1); deadMau5.render(stack, vertices, OverlayTexture.DEFAULT_UV, lightUv, limbDistance, limbAngle, tickDelta, 1);

View file

@ -68,7 +68,7 @@ public class ElytraFeature<T extends LivingEntity, M extends EntityModel<T> & Po
protected Identifier getElytraTexture(T entity) { protected Identifier getElytraTexture(T entity) {
if (entity instanceof AbstractClientPlayerEntity player) { if (entity instanceof AbstractClientPlayerEntity player) {
SkinTextures textures = player.method_52814(); SkinTextures textures = player.getSkinTextures();
if (textures.elytraTexture() != null) { if (textures.elytraTexture() != null) {
return textures.elytraTexture(); return textures.elytraTexture();

View file

@ -37,6 +37,7 @@ public class HeldItemFeature<T extends LivingEntity, M extends EntityModel<T> &
return main ? entity.getMainHandStack() : entity.getOffHandStack(); return main ? entity.getMainHandStack() : entity.getOffHandStack();
} }
@Override @Override
public void render(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, T entity, float limbDistance, float limbAngle, float tickDelta, float age, float headYaw, float headPitch) { public void render(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, T entity, float limbDistance, float limbAngle, float tickDelta, float age, float headYaw, float headPitch) {
@ -44,7 +45,7 @@ public class HeldItemFeature<T extends LivingEntity, M extends EntityModel<T> &
ItemStack right = getRightItem(entity); ItemStack right = getRightItem(entity);
if (!left.isEmpty() || !right.isEmpty()) { if (!left.isEmpty() || !right.isEmpty()) {
M model = context.getInternalRenderer().getModel(); M model = context.getInternalRenderer().getModels().body();
stack.push(); stack.push();

View file

@ -1,14 +1,13 @@
package com.minelittlepony.client.render.entity.npc; package com.minelittlepony.client.render.entity.npc;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.EntityRendererFactory; import net.minecraft.client.render.entity.EntityRendererFactory;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.mob.MobEntity; import net.minecraft.entity.mob.MobEntity;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.Util;
import net.minecraft.village.VillagerDataContainer; import net.minecraft.village.VillagerDataContainer;
import net.minecraft.village.VillagerProfession; import net.minecraft.village.VillagerProfession;
import com.minelittlepony.api.model.ModelWrapper; import com.minelittlepony.api.model.Models;
import com.minelittlepony.api.model.gear.Gear; import com.minelittlepony.api.model.gear.Gear;
import com.minelittlepony.api.pony.meta.Race; import com.minelittlepony.api.pony.meta.Race;
import com.minelittlepony.api.pony.meta.Wearable; import com.minelittlepony.api.pony.meta.Wearable;
@ -17,15 +16,21 @@ import com.minelittlepony.client.render.entity.PonyRenderer;
import com.minelittlepony.client.render.entity.feature.*; import com.minelittlepony.client.render.entity.feature.*;
import com.minelittlepony.client.render.entity.npc.textures.*; import com.minelittlepony.client.render.entity.npc.textures.*;
import java.util.*; import java.util.function.Function;
abstract class AbstractNpcRenderer<T extends MobEntity & VillagerDataContainer> extends PonyRenderer<T, ClientPonyModel<T>> { abstract class AbstractNpcRenderer<T extends MobEntity & VillagerDataContainer> extends PonyRenderer<T, ClientPonyModel<T>> {
private final Map<Race, ModelWrapper<T, ClientPonyModel<T>>> models = new EnumMap<>(Race.class);
private final NpcClothingFeature<T, ClientPonyModel<T>, AbstractNpcRenderer<T>> clothing; private final NpcClothingFeature<T, ClientPonyModel<T>, AbstractNpcRenderer<T>> clothing;
private final Function<Race, Models<T, ClientPonyModel<T>>> models = Util.memoize(race -> {
if (race.isHuman()) {
race = Race.EARTH;
}
return ModelType.getPlayerModel(race).create(false, this::initializeModel);
});
public AbstractNpcRenderer(EntityRendererFactory.Context context, String type, TextureSupplier<T> textureSupplier, TextureSupplier<String> formatter) { public AbstractNpcRenderer(EntityRendererFactory.Context context, String type, TextureSupplier<T> textureSupplier, TextureSupplier<String> formatter) {
super(context, ModelType.getPlayerModel(Race.EARTH).getKey(false), SillyPonyTextureSupplier.create(textureSupplier, formatter)); super(context, ModelType.getPlayerModel(Race.EARTH).getKey(false), SillyPonyTextureSupplier.create(textureSupplier, formatter));
clothing = new NpcClothingFeature<>(this, type); clothing = new NpcClothingFeature<>(this, type);
this.manager.setModelsLookup(entity -> models.apply(getEntityPony(entity).race()));
addFeature(clothing); addFeature(clothing);
} }
@ -54,20 +59,6 @@ abstract class AbstractNpcRenderer<T extends MobEntity & VillagerDataContainer>
return super.shouldRender(model, entity, wearable, gear); return super.shouldRender(model, entity, wearable, gear);
} }
@Override
public void render(T entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) {
model = manager.setModel(models.computeIfAbsent(getEntityPony(entity).race(), this::createModel)).body();
super.render(entity, entityYaw, tickDelta, stack, renderContext, lightUv);
}
private ModelWrapper<T, ClientPonyModel<T>> createModel(Race race) {
if (race.isHuman()) {
race = Race.EARTH;
}
return ModelType.getPlayerModel(race).create(false, this::initializeModel);
}
protected void initializeModel(ClientPonyModel<T> model) { protected void initializeModel(ClientPonyModel<T> model) {
} }

View file

@ -6,7 +6,7 @@ import net.minecraft.util.Identifier;
import net.minecraft.util.Util; import net.minecraft.util.Util;
import com.minelittlepony.api.pony.Pony; import com.minelittlepony.api.pony.Pony;
import com.minelittlepony.client.SkinsProxy; import com.minelittlepony.api.pony.SkinsProxy;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.function.Function; import java.util.function.Function;

View file

@ -8,7 +8,9 @@ public class SillyPonyTextureSupplier {
public static <T extends LivingEntity & VillagerDataContainer> TextureSupplier<T> create(TextureSupplier<T> fallback, TextureSupplier<String> formatter) { public static <T extends LivingEntity & VillagerDataContainer> TextureSupplier<T> create(TextureSupplier<T> fallback, TextureSupplier<String> formatter) {
Identifier egg = formatter.apply("silly_pony"); Identifier egg = formatter.apply("silly_pony");
Identifier egg2 = formatter.apply("tiny_silly_pony"); Identifier egg2 = formatter.apply("tiny_silly_pony");
return entity -> isBestPony(entity) ? (entity.isBaby() ? egg2 : egg) : fallback.apply(entity); return entity -> {
return isBestPony(entity) ? ("Dinky".equals(entity.getCustomName().getString()) ? egg2 : egg) : fallback.apply(entity);
};
} }
public static boolean isBestPony(LivingEntity entity) { public static boolean isBestPony(LivingEntity entity) {
@ -16,7 +18,7 @@ public class SillyPonyTextureSupplier {
return false; return false;
} }
String name = entity.getCustomName().getString(); String name = entity.getCustomName().getString();
return "Derpy".equals(name) || (entity.isBaby() && "Dinky".equals(name)); return "Derpy".equals(name) || "Dinky".equals(name);
} }
public static boolean isCrownPony(LivingEntity entity) { public static boolean isCrownPony(LivingEntity entity) {

View file

@ -20,7 +20,8 @@ public enum PonyTransformation {
public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) { public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) {
if (model.getAttributes().isSwimming) stack.translate(0, -0.3F, 0); if (model.getAttributes().isSwimming) stack.translate(0, -0.3F, 0);
if (model.getAttributes().isCrouching) stack.translate(0, -0.2F, 0); if (model.getAttributes().isCrouching) stack.translate(0, -0.2F, 0);
if (model.getAttributes().isLyingDown) stack.translate(0, -0.61F, 0.1F); if (model.getAttributes().isLyingDown) stack.translate(0, -0.77F, 0.1F);
if (model.getAttributes().isSleeping) stack.translate(0, 0.16F, 0);
if (model.getAttributes().isSitting) stack.translate(0, -0.2F, -0.2F); if (model.getAttributes().isSitting) stack.translate(0, -0.2F, -0.2F);
switch (part) { switch (part) {
@ -28,7 +29,8 @@ public enum PonyTransformation {
if (model.getAttributes().isCrouching) stack.translate(-0.03F, 0.03F, 0.13F); if (model.getAttributes().isCrouching) stack.translate(-0.03F, 0.03F, 0.13F);
break; break;
case HEAD: case HEAD:
if (model.getAttributes().isCrouching) stack.translate(0, 0.1F, 0); if (model.getAttributes().isLyingDown) stack.translate(-0.05F, -0.05F, 0);
if (model.getAttributes().isCrouching) stack.translate(0, 0.1F, -0);
break; break;
case BACK: case BACK:
translateForRider(stack); translateForRider(stack);
@ -42,7 +44,8 @@ public enum PonyTransformation {
public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) { public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) {
if (model.getAttributes().isSwimming) stack.translate(0, -0.2F, 0); if (model.getAttributes().isSwimming) stack.translate(0, -0.2F, 0);
if (model.getAttributes().isCrouching) stack.translate(0, -0.15F, 0); if (model.getAttributes().isCrouching) stack.translate(0, -0.15F, 0);
if (model.getAttributes().isLyingDown) stack.translate(0, -0.6F, 0.15F); if (model.getAttributes().isLyingDown) stack.translate(0, -0.68F, 0.15F);
if (model.getAttributes().isSleeping) stack.translate(0, 0.08F, 0);
if (model.getAttributes().isSitting) stack.translate(0, 0, -0.2F); if (model.getAttributes().isSitting) stack.translate(0, 0, -0.2F);
switch (part) { switch (part) {
@ -77,7 +80,8 @@ public enum PonyTransformation {
@Override @Override
public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) { public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) {
if (model.getAttributes().isCrouching) stack.translate(0, -0.15F, 0); if (model.getAttributes().isCrouching) stack.translate(0, -0.15F, 0);
if (model.getAttributes().isLyingDown) stack.translate(0, -0.6F, 0.25F); if (model.getAttributes().isLyingDown) stack.translate(0, -0.66F, 0.25F);
if (model.getAttributes().isSleeping) stack.translate(0, 0.06F, 0);
if (model.getAttributes().isSitting) stack.translate(0, 0, -0.2F); if (model.getAttributes().isSitting) stack.translate(0, 0, -0.2F);
switch (part) { switch (part) {
@ -88,7 +92,7 @@ public enum PonyTransformation {
break; break;
case HEAD: case HEAD:
stack.translate(0, -0.14F, -0.06F); stack.translate(0, -0.14F, -0.06F);
if (model.getAttributes().isLyingDown) stack.translate(0, 0, -0.1F); if (model.getAttributes().isLyingDown) stack.translate(-0.05F, 0, -0.1F);
if (model.getAttributes().isCrouching) stack.translate(0, 0.15F, 0); if (model.getAttributes().isCrouching) stack.translate(0, 0.15F, 0);
break; break;
case BODY: case BODY:
@ -113,7 +117,8 @@ public enum PonyTransformation {
public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) { public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) {
if (model.getAttributes().isSwimming) stack.translate(0, -0.9F, 0); if (model.getAttributes().isSwimming) stack.translate(0, -0.9F, 0);
if (model.getAttributes().isCrouching) stack.translate(0, -0.2F, 0); if (model.getAttributes().isCrouching) stack.translate(0, -0.2F, 0);
if (model.getAttributes().isLyingDown) stack.translate(0, -0.8F, -0.3F); if (model.getAttributes().isLyingDown) stack.translate(0, -0.98F, -0.3F);
if (model.getAttributes().isSleeping) stack.translate(0, 0.18F, 0);
if (model.getAttributes().isSitting) stack.translate(0, -0.6F, -0.2F); if (model.getAttributes().isSitting) stack.translate(0, -0.6F, -0.2F);
stack.translate(0, 0.2F, 0); stack.translate(0, 0.2F, 0);
@ -142,7 +147,8 @@ public enum PonyTransformation {
@Override @Override
public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) { public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) {
if (model.getAttributes().isCrouching) stack.translate(0, -0.15F, 0); if (model.getAttributes().isCrouching) stack.translate(0, -0.15F, 0);
if (model.getAttributes().isLyingDown) stack.translate(0, -0.5F, 0.35F); if (model.getAttributes().isLyingDown) stack.translate(0, -0.6F, 0.35F);
if (model.getAttributes().isSleeping) stack.translate(0, 0.1F, 0);
if (model.getAttributes().isSitting) stack.translate(0, 0.1F, -0.2F); if (model.getAttributes().isSitting) stack.translate(0, 0.1F, -0.2F);
switch (part) { switch (part) {
@ -175,7 +181,8 @@ public enum PonyTransformation {
public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) { public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) {
if (model.getAttributes().isSwimming) stack.translate(0, -0.6F, 0); if (model.getAttributes().isSwimming) stack.translate(0, -0.6F, 0);
if (model.getAttributes().isCrouching) stack.translate(0, -0.15F, 0); if (model.getAttributes().isCrouching) stack.translate(0, -0.15F, 0);
if (model.getAttributes().isLyingDown) stack.translate(0, -0.45F, -0.3F); if (model.getAttributes().isLyingDown) stack.translate(0, -0.71F, -0.3F);
if (model.getAttributes().isSleeping) stack.translate(0, 0.26F, 0);
if (model.getAttributes().isSitting) stack.translate(0, -0.4F, -0.2F); if (model.getAttributes().isSitting) stack.translate(0, -0.4F, -0.2F);
switch (part) { switch (part) {

View file

@ -88,16 +88,17 @@ public class NativeUtil {
} }
public static void parseImage(Identifier resource, Consumer<TriggerPixel.Mat> consumer, Consumer<Exception> fail) { public static void parseImage(Identifier resource, Consumer<TriggerPixel.Mat> consumer, Consumer<Exception> fail) {
parseImage(resource, consumer, fail, 0); MinecraftClient.getInstance().execute(() -> {
}
private static void parseImage(Identifier resource, Consumer<TriggerPixel.Mat> consumer, Consumer<Exception> fail, int attempt) {
try {
if (!RenderSystem.isOnRenderThread()) { if (!RenderSystem.isOnRenderThread()) {
RenderSystem.recordRenderCall(() -> parseImage(resource, consumer, fail, attempt)); RenderSystem.recordRenderCall(() -> _parseImage(resource, consumer, fail, 0));
return; return;
} }
_parseImage(resource, consumer, fail, 0);
});
}
private static void _parseImage(Identifier resource, Consumer<TriggerPixel.Mat> consumer, Consumer<Exception> fail, int attempt) {
try {
MinecraftClient mc = MinecraftClient.getInstance(); MinecraftClient mc = MinecraftClient.getInstance();
TextureManager textures = mc.getTextureManager(); TextureManager textures = mc.getTextureManager();

View file

@ -0,0 +1,62 @@
{
"minelp.options.title": "Mine Little Pony Instellings",
"minelp.options.ponylevel": "Ponievlak",
"minelp.options.ponylevel.ponies": "Enigste Ponietjies",
"minelp.options.ponylevel.ponies.tooltip": "Alle spelers is ponies\n\nNie-ponievelle word vervang met 'n ewekansige agtergrondponie",
"minelp.options.ponylevel.humans": "Enigste Mans",
"minelp.options.ponylevel.humans.tooltip": "Al speelers menslik is\n\nPony klere sal virpas maar hulle wil na die menslik modelle gebruik",
"minelp.options.ponylevel.both": "Albei",
"minelp.options.ponylevel.both.tooltip": "Speele kan ponies of menslik",
"minelp.options.options": "Ponie Opsies",
"minelp.options.sizes": "Verskeie Poniegroottes",
"minelp.options.skins": "Veloplaaier",
"minelp.options.skins.hdskins.open": "Maak HD Skins oop",
"minelp.options.skins.hdskins.disabled": "HD Skins is nie geïnstalleer nie\n\nDie HD Skins-mod is nodig om velle van in-speletjie op te laai en om pasgemaakte velbedieners te gebruik.\n\nAs jy dit nie kan gebruik nie, sal jy na www.minecraft.net moet gaan om jou vel daarheen op te laai.",
"minelp.options.snuzzles": "Wys Snuzzles",
"minelp.options.fillycam": "Vul-kamera",
"minelp.options.showscale": "Toon-akkurate skaal",
"minelp.options.fpsmagic": "Magie in eerstepersoon",
"minelp.options.tpsmagic": "Magie in derdepersoon",
"minelp.options.ponyskulls": "Ponieskedels",
"minelp.options.frustrum": "Frustum tjeks",
"minelp.options.flappyelytras": "Klap vlerke terwyl jy sweef",
"minelp.options.horsiemode": "Perdkiejie Perd Modus",
"minelp.options.nofun": "Vervelige Modus",
"minelp.options.button": "Vertoon op Titelskerm",
"minelp.options.button.on": "Wys altyd\n\nBeide die ponieknoppie en HD Skins-knoppie is sigbaar (indien geïnstalleer)",
"minelp.options.button.auto": "Vertoon slegs wanneer HD Skins nie geïnstalleer is nie",
"minelp.options.button.off": "Moet nooit vertoon nie\n\nJy sal net die HD Skins-knoppie sien as dit geïnstalleer is.",
"minelp.options.option.disabled": "Hierdie opsie is toegesluit in oorlewings-multispeler.\n\nVerander spelmodusse of verlaat en sluit weer aan\ndie bediener om hierdie instelling te verander.",
"minelp.mobs.title": "Mob-instellings",
"minelp.mobs.villagers": "Ponie Dorpenaars",
"minelp.mobs.zombies": "Ponie Zombies",
"minelp.mobs.pigzombies": "Ponie Piglins",
"minelp.mobs.striders": "Ponie Striders",
"minelp.mobs.skeletons": "Ponie Geraamte",
"minelp.mobs.illagers": "Ponie Illagers",
"minelp.mobs.guardians": "Ponify Voogde",
"minelp.mobs.endermen": "Ponie Endermans",
"minelp.mobs.allays": "Ponie Allaye",
"minelp.mobs.inanimates": "Ponie Voorwerpe",
"minelp.mode.dry": "Land ponie",
"minelp.mode.wet": "See pony",
"minelp.debug.reload_models.message": "Herlaai tans poniemodelle...",
"minelp.debug.scale": "Skaalfaktor",
"minelp.debug.scale.meg": "Groote",
"minelp.debug.scale.max": "Dubbel",
"minelp.debug.scale.mid": "Verstek",
"minelp.debug.scale.sa": "Toon-akkurate",
"minelp.debug.scale.min": "Klein",
"minelp.debug.size": "Grootte ignoreer",
"minelp.debug.race": "Ras oorheersing",
"minelp.debug.armour": "Deaktiveer geponifiseerde pantserteksture",
"skin_type.minelp.seapony": "Seeponie",
"skin_type.minelittlepony.crown": "Kroon",
"skin_type.minelittlepony.muffin": "Muffin hoed",
"skin_type.minelittlepony.hat": "Hekshoed",
"skin_type.minelittlepony.antlers": "Hert Horings",
"skin_type.minelittlepony.saddle_bags_left": "Links Sakkie",
"skin_type.minelittlepony.saddle_bags_right": "Regs Sakkie",
"skin_type.minelittlepony.saddle_bags_both": "Saalsakke",
"skin_type.minelittlepony.stetson": "Stetson"
}

View file

@ -13,15 +13,18 @@
"minelp.options.skins.hdskins.open": "Öffne HD Skins", "minelp.options.skins.hdskins.open": "Öffne HD Skins",
"minelp.options.skins.hdskins.disabled": "HD Skins ist nicht installiert\n\nDer HD Skins mod wird benötigt um deinen Skin auf einen custom skin server hochzuladen.\n\nWenn du das nicht kannst, gehe zu www.minecraft.net und lade deinen Skin dort hoch.", "minelp.options.skins.hdskins.disabled": "HD Skins ist nicht installiert\n\nDer HD Skins mod wird benötigt um deinen Skin auf einen custom skin server hochzuladen.\n\nWenn du das nicht kannst, gehe zu www.minecraft.net und lade deinen Skin dort hoch.",
"minelp.options.snuzzles": "Zeige die Schnauzen der Ponies", "minelp.options.snuzzles": "Zeige die Schnauzen der Ponies",
"minelp.options.fillycam": "Filly Kamera",
"minelp.options.showscale": "Nutze die Größen aus der Serie", "minelp.options.showscale": "Nutze die Größen aus der Serie",
"minelp.options.fpsmagic": "Magie in der ersten Person", "minelp.options.fpsmagic": "Magie in der ersten Person",
"minelp.options.tpsmagic": "Magie in der dritten Person", "minelp.options.tpsmagic": "Magie in der dritten Person",
"minelp.options.ponyskulls": "Pony-Schädel", "minelp.options.ponyskulls": "Pony-Schädel",
"minelp.options.frustrum": "Frustum Prüfungen", "minelp.options.frustrum": "Frustum Prüfungen",
"minelp.options.flappyelytras": "Beim Gleiten mit den Flügeln schlagen", "minelp.options.flappyelytras": "Beim Gleiten mit den Flügeln schlagen",
"minelp.options.horsiemode": "Pferdy Pferd Modus",
"minelp.options.nofun": "Langweiliger Modus", "minelp.options.nofun": "Langweiliger Modus",
"minelp.options.dualskinmode": "(Experimentell) Dualer Skin Modus",
"minelp.options.button": "Button auf dem Titelbildschirm anzeigen", "minelp.options.button": "Button auf dem Titelbildschirm anzeigen",
"minelp.options.button.on": "Immer Anzeigen\n\nSowie der Pony Button, als auch der HD Skins Button (sofern instaliert) werden angezeigt.", "minelp.options.button.on": "Immer Anzeigen\n\nSowie der Pony Button, als auch der HD Skins Button (sofern instaliert) werden angezeigt",
"minelp.options.button.auto": "Nur anzeigen wenn HD Skins nicht installiert ist", "minelp.options.button.auto": "Nur anzeigen wenn HD Skins nicht installiert ist",
"minelp.options.button.off": "Niemals anzeigen", "minelp.options.button.off": "Niemals anzeigen",
"minelp.options.option.disabled": "Diese Optionen sind, wärend einer Mehrspieler Sitzung, im Überlebensmodus gesperrt.\n\nUm die Einstellungen zu ändern trete dem Server neu\nbei oder wechsel in den Kreativ Modus.", "minelp.options.option.disabled": "Diese Optionen sind, wärend einer Mehrspieler Sitzung, im Überlebensmodus gesperrt.\n\nUm die Einstellungen zu ändern trete dem Server neu\nbei oder wechsel in den Kreativ Modus.",
@ -40,7 +43,6 @@
"minelp.mode.wet": "Seepony", "minelp.mode.wet": "Seepony",
"minelp.debug.reload_models.message": "Ponytexturen neu laden...", "minelp.debug.reload_models.message": "Ponytexturen neu laden...",
"minelp.debug.scale": "Skalierungsfaktor", "minelp.debug.scale": "Skalierungsfaktor",
"minelp.debug.scale.value": "%.2f",
"minelp.debug.scale.meg": "Enorm", "minelp.debug.scale.meg": "Enorm",
"minelp.debug.scale.max": "Doppelt", "minelp.debug.scale.max": "Doppelt",
"minelp.debug.scale.mid": "Normal", "minelp.debug.scale.mid": "Normal",
@ -48,7 +50,7 @@
"minelp.debug.scale.min": "Winzig", "minelp.debug.scale.min": "Winzig",
"minelp.debug.size": "Überschreibe Größe", "minelp.debug.size": "Überschreibe Größe",
"minelp.debug.race": "Überschreibe Spezies", "minelp.debug.race": "Überschreibe Spezies",
"minelp.debug.armour": "Ponifizierte Rüstungsständer deaktivieren",
"skin_type.minelp.seapony": "Seepony", "skin_type.minelp.seapony": "Seepony",
"skin_type.minelittlepony.crown": "Krone", "skin_type.minelittlepony.crown": "Krone",
"skin_type.minelittlepony.muffin": "Muffin-Mütze", "skin_type.minelittlepony.muffin": "Muffin-Mütze",

View file

@ -0,0 +1,62 @@
{
"minelp.options.title": "Mine Little Pony Settings",
"minelp.options.ponylevel": "Pony Level",
"minelp.options.ponylevel.ponies": "Ponies Only",
"minelp.options.ponylevel.ponies.tooltip": "All players are ponies\n\nNon-pony skins are replaced with a random background pony",
"minelp.options.ponylevel.humans": "Humans Only",
"minelp.options.ponylevel.humans.tooltip": "All players are humans\n\nPony skins are used but will be applied to the human model",
"minelp.options.ponylevel.both": "Both",
"minelp.options.ponylevel.both.tooltip": "Players can be ponies or humans",
"minelp.options.options": "Pony Options",
"minelp.options.sizes": "Varied Pony Sizes",
"minelp.options.skins": "Skin Uploader",
"minelp.options.skins.hdskins.open": "Open HD Skins",
"minelp.options.skins.hdskins.disabled": "HD Skins is not installed\n\nThe HD Skins mod is required to upload skins from in-game and to use custom skin servers.\n\nIf you cannot use that you will have to go to www.minecraft.net to upload your skin there.",
"minelp.options.snuzzles": "Show Snuzzles",
"minelp.options.fillycam": "Filly Cam",
"minelp.options.showscale": "Show-accurate scaling",
"minelp.options.fpsmagic": "Magic in first-person",
"minelp.options.tpsmagic": "Magic in third-person",
"minelp.options.ponyskulls": "Pony Skulls",
"minelp.options.frustrum": "Frustum checks",
"minelp.options.flappyelytras": "Flap Wings whilst Gliding",
"minelp.options.horsiemode": "Horsey Horse Mode",
"minelp.options.nofun": "Boring Mode",
"minelp.options.button": "Display On Title Screen",
"minelp.options.button.on": "Always Display\n\nBoth the pony button and HD Skins button are visible (if installed)",
"minelp.options.button.auto": "Display only when HD Skins is not installed",
"minelp.options.button.off": "Never Display\n\nYou will only see the HD Skins button if installed.",
"minelp.options.option.disabled": "This option is locked in survival multiplayer.\n\nChange game modes or leave and rejoin\nthe server to change this setting.",
"minelp.mobs.title": "Mob Settings",
"minelp.mobs.villagers": "Ponify Villagers",
"minelp.mobs.zombies": "Ponify Zombies",
"minelp.mobs.pigzombies": "Ponify Piglins",
"minelp.mobs.striders": "Ponify Striders",
"minelp.mobs.skeletons": "Ponify Skeletons",
"minelp.mobs.illagers": "Ponify Illagers",
"minelp.mobs.guardians": "Ponify Guardians",
"minelp.mobs.endermen": "Ponify Endermen",
"minelp.mobs.allays": "Ponify Allays",
"minelp.mobs.inanimates": "Ponify Objects",
"minelp.mode.dry": "Land pony",
"minelp.mode.wet": "Sea pony",
"minelp.debug.reload_models.message": "Reloading pony models...",
"minelp.debug.scale": "Scaling Factor",
"minelp.debug.scale.meg": "Mega",
"minelp.debug.scale.max": "Double",
"minelp.debug.scale.mid": "Default",
"minelp.debug.scale.sa": "Show-accurate",
"minelp.debug.scale.min": "Miniscule",
"minelp.debug.size": "Size Override",
"minelp.debug.race": "Race Override",
"minelp.debug.armour": "Disable ponified armour textures",
"skin_type.minelp.seapony": "Seapony",
"skin_type.minelittlepony.crown": "Crown",
"skin_type.minelittlepony.muffin": "Muffin Hat",
"skin_type.minelittlepony.hat": "Witch's Hat",
"skin_type.minelittlepony.antlers": "Deer Antlers",
"skin_type.minelittlepony.saddle_bags_left": "Left Satchel",
"skin_type.minelittlepony.saddle_bags_right": "Right Satchel",
"skin_type.minelittlepony.saddle_bags_both": "Saddlebags",
"skin_type.minelittlepony.stetson": "Stetson"
}

View file

@ -1,5 +1,4 @@
{ {
"key.minelittlepony.settings": "Petite Equine Sailor", "key.minelittlepony.settings": "Petite Equine Sailor",
"minelp.options.title": "Petite Equine Sailor Choices", "minelp.options.title": "Petite Equine Sailor Choices",
"minelp.options.ponylevel": "Notoriety", "minelp.options.ponylevel": "Notoriety",
@ -22,6 +21,8 @@
"minelp.options.ponyskulls": "Rendaaar mah heads", "minelp.options.ponyskulls": "Rendaaar mah heads",
"minelp.options.frustrum": "Horsey Sails", "minelp.options.frustrum": "Horsey Sails",
"minelp.options.flappyelytras": "Look at yew, ye flapping like a wee bird", "minelp.options.flappyelytras": "Look at yew, ye flapping like a wee bird",
"minelp.options.horsiemode": "Make it a Fine Steed Worth Riding",
"minelp.options.nofun": "Being Serious-like",
"minelp.options.button": "Anounce Yer Arrival", "minelp.options.button": "Anounce Yer Arrival",
"minelp.options.button.on": "More t' merrier\n\nShow off ya haul even ifn' noboy asked", "minelp.options.button.on": "More t' merrier\n\nShow off ya haul even ifn' noboy asked",
"minelp.options.button.auto": "Proud n' contained\n\nNo need ta scare the lad...yet", "minelp.options.button.auto": "Proud n' contained\n\nNo need ta scare the lad...yet",
@ -49,6 +50,14 @@
"minelp.debug.scale.min": "Pathetic", "minelp.debug.scale.min": "Pathetic",
"minelp.debug.size": "Bow Width", "minelp.debug.size": "Bow Width",
"minelp.debug.race": "Sail Height", "minelp.debug.race": "Sail Height",
"minelp.debug.armour": "Batten down the hatches",
"hdskins.mode.minelp_seapony": "Seaharpy (in da briny deep)" "skin_type.minelp.seapony": "Maremaid",
"skin_type.minelittlepony.crown": "Captain's Tricorne",
"skin_type.minelittlepony.muffin": "Galley-man's Headwear",
"skin_type.minelittlepony.hat": "Olde Hag's Gown",
"skin_type.minelittlepony.antlers": "Banshee's Handlebars",
"skin_type.minelittlepony.saddle_bags_left": "Starboard Treasure Chest",
"skin_type.minelittlepony.saddle_bags_right": "Port-side Treasure Chest",
"skin_type.minelittlepony.saddle_bags_both": "Treasure Chests",
"skin_type.minelittlepony.stetson": "Captin's Hat"
} }

View file

@ -0,0 +1,62 @@
{
"minelp.options.title": "sƃuᴉʇʇǝS ʎuoԀ ǝlʇʇᴉ˥ ǝuᴉW",
"minelp.options.ponylevel": "lǝʌǝ˥ ʎuoԀ",
"minelp.options.ponylevel.ponies": "ʎluO sǝᴉuoԀ",
"minelp.options.ponylevel.ponies.tooltip": "ʎuod punoɹƃʞɔɐq ɯopuɐɹ ɐ ɥʇᴉʍ pǝɔɐldǝɹ ǝɹɐ suᴉʞs ʎuod-uoN\n\nsǝᴉuod ǝɹɐ sɹǝʎɐld ll∀",
"minelp.options.ponylevel.humans": "ʎluO suɐɯnH",
"minelp.options.ponylevel.humans.tooltip": "lǝpoɯɯnɥ ǝɥʇ oʇ pǝᴉlddɐ ǝq llᴉʍ ʇnq pǝsn ǝɹɐ suᴉʞs ʎuoԀ\n\nsuɐɯnɥ ǝɹɐ sɹǝʎɐld ll∀",
"minelp.options.ponylevel.both": "ɥʇoq",
"minelp.options.ponylevel.both.tooltip": "suɐɯnɥ ɹo sǝᴉuod ǝq uɐɔ sɹǝʎɐlԀ",
"minelp.options.options": "suoᴉʇdO ʎuoԀ",
"minelp.options.sizes": "sǝzᴉS ʎuoԀ pǝᴉɹɐΛ",
"minelp.options.skins": "ɹǝpɐold∩ uᴉʞS",
"minelp.options.skins.hdskins.open": "suᴉʞS DH uǝdO",
"minelp.options.skins.hdskins.disabled": "˙ǝɹǝɥʇ uᴉʞs ɹnoʎ pɐoldn oʇ ʇǝu˙ʇɟɐɹɔǝuᴉɯ˙ʍʍʍ oʇ oƃ oʇ ǝʌɐɥ llᴉʍ noʎ ʇɐɥʇ ǝsn ʇouuɐɔ noʎ ɟI\n\n˙sɹǝʌɹǝs uᴉʞs ɯoʇsnɔ ǝsn oʇ puɐ ǝɯɐƃ-uᴉ ɯoɹɟ suᴉʞs pɐoldn oʇ pǝɹᴉnbǝɹ sᴉ poɯ suᴉʞS DH ǝɥ⊥\n\npǝllɐʇsuᴉ ʇou sᴉ suᴉʞS DH",
"minelp.options.snuzzles": "sǝlzznuS ʍoɥS",
"minelp.options.fillycam": "ɯɐƆ ʎllᴉℲ",
"minelp.options.showscale": "ƃuᴉlɐɔs ǝʇɐɹnɔɔɐ-ʍoɥS",
"minelp.options.fpsmagic": "uosɹǝd-ʇsɹᴉɟ uᴉ ɔᴉƃɐW",
"minelp.options.tpsmagic": "uosɹǝd-pɹᴉɥʇ uᴉ ɔᴉƃɐW",
"minelp.options.ponyskulls": "sllnʞS ʎuoԀ",
"minelp.options.frustrum": "sʞɔǝɥɔ ɯnʇsnɹℲ",
"minelp.options.flappyelytras": "ƃuᴉpᴉlפ ʇslᴉɥʍ sƃuᴉM dɐlℲ",
"minelp.options.horsiemode": "ǝpoW ǝsɹoH ʎǝsɹoH",
"minelp.options.nofun": "ǝpoW ƃuᴉɹoq",
"minelp.options.button": "uǝǝɹɔS ǝlʇᴉ⊥ uO ʎɐldsᴉD",
"minelp.options.button.on": "(pǝllɐʇsuᴉ ɟᴉ) ǝlqᴉsᴉʌ ǝɹɐ uoʇʇnq suᴉʞS DH puɐ uoʇʇnq ʎuod ǝɥʇ ɥʇoq\n\nʎɐldsᴉD sʎɐʍl∀",
"minelp.options.button.auto": "pǝllɐʇsuᴉ ʇou sᴉ suᴉʞS DH uǝɥʍ ʎluo ʎɐldsᴉD",
"minelp.options.button.off": "˙pǝllɐʇsuᴉ ɟᴉ uoʇʇnq suᴉʞS DH ǝɥʇ ǝǝs ʎluo llᴉʍ no⅄\n\nʎɐldsᴉD ɹǝʌǝN",
"minelp.options.option.disabled": "˙ƃuᴉʇʇǝs sᴉɥʇ ǝƃuɐɥɔ oʇ ɹǝʌɹǝs ǝɥʇ\nuᴉoɾǝɹ puɐ ǝʌɐǝl ɹo sǝpoɯ ǝɯɐƃ ǝƃuɐɥƆ\n\n˙ɹǝʎɐldᴉʇlnɯ lɐʌᴉʌɹns uᴉ pǝʞɔol sᴉ uoᴉʇdo sᴉɥ⊥",
"minelp.mobs.title": "sƃuᴉʇʇǝS qoW",
"minelp.mobs.villagers": "sɹǝƃɐllᴉΛ ʎɟᴉuoԀ",
"minelp.mobs.zombies": "sǝᴉqɯoZ ʎɟᴉuoԀ",
"minelp.mobs.pigzombies": "suᴉlƃᴉԀ ʎɟᴉuoԀ",
"minelp.mobs.striders": "sɹǝpᴉɹʇS ʎɟᴉuoԀ",
"minelp.mobs.skeletons": "suoʇǝlǝʞS ʎɟᴉuoԀ",
"minelp.mobs.illagers": "sɹǝƃɐllI ʎɟᴉuoԀ",
"minelp.mobs.guardians": "suɐᴉpɹɐnפ ʎɟᴉuoԀ",
"minelp.mobs.endermen": "uǝɯɹǝpuƎ ʎɟᴉuoԀ",
"minelp.mobs.allays": "sʎɐll∀ ʎɟᴉuoԀ",
"minelp.mobs.inanimates": "sʇɔǝɾqO ʎɟᴉuoԀ",
"minelp.mode.dry": "ʎuod puɐ˥",
"minelp.mode.wet": "ʎuod ɐǝS",
"minelp.debug.reload_models.message": "˙˙˙slǝpoɯ ʎuod ƃuᴉpɐolǝᴚ",
"minelp.debug.scale": "ɹoʇɔɐℲ ƃuᴉlɐɔS",
"minelp.debug.scale.meg": "ɐƃǝW",
"minelp.debug.scale.max": "ǝlqnoD",
"minelp.debug.scale.mid": "ʇlnɐɟǝD",
"minelp.debug.scale.sa": "ǝʇɐɹnɔɔ∀ ʍoɥS",
"minelp.debug.scale.min": "ǝlnɔsᴉuᴉW",
"minelp.debug.size": "ǝpᴉɹɹǝʌO ǝzᴉS",
"minelp.debug.race": "ǝpᴉɹɹǝʌO ǝɔɐᴚ",
"minelp.debug.armour": "sǝɹnʇxǝʇ ɹnoɯɹɐ pǝᴉɟᴉuod ǝlqɐsᴉD",
"skin_type.minelp.seapony": "ʎuodɐǝS",
"skin_type.minelittlepony.crown": "uʍoɹƆ",
"skin_type.minelittlepony.muffin": "ʇɐH uᴉɟɟnW",
"skin_type.minelittlepony.hat": "ʇɐH ɥɔʇᴉM",
"skin_type.minelittlepony.antlers": "sɹǝlʇu∀ ɹǝǝD",
"skin_type.minelittlepony.saddle_bags_left": "lǝɥɔʇɐS ʇɟǝ˥",
"skin_type.minelittlepony.saddle_bags_right": "lǝɥɔʇɐS ʇɥƃᴉᴚ",
"skin_type.minelittlepony.saddle_bags_both": "sƃɐqǝlppɐS",
"skin_type.minelittlepony.stetson": "uosʇǝʇS"
}

View file

@ -23,6 +23,7 @@
"minelp.options.flappyelytras": "Flap Wings whilst Gliding", "minelp.options.flappyelytras": "Flap Wings whilst Gliding",
"minelp.options.horsiemode": "Horsey Horse Mode", "minelp.options.horsiemode": "Horsey Horse Mode",
"minelp.options.nofun": "Boring Mode", "minelp.options.nofun": "Boring Mode",
"minelp.options.dualskinmode": "(Experimental) Dual Skin Mode",
"minelp.options.button": "Display On Title Screen", "minelp.options.button": "Display On Title Screen",
"minelp.options.button.on": "Always Display\n\nBoth the pony button and HD Skins button are visible (if installed)", "minelp.options.button.on": "Always Display\n\nBoth the pony button and HD Skins button are visible (if installed)",
"minelp.options.button.auto": "Display only when HD Skins is not installed", "minelp.options.button.auto": "Display only when HD Skins is not installed",
@ -53,7 +54,8 @@
"minelp.debug.race": "Race Override", "minelp.debug.race": "Race Override",
"minelp.debug.armour": "Disable ponified armour textures", "minelp.debug.armour": "Disable ponified armour textures",
"skin_type.minelp.seapony": "Seapony", "skin_type.minelp.seapony": "Seapony Form",
"skin_type.minelp.nirik": "Kirin Nirik Form",
"skin_type.minelittlepony.crown": "Crown", "skin_type.minelittlepony.crown": "Crown",
"skin_type.minelittlepony.muffin": "Muffin Hat", "skin_type.minelittlepony.muffin": "Muffin Hat",
"skin_type.minelittlepony.hat": "Witch Hat", "skin_type.minelittlepony.hat": "Witch Hat",

View file

@ -0,0 +1,63 @@
{
"key.minelittlepony.settings": "Mine Little Horseling",
"minelp.options.title": "Mine Little Horseling Settings",
"minelp.options.ponylevel": "Horseling Yelm",
"minelp.options.ponylevel.ponies": "Horselings Only",
"minelp.options.ponylevel.ponies.tooltip": "All players are horselings\n\nNon-horseling skins shall be replaced with a hitormiss leaden horsling",
"minelp.options.ponylevel.humans": "Folk Only",
"minelp.options.ponylevel.humans.tooltip": "All players are folk\n\nHorseling skins shall be applied but shall be put to the manlike build",
"minelp.options.ponylevel.both": "Both",
"minelp.options.ponylevel.both.tooltip": "Players may be horselings or folk",
"minelp.options.options": "Horseling Options",
"minelp.options.sizes": "Varied Horseling Breadths",
"minelp.options.skins": "Skin Uploader",
"minelp.options.skins.hdskins.open": "Open HD Skins",
"minelp.options.skins.hdskins.disabled": "HD Skins is not installed\n\nThe HD Skins mod is needed to send skins from here and to brook besunderledge skin servers.\n\nIf you cannot brook that you will have to go to www.minecraft.net to upload your skin there.",
"minelp.options.snuzzles": "Show Snuzzles",
"minelp.options.fillycam": "Filly Cam",
"minelp.options.showscale": "Play Onmark Layouing",
"minelp.options.fpsmagic": "Spellcraft in first-selfly",
"minelp.options.tpsmagic": "Spellcraft in third-selfly",
"minelp.options.ponyskulls": "Horseling Headbones",
"minelp.options.frustrum": "Frustum finding outs",
"minelp.options.flappyelytras": "Flap Wings whilst Gliding",
"minelp.options.horsiemode": "Horsey Horse Way",
"minelp.options.nofun": "Boring Way",
"minelp.options.button": "Forthset on Main Shirm",
"minelp.options.button.on": "Always Forthset\n\nBoth the horseling switcher and HD Skins button are showing (if installed)",
"minelp.options.button.auto": "Forthset only when HD Skins is not installed",
"minelp.options.button.off": "Never Forthset\n\nYou will only see the HD Skins switcher if installed.",
"minelp.options.option.disabled": "This option is locked in overlive maniplayer.\n\nChange game wayset or leave and rejoin\nthe outreckoner to shift this setting.",
"minelp.mobs.title": "Wight Settings",
"minelp.mobs.villagers": "Ponify Thorpsmen",
"minelp.mobs.zombies": "Ponify Undead Liches",
"minelp.mobs.pigzombies": "Ponify Piglins",
"minelp.mobs.striders": "Ponify Striders",
"minelp.mobs.skeletons": "Ponify Bonesets",
"minelp.mobs.illagers": "Ponify Reavers",
"minelp.mobs.guardians": "Ponify Wards",
"minelp.mobs.endermen": "Ponify Endermen",
"minelp.mobs.allays": "Ponify Allays",
"minelp.mobs.inanimates": "Ponify Things",
"minelp.mode.dry": "Land pony",
"minelp.mode.wet": "Sea pony",
"minelp.debug.reload_models.message": "Edloading pony models...",
"minelp.debug.scale": "Meter Difference",
"minelp.debug.scale.meg": "Large",
"minelp.debug.scale.max": "Twofold",
"minelp.debug.scale.mid": "Stock",
"minelp.debug.scale.sa": "Play Onmark",
"minelp.debug.scale.min": "Miniscule",
"minelp.debug.size": "Bulk Override",
"minelp.debug.race": "Kind Override",
"minelp.debug.armour": "Cripple horselingified armour skins",
"skin_type.minelp.seapony": "Seahorseling",
"skin_type.minelittlepony.crown": "Kinehelm",
"skin_type.minelittlepony.muffin": "Muffin Hat",
"skin_type.minelittlepony.hat": "Witch Hat",
"skin_type.minelittlepony.antlers": "Deer Horns",
"skin_type.minelittlepony.saddle_bags_left": "Left Knapsack",
"skin_type.minelittlepony.saddle_bags_right": "Right Knapsack",
"skin_type.minelittlepony.saddle_bags_both": "Saddlebags",
"skin_type.minelittlepony.stetson": "Stetson"
}

View file

@ -0,0 +1 @@
{}

View file

@ -19,7 +19,6 @@
"minelp.mobs.pigzombies": "Ponifier Piglin", "minelp.mobs.pigzombies": "Ponifier Piglin",
"minelp.mobs.striders": "Ponifier Arpenteur", "minelp.mobs.striders": "Ponifier Arpenteur",
"minelp.mobs.skeletons": "Ponifier Illageois", "minelp.mobs.skeletons": "Ponifier Illageois",
"minelp.mobs.illagers": "Ponify Illagers",
"minelp.mobs.guardians": "Ponifier Gardien", "minelp.mobs.guardians": "Ponifier Gardien",
"minelp.mobs.endermen": "Ponifier Endermen", "minelp.mobs.endermen": "Ponifier Endermen",
"minelp.mode.dry": "Poney terrestre", "minelp.mode.dry": "Poney terrestre",
@ -27,7 +26,6 @@
"minelp.debug.reload_models.message": "Rechargement modèles de poney ...", "minelp.debug.reload_models.message": "Rechargement modèles de poney ...",
"minelp.debug.scale": "Facteur D'échelle", "minelp.debug.scale": "Facteur D'échelle",
"minelp.debug.scale.meg": "Énorme", "minelp.debug.scale.meg": "Énorme",
"minelp.debug.scale.max": "Double",
"minelp.debug.scale.mid": "Défaut", "minelp.debug.scale.mid": "Défaut",
"minelp.debug.scale.sa": "Montrer Précis", "minelp.debug.scale.sa": "Montrer Précis",
"minelp.debug.scale.min": "Tout Petit", "minelp.debug.scale.min": "Tout Petit",

View file

@ -0,0 +1,63 @@
{
"key.minelittlepony.settings": "Wine Wilwwe Poneh",
"minelp.options.title": "Wine Wilwwe Poneh Sewwings",
"minelp.options.ponylevel": "Poneh Wewew",
"minelp.options.ponylevel.ponies": "Ponehs Onwy",
"minelp.options.ponylevel.ponies.tooltip": "Al playerz iz poniez\n\nNonpony skinz iz replacd wif randem bakgroun ponehz",
"minelp.options.ponylevel.humans": "Hoomanz Onle",
"minelp.options.ponylevel.humans.tooltip": "Al playerz iz hoomanz\n\nPoneh skinz iz usd but wIl be applid to teh human model",
"minelp.options.ponylevel.both": "Bowh",
"minelp.options.ponylevel.both.tooltip": "Kittehs kan be ponehz or hoomanz",
"minelp.options.options": "Poneh Opwions",
"minelp.options.sizes": "Wawied Poneh Sizes",
"minelp.options.skins": "Fur Rizzer",
"minelp.options.skins.hdskins.open": "Opeh HD Skinz plox",
"minelp.options.skins.hdskins.disabled": "HD Skinz r not enstald\n\nTeh HD Skinz mod r rekwird 2 upload skinz frum engame an 2 us custom skin serverz.\n \nIf u cannot us that u wil haz go 2 www.minecraf.net 2 upload ur skin ther.",
"minelp.options.snuzzles": "Shwow Snuzzwes",
"minelp.options.fillycam": "Fiwwy Caw",
"minelp.options.showscale": "ShwoW-accuwawe scawing",
"minelp.options.fpsmagic": "Wagic in fiwsw-pewson",
"minelp.options.tpsmagic": "Wagic in thewd-pewson",
"minelp.options.ponyskulls": "Poneh Skulz",
"minelp.options.frustrum": "Pointey Leizarz",
"minelp.options.flappyelytras": "Flap Wingz Wilst Glidin",
"minelp.options.horsiemode": "Neigh Mowed Neigh Winnez",
"minelp.options.nofun": "Borin Mode",
"minelp.options.button": "Deespway On UwU Scween",
"minelp.options.button.on": "Alwayz Displai\n\nBoth teh pony button an HD Skinz button iz visibl (if enstaled)",
"minelp.options.button.auto": "Displai onle win HD Skinz r not enstald",
"minelp.options.button.off": "Nevr displai\n\nU wil onle se teh HD Skinz button if enstald.",
"minelp.options.option.disabled": "Whis opwion is wocked in suwwilaw wuwwipwayew.\n\nChange gawe wodes ow weawe and wejoin\nwhe sewwew two change whis sewwing.",
"minelp.mobs.title": "Mob Settingz",
"minelp.mobs.villagers": "Ponehfy Wilwagews",
"minelp.mobs.zombies": "Ponehfy Zowbies",
"minelp.mobs.pigzombies": "Ponehfy Pigwins",
"minelp.mobs.striders": "Ponehfy Swwidews",
"minelp.mobs.skeletons": "Ponehfy Skewewons",
"minelp.mobs.illagers": "Ponehfy Iwwagews",
"minelp.mobs.guardians": "Ponehfy Guawdeeans",
"minelp.mobs.endermen": "Ponehfy Endewwen",
"minelp.mobs.allays": "Ponehfy Iwwagews",
"minelp.mobs.inanimates": "Ponehfy Objecws",
"minelp.mode.dry": "Wand poneh",
"minelp.mode.wet": "See poneh",
"minelp.debug.reload_models.message": "Wewoadeeng pony wodews...",
"minelp.debug.scale": "Scawing Facwow",
"minelp.debug.scale.meg": "Wega",
"minelp.debug.scale.max": "Doubwe",
"minelp.debug.scale.mid": "Defauww",
"minelp.debug.scale.sa": "Shwow Accuwawe",
"minelp.debug.scale.min": "Winiscuwe",
"minelp.debug.size": "Size Owewwide",
"minelp.debug.race": "Waze Owewwide",
"minelp.debug.armour": "Disabl ponifid armr texturez",
"skin_type.minelp.seapony": "Seeponeh",
"skin_type.minelittlepony.crown": "Meown",
"skin_type.minelittlepony.muffin": "Muffin Hat plz",
"skin_type.minelittlepony.hat": "Crazy Kitteh Ownr Hat",
"skin_type.minelittlepony.antlers": "Deer Antlerz",
"skin_type.minelittlepony.saddle_bags_left": "Leaved Satchel",
"skin_type.minelittlepony.saddle_bags_right": "Rite Satchel",
"skin_type.minelittlepony.saddle_bags_both": "Kittehbagz",
"skin_type.minelittlepony.stetson": "Funi Hat"
}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1 @@
{}

View file

@ -1,5 +1,4 @@
{ {
"key.minelittlepony.settings": "Mine Little Pony",
"minelp.options.title": "Настройки Mine Little Pony", "minelp.options.title": "Настройки Mine Little Pony",
"minelp.options.ponylevel": "Уровень пони", "minelp.options.ponylevel": "Уровень пони",
"minelp.options.ponylevel.ponies": "Только пони", "minelp.options.ponylevel.ponies": "Только пони",
@ -21,7 +20,8 @@
"minelp.options.ponyskulls": "Понифицировать черепа", "minelp.options.ponyskulls": "Понифицировать черепа",
"minelp.options.frustrum": "Изменить проверку поля зрения", "minelp.options.frustrum": "Изменить проверку поля зрения",
"minelp.options.flappyelytras": "Махать крыльями при Парении", "minelp.options.flappyelytras": "Махать крыльями при Парении",
"minelp.options.passivenetworking": "Пассивная сеть [Beta]", "minelp.options.horsiemode": "Режим лошади",
"minelp.options.nofun": "Режим без веселья",
"minelp.options.button": "Отображать на главном экране", "minelp.options.button": "Отображать на главном экране",
"minelp.options.button.on": "Отображать всегда\n\nВидны обе кнопки Mine Little Pony и HD Skins (если установлен)", "minelp.options.button.on": "Отображать всегда\n\nВидны обе кнопки Mine Little Pony и HD Skins (если установлен)",
"minelp.options.button.auto": "Отображать, только если не установлен мод HD Skins", "minelp.options.button.auto": "Отображать, только если не установлен мод HD Skins",
@ -42,7 +42,6 @@
"minelp.mode.wet": "Морской пони", "minelp.mode.wet": "Морской пони",
"minelp.debug.reload_models.message": "Перезагрузка понифицированных моделей...", "minelp.debug.reload_models.message": "Перезагрузка понифицированных моделей...",
"minelp.debug.scale": "Масштаб", "minelp.debug.scale": "Масштаб",
"minelp.debug.scale.value": "%.2f",
"minelp.debug.scale.meg": "Мега", "minelp.debug.scale.meg": "Мега",
"minelp.debug.scale.max": "Удвоенный", "minelp.debug.scale.max": "Удвоенный",
"minelp.debug.scale.mid": "Стандартный", "minelp.debug.scale.mid": "Стандартный",
@ -50,7 +49,7 @@
"minelp.debug.scale.min": "Мельчайший", "minelp.debug.scale.min": "Мельчайший",
"minelp.debug.size": "Переопределение размера", "minelp.debug.size": "Переопределение размера",
"minelp.debug.race": "Переопределение расы", "minelp.debug.race": "Переопределение расы",
"minelp.debug.armour": "Отключить понифицированную броню",
"skin_type.minelp.seapony": "Морской пони", "skin_type.minelp.seapony": "Морской пони",
"skin_type.minelittlepony.crown": "Корона", "skin_type.minelittlepony.crown": "Корона",
"skin_type.minelittlepony.muffin": "Маффин", "skin_type.minelittlepony.muffin": "Маффин",

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1 @@
{}

View file

@ -1,38 +1,66 @@
{ {
"key.minelittlepony.settings": "我的小马驹", "key.minelittlepony.settings": "我的小马驹",
"minelp.options.title": "我的小马驹设置菜单", "minelp.options.title": "我的小马驹设置菜单",
"minelp.options.ponylevel": "小马化类型", "minelp.options.ponylevel": "小马化程度",
"minelp.options.ponylevel.ponies": "仅小马", "minelp.options.ponylevel.ponies": "全是小马",
"minelp.options.ponylevel.humans": "仅人类", "minelp.options.ponylevel.ponies.tooltip": "所有玩家都变小马\n\n使用非小马皮肤的玩家会被随机分配一个背景小马的皮肤",
"minelp.options.ponylevel.both": "全部", "minelp.options.ponylevel.humans": "全是人类",
"minelp.options.ponylevel.humans.tooltip": "所有玩家仍然是人类\n\n可以使用小马皮肤但会以人类模型来显示",
"minelp.options.ponylevel.both": "均有",
"minelp.options.ponylevel.both.tooltip": "玩家既可以是小马也可以是人类",
"minelp.options.options": "小马选项", "minelp.options.options": "小马选项",
"minelp.options.sizes": "多样的小马体型", "minelp.options.sizes": "多样的小马体型",
"minelp.options.skins": "皮肤上传器",
"minelp.options.skins.hdskins.open": "打开HD Skins",
"minelp.options.skins.hdskins.disabled": "未安装HD Skins\n\n使用HD Skins模组从游戏内向定制皮肤服务器上传并加载皮肤。\n\n如果你用不了的话你得去www.minecraft.net上传皮肤。",
"minelp.options.snuzzles": "显示鼻子", "minelp.options.snuzzles": "显示鼻子",
"minelp.options.fillycam": "显示小马视角", "minelp.options.fillycam": "显示幼驹视角",
"minelp.options.showscale": "准确的显示缩放", "minelp.options.showscale": "准确的显示缩放",
"minelp.options.fpsmagic": "第一人称视角显示魔法", "minelp.options.fpsmagic": "第一人称视角显示魔法",
"minelp.options.ponyskulls": "马化头部", "minelp.options.tpsmagic": "第三人称视角显示魔法",
"minelp.options.ponyskulls": "马化头颅",
"minelp.options.frustrum": "视锥体网格", "minelp.options.frustrum": "视锥体网格",
"minelp.options.flappyelytras": "在滑翔时拍翅膀",
"minelp.options.horsiemode": "大马模式",
"minelp.options.nofun": "无聊模式",
"minelp.options.dualskinmode": "(实验性)双层皮肤模式",
"minelp.options.button": "在标题界面显示设置菜单", "minelp.options.button": "在标题界面显示设置菜单",
"minelp.options.button.on": "总是显示\n\n小马按钮和HD Skins如果安装了按钮均可见",
"minelp.options.button.auto": "未安装HD Skins时才显示",
"minelp.options.button.off": "从不显示\n\n只有在安装了HD Skins后才显示HD Skins按钮。",
"minelp.options.option.disabled": "此选项在多人游戏的生存模式下锁定。\n\n改变游戏模式或重新进入\n服务器来改变这项设定。",
"minelp.mobs.title": "生物设置", "minelp.mobs.title": "生物设置",
"minelp.mobs.villagers": "马化村民", "minelp.mobs.villagers": "村民 小马化",
"minelp.mobs.zombies": "马化僵尸", "minelp.mobs.zombies": "僵尸 小马化",
"minelp.mobs.pigzombies": "马化僵尸猪灵", "minelp.mobs.pigzombies": "僵尸猪灵 小马化",
"minelp.mobs.striders": "炽足马兽", "minelp.mobs.striders": "炽足兽 小马化",
"minelp.mobs.skeletons": "马化骷髅", "minelp.mobs.skeletons": "骷髅 小马化",
"minelp.mobs.illagers": "马化掠夺者", "minelp.mobs.illagers": "掠夺者 小马化",
"minelp.mobs.guardians": "马化守卫者", "minelp.mobs.guardians": "守卫者 小马化",
"minelp.mobs.endermen": "马化末影人", "minelp.mobs.endermen": "末影人 小马化",
"minelp.mobs.inanimates": "马化物体", "minelp.mobs.allays": "悦灵 小马化",
"minelp.mobs.inanimates": "物体 小马化",
"minelp.mode.dry": "陆地小马模型", "minelp.mode.dry": "陆地小马模型",
"minelp.mode.wet": "海马小马模型", "minelp.mode.wet": "海马小马模型",
"minelp.debug.reload_models.message": "重新加载小马模型中...", "minelp.debug.reload_models.message": "重新加载小马模型中...",
"minelp.debug.scale": "比例系数", "minelp.debug.scale": "比例系数",
"minelp.debug.scale.value": "%.2f",
"minelp.debug.scale.meg": "巨大的", "minelp.debug.scale.meg": "巨大的",
"minelp.debug.scale.max": "双倍的", "minelp.debug.scale.max": "双倍的",
"minelp.debug.scale.mid": "默认", "minelp.debug.scale.mid": "默认",
"minelp.debug.scale.sa": "精准显示", "minelp.debug.scale.sa": "精准显示",
"minelp.debug.scale.min": "极小的", "minelp.debug.scale.min": "极小的",
"minelp.debug.size": "覆盖大小" "minelp.debug.size": "覆盖大小",
"minelp.debug.race": "覆盖种族",
"minelp.debug.armour": "停用小马化护甲纹理",
"skin_type.minelp.seapony": "海马",
"skin_type.minelittlepony.crown": "头冠",
"skin_type.minelittlepony.muffin": "马芬帽",
"skin_type.minelittlepony.hat": "女巫帽",
"skin_type.minelittlepony.antlers": "鹿角",
"skin_type.minelittlepony.saddle_bags_left": "左侧鞍包",
"skin_type.minelittlepony.saddle_bags_right": "右侧鞍包",
"skin_type.minelittlepony.saddle_bags_both": "双侧鞍包",
"skin_type.minelittlepony.stetson": "牛仔帽"
} }

View file

@ -27,7 +27,6 @@
"minelp.mode.wet": "海馬小馬模型", "minelp.mode.wet": "海馬小馬模型",
"minelp.debug.reload_models.message": "重新加載小馬模型中...", "minelp.debug.reload_models.message": "重新加載小馬模型中...",
"minelp.debug.scale": "比例係數", "minelp.debug.scale": "比例係數",
"minelp.debug.scale.value": "%.2f",
"minelp.debug.scale.meg": "巨大的", "minelp.debug.scale.meg": "巨大的",
"minelp.debug.scale.max": "雙倍的", "minelp.debug.scale.max": "雙倍的",
"minelp.debug.scale.mid": "默認", "minelp.debug.scale.mid": "默認",

View file

@ -127,8 +127,8 @@
{ {
"type": "mson:plane", "__comment": "butt", "type": "mson:plane", "__comment": "butt",
"texture": { "u": 36, "v": 16 }, "texture": { "u": 36, "v": 16 },
"mirror": [true, true], "mirror": [false, true],
"face": "south", "face": "north",
"size": [ 8, 4 ] "size": [ 8, 4 ]
} }
] ]

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View file

@ -31,12 +31,12 @@
"minelp.mixin.json" "minelp.mixin.json"
], ],
"depends": { "depends": {
"fabricloader": ">=0.12.0", "minecraft": "${minecraftVersion}",
"fabricloader": "${loaderVersion}",
"java": ">=17", "java": ">=17",
"fabric-api-base": ">=0.1.0", "fabric-api": "${fabricVersion}",
"fabric-lifecycle-events-v1": ">=0.1.0", "kirin": "${kirinVersion}",
"fabric-resource-loader-v0": ">=0.1.0", "mson": "${msonVersion}"
"kirin": "*"
}, },
"suggests": { "suggests": {
"hdskins": "*", "hdskins": "*",