mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-03-14 07:30:08 +01:00
Compare commits
92 commits
4.11.0-bet
...
1.20.2
Author | SHA1 | Date | |
---|---|---|---|
|
57754d8dec | ||
|
ec8f92e151 | ||
|
e21ce62631 | ||
|
c78cf32bd4 | ||
|
4ef2d4ab54 | ||
|
82a89eb1ba | ||
|
8bf3bc38a4 | ||
|
e01580f804 | ||
|
040105c792 | ||
|
18591c0720 | ||
|
31a9a9b0e6 | ||
|
c46cbea872 | ||
|
299a81088c | ||
|
bdc807b102 | ||
|
e149e926d2 | ||
|
4d55f546bb | ||
|
c0e4620355 | ||
|
a3ea4f5982 | ||
|
39f4a7d26d | ||
|
71518d9478 | ||
|
dfa9ce8977 | ||
|
0d97f6b9d4 | ||
|
76211930d5 | ||
|
a40b55e142 | ||
|
aa08f12320 | ||
|
f3cc92dee6 | ||
|
9c8d6d0a86 | ||
|
8ce2fc4e6d | ||
|
7da44b879c | ||
|
f5bfa14bb1 | ||
|
d392b204a3 | ||
|
21a33ebc76 | ||
|
0895e94053 | ||
|
387c9307d0 | ||
|
475e96726e | ||
|
9d65185fcd | ||
|
c365c141ef | ||
|
a94137fda9 | ||
|
34087bd105 | ||
|
cb423186e7 | ||
|
af99765bf2 | ||
|
1faa192f33 | ||
|
b9baba84de | ||
|
814dac6414 | ||
|
667ce0ce4b | ||
|
8832beac32 | ||
|
4de3f3daa2 | ||
|
9064272771 | ||
|
011ceedafe | ||
|
2ed7f91786 | ||
|
d011c11689 | ||
|
060c4abfff | ||
|
9f77999baf | ||
|
fa0c903c0f | ||
|
a7acd2a1c1 | ||
|
101b2bd20c | ||
|
9334836aa7 | ||
|
a69140b761 | ||
|
50ce9f92d1 | ||
|
971f3623cf | ||
|
24e220bb29 | ||
|
f8b21e78ba | ||
|
131bc7cb3f | ||
|
31857e2de0 | ||
|
d3a5c80981 | ||
|
be5382ebad | ||
|
3ae6a48204 | ||
|
4717c9e458 | ||
|
e31ee1c53b | ||
|
509f6477f2 | ||
|
3322e7eaff | ||
|
4904c78e01 | ||
|
8dad366317 | ||
|
b1869c824e | ||
|
72ff58015d | ||
|
76a2e043b7 | ||
|
f54cd5682d | ||
|
26aa16d684 | ||
|
9f280f79eb | ||
|
b538174933 | ||
|
f70ec0996c | ||
|
c2337058f6 | ||
|
1c4fa62676 | ||
|
f5603b05b7 | ||
|
ca728ded81 | ||
|
24a8afc508 | ||
|
6013fa2ad5 | ||
|
2c6c23d05c | ||
|
0f9e865dc4 | ||
|
15274aba2b | ||
|
429cdb644e | ||
|
5cf082d28d |
82 changed files with 997 additions and 472 deletions
|
@ -6,6 +6,7 @@
|
|||
[](https://modrinth.com/mod/mine-little-pony)
|
||||
[](https://discord.gg/HbJSFyu)
|
||||

|
||||
[](https://crowdin.com/project/mine-little-pony)
|
||||

|
||||
|
||||
Turns players and mobs into ponies.
|
||||
|
|
12
build.gradle
12
build.gradle
|
@ -1,15 +1,15 @@
|
|||
buildscript {
|
||||
dependencies {
|
||||
classpath 'com.github.dexman545:Outlet:1.3.10'
|
||||
classpath 'com.github.dexman545:Outlet:1.6.1'
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.3-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.5-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id 'com.modrinth.minotaur' version '2.+'
|
||||
id 'org.ajoberstar.reckon' version '0.13.0'
|
||||
id 'org.ajoberstar.reckon' version '0.13.1'
|
||||
}
|
||||
apply plugin: 'dex.plugins.outlet'
|
||||
apply plugin: 'io.github.dexman545.outlet'
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
|
@ -86,7 +86,9 @@ processResources {
|
|||
expand "version": project.version.toString(),
|
||||
"minecraftVersion": project.minecraft_version_range,
|
||||
"loaderVersion": ">=${project.loader_version}",
|
||||
"fabricVersion": ">=${project.fabric_version}"
|
||||
"fabricVersion": ">=${project.fabric_version}",
|
||||
"kirinVersion": ">=${project.kirin_version}",
|
||||
"msonVersion": ">=${project.mson_version}"
|
||||
}
|
||||
|
||||
from 'LICENSE'
|
||||
|
|
3
crowdin.yml
Normal file
3
crowdin.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
files:
|
||||
- source: src/main/resources/assets/minelittlepony/lang/en_us.json
|
||||
translation: /%original_path%/%locale_with_underscore%.%file_extension%
|
|
@ -3,10 +3,10 @@ org.gradle.daemon=false
|
|||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.20.2-rc1
|
||||
yarn_mappings=1.20.2-rc1+build.2
|
||||
loader_version=0.14.22
|
||||
fabric_version=0.88.5+1.20.2
|
||||
minecraft_version=1.20.2
|
||||
yarn_mappings=1.20.2+build.4
|
||||
loader_version=0.15.1
|
||||
fabric_version=0.91.1+1.20.2
|
||||
|
||||
# Mod Properties
|
||||
group=com.minelittlepony
|
||||
|
@ -20,7 +20,7 @@ org.gradle.daemon=false
|
|||
modrinth_project_id=JBjInUXM
|
||||
|
||||
# Dependencies
|
||||
modmenu_version=8.0.0-beta.1
|
||||
kirin_version=1.16.0-beta.1+1.20.2
|
||||
hd_skins_version=6.11.0-beta.3+1.20.2
|
||||
mson_version=1.9.0-beta.1
|
||||
modmenu_version=8.0.0
|
||||
kirin_version=1.16.1+1.20.2
|
||||
hd_skins_version=6.12.4+1.20.2
|
||||
mson_version=1.9.3+1.20.2
|
||||
|
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
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
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
pluginManagement {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = 'Fabric'
|
||||
url = 'https://maven.fabricmc.net/'
|
||||
}
|
||||
maven {
|
||||
name = 'Jitpack'
|
||||
url = 'https://jitpack.io'
|
||||
}
|
||||
maven { name 'Fabric'; url 'https://maven.fabricmc.net/' }
|
||||
maven { name 'Jitpack'; url 'https://jitpack.io' }
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
|
2
skins
2
skins
|
@ -1 +1 @@
|
|||
Subproject commit 8987db558b16657245ab8d0b98be366f46dc157c
|
||||
Subproject commit 45dfe1101b4506077b3d3f2246b08c9b485735eb
|
|
@ -26,13 +26,13 @@ public class PonyConfig extends Config {
|
|||
* Sets the pony level. Want MOAR PONEHS? Well here you go.
|
||||
*/
|
||||
public final Setting<PonyLevel> ponyLevel = value("ponylevel", PonyLevel.PONIES)
|
||||
.addComment("How much pony do you want?")
|
||||
.addComment("PONIES - all players are turned into ponies")
|
||||
.addComment("HUMANS - all players are humans")
|
||||
.addComment("BOTH - players with compatible skins will be ponies whilst the rest are humans");
|
||||
.addComment("How much pony do you want?")
|
||||
.addComment("PONIES - all players are turned into ponies")
|
||||
.addComment("HUMANS - all players are humans")
|
||||
.addComment("BOTH - players with compatible skins will be ponies whilst the rest are humans");
|
||||
private final Setting<Float> scaleFactor = value("globalScaleFactor", 0.9F)
|
||||
.addComment("How large do you want your ponies to be?")
|
||||
.addComment("Default is show scale (0.9)");
|
||||
.addComment("How large do you want your ponies to be?")
|
||||
.addComment("Default is show scale (0.9)");
|
||||
|
||||
public final Setting<Boolean> sizes = value("settings", "sizes", true)
|
||||
.addComment("Allows ponies of different sizes/ages");
|
||||
|
@ -53,7 +53,12 @@ public class PonyConfig extends Config {
|
|||
.addComment("Adjust camera intersection checks to properly cull entities when they're not in view.")
|
||||
.addComment("Helps to prevent entities from vanishing when they're in long stacks");
|
||||
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)
|
||||
.addComment("Overrides pony sizes")
|
||||
|
@ -69,15 +74,16 @@ public class PonyConfig extends Config {
|
|||
|
||||
public final Setting<Boolean> flappyElytras = value("customisation", "flappyElytras", false)
|
||||
.addComment("Pegasi will use their wings to fly even when they're wearing an elytra");
|
||||
|
||||
public final Setting<Boolean> noFun = value("customisation", "noFun", false)
|
||||
.addComment("Disables certain easter eggs and secrets (party pooper)")
|
||||
.addComment("Turning this off may help with compatibility in some cases");
|
||||
|
||||
public final Setting<VisibilityMode> horseButton = value("horseButton", VisibilityMode.AUTO)
|
||||
.addComment("Whether to show the mine little pony settings button on the main menu")
|
||||
.addComment("AUTO (default) - only show when HDSkins is not installed")
|
||||
.addComment("ON - always show")
|
||||
.addComment("OFF - never show");
|
||||
.addComment("Whether to show the mine little pony settings button on the main menu")
|
||||
.addComment("AUTO (default) - only show when HDSkins is not installed")
|
||||
.addComment("ON - always show")
|
||||
.addComment("OFF - never show");
|
||||
|
||||
public PonyConfig(Path path) {
|
||||
super(HEIRARCHICAL_JSON_ADAPTER, path);
|
||||
|
|
|
@ -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.ServerPlayNetworking;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.minelittlepony.api.pony.Pony;
|
||||
import com.minelittlepony.api.pony.PonyData;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class Channel {
|
||||
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 Logger LOGGER = LogManager.getLogger("MineLittlePony");
|
||||
private static final Logger LOGGER = LogManager.getLogger("MineLittlePony:Networking");
|
||||
|
||||
private static boolean registered;
|
||||
|
||||
public static void bootstrap() {
|
||||
ClientLoginConnectionEvents.INIT.register((handler, client) -> {
|
||||
registered = false;
|
||||
LOGGER.info("Resetting registered flag");
|
||||
});
|
||||
ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> {
|
||||
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) -> {
|
||||
if (client.player != null) {
|
||||
Pony pony = Pony.getManager().getPony(client.player);
|
||||
registered = true;
|
||||
LOGGER.info("Server has just consented");
|
||||
|
||||
sender.sendPacket(CLIENT_PONY_DATA, MsgPonyData.write(pony.metadata(), PacketByteBufs.create()));
|
||||
}
|
||||
registered = true;
|
||||
LOGGER.info("Server has just consented");
|
||||
});
|
||||
ServerPlayNetworking.registerGlobalReceiver(CLIENT_PONY_DATA, (server, player, ignore, buffer, ignore2) -> {
|
||||
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) {
|
||||
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()));
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -23,6 +23,7 @@ public class MsgPonyData {
|
|||
new MsgSize(buffer),
|
||||
buffer.readInt(),
|
||||
buffer.readBoolean(),
|
||||
buffer.readVarInt(),
|
||||
Flags.read(Wearable.NONE, buffer)
|
||||
);
|
||||
}
|
||||
|
@ -34,13 +35,24 @@ public class MsgPonyData {
|
|||
buffer.writeEnumConstant(data.tailLength());
|
||||
buffer.writeEnumConstant(data.tailShape());
|
||||
buffer.writeEnumConstant(data.gender());
|
||||
new MsgSize(data.size()).toBuffer(buffer);
|
||||
write(data.size(), buffer);
|
||||
buffer.writeInt(data.glowColor());
|
||||
buffer.writeBoolean(data.noSkin());
|
||||
buffer.writeVarInt(data.priority());
|
||||
data.gear().write(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 (
|
||||
int ordinal,
|
||||
String name,
|
||||
|
@ -49,23 +61,8 @@ public class MsgPonyData {
|
|||
float eyeHeightFactor,
|
||||
float eyeDistanceFactor,
|
||||
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) {
|
||||
this(buffer.readInt(), buffer.readString(32767), 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);
|
||||
this(buffer.readInt(), buffer.readString(), buffer.readFloat(), buffer.readFloat(), buffer.readFloat(), buffer.readFloat(), buffer.readInt());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -36,9 +36,15 @@ public final class MobPosingHelper {
|
|||
|
||||
if (islookAngleRight(move)) {
|
||||
rotateArmHolding(rightArm, 1, model.getSwingAmount(), ticks);
|
||||
if (model.getAttributes().isSitting) {
|
||||
rightArm.pitch += 0.6F;
|
||||
}
|
||||
PartUtil.shift(rightArm, 0.5F, 1.5F, 3);
|
||||
} else {
|
||||
rotateArmHolding(leftArm, -1, model.getSwingAmount(), ticks);
|
||||
if (model.getAttributes().isSitting) {
|
||||
leftArm.pitch += 0.6F;
|
||||
}
|
||||
PartUtil.shift(leftArm, -0.5F, 1.5F, 3);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.minelittlepony.api.model;
|
|||
|
||||
import com.minelittlepony.api.config.PonyConfig;
|
||||
import com.minelittlepony.api.pony.*;
|
||||
import com.minelittlepony.client.*;
|
||||
import com.minelittlepony.common.util.animation.Interpolator;
|
||||
import com.minelittlepony.util.MathUtil;
|
||||
|
||||
|
@ -10,6 +9,7 @@ import java.util.*;
|
|||
|
||||
import net.minecraft.client.render.entity.model.BipedEntityModel.ArmPose;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
@ -152,6 +152,11 @@ public class ModelAttributes {
|
|||
isSitting = PonyPosture.isSitting(entity);
|
||||
isSleeping = entity.isAlive() && entity.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);
|
||||
isFlying = !isLyingDown && mode == Mode.THIRD_PERSON && PonyPosture.isFlying(entity);
|
||||
isGliding = entity.isFallFlying();
|
||||
|
|
|
@ -18,14 +18,14 @@ import java.util.function.Consumer;
|
|||
/**
|
||||
* 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
|
||||
private final MsonModel.Factory<PonyArmourModel<T>> armorFactory;
|
||||
private final Map<ModelKey<PonyArmourModel<?>>, PonyArmourModel<T>> armor = new HashMap<>();
|
||||
|
||||
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.body = playerModelKey.getKey(slimArms).createModel();
|
||||
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.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);
|
||||
armor.values().forEach(a -> a.setMetadata(meta));
|
||||
return this;
|
|
@ -2,4 +2,6 @@ package com.minelittlepony.api.model;
|
|||
|
||||
public interface PreviewModel {
|
||||
boolean forceSeapony();
|
||||
|
||||
boolean forceNirik();
|
||||
}
|
||||
|
|
|
@ -11,6 +11,9 @@ import java.util.*;
|
|||
public final class DefaultPonySkinHelper {
|
||||
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<>();
|
||||
|
||||
public static SkinTextures getTextures(SkinTextures original) {
|
||||
|
@ -27,7 +30,7 @@ public final class DefaultPonySkinHelper {
|
|||
}
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
|
|
|
@ -49,13 +49,25 @@ public record PonyData (
|
|||
* rather than a user-uploaded one.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
Map<String, TValue<?>> attributes
|
||||
) implements Comparable<PonyData> {
|
||||
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 PonyData emptyOf(Race race) {
|
||||
|
@ -71,18 +83,20 @@ public record PonyData (
|
|||
TriggerPixel.SIZE.read(image),
|
||||
TriggerPixel.GLOW.read(image),
|
||||
noSkin,
|
||||
TriggerPixel.PRIORITY.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) {
|
||||
this(race, tailLength, tailShape, gender, size, glowColor, wearables, noSkin, Util.make(new TreeMap<>(), map -> {
|
||||
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, priority, Util.make(new TreeMap<>(), map -> {
|
||||
map.put("race", race);
|
||||
map.put("tailLength", tailLength);
|
||||
map.put("tailShape", tailShape);
|
||||
map.put("gender", gender);
|
||||
map.put("size", size);
|
||||
map.put("magic", new TValue.Numeric(glowColor));
|
||||
map.put("priority", new TValue.Numeric(priority));
|
||||
map.put("gear", wearables);
|
||||
})
|
||||
);
|
||||
|
|
|
@ -2,8 +2,6 @@ package com.minelittlepony.api.pony;
|
|||
|
||||
import com.minelittlepony.api.pony.meta.Race;
|
||||
import com.minelittlepony.api.model.PreviewModel;
|
||||
import com.minelittlepony.client.SkinsProxy;
|
||||
import com.minelittlepony.client.render.entity.AquaticPlayerPonyRenderer;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
|
@ -101,7 +99,26 @@ public final class PonyPosture {
|
|||
}
|
||||
return Pony.getManager().getPony(entity).filter(pony -> {
|
||||
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();
|
||||
}
|
||||
|
|
|
@ -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 java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.network.AbstractClientPlayerEntity;
|
||||
import net.minecraft.client.texture.PlayerSkinProvider;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Proxy handler for getting player skin data from HDSkins
|
||||
*/
|
||||
public class SkinsProxy {
|
||||
|
||||
public static SkinsProxy instance = new SkinsProxy();
|
||||
|
||||
@Nullable
|
||||
public Identifier getSkinTexture(GameProfile profile) {
|
||||
PlayerSkinProvider skins = MinecraftClient.getInstance().getSkinProvider();
|
||||
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) {
|
||||
return Optional.empty();
|
||||
}
|
|
@ -30,14 +30,6 @@ public record Flags<T extends Enum<T> & TValue<T>> (
|
|||
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) {
|
||||
buffer.writeCollection(values, (buf, value) -> buf.writeInt(value.ordinal()));
|
||||
buffer.writeInt(colorCode);
|
||||
|
|
|
@ -41,4 +41,9 @@ public interface Size extends TValue<Size> {
|
|||
* A scale factor used to alter the camera's distance.
|
||||
*/
|
||||
float eyeDistanceFactor();
|
||||
|
||||
/**
|
||||
* The trigger pixel colour corresponding to this size.
|
||||
*/
|
||||
int colorCode();
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ public interface TriggerPixel<T> {
|
|||
TriggerPixel<Size> SIZE = ofOptions(3, 0, SizePreset.NORMAL, SizePreset.values());
|
||||
TriggerPixel<Integer> GLOW = ofColor(0, 1);
|
||||
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) {
|
||||
MAX_COORDS.x = Math.max(MAX_COORDS.x, x);
|
||||
|
@ -61,8 +62,8 @@ public interface TriggerPixel<T> {
|
|||
@SuppressWarnings("unchecked")
|
||||
Set<T> values = EnumSet.noneOf((Class<T>)def.def().getClass());
|
||||
if (flagReader.readFlag(ColorHelper.Argb.getRed(color), values)
|
||||
|| flagReader.readFlag(ColorHelper.Argb.getGreen(color), values)
|
||||
|| flagReader.readFlag(ColorHelper.Argb.getBlue(color), values)) {
|
||||
| flagReader.readFlag(ColorHelper.Argb.getGreen(color), values)
|
||||
| flagReader.readFlag(ColorHelper.Argb.getBlue(color), values)) {
|
||||
return new Flags<>(def.def(), values, color & 0x00FFFFFF);
|
||||
}
|
||||
return def;
|
||||
|
|
|
@ -106,7 +106,7 @@ public class MineLittlePony implements ClientModInitializer {
|
|||
}
|
||||
|
||||
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) {
|
||||
int y = hasHdSkins ? 75 : 50;
|
||||
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()
|
||||
.setIcon(new TextureSprite()
|
||||
.setPosition(2, 2)
|
||||
|
|
|
@ -79,16 +79,16 @@ public class PonyManagerImpl implements PonyManager, SimpleSynchronousResourceRe
|
|||
@Override
|
||||
public Pony getBackgroundPony(@Nullable UUID uuid) {
|
||||
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
|
||||
private Identifier getSkin(LivingEntity entity) {
|
||||
if (entity instanceof PlayerEntity player) {
|
||||
if (player.getGameProfile() != null && player instanceof AbstractClientPlayerEntity clientPlayer) {
|
||||
return clientPlayer.method_52814().texture();
|
||||
return clientPlayer.getSkinTextures().texture();
|
||||
}
|
||||
} else {
|
||||
if (MineLittlePony.getInstance().getRenderDispatcher().getPonyRenderer(entity) != null) {
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.jetbrains.annotations.Nullable;
|
|||
* 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 PONY_LEVEL = OPTIONS_PREFIX + "ponylevel";
|
||||
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_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 ScrollContainer content = new ScrollContainer();
|
||||
|
||||
private final boolean hiddenOptions;
|
||||
|
||||
public PonySettingsscreen(@Nullable Screen parent) {
|
||||
public PonySettingsScreen(@Nullable Screen parent) {
|
||||
super(Text.literal(OPTIONS_PREFIX + "title"), parent);
|
||||
content.margin.top = 30;
|
||||
content.margin.bottom = 30;
|
||||
|
@ -156,7 +164,7 @@ public class PonySettingsscreen extends GameGui {
|
|||
row += 15;
|
||||
|
||||
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) {
|
||||
|
@ -186,7 +194,6 @@ public class PonySettingsscreen extends GameGui {
|
|||
|
||||
@Override
|
||||
public void render(DrawContext context, int mouseX, int mouseY, float tickDelta) {
|
||||
renderBackground(context, mouseX, mouseY, tickDelta);
|
||||
super.render(context, mouseX, mouseY, tickDelta);
|
||||
content.render(context, mouseX, mouseY, tickDelta);
|
||||
}
|
||||
|
@ -195,4 +202,8 @@ public class PonySettingsscreen extends GameGui {
|
|||
public void removed() {
|
||||
config.save();
|
||||
}
|
||||
|
||||
public interface HorseButtonFactory {
|
||||
void renderOption(Screen screen, @Nullable Screen parent, int row, int RIGHT, ScrollContainer content);
|
||||
}
|
||||
}
|
|
@ -4,7 +4,6 @@ import net.minecraft.client.world.ClientWorld;
|
|||
|
||||
import com.minelittlepony.api.model.PreviewModel;
|
||||
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.skins.PlayerSkins;
|
||||
|
||||
|
@ -13,20 +12,20 @@ import java.util.UUID;
|
|||
/**
|
||||
* 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) {
|
||||
super(world, textures);
|
||||
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
|
||||
public boolean forceSeapony() {
|
||||
return getTextures().getPosture().getActiveSkinType() == MineLPHDSkins.seaponySkinType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean forceNirik() {
|
||||
return getTextures().getPosture().getActiveSkinType() == MineLPHDSkins.nirikSkinType;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.minelittlepony.client.compat.hdskins;
|
||||
|
||||
import com.minelittlepony.client.PonySettingsscreen;
|
||||
import com.minelittlepony.client.PonySettingsScreen;
|
||||
import com.minelittlepony.client.MineLittlePony;
|
||||
import com.minelittlepony.common.client.gui.dimension.Bounds;
|
||||
import com.minelittlepony.common.client.gui.element.Button;
|
||||
|
@ -41,9 +41,9 @@ class GuiSkinsMineLP extends GuiSkins {
|
|||
|
||||
@Override
|
||||
protected void initServerPreviewButtons(Bounds area) {
|
||||
if (!(parent instanceof PonySettingsscreen)) {
|
||||
if (!(parent instanceof PonySettingsScreen)) {
|
||||
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()
|
||||
.setIcon(new TextureSprite()
|
||||
.setPosition(2, 2)
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package com.minelittlepony.client.compat.hdskins;
|
||||
|
||||
import com.minelittlepony.api.pony.Pony;
|
||||
import com.minelittlepony.api.pony.PonyData;
|
||||
import com.minelittlepony.api.config.PonyConfig;
|
||||
import com.minelittlepony.api.config.PonyLevel;
|
||||
import com.minelittlepony.api.pony.*;
|
||||
import com.minelittlepony.api.pony.meta.Wearable;
|
||||
import com.minelittlepony.common.client.gui.ScrollContainer;
|
||||
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.player.DummyPlayer;
|
||||
import com.minelittlepony.hdskins.client.gui.player.skins.PlayerSkins.PlayerSkin;
|
||||
import com.minelittlepony.hdskins.client.profile.SkinLoader.ProvidedSkins;
|
||||
import com.minelittlepony.hdskins.profile.SkinType;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
@ -27,7 +29,6 @@ import net.minecraft.item.Items;
|
|||
import net.minecraft.util.Identifier;
|
||||
|
||||
import com.minelittlepony.client.*;
|
||||
import com.minelittlepony.client.render.entity.AquaticPlayerPonyRenderer;
|
||||
|
||||
/**
|
||||
* All the interactions with HD Skins.
|
||||
|
@ -35,14 +36,17 @@ import com.minelittlepony.client.render.entity.AquaticPlayerPonyRenderer;
|
|||
public class MineLPHDSkins extends SkinsProxy implements ClientModInitializer {
|
||||
|
||||
static SkinType seaponySkinType;
|
||||
static SkinType nirikSkinType;
|
||||
|
||||
static final Map<SkinType, Wearable> wearableTypes = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
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 -> {
|
||||
if (wearable != Wearable.NONE) {
|
||||
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.
|
||||
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
|
||||
public void renderOption(Screen screen, @Nullable Screen parent, int row, int RIGHT, ScrollContainer content) {
|
||||
static Optional<Pony> getPony(PlayerSkinLayers.Layer layer) {
|
||||
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))
|
||||
.onClick(button -> MinecraftClient.getInstance().setScreen(
|
||||
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) {
|
||||
PlayerSkins skins = PlayerSkins.of(player);
|
||||
if (skins != null) {
|
||||
return skins.getProvidedSkinTypes();
|
||||
}
|
||||
return PlayerSkins.of(player)
|
||||
.map(PlayerSkins::layers)
|
||||
.map(PlayerSkinLayers::combined)
|
||||
.map(PlayerSkinLayers.Layer::getProvidedSkinTypes)
|
||||
.orElseGet(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
|
||||
public Identifier getSkinTexture(GameProfile profile) {
|
||||
return HDSkins.getInstance().getProfileRepository()
|
||||
.getNow(profile)
|
||||
.load(profile)
|
||||
.getNow(ProvidedSkins.EMPTY)
|
||||
.getSkin(SkinType.SKIN)
|
||||
.orElseGet(() -> super.getSkinTexture(profile));
|
||||
}
|
||||
|
|
|
@ -31,6 +31,9 @@ class PonifiedDualCarouselWidget extends DualCarouselWidget {
|
|||
if (type == MineLPHDSkins.seaponySkinType) {
|
||||
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);
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@ package com.minelittlepony.client.compat.modmenu;
|
|||
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
|
||||
import com.terraformersmc.modmenu.api.ModMenuApi;
|
||||
|
||||
import com.minelittlepony.client.PonySettingsscreen;
|
||||
import com.minelittlepony.client.PonySettingsScreen;
|
||||
|
||||
public class MineLPModMenuFactory implements ModMenuApi {
|
||||
@Override
|
||||
public ConfigScreenFactory<?> getModConfigScreenFactory() {
|
||||
return PonySettingsscreen::new;
|
||||
return PonySettingsScreen::new;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.entity.EntityDimensions;
|
||||
import net.minecraft.entity.EntityPose;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
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 {
|
||||
public MixinClientPlayerEntity() { super(null, null); }
|
||||
|
||||
@Nullable
|
||||
private Pony pony;
|
||||
private final EquineRenderManager.SyncedPony syncedPony = new EquineRenderManager.SyncedPony();
|
||||
|
||||
@Inject(method = "startRiding(Lnet/minecraft/entity/Entity;Z)Z", at = @At("RETURN"))
|
||||
private void onStartRiding(Entity entity, boolean bl, CallbackInfoReturnable<Boolean> info) {
|
||||
|
@ -34,12 +32,8 @@ abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity implem
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUpdateRegistration(Pony pony) {
|
||||
if (this.pony != pony && (this.pony == null || this.pony.metadata().compareTo(pony.metadata()) != 0)) {
|
||||
this.pony = pony.immutableCopy();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
public EquineRenderManager.SyncedPony getSyncedPony() {
|
||||
return syncedPony;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -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"),
|
||||
cancellable = true)
|
||||
private static void onGetTexture(UUID uuid, CallbackInfoReturnable<SkinTextures> cir) {
|
||||
|
|
|
@ -366,6 +366,7 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
|||
case NECK: return neck;
|
||||
case TAIL:
|
||||
case LEGS:
|
||||
case BACK:
|
||||
case BODY: return body;
|
||||
}
|
||||
}
|
||||
|
@ -622,8 +623,11 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
|||
stack.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(180));
|
||||
}
|
||||
|
||||
boolean crouching = attributes.isCrouching;
|
||||
|
||||
if (attributes.isLyingDown && !attributes.isSleeping) {
|
||||
stack.translate(0, 1.35F, 0);
|
||||
attributes.isCrouching = sneaking;
|
||||
}
|
||||
|
||||
if (attributes.isHorsey) {
|
||||
|
@ -637,5 +641,7 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
|||
}
|
||||
|
||||
PonyTransformation.forSize(getSize()).transform(this, part, stack);
|
||||
|
||||
attributes.isCrouching = crouching;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public abstract class ClientPonyModel<T extends LivingEntity> extends MsonPlayer
|
|||
child = entity.isBaby();
|
||||
attributes.updateLivingState(entity, pony, mode);
|
||||
PonyModelPrepareCallback.EVENT.invoker().onPonyModelPrepared(entity, this, mode);
|
||||
sneaking = attributes.isCrouching;
|
||||
sneaking = attributes.isCrouching && !attributes.isLyingDown;
|
||||
riding = attributes.isSitting;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.util.Identifier;
|
|||
|
||||
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.client.model.armour.PonyArmourModel;
|
||||
import com.minelittlepony.mson.api.*;
|
||||
|
@ -31,12 +31,12 @@ public record PlayerModelKey<T extends LivingEntity, M extends Model & PonyModel
|
|||
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);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
public <E extends T, N extends M> ModelWrapper<E, N> create(boolean slimArms, @Nullable Consumer<N> initializer) {
|
||||
return new ModelWrapper(this, slimArms, initializer);
|
||||
public <E extends T, N extends M> Models<E, N> create(boolean slimArms, @Nullable Consumer<N> initializer) {
|
||||
return new Models(this, slimArms, initializer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,10 +23,9 @@ public class DeerAntlers extends WearableGear {
|
|||
dayChecked = true;
|
||||
Calendar cal = Calendar.getInstance();
|
||||
dayResult = cal.get(Calendar.MONTH) == Calendar.DECEMBER
|
||||
&& cal.get(Calendar.DAY_OF_MONTH) == 25;
|
||||
&& Math.abs(cal.get(Calendar.DAY_OF_MONTH) - 25) < 2;
|
||||
}
|
||||
|
||||
|
||||
return dayResult;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import net.minecraft.client.util.math.MatrixStack;
|
|||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import com.minelittlepony.api.model.SubModel;
|
||||
import com.minelittlepony.api.pony.meta.Race;
|
||||
import com.minelittlepony.api.model.ModelAttributes;
|
||||
import com.minelittlepony.mson.api.*;
|
||||
import com.minelittlepony.mson.api.model.PartBuilder;
|
||||
|
@ -29,6 +30,12 @@ public class PonyEars implements SubModel, MsonModel {
|
|||
@Override
|
||||
public void setPartAngles(ModelAttributes attributes, float limbAngle, float limbSpeed, float bodySwing, float animationProgress) {
|
||||
right.resetTransform();
|
||||
left.resetTransform();
|
||||
|
||||
if (attributes.metadata.race() == Race.CHANGEDLING
|
||||
|| attributes.metadata.race() == Race.CHANGELING) {
|
||||
return;
|
||||
}
|
||||
|
||||
limbSpeed = MathHelper.clamp(limbSpeed, 0, 1);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@ import com.minelittlepony.util.MathUtil;
|
|||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.function.Function;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
|
@ -22,42 +23,42 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
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() {
|
||||
RenderSystem.disableBlend();
|
||||
}
|
||||
|
||||
public EquineRenderManager(PonyRenderContext<T, M> renderer) {
|
||||
this.renderer = renderer;
|
||||
}
|
||||
|
||||
public PonyRenderContext<T, M> getContext() {
|
||||
return renderer;
|
||||
}
|
||||
|
||||
public ModelWrapper<T, M> getModelWrapper() {
|
||||
return playerModel;
|
||||
}
|
||||
|
||||
public M getModel() {
|
||||
return playerModel.body();
|
||||
public EquineRenderManager(PonyRenderContext<T, M> context, Transformer<T> transformer, Models<T, M> models) {
|
||||
this.context = context;
|
||||
this.transformer = transformer;
|
||||
this.models = models;
|
||||
frustrum = new FrustrumCheck<>(context);
|
||||
context.setModel(models.body());
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
public ModelWrapper<T, M> setModel(ModelKey<? super M> key) {
|
||||
return setModel(new ModelWrapper(key));
|
||||
public EquineRenderManager(PonyRenderContext<T, M> context, Transformer<T> transformer, ModelKey<? super M> key) {
|
||||
this(context, transformer, new Models(key));
|
||||
}
|
||||
|
||||
public ModelWrapper<T, M> setModel(ModelWrapper<T, M> wrapper) {
|
||||
playerModel = wrapper;
|
||||
return wrapper;
|
||||
public void setModelsLookup(@Nullable Function<T, Models<T, M>> modelsLookup) {
|
||||
this.modelsLookup = modelsLookup;
|
||||
}
|
||||
|
||||
public Models<T, M> getModels() {
|
||||
return models;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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()) {
|
||||
Entity mount = entity.getVehicle();
|
||||
if (mount instanceof LivingEntity) {
|
||||
|
@ -82,76 +137,20 @@ public class EquineRenderManager<T extends LivingEntity, M extends EntityModel<T
|
|||
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() {
|
||||
return getModel().getSize().scaleFactor();
|
||||
return getModels().body().getSize().scaleFactor();
|
||||
}
|
||||
|
||||
public float getShadowSize() {
|
||||
return getModel().getSize().shadowSize();
|
||||
return getModels().body().getSize().shadowSize();
|
||||
}
|
||||
|
||||
public double getNamePlateYOffset(T entity) {
|
||||
|
||||
// We start by negating the height calculation done by mahjong.
|
||||
float y = -(entity.getHeight() + 0.5F);
|
||||
|
||||
// Then we add our own offsets.
|
||||
y += getModel().getAttributes().visualHeight * getScaleFactor() + 0.25F;
|
||||
y += getModels().body().getAttributes().visualHeight * getScaleFactor() + 0.25F;
|
||||
|
||||
if (entity.isSneaking()) {
|
||||
y -= 0.25F;
|
||||
|
@ -168,7 +167,48 @@ public class EquineRenderManager<T extends LivingEntity, M extends EntityModel<T
|
|||
return y;
|
||||
}
|
||||
|
||||
public interface Transformer<T extends LivingEntity> {
|
||||
void setupTransforms(T entity, MatrixStack stack, float ageInTicks, float rotationYaw, float partialTicks);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,11 +19,11 @@ public class FrustrumCheck<T extends LivingEntity> extends Frustum {
|
|||
|
||||
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());
|
||||
renderer = render;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public Frustum withCamera(T entity, Frustum vanillaFrustrum) {
|
||||
|
@ -34,7 +34,7 @@ public class FrustrumCheck<T extends LivingEntity> extends Frustum {
|
|||
|
||||
@Override
|
||||
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
|
||||
|
|
|
@ -11,11 +11,9 @@ import net.minecraft.client.render.item.ItemRenderer;
|
|||
import net.minecraft.client.render.model.json.ModelTransformationMode;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.CrossbowItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.screen.PlayerScreenHandler;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.UseAction;
|
||||
import net.minecraft.util.math.RotationAxis;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -24,11 +22,10 @@ public class LevitatingItemRenderer {
|
|||
private VertexConsumerProvider getProvider(Pony pony, VertexConsumerProvider renderContext) {
|
||||
final int color = pony.metadata().glowColor();
|
||||
return layer -> {
|
||||
Identifier texture = RenderLayerUtil.getTexture(layer).orElse(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE);
|
||||
if (texture == ItemRenderer.ENTITY_ENCHANTMENT_GLINT || texture == ItemRenderer.ITEM_ENCHANTMENT_GLINT) {
|
||||
if (layer.getVertexFormat() != VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL) {
|
||||
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,32 +34,36 @@ 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) {
|
||||
|
||||
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
|
||||
|| mode == ModelTransformationMode.THIRD_PERSON_RIGHT_HAND
|
||||
) {
|
||||
Pony.getManager().getPony(entity).ifPresentOrElse(pony -> {
|
||||
matrix.push();
|
||||
|
||||
Pony pony = Pony.getManager().getPony((PlayerEntity)entity);
|
||||
boolean doMagic = PonyConfig.getInstance().fpsmagic.get() && pony.hasMagic();
|
||||
|
||||
matrix.push();
|
||||
if (doMagic && mode.isFirstPerson()) {
|
||||
setupPerspective(itemRenderer, entity, stack, left, matrix);
|
||||
}
|
||||
|
||||
boolean doMagic = PonyConfig.getInstance().fpsmagic.get() && pony.hasMagic();
|
||||
itemRenderer.renderItem(entity, stack, mode, left, matrix, renderContext, world, lightUv, OverlayTexture.DEFAULT_UV, posLong);
|
||||
|
||||
if (doMagic && mode.isFirstPerson()) {
|
||||
setupPerspective(itemRenderer, entity, stack, left, matrix);
|
||||
}
|
||||
if (doMagic) {
|
||||
VertexConsumerProvider interceptedContext = getProvider(pony, renderContext);
|
||||
|
||||
itemRenderer.renderItem(entity, stack, mode, left, matrix, renderContext, world, lightUv, OverlayTexture.DEFAULT_UV, posLong);
|
||||
matrix.scale(1.1F, 1.1F, 1.1F);
|
||||
matrix.translate(0.015F, 0.01F, 0.01F);
|
||||
|
||||
if (doMagic) {
|
||||
VertexConsumerProvider interceptedContext = getProvider(pony, renderContext);
|
||||
itemRenderer.renderItem(entity, stack, mode, left, matrix, interceptedContext, world, lightUv, OverlayTexture.DEFAULT_UV, posLong);
|
||||
matrix.translate(-0.03F, -0.02F, -0.02F);
|
||||
itemRenderer.renderItem(entity, stack, mode, left, matrix, interceptedContext, world, lightUv, OverlayTexture.DEFAULT_UV, posLong);
|
||||
}
|
||||
|
||||
matrix.scale(1.1F, 1.1F, 1.1F);
|
||||
matrix.translate(0.015F, 0.01F, 0.01F);
|
||||
|
||||
itemRenderer.renderItem(entity, stack, mode, left, matrix, interceptedContext, world, lightUv, OverlayTexture.DEFAULT_UV, posLong);
|
||||
matrix.translate(-0.03F, -0.02F, -0.02F);
|
||||
itemRenderer.renderItem(entity, stack, mode, left, matrix, interceptedContext, world, lightUv, OverlayTexture.DEFAULT_UV, posLong);
|
||||
}
|
||||
|
||||
matrix.pop();
|
||||
matrix.pop();
|
||||
}, () -> {
|
||||
itemRenderer.renderItem(entity, stack, mode, left, matrix, renderContext, world, lightUv, OverlayTexture.DEFAULT_UV, posLong);
|
||||
});
|
||||
} else {
|
||||
itemRenderer.renderItem(entity, stack, mode, left, matrix, renderContext, world, lightUv, OverlayTexture.DEFAULT_UV, posLong);
|
||||
}
|
||||
|
|
|
@ -16,8 +16,8 @@ import java.util.function.BiFunction;
|
|||
import java.util.function.Supplier;
|
||||
|
||||
public abstract class MagicGlow extends RenderPhase {
|
||||
private MagicGlow(String name, Runnable beginAction, Runnable endAction) {
|
||||
super(name, beginAction, endAction);
|
||||
private MagicGlow() {
|
||||
super(null, null, null);
|
||||
}
|
||||
|
||||
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 final float red;
|
||||
private final float green;
|
||||
private final float blue;
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
package com.minelittlepony.client.render;
|
||||
|
||||
import com.minelittlepony.api.model.BodyPart;
|
||||
import com.minelittlepony.api.model.PonyModel;
|
||||
import com.minelittlepony.api.model.gear.Gear;
|
||||
import com.minelittlepony.api.pony.Pony;
|
||||
import com.minelittlepony.util.MathUtil;
|
||||
|
||||
import net.minecraft.client.render.entity.model.EntityModel;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
|
||||
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();
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
}
|
||||
void setModel(M model);
|
||||
}
|
||||
|
|
|
@ -3,11 +3,9 @@ package com.minelittlepony.client.render;
|
|||
import java.util.function.Function;
|
||||
|
||||
import com.minelittlepony.api.model.PonyModel;
|
||||
import com.minelittlepony.api.pony.Pony;
|
||||
import com.minelittlepony.api.pony.PonyPosture;
|
||||
import com.minelittlepony.api.pony.*;
|
||||
import com.minelittlepony.client.mixin.MixinEntityRenderers;
|
||||
import com.minelittlepony.client.render.entity.AquaticPlayerPonyRenderer;
|
||||
import com.minelittlepony.client.render.entity.PlayerPonyRenderer;
|
||||
import com.minelittlepony.client.render.entity.*;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
@ -48,16 +46,25 @@ public class PonyRenderDispatcher {
|
|||
player -> {
|
||||
return !Pony.getManager().getPony(player).race().isHuman()
|
||||
&& PonyPosture.hasSeaponyForm(player)
|
||||
&& player.method_52814().model() == armShape;
|
||||
&& player.getSkinTextures().model() == armShape;
|
||||
},
|
||||
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(
|
||||
new Identifier("minelittlepony", "land/" + armShape.getName()),
|
||||
player -> {
|
||||
return !Pony.getManager().getPony(player).race().isHuman()
|
||||
&& !PonyPosture.hasSeaponyForm(player)
|
||||
&& player.method_52814().model() == armShape;
|
||||
&& !PonyPosture.hasSeaponyForm(player) && !PonyPosture.hasNirikForm(player)
|
||||
&& player.getSkinTextures().model() == armShape;
|
||||
},
|
||||
context -> new PlayerPonyRenderer(context, armShape == SkinTextures.Model.SLIM)
|
||||
);
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.minelittlepony.client.render.blockentity.skull;
|
|||
import com.minelittlepony.api.config.PonyConfig;
|
||||
import com.minelittlepony.api.config.PonyLevel;
|
||||
import com.minelittlepony.api.pony.Pony;
|
||||
import com.minelittlepony.api.pony.SkinsProxy;
|
||||
import com.minelittlepony.api.pony.meta.Race;
|
||||
import com.minelittlepony.client.SkinsProxy;
|
||||
import com.minelittlepony.client.model.*;
|
||||
import com.minelittlepony.client.render.blockentity.skull.PonySkullRenderer.ISkull;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
@ -45,7 +45,7 @@ public class PlayerPonySkull implements ISkull {
|
|||
return skin;
|
||||
}
|
||||
|
||||
return DefaultSkinHelper.getTexture(profile).texture();
|
||||
return DefaultSkinHelper.getSkinTextures(profile).texture();
|
||||
}
|
||||
|
||||
return DefaultSkinHelper.getTexture();
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.minelittlepony.client.render.entity;
|
||||
|
||||
import com.minelittlepony.api.model.ModelAttributes;
|
||||
import com.minelittlepony.api.model.PonyModel;
|
||||
import com.minelittlepony.api.pony.Pony;
|
||||
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> {
|
||||
|
||||
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);
|
||||
|
||||
|
@ -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) {
|
||||
super(context, null, 0.5F);
|
||||
this.model = manager.setModel(key).body();
|
||||
this.manager = new EquineRenderManager<>(this, super::setupTransforms, key);
|
||||
this.texture = texture;
|
||||
this.scale = scale;
|
||||
addFeatures(context);
|
||||
|
@ -64,24 +65,17 @@ public abstract class AbstractPonyRenderer<T extends MobEntity, M extends Entity
|
|||
|
||||
@Override
|
||||
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);
|
||||
DebugBoundingBoxRenderer.render(getEntityPony(entity), this, entity, stack, renderContext, tickDelta);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setupTransforms(T entity, MatrixStack stack, float ageInTicks, float rotationYaw, float partialTicks) {
|
||||
manager.preRenderCallback(entity, stack, 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);
|
||||
manager.setupTransforms(entity, stack, ageInTicks, rotationYaw, partialTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -100,7 +94,7 @@ public abstract class AbstractPonyRenderer<T extends MobEntity, M extends Entity
|
|||
if (!entity.hasVehicle()) {
|
||||
stack.translate(0, 0, -entity.getWidth() / 2); // move us to the center of the shadow
|
||||
} else {
|
||||
stack.translate(0, -entity.getRidingOffset(entity.getVehicle()), 0);
|
||||
stack.translate(0, entity.getRidingOffset(entity.getVehicle()), 0);
|
||||
}
|
||||
|
||||
stack.scale(scale, scale, scale);
|
||||
|
@ -117,8 +111,7 @@ public abstract class AbstractPonyRenderer<T extends MobEntity, M extends Entity
|
|||
@Override
|
||||
public Identifier getDefaultTexture(T entity, Wearable wearable) {
|
||||
return wearableTextures.computeIfAbsent(wearable, w -> {
|
||||
Identifier texture = getTexture(entity);
|
||||
texture = new Identifier(texture.getNamespace(), texture.getPath().split("\\.")[0] + "_" + wearable.name().toLowerCase(Locale.ROOT) + ".png");
|
||||
Identifier texture = getTexture(entity).withPath(path -> path.split("\\.")[0] + "_" + wearable.name().toLowerCase(Locale.ROOT) + ".png");
|
||||
|
||||
if (MinecraftClient.getInstance().getResourceManager().getResource(texture).isPresent()) {
|
||||
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
|
||||
public EquineRenderManager<T, M> getInternalRenderer() {
|
||||
return manager;
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package com.minelittlepony.client.render.entity;
|
||||
|
||||
import com.minelittlepony.api.model.PreviewModel;
|
||||
import com.minelittlepony.api.pony.Pony;
|
||||
import com.minelittlepony.api.pony.PonyPosture;
|
||||
import com.minelittlepony.api.pony.*;
|
||||
import com.minelittlepony.api.pony.meta.Race;
|
||||
import com.minelittlepony.client.SkinsProxy;
|
||||
import com.minelittlepony.util.MathUtil;
|
||||
|
||||
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.util.math.MatrixStack;
|
||||
import net.minecraft.particle.ParticleTypes;
|
||||
import net.minecraft.util.Arm;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
public class AquaticPlayerPonyRenderer extends PlayerPonyRenderer {
|
||||
public static final Identifier SKIN_TYPE_ID = new Identifier("minelp", "seapony");
|
||||
|
||||
private boolean wet;
|
||||
public class AquaticPlayerPonyRenderer extends FormChangingPlayerPonyRenderer {
|
||||
|
||||
public AquaticPlayerPonyRenderer(EntityRendererFactory.Context context, boolean slim) {
|
||||
super(context, slim);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identifier getTexture(AbstractClientPlayerEntity player) {
|
||||
if (wet) {
|
||||
return SkinsProxy.instance.getSkin(SKIN_TYPE_ID, player).orElseGet(() -> super.getTexture(player));
|
||||
}
|
||||
return super.getTexture(player);
|
||||
super(context, slim, DefaultPonySkinHelper.SEAPONY_SKIN_TYPE_ID, PonyPosture::isSeaponyModifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
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);
|
||||
|
||||
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 y = player.getEntityWorld().getRandom().nextTriangular(player.getY(), 1);
|
||||
double z = player.getEntityWorld().getRandom().nextTriangular(player.getZ(), 1);
|
||||
|
||||
player.getEntityWorld().addParticle(ParticleTypes.BUBBLE, x, y, z, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Race getPlayerRace(AbstractClientPlayerEntity entity, Pony 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
|
||||
protected void setupTransforms(AbstractClientPlayerEntity entity, MatrixStack stack, float ageInTicks, float rotationYaw, float partialTicks) {
|
||||
if (wet) {
|
||||
protected void setupTransforms(AbstractClientPlayerEntity player, MatrixStack stack, float ageInTicks, float rotationYaw, float partialTicks) {
|
||||
if (PonyPosture.isSeaponyModifier(player)) {
|
||||
stack.translate(0, 0.6, 0);
|
||||
if (entity.isInSneakingPose()) {
|
||||
if (player.isInSneakingPose()) {
|
||||
stack.translate(0, 0.125, 0);
|
||||
}
|
||||
}
|
||||
super.setupTransforms(entity, stack, ageInTicks, rotationYaw, partialTicks);
|
||||
super.setupTransforms(player, stack, ageInTicks, rotationYaw, partialTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderArm(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, AbstractClientPlayerEntity player, Arm side) {
|
||||
updateSeaponyState(player);
|
||||
super.renderArm(stack, renderContext, lightUv, player, side);
|
||||
}
|
||||
|
||||
private void updateSeaponyState(AbstractClientPlayerEntity player) {
|
||||
wet = PonyPosture.isSeaponyModifier(player);
|
||||
|
||||
protected void updateForm(AbstractClientPlayerEntity player) {
|
||||
super.updateForm(player);
|
||||
if (!(player instanceof PreviewModel)) {
|
||||
float state = wet ? 100 : 0;
|
||||
float interpolated = getInternalRenderer().getModel().getAttributes().getMainInterpolator().interpolate("seapony_state", state, 5);
|
||||
float state = transformed ? 100 : 0;
|
||||
float interpolated = getInternalRenderer().getModels().body().getAttributes().getMainInterpolator().interpolate("seapony_state", state, 5);
|
||||
|
||||
if (!MathUtil.compareFloats(interpolated, state)) {
|
||||
double x = player.getEntityWorld().getRandom().nextTriangular(player.getX(), 1);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
package com.minelittlepony.client.render.entity;
|
||||
|
||||
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.SkinsProxy;
|
||||
import com.minelittlepony.api.pony.meta.Race;
|
||||
import com.minelittlepony.api.pony.meta.Wearable;
|
||||
import com.minelittlepony.client.SkinsProxy;
|
||||
import com.minelittlepony.client.model.*;
|
||||
import com.minelittlepony.client.render.DebugBoundingBoxRenderer;
|
||||
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.text.Text;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.*;
|
||||
|
||||
public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRenderContext<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> {
|
||||
|
||||
protected final EquineRenderManager<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> manager = new EquineRenderManager<>(this);
|
||||
|
||||
private final Function<Race, ModelWrapper<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>>> modelsCache;
|
||||
private final Function<Race, Models<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>>> modelsCache;
|
||||
protected final EquineRenderManager<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> manager;
|
||||
|
||||
public PlayerPonyRenderer(EntityRendererFactory.Context context, boolean slim) {
|
||||
super(context, 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);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
protected void addLayers(EntityRendererFactory.Context context) {
|
||||
// remove vanilla features (keep modded ones)
|
||||
// TODO: test with https://github.com/Globox1997/BackSlot
|
||||
features.removeIf(feature -> {
|
||||
return feature instanceof ArmorFeatureRenderer
|
||||
|| feature instanceof PlayerHeldItemFeatureRenderer
|
||||
|
@ -71,22 +69,22 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRend
|
|||
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
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
|
||||
manager.preRender(entity, ModelAttributes.Mode.THIRD_PERSON);
|
||||
shadowRadius = manager.getShadowSize();
|
||||
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
|
||||
// (shadows are drawn after us)
|
||||
/*
|
||||
if (!entity.hasVehicle() && !entity.isSleeping()) {
|
||||
float yaw = MathHelper.lerpAngleDegrees(tickDelta, entity.prevBodyYaw, entity.bodyYaw);
|
||||
float l = entity.getWidth() / 2 * manager.getScaleFactor();
|
||||
|
@ -95,6 +93,8 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRend
|
|||
stack.translate(0, 0, -l);
|
||||
stack.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(yaw));
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
protected Race getPlayerRace(AbstractClientPlayerEntity entity, Pony pony) {
|
||||
|
@ -103,10 +103,7 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRend
|
|||
|
||||
@Override
|
||||
protected void setupTransforms(AbstractClientPlayerEntity entity, MatrixStack stack, float ageInTicks, float rotationYaw, float partialTicks) {
|
||||
manager.preRenderCallback(entity, stack, partialTicks);
|
||||
rotationYaw = manager.getRenderYaw(entity, rotationYaw, partialTicks);
|
||||
super.setupTransforms(entity, stack, ageInTicks, rotationYaw, partialTicks);
|
||||
manager.setupTransforms(entity, stack, rotationYaw, partialTicks);
|
||||
manager.setupTransforms(entity, stack, ageInTicks, rotationYaw, partialTicks);
|
||||
}
|
||||
|
||||
@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) {
|
||||
Pony pony = getEntityPony(player);
|
||||
model = manager.setModel(modelsCache.apply(getPlayerRace(player, pony))).body();
|
||||
manager.updateModel(player, ModelAttributes.Mode.FIRST_PERSON);
|
||||
manager.preRender(player, ModelAttributes.Mode.FIRST_PERSON);
|
||||
|
||||
stack.push();
|
||||
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);
|
||||
|
||||
Identifier texture = getTexture(player);
|
||||
Identifier playerSkin = player.method_52814().texture();
|
||||
Identifier playerSkin = player.getSkinTextures().texture();
|
||||
VertexConsumerProvider interceptedContext = layer -> {
|
||||
return renderContext.getBuffer(RenderLayerUtil
|
||||
.getTexture(layer)
|
||||
|
@ -179,6 +174,11 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRend
|
|||
return getEntityPony(player).texture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setModel(ClientPonyModel<AbstractClientPlayerEntity> model) {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EquineRenderManager<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> getInternalRenderer() {
|
||||
return manager;
|
||||
|
@ -192,7 +192,7 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRend
|
|||
@Override
|
||||
public Identifier getDefaultTexture(AbstractClientPlayerEntity entity, Wearable wearable) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import net.minecraft.entity.EquipmentSlot;
|
|||
import net.minecraft.entity.decoration.ArmorStandEntity;
|
||||
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.meta.Race;
|
||||
import com.minelittlepony.client.model.ModelType;
|
||||
|
@ -60,7 +60,7 @@ public class PonyStandRenderer extends ArmorStandEntityRenderer {
|
|||
}
|
||||
|
||||
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) {
|
||||
super(renderer,
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.minelittlepony.client.render.entity;
|
|||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import com.minelittlepony.api.model.ModelAttributes;
|
||||
import com.minelittlepony.client.mixin.IResizeable;
|
||||
import com.minelittlepony.client.model.ModelType;
|
||||
import com.minelittlepony.client.model.entity.GuardianPonyModel;
|
||||
|
@ -52,7 +53,7 @@ public class SeaponyRenderer extends GuardianEntityRenderer {
|
|||
|
||||
@Override
|
||||
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();
|
||||
|
||||
|
@ -61,4 +62,9 @@ public class SeaponyRenderer extends GuardianEntityRenderer {
|
|||
super.render(entity, entityYaw, tickDelta, stack, renderContext, lightUv);
|
||||
((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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,6 +38,6 @@ public class ZomponyRenderer<Zombie extends HostileEntity> extends PonyRenderer<
|
|||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
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.client.render.PonyRenderContext;
|
||||
|
||||
|
@ -45,10 +45,10 @@ public abstract class AbstractPonyFeature<T extends LivingEntity, M extends Enti
|
|||
|
||||
@Override
|
||||
public final M getContextModel() {
|
||||
return context.getInternalRenderer().getModel();
|
||||
return context.getInternalRenderer().getModels().body();
|
||||
}
|
||||
|
||||
protected ModelWrapper<T, M> getModelWrapper() {
|
||||
return context.getInternalRenderer().getModelWrapper();
|
||||
protected Models<T, M> getModelWrapper() {
|
||||
return context.getInternalRenderer().getModels();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
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.client.model.armour.*;
|
||||
import com.minelittlepony.client.render.ArmorRenderLayers;
|
||||
import com.minelittlepony.client.render.PonyRenderContext;
|
||||
import com.minelittlepony.common.util.Color;
|
||||
|
||||
|
@ -28,7 +29,7 @@ public class ArmourFeature<T extends LivingEntity, M extends EntityModel<T> & Po
|
|||
|
||||
@Override
|
||||
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()) {
|
||||
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(
|
||||
ModelWrapper<T, ? extends PonyModel<T>> pony, MatrixStack matrices,
|
||||
Models<T, ? extends PonyModel<T>> pony, MatrixStack matrices,
|
||||
VertexConsumerProvider renderContext, int light, T entity,
|
||||
float limbDistance, float limbAngle,
|
||||
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) {
|
||||
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) {
|
||||
|
@ -103,9 +104,8 @@ public class ArmourFeature<T extends LivingEntity, M extends EntityModel<T> & Po
|
|||
Sprite sprite = armorTrimsAtlas.getSprite(
|
||||
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(
|
||||
ItemRenderer.getDirectItemGlintConsumer(provider, TexturedRenderLayers.getArmorTrims(trim.getPattern().value().decal()), true, glint)
|
||||
);
|
||||
return sprite.getTextureSpecificVertexConsumer(ItemRenderer.getDirectItemGlintConsumer(provider, renderLayer, true, glint));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,13 +26,16 @@ public class CapeFeature<M extends ClientPonyModel<AbstractClientPlayerEntity>>
|
|||
M model = getModelWrapper().body();
|
||||
|
||||
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) {
|
||||
|
||||
stack.push();
|
||||
|
||||
model.transform(BodyPart.BODY, stack);
|
||||
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);
|
||||
|
||||
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_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);
|
||||
stack.pop();
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public class DJPon3Feature<T extends AbstractClientPlayerEntity, M extends Entit
|
|||
|
||||
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);
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ public class ElytraFeature<T extends LivingEntity, M extends EntityModel<T> & Po
|
|||
|
||||
protected Identifier getElytraTexture(T entity) {
|
||||
if (entity instanceof AbstractClientPlayerEntity player) {
|
||||
SkinTextures textures = player.method_52814();
|
||||
SkinTextures textures = player.getSkinTextures();
|
||||
|
||||
if (textures.elytraTexture() != null) {
|
||||
return textures.elytraTexture();
|
||||
|
|
|
@ -37,6 +37,7 @@ public class HeldItemFeature<T extends LivingEntity, M extends EntityModel<T> &
|
|||
|
||||
return main ? entity.getMainHandStack() : entity.getOffHandStack();
|
||||
}
|
||||
|
||||
@Override
|
||||
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);
|
||||
|
||||
if (!left.isEmpty() || !right.isEmpty()) {
|
||||
M model = context.getInternalRenderer().getModel();
|
||||
M model = context.getInternalRenderer().getModels().body();
|
||||
|
||||
stack.push();
|
||||
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
package com.minelittlepony.client.render.entity.npc;
|
||||
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.mob.MobEntity;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.village.VillagerDataContainer;
|
||||
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.pony.meta.Race;
|
||||
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.npc.textures.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
|
||||
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 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) {
|
||||
super(context, ModelType.getPlayerModel(Race.EARTH).getKey(false), SillyPonyTextureSupplier.create(textureSupplier, formatter));
|
||||
clothing = new NpcClothingFeature<>(this, type);
|
||||
this.manager.setModelsLookup(entity -> models.apply(getEntityPony(entity).race()));
|
||||
addFeature(clothing);
|
||||
}
|
||||
|
||||
|
@ -54,20 +59,6 @@ abstract class AbstractNpcRenderer<T extends MobEntity & VillagerDataContainer>
|
|||
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) {
|
||||
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.util.Identifier;
|
|||
import net.minecraft.util.Util;
|
||||
|
||||
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.function.Function;
|
||||
|
|
|
@ -8,7 +8,9 @@ public class SillyPonyTextureSupplier {
|
|||
public static <T extends LivingEntity & VillagerDataContainer> TextureSupplier<T> create(TextureSupplier<T> fallback, TextureSupplier<String> formatter) {
|
||||
Identifier egg = formatter.apply("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) {
|
||||
|
@ -16,7 +18,7 @@ public class SillyPonyTextureSupplier {
|
|||
return false;
|
||||
}
|
||||
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) {
|
||||
|
|
|
@ -20,7 +20,8 @@ public enum PonyTransformation {
|
|||
public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) {
|
||||
if (model.getAttributes().isSwimming) stack.translate(0, -0.3F, 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);
|
||||
|
||||
switch (part) {
|
||||
|
@ -28,7 +29,8 @@ public enum PonyTransformation {
|
|||
if (model.getAttributes().isCrouching) stack.translate(-0.03F, 0.03F, 0.13F);
|
||||
break;
|
||||
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;
|
||||
case BACK:
|
||||
translateForRider(stack);
|
||||
|
@ -42,7 +44,8 @@ public enum PonyTransformation {
|
|||
public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) {
|
||||
if (model.getAttributes().isSwimming) stack.translate(0, -0.2F, 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);
|
||||
|
||||
switch (part) {
|
||||
|
@ -77,7 +80,8 @@ public enum PonyTransformation {
|
|||
@Override
|
||||
public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) {
|
||||
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);
|
||||
|
||||
switch (part) {
|
||||
|
@ -88,7 +92,7 @@ public enum PonyTransformation {
|
|||
break;
|
||||
case HEAD:
|
||||
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);
|
||||
break;
|
||||
case BODY:
|
||||
|
@ -113,7 +117,8 @@ public enum PonyTransformation {
|
|||
public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) {
|
||||
if (model.getAttributes().isSwimming) stack.translate(0, -0.9F, 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);
|
||||
|
||||
stack.translate(0, 0.2F, 0);
|
||||
|
@ -142,7 +147,8 @@ public enum PonyTransformation {
|
|||
@Override
|
||||
public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) {
|
||||
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);
|
||||
|
||||
switch (part) {
|
||||
|
@ -175,7 +181,8 @@ public enum PonyTransformation {
|
|||
public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) {
|
||||
if (model.getAttributes().isSwimming) stack.translate(0, -0.6F, 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);
|
||||
|
||||
switch (part) {
|
||||
|
|
|
@ -88,16 +88,17 @@ public class NativeUtil {
|
|||
}
|
||||
|
||||
public static void parseImage(Identifier resource, Consumer<TriggerPixel.Mat> consumer, Consumer<Exception> fail) {
|
||||
parseImage(resource, consumer, fail, 0);
|
||||
}
|
||||
|
||||
private static void parseImage(Identifier resource, Consumer<TriggerPixel.Mat> consumer, Consumer<Exception> fail, int attempt) {
|
||||
try {
|
||||
MinecraftClient.getInstance().execute(() -> {
|
||||
if (!RenderSystem.isOnRenderThread()) {
|
||||
RenderSystem.recordRenderCall(() -> parseImage(resource, consumer, fail, attempt));
|
||||
RenderSystem.recordRenderCall(() -> _parseImage(resource, consumer, fail, 0));
|
||||
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();
|
||||
TextureManager textures = mc.getTextureManager();
|
||||
|
||||
|
|
62
src/main/resources/assets/minelittlepony/lang/af_za.json
Normal file
62
src/main/resources/assets/minelittlepony/lang/af_za.json
Normal 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"
|
||||
}
|
|
@ -13,15 +13,18 @@
|
|||
"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.snuzzles": "Zeige die Schnauzen der Ponies",
|
||||
"minelp.options.fillycam": "Filly Kamera",
|
||||
"minelp.options.showscale": "Nutze die Größen aus der Serie",
|
||||
"minelp.options.fpsmagic": "Magie in der ersten Person",
|
||||
"minelp.options.tpsmagic": "Magie in der dritten Person",
|
||||
"minelp.options.ponyskulls": "Pony-Schädel",
|
||||
"minelp.options.frustrum": "Frustum Prüfungen",
|
||||
"minelp.options.flappyelytras": "Beim Gleiten mit den Flügeln schlagen",
|
||||
"minelp.options.horsiemode": "Pferdy Pferd Modus",
|
||||
"minelp.options.nofun": "Langweiliger Modus",
|
||||
"minelp.options.dualskinmode": "(Experimentell) Dualer Skin Modus",
|
||||
"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.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.",
|
||||
|
@ -40,7 +43,6 @@
|
|||
"minelp.mode.wet": "Seepony",
|
||||
"minelp.debug.reload_models.message": "Ponytexturen neu laden...",
|
||||
"minelp.debug.scale": "Skalierungsfaktor",
|
||||
"minelp.debug.scale.value": "%.2f",
|
||||
"minelp.debug.scale.meg": "Enorm",
|
||||
"minelp.debug.scale.max": "Doppelt",
|
||||
"minelp.debug.scale.mid": "Normal",
|
||||
|
@ -48,7 +50,7 @@
|
|||
"minelp.debug.scale.min": "Winzig",
|
||||
"minelp.debug.size": "Überschreibe Größe",
|
||||
"minelp.debug.race": "Überschreibe Spezies",
|
||||
|
||||
"minelp.debug.armour": "Ponifizierte Rüstungsständer deaktivieren",
|
||||
"skin_type.minelp.seapony": "Seepony",
|
||||
"skin_type.minelittlepony.crown": "Krone",
|
||||
"skin_type.minelittlepony.muffin": "Muffin-Mütze",
|
||||
|
|
62
src/main/resources/assets/minelittlepony/lang/en_gb.json
Normal file
62
src/main/resources/assets/minelittlepony/lang/en_gb.json
Normal 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"
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
|
||||
"key.minelittlepony.settings": "Petite Equine Sailor",
|
||||
"minelp.options.title": "Petite Equine Sailor Choices",
|
||||
"minelp.options.ponylevel": "Notoriety",
|
||||
|
@ -22,6 +21,8 @@
|
|||
"minelp.options.ponyskulls": "Rendaaar mah heads",
|
||||
"minelp.options.frustrum": "Horsey Sails",
|
||||
"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.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",
|
||||
|
@ -49,6 +50,14 @@
|
|||
"minelp.debug.scale.min": "Pathetic",
|
||||
"minelp.debug.size": "Bow Width",
|
||||
"minelp.debug.race": "Sail Height",
|
||||
|
||||
"hdskins.mode.minelp_seapony": "Seaharpy (in da briny deep)"
|
||||
"minelp.debug.armour": "Batten down the hatches",
|
||||
"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"
|
||||
}
|
||||
|
|
62
src/main/resources/assets/minelittlepony/lang/en_ud.json
Normal file
62
src/main/resources/assets/minelittlepony/lang/en_ud.json
Normal 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ɯ uɐɯ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"
|
||||
}
|
|
@ -23,6 +23,7 @@
|
|||
"minelp.options.flappyelytras": "Flap Wings whilst Gliding",
|
||||
"minelp.options.horsiemode": "Horsey Horse Mode",
|
||||
"minelp.options.nofun": "Boring Mode",
|
||||
"minelp.options.dualskinmode": "(Experimental) Dual Skin 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",
|
||||
|
@ -53,7 +54,8 @@
|
|||
"minelp.debug.race": "Race Override",
|
||||
"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.muffin": "Muffin Hat",
|
||||
"skin_type.minelittlepony.hat": "Witch Hat",
|
||||
|
|
63
src/main/resources/assets/minelittlepony/lang/enus_enp.json
Normal file
63
src/main/resources/assets/minelittlepony/lang/enus_enp.json
Normal 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"
|
||||
}
|
1
src/main/resources/assets/minelittlepony/lang/es_cl.json
Normal file
1
src/main/resources/assets/minelittlepony/lang/es_cl.json
Normal file
|
@ -0,0 +1 @@
|
|||
{}
|
|
@ -19,7 +19,6 @@
|
|||
"minelp.mobs.pigzombies": "Ponifier Piglin",
|
||||
"minelp.mobs.striders": "Ponifier Arpenteur",
|
||||
"minelp.mobs.skeletons": "Ponifier Illageois",
|
||||
"minelp.mobs.illagers": "Ponify Illagers",
|
||||
"minelp.mobs.guardians": "Ponifier Gardien",
|
||||
"minelp.mobs.endermen": "Ponifier Endermen",
|
||||
"minelp.mode.dry": "Poney terrestre",
|
||||
|
@ -27,7 +26,6 @@
|
|||
"minelp.debug.reload_models.message": "Rechargement modèles de poney ...",
|
||||
"minelp.debug.scale": "Facteur D'échelle",
|
||||
"minelp.debug.scale.meg": "Énorme",
|
||||
"minelp.debug.scale.max": "Double",
|
||||
"minelp.debug.scale.mid": "Défaut",
|
||||
"minelp.debug.scale.sa": "Montrer Précis",
|
||||
"minelp.debug.scale.min": "Tout Petit",
|
||||
|
|
63
src/main/resources/assets/minelittlepony/lang/lol_us.json
Normal file
63
src/main/resources/assets/minelittlepony/lang/lol_us.json
Normal 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"
|
||||
}
|
1
src/main/resources/assets/minelittlepony/lang/nl_nl.json
Normal file
1
src/main/resources/assets/minelittlepony/lang/nl_nl.json
Normal file
|
@ -0,0 +1 @@
|
|||
{}
|
1
src/main/resources/assets/minelittlepony/lang/pt_pt.json
Normal file
1
src/main/resources/assets/minelittlepony/lang/pt_pt.json
Normal file
|
@ -0,0 +1 @@
|
|||
{}
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"key.minelittlepony.settings": "Mine Little Pony",
|
||||
"minelp.options.title": "Настройки Mine Little Pony",
|
||||
"minelp.options.ponylevel": "Уровень пони",
|
||||
"minelp.options.ponylevel.ponies": "Только пони",
|
||||
|
@ -21,7 +20,8 @@
|
|||
"minelp.options.ponyskulls": "Понифицировать черепа",
|
||||
"minelp.options.frustrum": "Изменить проверку поля зрения",
|
||||
"minelp.options.flappyelytras": "Махать крыльями при Парении",
|
||||
"minelp.options.passivenetworking": "Пассивная сеть [Beta]",
|
||||
"minelp.options.horsiemode": "Режим лошади",
|
||||
"minelp.options.nofun": "Режим без веселья",
|
||||
"minelp.options.button": "Отображать на главном экране",
|
||||
"minelp.options.button.on": "Отображать всегда\n\nВидны обе кнопки Mine Little Pony и HD Skins (если установлен)",
|
||||
"minelp.options.button.auto": "Отображать, только если не установлен мод HD Skins",
|
||||
|
@ -42,7 +42,6 @@
|
|||
"minelp.mode.wet": "Морской пони",
|
||||
"minelp.debug.reload_models.message": "Перезагрузка понифицированных моделей...",
|
||||
"minelp.debug.scale": "Масштаб",
|
||||
"minelp.debug.scale.value": "%.2f",
|
||||
"minelp.debug.scale.meg": "Мега",
|
||||
"minelp.debug.scale.max": "Удвоенный",
|
||||
"minelp.debug.scale.mid": "Стандартный",
|
||||
|
@ -50,7 +49,7 @@
|
|||
"minelp.debug.scale.min": "Мельчайший",
|
||||
"minelp.debug.size": "Переопределение размера",
|
||||
"minelp.debug.race": "Переопределение расы",
|
||||
|
||||
"minelp.debug.armour": "Отключить понифицированную броню",
|
||||
"skin_type.minelp.seapony": "Морской пони",
|
||||
"skin_type.minelittlepony.crown": "Корона",
|
||||
"skin_type.minelittlepony.muffin": "Маффин",
|
||||
|
|
1
src/main/resources/assets/minelittlepony/lang/sr_cs.json
Normal file
1
src/main/resources/assets/minelittlepony/lang/sr_cs.json
Normal file
|
@ -0,0 +1 @@
|
|||
{}
|
1
src/main/resources/assets/minelittlepony/lang/uk_ua.json
Normal file
1
src/main/resources/assets/minelittlepony/lang/uk_ua.json
Normal file
|
@ -0,0 +1 @@
|
|||
{}
|
|
@ -1,38 +1,66 @@
|
|||
{
|
||||
"key.minelittlepony.settings": "我的小马驹",
|
||||
"minelp.options.title": "我的小马驹设置菜单",
|
||||
"minelp.options.ponylevel": "小马化类型",
|
||||
"minelp.options.ponylevel.ponies": "仅小马",
|
||||
"minelp.options.ponylevel.humans": "仅人类",
|
||||
"minelp.options.ponylevel.both": "全部",
|
||||
"minelp.options.ponylevel": "小马化程度",
|
||||
"minelp.options.ponylevel.ponies": "全是小马",
|
||||
"minelp.options.ponylevel.ponies.tooltip": "所有玩家都变小马\n\n使用非小马皮肤的玩家会被随机分配一个背景小马的皮肤",
|
||||
"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.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.fillycam": "显示小马视角",
|
||||
"minelp.options.fillycam": "显示幼驹视角",
|
||||
"minelp.options.showscale": "准确的显示缩放",
|
||||
"minelp.options.fpsmagic": "第一人称视角显示魔法",
|
||||
"minelp.options.ponyskulls": "马化头部",
|
||||
"minelp.options.tpsmagic": "第三人称视角显示魔法",
|
||||
"minelp.options.ponyskulls": "马化头颅",
|
||||
"minelp.options.frustrum": "视锥体网格",
|
||||
"minelp.options.flappyelytras": "在滑翔时拍翅膀",
|
||||
"minelp.options.horsiemode": "大马模式",
|
||||
"minelp.options.nofun": "无聊模式",
|
||||
"minelp.options.dualskinmode": "(实验性)双层皮肤模式",
|
||||
"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.villagers": "马化村民",
|
||||
"minelp.mobs.zombies": "马化僵尸",
|
||||
"minelp.mobs.pigzombies": "马化僵尸猪灵",
|
||||
"minelp.mobs.striders": "炽足马兽",
|
||||
"minelp.mobs.skeletons": "马化骷髅",
|
||||
"minelp.mobs.illagers": "马化掠夺者",
|
||||
"minelp.mobs.guardians": "马化守卫者",
|
||||
"minelp.mobs.endermen": "马化末影人",
|
||||
"minelp.mobs.inanimates": "马化物体",
|
||||
"minelp.mobs.villagers": "村民 小马化",
|
||||
"minelp.mobs.zombies": "僵尸 小马化",
|
||||
"minelp.mobs.pigzombies": "僵尸猪灵 小马化",
|
||||
"minelp.mobs.striders": "炽足兽 小马化",
|
||||
"minelp.mobs.skeletons": "骷髅 小马化",
|
||||
"minelp.mobs.illagers": "掠夺者 小马化",
|
||||
"minelp.mobs.guardians": "守卫者 小马化",
|
||||
"minelp.mobs.endermen": "末影人 小马化",
|
||||
"minelp.mobs.allays": "悦灵 小马化",
|
||||
"minelp.mobs.inanimates": "物体 小马化",
|
||||
"minelp.mode.dry": "陆地小马模型",
|
||||
"minelp.mode.wet": "海马小马模型",
|
||||
"minelp.debug.reload_models.message": "重新加载小马模型中...",
|
||||
"minelp.debug.scale": "比例系数",
|
||||
"minelp.debug.scale.value": "%.2f",
|
||||
"minelp.debug.scale.meg": "巨大的",
|
||||
"minelp.debug.scale.max": "双倍的",
|
||||
"minelp.debug.scale.mid": "默认",
|
||||
"minelp.debug.scale.sa": "精准显示",
|
||||
"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": "牛仔帽"
|
||||
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
"minelp.mode.wet": "海馬小馬模型",
|
||||
"minelp.debug.reload_models.message": "重新加載小馬模型中...",
|
||||
"minelp.debug.scale": "比例係數",
|
||||
"minelp.debug.scale.value": "%.2f",
|
||||
"minelp.debug.scale.meg": "巨大的",
|
||||
"minelp.debug.scale.max": "雙倍的",
|
||||
"minelp.debug.scale.mid": "默認",
|
||||
|
|
|
@ -127,8 +127,8 @@
|
|||
{
|
||||
"type": "mson:plane", "__comment": "butt",
|
||||
"texture": { "u": 36, "v": 16 },
|
||||
"mirror": [true, true],
|
||||
"face": "south",
|
||||
"mirror": [false, true],
|
||||
"face": "north",
|
||||
"size": [ 8, 4 ]
|
||||
}
|
||||
]
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
|
@ -31,12 +31,12 @@
|
|||
"minelp.mixin.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.12.0",
|
||||
"minecraft": "${minecraftVersion}",
|
||||
"fabricloader": "${loaderVersion}",
|
||||
"java": ">=17",
|
||||
"fabric-api-base": ">=0.1.0",
|
||||
"fabric-lifecycle-events-v1": ">=0.1.0",
|
||||
"fabric-resource-loader-v0": ">=0.1.0",
|
||||
"kirin": "*"
|
||||
"fabric-api": "${fabricVersion}",
|
||||
"kirin": "${kirinVersion}",
|
||||
"mson": "${msonVersion}"
|
||||
},
|
||||
"suggests": {
|
||||
"hdskins": "*",
|
||||
|
|
Loading…
Add table
Reference in a new issue