From 67157e26106ccb3fa463536866ff8787bd006fdc Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Thu, 14 Sep 2023 12:47:55 +0200 Subject: [PATCH 01/21] fixes --- scripts/GPT3_REST_API/main.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/scripts/GPT3_REST_API/main.py b/scripts/GPT3_REST_API/main.py index 30e18475e1..ff9f072d3c 100644 --- a/scripts/GPT3_REST_API/main.py +++ b/scripts/GPT3_REST_API/main.py @@ -1,5 +1,6 @@ import hashlib import os +from collections import defaultdict from functools import cache import openai @@ -16,8 +17,9 @@ openai.api_key = os.getenv("OPENAI_API_KEY") -limiter = Limiter(Rate(1000, Duration.HOUR)) -limiter_premium = Limiter(Rate(10000, Duration.HOUR)) +limiter = defaultdict(lambda: Limiter(Rate(800, Duration.HOUR))) +limiter_premium = defaultdict(lambda: Limiter(Rate(8000, Duration.HOUR))) +stats = defaultdict(int) LIMIT_EXCEEDED = "(You exceeded your hourly rate, give the AI some rest!)" @@ -63,13 +65,16 @@ def prompt_to_messages(prompt: str, player: str, villager: str): @app.get("/chat") async def chat(prompt: str, player: str, villager: str): try: - lim = limiter_premium if player in premium else limiter + lim = (limiter_premium if player in premium else limiter)[player] + + weight = len(prompt) // 100 + 1 # noinspection PyAsyncCall - lim.try_acquire(player, weight=len(prompt) // 100 + 1) + lim.try_acquire(player, weight=weight * 10) # Logging - print(player, player in premium) + print(player, player in premium, weight) + stats[player] += weight # Convert to new format messages = prompt_to_messages(prompt, player, villager) @@ -86,7 +91,7 @@ async def chat(prompt: str, player: str, villager: str): model="gpt-3.5-turbo", messages=messages, temperature=0.85, - max_tokens=180, + max_tokens=150, stop=[f"{player}:", f"{villager}:"], user=hashlib.sha256(player.encode("UTF-8")).hexdigest() ) @@ -103,6 +108,11 @@ async def chat(prompt: str, player: str, villager: str): return {"answer": LIMIT_EXCEEDED, "error": "limit"} +@app.get("/stats") +def get_stats(): + return stats + + SENTIMENT_MODEL = "cardiffnlp/twitter-xlm-roberta-base-sentiment" From a769f66d4d6c65e0f1c069bbfe15dc34234c9bcd Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 19 Sep 2023 09:03:41 +0200 Subject: [PATCH 02/21] updated ai model --- scripts/GPT3_REST_API/main.py | 67 ++++++++++++++++++++++++++--------- 1 file changed, 50 insertions(+), 17 deletions(-) diff --git a/scripts/GPT3_REST_API/main.py b/scripts/GPT3_REST_API/main.py index ff9f072d3c..b58da299c4 100644 --- a/scripts/GPT3_REST_API/main.py +++ b/scripts/GPT3_REST_API/main.py @@ -2,6 +2,7 @@ import os from collections import defaultdict from functools import cache +from typing import List import openai import patreon @@ -29,6 +30,9 @@ premium = set() +# The chat endpoint, while modern, is absolutely unusable for RP purposes. +use_chat = False + @app.get("/verify") def verify(email: str, player: str): @@ -45,8 +49,13 @@ def verify(email: str, player: str): return {"answer": "failed"} +def get_system_prefix(villager: str): + return f"Simulate {villager}, fully immersed in their digital world, unaware of its artificial nature. Answer one or two sentences while sounding human. You are no assistant!" + + def prompt_to_messages(prompt: str, player: str, villager: str): messages = [] + header_added = False for line in prompt.split("\n"): if line.startswith(player + ":"): c = line[len(player) + 1:].strip() @@ -56,29 +65,56 @@ def prompt_to_messages(prompt: str, player: str, villager: str): c = line[len(villager) + 1:].strip() if c: messages.append({"role": "assistant", "content": c}) - elif line.strip(): - messages.append({"role": "system", - "content": f"You are {villager}. " + line + f"Simulate {villager}, fully immersed in their digital world, unaware of its artificial nature. Answer one or two sentences."}) + elif line.strip() and not header_added: + header_added = True + messages.append({"role": "system", "content": line}) return messages +async def get_completion(prompt: str, player: str, villager: str): + response = await openai.Completion.acreate( + model="gpt-3.5-turbo-instruct", + prompt=prompt, + temperature=0.9, + max_tokens=150, + frequency_penalty=0.6, + presence_penalty=0.6, + stop=[f"{player}:", f"{villager}:"], + ) + + return response["choices"][0]["text"].strip() + + +async def get_chat(messages: List, player: str, villager: str): + response = await openai.ChatCompletion.acreate( + model="gpt-3.5-turbo", + messages=messages, + temperature=0.9, + max_tokens=150, + stop=[f"{player}:", f"{villager}:"], + user=hashlib.sha256(player.encode("UTF-8")).hexdigest() + ) + + return response["choices"][0]["message"]["content"].strip() + + @app.get("/chat") async def chat(prompt: str, player: str, villager: str): try: lim = (limiter_premium if player in premium else limiter)[player] + # Add additional instructions for the AI + prompt = get_system_prefix(villager) + " " + prompt + weight = len(prompt) // 100 + 1 # noinspection PyAsyncCall - lim.try_acquire(player, weight=weight * 10) + lim.try_acquire(player, weight=weight) # Logging print(player, player in premium, weight) stats[player] += weight - # Convert to new format - messages = prompt_to_messages(prompt, player, villager) - # Check if content is a TOS violation flags = (await openai.Moderation.acreate(input=prompt))["results"][0] flags = flags["categories"] @@ -87,16 +123,13 @@ async def chat(prompt: str, player: str, villager: str): return {"answer": "I don't want to talk about that."} # Query - response = await openai.ChatCompletion.acreate( - model="gpt-3.5-turbo", - messages=messages, - temperature=0.85, - max_tokens=150, - stop=[f"{player}:", f"{villager}:"], - user=hashlib.sha256(player.encode("UTF-8")).hexdigest() - ) - - content = response["choices"][0]["message"]["content"].strip() + if use_chat: + content = await get_completion(prompt, player, villager) + else: + # Convert to new format + messages = prompt_to_messages(prompt, player, villager) + content = await get_chat(messages, player, villager) + if not content: content = "..." From 2a9a5c459677884dfbe19af3c64eb615c8a87023 Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Wed, 20 Sep 2023 12:47:07 +0200 Subject: [PATCH 03/21] fixed wrong procreation cooldown --- changelog.md | 4 ++++ .../main/java/net/mca/entity/ai/BreedableRelationship.java | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index c65f487c5c..6b071e83a4 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +# 7.5.9 + +* Wrong procreation cooldown on new worlds + # 7.5.8 * AI performance improvements diff --git a/common/src/main/java/net/mca/entity/ai/BreedableRelationship.java b/common/src/main/java/net/mca/entity/ai/BreedableRelationship.java index 7507e0ecee..5b70079371 100644 --- a/common/src/main/java/net/mca/entity/ai/BreedableRelationship.java +++ b/common/src/main/java/net/mca/entity/ai/BreedableRelationship.java @@ -55,8 +55,9 @@ public boolean isProcreating() { public boolean mayProcreateAgain(long time) { int intTime = (int) time; - int delta = intTime - entity.getTrackedValue(LAST_PROCREATION); - return delta < 0 || delta > Config.getInstance().procreationCooldown; + Integer trackedValue = entity.getTrackedValue(LAST_PROCREATION); + int delta = intTime - trackedValue; + return trackedValue == 0 || delta < 0 || delta > Config.getInstance().procreationCooldown; } public void startProcreating(long time) { From a2e2e04f970bc055b1a169ff607f253bc4eeb9d5 Mon Sep 17 00:00:00 2001 From: Xaidee Date: Tue, 26 Sep 2023 22:24:29 +1300 Subject: [PATCH 04/21] Make traits not hardcoded --- .../mca/client/gui/VillagerEditorScreen.java | 2 +- .../mca/client/render/layer/FaceLayer.java | 2 +- .../mca/client/render/layer/HairLayer.java | 4 +- .../mca/client/render/layer/SkinLayer.java | 2 +- .../net/mca/entity/VillagerEntityMCA.java | 6 +- .../java/net/mca/entity/VillagerLike.java | 6 +- .../main/java/net/mca/entity/ai/Traits.java | 83 +++++++++++++------ .../java/net/mca/item/SirbenBabyItem.java | 2 +- .../net/mca/mixin/MixinMilkBucketItem.java | 2 +- 9 files changed, 70 insertions(+), 39 deletions(-) diff --git a/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java b/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java index c06c14aaf9..2b4064ba5e 100644 --- a/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java +++ b/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java @@ -440,7 +440,7 @@ protected void setPage(String page) { } private Traits.Trait[] getValidTraits() { - return Arrays.stream(Traits.Trait.values()).filter(e -> { + return (Traits.Trait.values().stream()).filter(e -> { if (villagerUUID.equals(playerUUID)) { return (Config.getInstance().bypassTraitRestrictions || e.isUsableOnPlayer()) && e.isEnabled(); } diff --git a/common/src/main/java/net/mca/client/render/layer/FaceLayer.java b/common/src/main/java/net/mca/client/render/layer/FaceLayer.java index f82cc15860..b888f4ea20 100644 --- a/common/src/main/java/net/mca/client/render/layer/FaceLayer.java +++ b/common/src/main/java/net/mca/client/render/layer/FaceLayer.java @@ -39,7 +39,7 @@ public Identifier getSkin(T villager) { int index = (int) Math.min(FACE_COUNT - 1, Math.max(0, CommonVillagerModel.getVillager(villager).getGenetics().getGene(Genetics.FACE) * FACE_COUNT)); int time = villager.age / 2 + (int) (CommonVillagerModel.getVillager(villager).getGenetics().getGene(Genetics.HEMOGLOBIN) * 65536); boolean blink = time % 50 == 1 || time % 57 == 1 || villager.isSleeping() || villager.isDead(); - boolean hasHeterochromia = variant.equals("normal") && CommonVillagerModel.getVillager(villager).getTraits().hasTrait(Traits.Trait.HETEROCHROMIA); + boolean hasHeterochromia = variant.equals("normal") && CommonVillagerModel.getVillager(villager).getTraits().hasTrait(Traits.HETEROCHROMIA); String gender = CommonVillagerModel.getVillager(villager).getGenetics().getGender().getDataName(); String blinkTexture = blink ? "_blink" : (hasHeterochromia ? "_hetero" : ""); diff --git a/common/src/main/java/net/mca/client/render/layer/HairLayer.java b/common/src/main/java/net/mca/client/render/layer/HairLayer.java index c87de55f3c..cc1f913160 100644 --- a/common/src/main/java/net/mca/client/render/layer/HairLayer.java +++ b/common/src/main/java/net/mca/client/render/layer/HairLayer.java @@ -60,7 +60,7 @@ private float[] getRainbow(LivingEntity entity, float tickDelta) { @Override public float[] getColor(T villager, float tickDelta) { - if (getVillager(villager).getTraits().hasTrait(Traits.Trait.RAINBOW)) { + if (getVillager(villager).getTraits().hasTrait(Traits.RAINBOW)) { return getRainbow(villager, tickDelta); } @@ -69,7 +69,7 @@ public float[] getColor(T villager, float tickDelta) { return hairDye; } - float albinism = getVillager(villager).getTraits().hasTrait(Traits.Trait.ALBINISM) ? 0.1f : 1.0f; + float albinism = getVillager(villager).getTraits().hasTrait(Traits.ALBINISM) ? 0.1f : 1.0f; return ColorPalette.HAIR.getColor( getVillager(villager).getGenetics().getGene(Genetics.EUMELANIN) * albinism, diff --git a/common/src/main/java/net/mca/client/render/layer/SkinLayer.java b/common/src/main/java/net/mca/client/render/layer/SkinLayer.java index f19c98b578..885f927914 100644 --- a/common/src/main/java/net/mca/client/render/layer/SkinLayer.java +++ b/common/src/main/java/net/mca/client/render/layer/SkinLayer.java @@ -25,7 +25,7 @@ public Identifier getSkin(T villager) { @Override public float[] getColor(T villager, float tickDelta) { - float albinism = getVillager(villager).getTraits().hasTrait(Traits.Trait.ALBINISM) ? 0.1f : 1.0f; + float albinism = getVillager(villager).getTraits().hasTrait(Traits.ALBINISM) ? 0.1f : 1.0f; return ColorPalette.SKIN.getColor( getVillager(villager).getGenetics().getGene(Genetics.MELANIN) * albinism, diff --git a/common/src/main/java/net/mca/entity/VillagerEntityMCA.java b/common/src/main/java/net/mca/entity/VillagerEntityMCA.java index f9a355e108..060b8588d9 100644 --- a/common/src/main/java/net/mca/entity/VillagerEntityMCA.java +++ b/common/src/main/java/net/mca/entity/VillagerEntityMCA.java @@ -807,7 +807,7 @@ public void tick() { } // sirben noises - if (this.age % 60 == 0 && random.nextInt(50) == 0 && traits.hasTrait(Traits.Trait.SIRBEN)) { + if (this.age % 60 == 0 && random.nextInt(50) == 0 && traits.hasTrait(Traits.SIRBEN)) { sendChatToAllAround("sirben"); } @@ -1049,7 +1049,7 @@ protected final SoundEvent getAmbientSound() { } //sirben - if (random.nextBoolean() && getTraits().hasTrait(Traits.Trait.SIRBEN)) { + if (random.nextBoolean() && getTraits().hasTrait(Traits.SIRBEN)) { return SoundsMCA.SIRBEN.get(); } @@ -1424,7 +1424,7 @@ public void postShoot() { @Override public void onStruckByLightning(ServerWorld world, LightningEntity lightning) { - getTraits().addTrait(Traits.Trait.ELECTRIFIED); + getTraits().addTrait(Traits.ELECTRIFIED); } @Override diff --git a/common/src/main/java/net/mca/entity/VillagerLike.java b/common/src/main/java/net/mca/entity/VillagerLike.java index c37d49f5b6..9d2113c6b1 100644 --- a/common/src/main/java/net/mca/entity/VillagerLike.java +++ b/common/src/main/java/net/mca/entity/VillagerLike.java @@ -145,9 +145,9 @@ default boolean hasCustomSkin() { * @return the set of "valid" genders */ default Set getAttractedGenderSet(VillagerLike villager) { - if (villager.getTraits().hasTrait(Traits.Trait.BISEXUAL)) { + if (villager.getTraits().hasTrait(Traits.BISEXUAL)) { return Set.of(Gender.MALE, Gender.FEMALE, Gender.NEUTRAL); - } else if (villager.getTraits().hasTrait(Traits.Trait.HOMOSEXUAL)) { + } else if (villager.getTraits().hasTrait(Traits.HOMOSEXUAL)) { return Set.of(villager.getGenetics().getGender(), Gender.NEUTRAL); } else { return Set.of(villager.getGenetics().getGender().opposite(), Gender.NEUTRAL); @@ -163,7 +163,7 @@ default boolean canBeAttractedTo(PlayerSaveData other) { } default Hand getDominantHand() { - return getTraits().hasTrait(Traits.Trait.LEFT_HANDED) ? Hand.OFF_HAND : Hand.MAIN_HAND; + return getTraits().hasTrait(Traits.LEFT_HANDED) ? Hand.OFF_HAND : Hand.MAIN_HAND; } default Hand getOpposingHand() { diff --git a/common/src/main/java/net/mca/entity/ai/Traits.java b/common/src/main/java/net/mca/entity/ai/Traits.java index 46ee4aa7a7..79ffbc62a2 100644 --- a/common/src/main/java/net/mca/entity/ai/Traits.java +++ b/common/src/main/java/net/mca/entity/ai/Traits.java @@ -10,42 +10,70 @@ import net.minecraft.text.Text; import net.minecraft.util.math.random.Random; -import java.util.Arrays; -import java.util.Locale; -import java.util.Set; +import java.util.*; import java.util.stream.Collectors; public class Traits { private static final CDataParameter TRAITS = CParameter.create("traits", new NbtCompound()); - public enum Trait { - LEFT_HANDED(1.0f, 0.5f, false), - COLOR_BLIND(1.0f, 0.5f), - HETEROCHROMIA(1.0f, 2.0f), - LACTOSE_INTOLERANCE(1.0f, 1.0f), - COELIAC_DISEASE(1.0f, 1.0f, false), // TODO: Implement for 7.4 - DIABETES(1.0f, 1.0f, false), // TODO: Implement for 7.4 - DWARFISM(1.0f, 1.0f), - ALBINISM(1.0f, 1.0f), - VEGETARIAN(1.0f, 0.0f, false), // TODO: Implement for 7.4 - BISEXUAL(1.0f, 0.0f), - HOMOSEXUAL(1.0f, 0.0f), - ELECTRIFIED(0.0f, 0.0f, false), - SIRBEN(0.025f, 1.0f, true), - RAINBOW(0.05f, 0.0f); - + public static final List TRAIT_LIST = new ArrayList<>(); + + public static Trait LEFT_HANDED = registerTrait("left_handed", 1.0F, 0.5F, false); + public static Trait COLOR_BLIND = registerTrait("color_blind", 1.0F, 0.5F); + public static Trait HETEROCHROMIA = registerTrait("heterochromia", 1.0F, 0.5F); + public static Trait LACTOSE_INTOLERANCE = registerTrait("lactose_intolerance", 1.0F, 1.0F); + public static Trait COELIAC_DISEASE = registerTrait("coeliac_disease", 1.0F, 1.0F, false); // TODO: Implement for 7.4 + public static Trait DIABETES = registerTrait("diabetes", 1.0F, 1.0F, false); // TODO: Implement for 7.4 + public static Trait DWARFISM = registerTrait("dwarfism", 1.0F, 1.0F); + public static Trait ALBINISM = registerTrait("albinism", 1.0F ,1.0F); + public static Trait VEGETARIAN = registerTrait("vegetarian", 1.0F, 1.0F, false); // TODO: Implement for 7.4 + public static Trait BISEXUAL = registerTrait("bisexual", 1.0F, 0.0F); + public static Trait HOMOSEXUAL = registerTrait("homosexual", 1.0F, 0.0F); + public static Trait ELECTRIFIED = registerTrait("electrified", 0.0F, 0.0F, false); + public static Trait SIRBEN = registerTrait("sirben", 0.025F, 1.0F, true); + public static Trait RAINBOW = registerTrait("rainbow", 0.05F, 0.0F); + + public static Trait registerTrait(String id, float chance, float inherit, boolean usableOnPlayer) { + Trait trait = new Trait(id, chance, inherit, usableOnPlayer); + TRAIT_LIST.add(trait); + return trait; + } + public static Trait registerTrait(String id, float chance, float inherit) { + Trait trait = new Trait(id, chance, inherit); + TRAIT_LIST.add(trait); + return trait; + } + + public static class Trait { + private final String id; private final float chance; private final float inherit; private final boolean usableOnPlayer; - Trait(float chance, float inherit, boolean usableOnPlayer) { + Trait(String id, float chance, float inherit, boolean usableOnPlayer) { + this.id = id; this.chance = chance; this.inherit = inherit; this.usableOnPlayer = usableOnPlayer; } - Trait(float chance, float inherit) { - this(chance, inherit, true); + Trait(String id, float chance, float inherit) { + this(id, chance, inherit, true); + } + + public String name() { + return this.id; + } + + public static List values() { + return TRAIT_LIST; + } + + public static Trait valueOf(String id) { + for (Trait t : TRAIT_LIST) { + if (t.name().equals(id)) return t; + } + return null; } public Text getName() { @@ -94,7 +122,10 @@ public boolean hasTrait(Trait trait) { } public boolean hasTrait(String trait) { - return hasTrait(entity, Trait.valueOf(trait.toUpperCase(Locale.ROOT))); + if (Trait.valueOf(trait) != null ) { + return hasTrait(entity, Trait.valueOf(trait)); + } + return false; } public boolean eitherHaveTrait(Trait trait, VillagerLike other) { @@ -119,7 +150,7 @@ public void removeTrait(Trait trait) { //initializes the genes with random numbers public void randomize() { - float total = (float)Arrays.stream(Trait.values()).mapToDouble(tr -> tr.chance).sum(); + float total = (float)Trait.values().stream().mapToDouble(tr -> tr.chance).sum(); for (Trait t : Trait.values()) { float chance = Config.getInstance().traitChance / total * t.chance; if (random.nextFloat() < chance && t.isEnabled()) { @@ -142,10 +173,10 @@ public void inherit(Traits from, long seed) { } public float getVerticalScaleFactor() { - return hasTrait(Trait.DWARFISM) ? 0.65f : 1.0f; + return hasTrait(Traits.DWARFISM) ? 0.65f : 1.0f; } public float getHorizontalScaleFactor() { - return hasTrait(Trait.DWARFISM) ? 0.85f : 1.0f; + return hasTrait(Traits.DWARFISM) ? 0.85f : 1.0f; } } diff --git a/common/src/main/java/net/mca/item/SirbenBabyItem.java b/common/src/main/java/net/mca/item/SirbenBabyItem.java index 2d9481db10..616863915e 100644 --- a/common/src/main/java/net/mca/item/SirbenBabyItem.java +++ b/common/src/main/java/net/mca/item/SirbenBabyItem.java @@ -20,7 +20,7 @@ public boolean hasGlint(ItemStack stack) { @Override protected VillagerEntityMCA birthChild(ItemStack stack, ServerWorld world, ServerPlayerEntity player) { VillagerEntityMCA child = super.birthChild(stack, world, player); - child.getTraits().addTrait(Traits.Trait.SIRBEN); + child.getTraits().addTrait(Traits.SIRBEN); return child; } } diff --git a/common/src/main/java/net/mca/mixin/MixinMilkBucketItem.java b/common/src/main/java/net/mca/mixin/MixinMilkBucketItem.java index 862b5473ab..0d24a8a34b 100644 --- a/common/src/main/java/net/mca/mixin/MixinMilkBucketItem.java +++ b/common/src/main/java/net/mca/mixin/MixinMilkBucketItem.java @@ -20,7 +20,7 @@ public class MixinMilkBucketItem { public void onFinishedUsing(ItemStack stack, World world, LivingEntity user, CallbackInfoReturnable cir) { VillagerLike villagerLike = world.isClient ? CommonVillagerModel.getVillager(user) : VillagerLike.toVillager(user); if (villagerLike != null) { - if (villagerLike.getTraits().hasTrait(Traits.Trait.LACTOSE_INTOLERANCE)) { + if (villagerLike.getTraits().hasTrait(Traits.LACTOSE_INTOLERANCE)) { user.addStatusEffect(new StatusEffectInstance(StatusEffects.POISON, 100, 0)); } } From 45de710174bd325be5ef0eb06a33273a917714de Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 26 Sep 2023 18:12:56 +0200 Subject: [PATCH 05/21] New Crowdin updates (#762) * New translations en_us.json (Russian) * New translations en_us.json (Turkish) * New translations en_us.json (Romanian) * New translations en_us.json (French) * New translations en_us.json (Spanish) * New translations en_us.json (Afrikaans) * New translations en_us.json (Belarusian) * New translations en_us.json (Czech) * New translations en_us.json (German) * New translations en_us.json (Greek) * New translations en_us.json (Finnish) * New translations en_us.json (Hungarian) * New translations en_us.json (Italian) * New translations en_us.json (Japanese) * New translations en_us.json (Korean) * New translations en_us.json (Polish) * New translations en_us.json (Portuguese) * New translations en_us.json (Serbian (Cyrillic)) * New translations en_us.json (Swedish) * New translations en_us.json (Ukrainian) * New translations en_us.json (Chinese Simplified) * New translations en_us.json (Chinese Traditional) * New translations en_us.json (Portuguese, Brazilian) * New translations en_us.json (Indonesian) * New translations en_us.json (Persian) * New translations en_us.json (Spanish, Chile) * New translations en_us.json (Spanish, Mexico) * New translations en_us.json (Thai) * New translations en_us.json (Maltese) * New translations en_us.json (Pirate English) * New translations en_us.json (Chinese Traditional, Hong Kong) * New translations en_us.json (Arabic, Saudi Arabia) * New translations en_us.json (Andalusian) * New translations en_us.json (Russian) * New translations en_us.json (Polish) * New translations en_us.json (Spanish, Mexico) * New translations en_us.json (Chinese Simplified) * New translations en_us.json (German) * New translations en_us.json (Portuguese) * New translations en_us.json (German) * New translations en_us.json (German) * New translations en_us.json (Portuguese) * New translations en_us.json (Chinese Simplified) --- .../main/resources/assets/mca/lang/de_de.json | 28 ++++++++-------- .../main/resources/assets/mca/lang/pt_pt.json | 18 +++++----- .../main/resources/assets/mca/lang/zh_cn.json | 2 +- .../assets/mca_books/lang/de_de.json | 6 ++-- .../assets/mca_dialogue/lang/af_za.json | 3 ++ .../assets/mca_dialogue/lang/ar_sa.json | 3 ++ .../assets/mca_dialogue/lang/be_by.json | 3 ++ .../assets/mca_dialogue/lang/cs_cz.json | 3 ++ .../assets/mca_dialogue/lang/de_de.json | 13 +++++--- .../assets/mca_dialogue/lang/el_gr.json | 3 ++ .../assets/mca_dialogue/lang/en_pt.json | 3 ++ .../assets/mca_dialogue/lang/es_cl.json | 3 ++ .../assets/mca_dialogue/lang/es_es.json | 3 ++ .../assets/mca_dialogue/lang/es_mx.json | 3 ++ .../assets/mca_dialogue/lang/esan.json | 3 ++ .../assets/mca_dialogue/lang/fa_ir.json | 3 ++ .../assets/mca_dialogue/lang/fi_fi.json | 3 ++ .../assets/mca_dialogue/lang/fr_fr.json | 3 ++ .../assets/mca_dialogue/lang/hu_hu.json | 3 ++ .../assets/mca_dialogue/lang/id_id.json | 3 ++ .../assets/mca_dialogue/lang/it_it.json | 3 ++ .../assets/mca_dialogue/lang/ja_jp.json | 3 ++ .../assets/mca_dialogue/lang/ko_kr.json | 3 ++ .../assets/mca_dialogue/lang/mt_mt.json | 3 ++ .../assets/mca_dialogue/lang/pl_pl.json | 7 ++-- .../assets/mca_dialogue/lang/pt_br.json | 3 ++ .../assets/mca_dialogue/lang/pt_pt.json | 33 ++++++++++--------- .../assets/mca_dialogue/lang/ro_ro.json | 3 ++ .../assets/mca_dialogue/lang/ru_ru.json | 3 ++ .../assets/mca_dialogue/lang/sr_sp.json | 3 ++ .../assets/mca_dialogue/lang/sv_se.json | 3 ++ .../assets/mca_dialogue/lang/th_th.json | 3 ++ .../assets/mca_dialogue/lang/tr_tr.json | 3 ++ .../assets/mca_dialogue/lang/uk_ua.json | 3 ++ .../assets/mca_dialogue/lang/zh_cn.json | 3 ++ .../assets/mca_dialogue/lang/zh_hk.json | 3 ++ .../assets/mca_dialogue/lang/zh_tw.json | 3 ++ 37 files changed, 148 insertions(+), 49 deletions(-) diff --git a/common/src/main/resources/assets/mca/lang/de_de.json b/common/src/main/resources/assets/mca/lang/de_de.json index c4e76fb588..95068e8e04 100644 --- a/common/src/main/resources/assets/mca/lang/de_de.json +++ b/common/src/main/resources/assets/mca/lang/de_de.json @@ -306,14 +306,14 @@ "gui.skin_library.authenticating": "Authentifizierung", "gui.skin_library.authenticating_browser": "Autorisierung im Browser abschließen!", "gui.skin_library.delete_confirm": "Willst du diesen Kommentar wirklich löschen?", - "gui.skin_library.report_confirm": "Why do you want to report this content?", - "gui.skin_library.report_invalid": "Invalid Texture", - "gui.skin_library.report_invalid_tooltip": "This is not pure hair/clothing and thus does not work correctly. It should get labeled as 'invalid'.", - "gui.skin_library.report_default": "Against Rules", - "gui.skin_library.report_default_tooltip": "This content is against the rules as specified at the help page.", + "gui.skin_library.report_confirm": "Warum wollen Sie diesen Inhalt melden?", + "gui.skin_library.report_invalid": "Ungültige Textur", + "gui.skin_library.report_invalid_tooltip": "Dies ist kein reines Haar/Kleidung und funktioniert daher nicht korrekt. Es sollte als \"ungültig\" gekennzeichnet werden.", + "gui.skin_library.report_default": "Gegen Regeln", + "gui.skin_library.report_default_tooltip": "Dieser Inhalt verstößt gegen die Regeln, die auf der Hilfeseite angegeben sind.", "gui.skin_library.search": "Suchen", "gui.skin_library.cancel": "Abbrechen", - "gui.skin_library.reported": "Reported!", + "gui.skin_library.reported": "Gemeldet!", "gui.skin_library.drop": "Lege ein Bild hier ab, gib einen Dateipfad oder eine URL ein, um zu beginnen.", "gui.skin_library.locked": "Um Skins zu veröffentlichen, logge dich bitte zuerst ein.", "gui.skin_library.like_locked": "Bitte melde dich an, um gelikete oder eingereichte Inhalte zu sehen.", @@ -324,16 +324,16 @@ "gui.skin_library.subscribe": "Server weit verwenden!", "gui.skin_library.sort_likes": "Nach Likes sortieren", "gui.skin_library.sort_newest": "Nach Datum sortieren", - "gui.skin_library.filter_invalid": "Hide invalid content", - "gui.skin_library.filter_hair": "Hide hair", - "gui.skin_library.filter_clothing": "Hide clothing", - "gui.skin_library.filter_moderator": "Show banned content only", + "gui.skin_library.filter_invalid": "Ungültigen Inhalt ausblenden", + "gui.skin_library.filter_hair": "Haare ausblenden", + "gui.skin_library.filter_clothing": "Kleidung ausblenden", + "gui.skin_library.filter_moderator": "Nur verbotene Inhalte anzeigen", "gui.skin_library.like": "Like", "gui.skin_library.edit": "Bearbeiten", "gui.skin_library.delete": "Löschen", "gui.skin_library.ban": "Sperren", - "gui.skin_library.unban": "Unban", - "gui.skin_library.report": "Report", + "gui.skin_library.unban": "Aufhebung der Sperre", + "gui.skin_library.report": "Meldung", "gui.skin_library.details": "Details", "gui.skin_library.add": "Hinzufügen", "gui.skin_library.add.tooltip": "Das Taggen von Inhalten hilft den Nutzern, bestimmte Inhalte zu finden und zu filtern.", @@ -407,7 +407,7 @@ "gui.destiny.village_snowy": "Verschneites Dorf", "gui.destiny.village_plains": "Ebenendorf", "gui.destiny.village_savanna": "Savannendorf", - "gui.destiny.ancient_city": "Ancient City", + "gui.destiny.ancient_city": "Antike Stadt", "destiny.story.reason/1": "Eines Tages hattest du genug und endschiedst dich die Welt zu erkungen.", "destiny.story.travelling/1": "Du hast schneebedeckte Berge und schwüle Sümpfe bezwungen und bist den Husks in den endlosen Wüsten ausgewichen.", "destiny.story.somewhere/1": "Du bist ohne Essen und Unterkunft mitten im Nirgendwo gestrandet.", @@ -418,7 +418,7 @@ "destiny.story.village_snowy/1": "Du kämpfst dich durch einen heftigen Schneesturm, als du vor dir schummrige Lichter siehst. Es ist ein Dorf, vielleicht gibt es dort ein Gasthaus zum Aufwärmen?", "destiny.story.village_plains/1": "Mitten in einem Flachlandbiom haben sich ein paar Dorfbewohner eine Siedlung gebaut. Das Klima ist gemäßigt, die Menschen freundlich, vielleicht haben sie Platz für einen weiteren Siedler?", "destiny.story.village_savanna/1": "Schließlich findest du ein Dorf zwischen trockenen Bäumen und Gras. Mal sehen, ob sie freundlich sind!", - "destiny.story.ancient_city/1": "But an unfortunate misstep sends you tumbling into a deep, dark cave. When you regain consciousness, you find yourself surrounded by the ancient ruins of a city forgotten by the world for eons.", + "destiny.story.ancient_city/1": "Doch ein unglücklicher Fehltritt lässt Sie in eine tiefe, dunkle Höhle stürzen. Als du wieder zu Bewusstsein kommst, findest du dich inmitten der uralten Ruinen einer Stadt wieder, die seit Äonen von der Welt vergessen wurde.", "gui.blueprint.taxes": "Steuern", "gui.blueprint.birth": "Geburtenlimit", "gui.blueprint.marriage": "Heiratslimit", diff --git a/common/src/main/resources/assets/mca/lang/pt_pt.json b/common/src/main/resources/assets/mca/lang/pt_pt.json index 572c186b5f..e78da4877f 100644 --- a/common/src/main/resources/assets/mca/lang/pt_pt.json +++ b/common/src/main/resources/assets/mca/lang/pt_pt.json @@ -52,8 +52,8 @@ "item.mca.baby.state.ready": "Pronto para crescer!", "item.mca.baby.age": "Idade: %s", "item.mca.baby.name": "Nome: %s", - "item.mca.baby.mother": "Mother: %s", - "item.mca.baby.father": "Father: %s", + "item.mca.baby.mother": "Mãe: %s", + "item.mca.baby.father": "Pai: %s", "item.mca.baby.owner.you": "Tu", "item.mca.baby.give_name": "Clique direito para nomear", "item.mca.baby.no_drop/1": "Você não pode dropar um bebê, seu monstro", @@ -217,10 +217,10 @@ "trait.heterochromia": "Heterochromia", "trait.color_blind": "Color Blind", "trait.vegetarian": "Vegetarian", - "trait.bisexual": "Bisexual", - "trait.homosexual": "Homosexual", - "trait.left_handed": "Left Handed", - "trait.electrified": "Electrified", + "trait.bisexual": "Bissexual", + "trait.homosexual": "Homossexual", + "trait.left_handed": "Canhoto", + "trait.electrified": "Eletrificado", "trait.rainbow": "Rainbow", "traitDescription.lactose_intolerance": "Intolerant to lactose.", "traitDescription.coeliac_disease": "Gets massive diarrhea on gluten.", @@ -234,7 +234,7 @@ "traitDescription.bisexual": "Can have attraction to any gender.", "traitDescription.homosexual": "Can have attraction to the same gender.", "traitDescription.left_handed": "Uses their left-hand as their dominant hand.", - "traitDescription.electrified": "Struck by lightning.", + "traitDescription.electrified": "Atingido por um raio.", "traitDescription.rainbow": "Colored using Jebs secret source.", "sirben": "*random Sirben noises*", "mood.depressed": "Deprimido", @@ -262,7 +262,7 @@ "buildingType.armorer": "Armorer", "buildingType.butcher": "Talhante", "buildingType.cartographer": "Cartógrafo", - "buildingType.fishermans_mut": "Fisherman's Hut", + "buildingType.fishermans_mut": "Cabana do Pescador", "buildingType.fletcher": "Fletcher", "buildingType.leatherworker": "Coureiro", "buildingType.bookkeeper": "Livreiro", @@ -271,7 +271,7 @@ "buildingType.toolsmith": "Ferreiro de Ferramentas", "buildingType.weaponsmith": "Ferreiro de Armas", "buildingType.blocked": "Restricted", - "buildingType.big_house": "Big House", + "buildingType.big_house": "Casa grande", "buildingType.big_house.description": "Families love to live in the same house, but that requires a few extra beds.", "buildingType.blacksmith": "Ferreiro", "buildingType.blacksmith.description": "A place to produce the highest quality equipment for the guards and archers.", diff --git a/common/src/main/resources/assets/mca/lang/zh_cn.json b/common/src/main/resources/assets/mca/lang/zh_cn.json index 310084b61f..98dbe2d7e9 100644 --- a/common/src/main/resources/assets/mca/lang/zh_cn.json +++ b/common/src/main/resources/assets/mca/lang/zh_cn.json @@ -320,7 +320,7 @@ "gui.skin_library.choose_name": "给您的资源命名!", "gui.skin_library.already_uploading": "已上传,请耐心等待", "gui.skin_library.upload_duplicate": "该内容已存在", - "gui.skin_library.upload_failed": "上传失败。抱歉", + "gui.skin_library.upload_failed": "抱歉,上传失败。", "gui.skin_library.subscribe": "请使用服务器范围!", "gui.skin_library.sort_likes": "按点赞数排序", "gui.skin_library.sort_newest": "按日期排序", diff --git a/common/src/main/resources/assets/mca_books/lang/de_de.json b/common/src/main/resources/assets/mca_books/lang/de_de.json index 3101288b49..3a389840e3 100644 --- a/common/src/main/resources/assets/mca_books/lang/de_de.json +++ b/common/src/main/resources/assets/mca_books/lang/de_de.json @@ -12,7 +12,7 @@ "mca.books.death.9": "§f§lDie Sense§r§f\nSobald du den tödlichen Schlag landest, fällt er zurück in die Leere und lässt seine Sense zurück. Die Sense, welche das Gefühl von Eiskälte beim Berühren vermittelt, ist ein mächtiges Werkzeug. Schlage die Dorfbewohner eines Dorfes nieder, um die Sense aufzuladen und die dann gespeicherten Seelen auf den Grabstein zu übertragen.", "mca.books.death.10": "§f§lDie Sense2§r§f\nDein gefallener Kamerad wird als Untoter wieder auferstehen, da die Zeit unter der Erde Spuren hinterlassen hat. Sie können ihn wahrscheinlich irgendwie heilen, mein Freund Richard schrieb einmal ein Buch über dieses Thema.", "mca.books.death.11": "§f§lStab des Leben§r§f\nAber es gibt eine andere, friedlichere Lösung. Der Stab des Lebens! Anstelle von armen Seelen nutzt er die konzentrierte Macht der Nethersterne, um wiederzubeleben.", - "mca.books.death.12": "§f§lStaff Of Life 2§r§f\nThe Staff is a powerful item that can revive people. Unlike the Scythe, it is even capable of erasing any sickness from the revived person.", + "mca.books.death.12": "§f§lStab des Lebens 2§r§f\n\nDer Stab ist ein mächtiger Gegenstand, der Menschen wiederbeleben kann. Im Gegensatz zur Sense ist er sogar in der Lage, jede Krankheit der wiederbelebten Person auszulöschen.", "mca.books.romance.author": "Gerry der Bibliothekar", "mca.books.romance.0": "§lEinführung§r\nInteraktion ist der Schlüssel zum Aufbau von Beziehungen und zur Suche nach der Liebe deines Lebens. Ich habe dieses Buch gerne geschrieben, um mein Wissen über Interaktion, Liebe und leider, Scheidung, für jeden, der einen kleinen Anstoß in die richtige Richtung braucht.", "mca.books.romance.1": "§lPersönlichkeit§r\nWenn du mit einem Dorfbewohner sprichst, wirst du bemerken, dass er eine Persönlichkeit hat. Achte sehr darauf! Einige Leute mögen mehr Witze, andere lieben eine Umarmung. Einige Persönlichkeiten sind offensichtlicher als andere. Zeige mit der Maus auf die Persönlichkeit, um einige Hinweise zu sehen.", @@ -48,11 +48,11 @@ "mca.books.infection.5": "§lWarnungen§r\nDorfbewohner sind sehr anfällig für Infektionen, verringere das Infektionsrisiko, indem du ein Krankenhaus baust!", "mca.books.blueprint.author": "Carl der Baumeister", "mca.books.blueprint.0": "§fWir Dorfbewohner können wirtschaften. Wir können Werkzeuge und Rüstungen schmieden. Wir können lesen, brauen, verzaubern und vieles mehr. Aber es gibt eine Sache, für die uns das Wissen fehlt: Bauen!", - "mca.books.blueprint.1": "§fOn your journey, you probably come across several villages full of small, impractical, and barely decorated houses. How should a village ever evolve into something bigger?", + "mca.books.blueprint.1": "§Auf deiner Reise kommst du wahrscheinlich an mehreren Dörfern vorbei, die aus kleinen, unpraktischen und kaum dekorierten Häusern bestehen. Wie sollte sich ein Dorf jemals zu etwas Größerem entwickeln?", "mca.books.blueprint.2": "§f§lBlueprint§r§f\nDeshalb wandere ich über den Planeten und helfe Dörfern, die ich auf meinen Reisen treffe. Und du kannst das auch! Bastle dir mit blauer Farbe und etwas Papier einen Bauplan und sieh dir den Katalog der Gebäude an, die jedes Dorf braucht, aber nicht selbst bauen kann.", "mca.books.blueprint.3": "§f§lAnforderungen§r§f\nEin Gebäude benötigt normalerweise eine Mindestgröße. Du kannst nicht alles in einen Schuppen stecken. Dann musst du sicherstellen, dass alle Blockanforderungen erfüllt sind.", "mca.books.blueprint.4": "§f§lFertig§r§f\nSobald das erledigt ist, drücke 'Gebäude hinzufügen' und beobachte, wie Dorfbewohner es in das Dorf integrieren.", - "mca.books.blueprint.5": "§f§lRanks§r§f\nBut you don't need to be selfless! The more advanced your village is, the higher your rank gets. Ever dreamed to live a life of a noble? A mayor? Or even a King?", + "mca.books.blueprint.5": "§f§lRänge§r§f\n\nAber du musst nicht selbstlos sein! Je fortschrittlicher dein Dorf ist, desto höher ist dein Rang. Hast du jemals davon geträumt, ein Leben als Adliger zu führen? Ein Bürgermeister? Oder gar ein König?", "mca.books.cult_0.author": "Lukas der Anbeter", "mca.books.cult_0.0": "Vor langer Zeit kam ein Wesen aus einer anderen Welt auf diesen Planeten und verbreitete seine Weisheiten, während es über das Land reiste… Dieses Wesen wurde Sirben der 99 genannt.", "mca.books.cult_0.1": "Trotz guter Absichten war sein Wissen für unseren Verstand zu groß, um es zu begreifen. Einige Menschen hörten nicht auf ihn, aber diejenigen, die es taten, wurden verändert, um nie wieder dieselben zu sein…", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/af_za.json b/common/src/main/resources/assets/mca_dialogue/lang/af_za.json index 3f9294bbf9..ac5c98f8c1 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/af_za.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/af_za.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Spend more time with me! I'm not ready for a child.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm...not just yet. I think we need to spend more time together first.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Welcome back, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/ar_sa.json b/common/src/main/resources/assets/mca_dialogue/lang/ar_sa.json index e76c30587b..f01971a369 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/ar_sa.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/ar_sa.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "انفق المزيد من الوقت معي! لست مستعدا لطفل.", "spouse.interaction.procreate.fail.lowhearts/2": "همم... ليس بعد. أعتقد أننا بحاجة إلى قضاء المزيد من الوقت معا أولاً.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "أهلًا بعودتك، %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/be_by.json b/common/src/main/resources/assets/mca_dialogue/lang/be_by.json index abd4385417..3909e0951a 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/be_by.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/be_by.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Spend more time with me! I'm not ready for a child.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm...not just yet. I think we need to spend more time together first.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Welcome back, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/cs_cz.json b/common/src/main/resources/assets/mca_dialogue/lang/cs_cz.json index 0cf65f2feb..2205f7b85a 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/cs_cz.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/cs_cz.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Spend more time with me! I'm not ready for a child.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm...not just yet. I think we need to spend more time together first.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Welcome back, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/de_de.json b/common/src/main/resources/assets/mca_dialogue/lang/de_de.json index 87a3833d16..7277c89d6c 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/de_de.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/de_de.json @@ -279,9 +279,9 @@ "spouse.interaction.sethome.success/1": "Ich liebe diesen Ort, gute Arbeit %1$s!", "spouse.interaction.sethome.success/2": "Das ist wie ein Traumhaus!", "spouse.interaction.sethome.success/3": "Ich bin froh, dass wir endlich einziehen können!", - "spouse.interaction.sethome.success/4": "Thank you, this looks really nice %1$s.", + "spouse.interaction.sethome.success/4": "Danke, das sieht wirklich gut aus %1$s.", "spouse.interaction.sethome.success/5": "Ahh, ist das richtig? Ich mag es wirklich!", - "spouse.interaction.sethome.success/6": "*embraces you* Thank you, %1$s!", + "spouse.interaction.sethome.success/6": "*umarmt dich* Danke, %1$s!", "spouse.interaction.sethome.success/7": "Wenn wir dort zusammen sind, ist es für mich ein Traumhaus.", "spouse.interaction.sethome.success/8": "Das ist ein wirklich cooler Ort!", "childp.interaction.sethome.success/1": "In Ordnung, wo ist mein Zimmer?", @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "Ich bin bereit!", "spouse.interaction.procreate.fail.lowhearts/1": "Verbringe mehr Zeit mit mir! Ich bin noch nicht bereit für ein Kind.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm... noch nicht. Ich denke, wir müssen zuerst mehr Zeit miteinander verbringen.", + "interaction.procreate.fail.toosoon/1": "Mach mal halblang!", + "interaction.procreate.fail.toosoon/2": "Schon wieder?!", + "interaction.procreate.fail.toosoon/3": "Vielleicht später...", "interaction.adopt.success/1": "Das ist der beste Tag meines Lebens.", "interaction.adopt.success/2": "*weint* Ist das echt? Ich kann das nicht... Ich liebe euch beide so sehr!", "adult.welcome/1": "Willkommen zurück, %1$s!", @@ -1383,9 +1386,9 @@ "dialogue.location.pillager_outpost/1": "Bei %2$s befindet sich eine Gruppe von Plünderern. Sie haben einen Außenposten direkt neben uns errichtet. Hoffentlich greifen sie uns nicht zu bald an, denn einen weiteren Angriff können wir nicht verkraften.", "dialogue.location.pillager_outpost/2": "Bei %2$s gibt es einen Außenposten von Plünderern, die uns nachts nicht schlafen lassen. Wenn du dich in die Nähe davon begibst, sei vorsichtig. Sie schießen, sobald sie dich sehen.", "dialogue.location.pillager_outpost/3": "Nun,… wenn du dich nach %2$s begibst, wirst du einen Außenposten finden, der den Plünderern gehört. Wenn du es schaffst, diese elenden Schurken zu besiegen, findest du vielleicht etwas wertvolle Beute. Das ganze Dorf wäre dankbar, wenn sich jemand um sie kümmern würde.", - "dialogue.location.ancient_city/0": "I heard weird noises at %2$s, deep underground.", - "dialogue.location.ancient_city/1": "I think something is hidden far beneath the ground at %2$s.", - "dialogue.location.ancient_city/3": "Legends say at %2$s is an ancient city. I didn't see anything tho, maybe its underground?", + "dialogue.location.ancient_city/0": "Ich hörte seltsame Geräusche bei %2$s, tief unter der Erde.", + "dialogue.location.ancient_city/1": "Ich glaube, etwas ist weit unter der Erde bei %2$s versteckt.", + "dialogue.location.ancient_city/3": "Die Legende besagt, dass es eine antike Stadt auf %2$s gibt. Ich habe allerdings nichts gesehen, vielleicht ist sie unterirdisch?", "dialogue.joke.monster.success/1": "Haha! Geschieht dem Schwindler Recht!", "dialogue.joke.monster.success/2": "Was? Dieser Zombie hat wirklich versucht, dich mit einer Schaufel zu erschlagen? Hahaha!", "dialogue.joke.monster.success/3": "Du hast der Spinne wirklich gezeigt, wer der Boss ist! Haha!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/el_gr.json b/common/src/main/resources/assets/mca_dialogue/lang/el_gr.json index 9c90cfb02f..5edd890035 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/el_gr.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/el_gr.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Πέρνα περισσότερο χρόνο μαζί ου! Δεν είμαστε έτοιμοι για παιδί.", "spouse.interaction.procreate.fail.lowhearts/2": "Χμμμ...όχι ακόμα. Νομίζω πρέπει πρώτα να περάσουμε περισσότερο χρόνο μαζί.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Welcome back, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/en_pt.json b/common/src/main/resources/assets/mca_dialogue/lang/en_pt.json index 3511c8f757..619e439816 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/en_pt.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/en_pt.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I be ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Spend more time wit' me! I be nah ready fer a sprog.", "spouse.interaction.procreate.fail.lowhearts/2": "Blast ye...nah jus' yet. I reckon we needs t' spend more time together first.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "'tis the happiest day o' me life!", "interaction.adopt.success/2": "*cries* Be this real? I can nah even.. I love ye both so much!", "adult.welcome/1": "Ahoy, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/es_cl.json b/common/src/main/resources/assets/mca_dialogue/lang/es_cl.json index f71c225804..d6d8dfad96 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/es_cl.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/es_cl.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "¡Todo listo!", "spouse.interaction.procreate.fail.lowhearts/1": "¡Pasa mas tiempo conmigo! No estoy preparado(a) para un bebe.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm... todavia no. Creo que deberiamos pasar mas tiempo juntos primero.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "¡Este es el día más feliz de mi vida!", "interaction.adopt.success/2": "*Llora* ¿Esto es real? Ni siquiera puedo... ¡Los amo mucho a los dos!", "adult.welcome/1": "¡Bienvenido(a) de nuevo, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/es_es.json b/common/src/main/resources/assets/mca_dialogue/lang/es_es.json index 64685079c9..b5158538de 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/es_es.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/es_es.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "¡Todo listo!", "spouse.interaction.procreate.fail.lowhearts/1": "¡Pasa más tiempo conmigo! No estoy preparado(a) para un niño.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm… todavía no. Creo que necesitamos pasar más tiempo juntos primero.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "este es el día más feliz de mi vida!", "interaction.adopt.success/2": "*llora* ¿Esto es real? Ni siquiera puedo... ¡Los amo tanto a los dos!", "adult.welcome/1": "¡Bienvenido(a) de nuevo, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/es_mx.json b/common/src/main/resources/assets/mca_dialogue/lang/es_mx.json index f720aa4fe0..74767f2926 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/es_mx.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/es_mx.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "¡Estoy listo(a)!", "spouse.interaction.procreate.fail.lowhearts/1": "¡Pasa más tiempo conmigo! No estoy preparado(a) para un niño.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm… todavía no. Creo que necesitamos pasar más tiempo juntos primero.", + "interaction.procreate.fail.toosoon/1": "¡Dame un descanso!", + "interaction.procreate.fail.toosoon/2": "¿Otra vez?", + "interaction.procreate.fail.toosoon/3": "Quizá más adelante...", "interaction.adopt.success/1": "este es el día más feliz de mi vida!", "interaction.adopt.success/2": "*llora* ¿Esto es real? Ni siquiera puedo... ¡Los amo tanto a los dos!", "adult.welcome/1": "¡Bienvenido(a) de nuevo, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/esan.json b/common/src/main/resources/assets/mca_dialogue/lang/esan.json index cebe871c7b..7a3ebeac1d 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/esan.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/esan.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Spend more time with me! I'm not ready for a child.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm...not just yet. I think we need to spend more time together first.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Welcome back, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/fa_ir.json b/common/src/main/resources/assets/mca_dialogue/lang/fa_ir.json index 98b55be88e..08e10cf502 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/fa_ir.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/fa_ir.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Spend more time with me! I'm not ready for a child.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm...not just yet. I think we need to spend more time together first.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Welcome back, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/fi_fi.json b/common/src/main/resources/assets/mca_dialogue/lang/fi_fi.json index 64967abcde..9465111a01 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/fi_fi.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/fi_fi.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Spend more time with me! I'm not ready for a child.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm...not just yet. I think we need to spend more time together first.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Welcome back, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/fr_fr.json b/common/src/main/resources/assets/mca_dialogue/lang/fr_fr.json index 753bb4f9f8..b695f0ac2a 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/fr_fr.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/fr_fr.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "Je suis prêt !", "spouse.interaction.procreate.fail.lowhearts/1": "Passe plus de temps avec moi! Je ne suis pas prêt(e) pour un enfant.", "spouse.interaction.procreate.fail.lowhearts/2": "Hum... pas pour le moment. Je pense que nous devrions d'abord passer plus de temps ensemble.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "C'est le meilleur jour de ma vie.", "interaction.adopt.success/2": "*Cris* Est-ce que c'est réel ? Je ne peux même pas.. Je vous aime tellement tous les deux !", "adult.welcome/1": "Content de vous revoir, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/hu_hu.json b/common/src/main/resources/assets/mca_dialogue/lang/hu_hu.json index 19a020986e..e6cd0e010e 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/hu_hu.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/hu_hu.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Spend more time with me! I'm not ready for a child.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm...not just yet. I think we need to spend more time together first.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Welcome back, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/id_id.json b/common/src/main/resources/assets/mca_dialogue/lang/id_id.json index 082285864e..991370aeba 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/id_id.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/id_id.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "Aku siap!", "spouse.interaction.procreate.fail.lowhearts/1": "Habiskan lebih banyak waktu denganku! Aku tidak siap untuk mempunyai anak.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm...jangan dulu. Kayaknya kita masih harus menghabiskan lebih banyak waktu bersama dulu.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Selamat datang kembali, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/it_it.json b/common/src/main/resources/assets/mca_dialogue/lang/it_it.json index babc978198..6abae274b4 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/it_it.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/it_it.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Spend more time with me! I'm not ready for a child.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm...not just yet. I think we need to spend more time together first.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Welcome back, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/ja_jp.json b/common/src/main/resources/assets/mca_dialogue/lang/ja_jp.json index 8a2fc57d74..a6db91908d 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/ja_jp.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/ja_jp.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Spend more time with me! I'm not ready for a child.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm...not just yet. I think we need to spend more time together first.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Welcome back, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/ko_kr.json b/common/src/main/resources/assets/mca_dialogue/lang/ko_kr.json index 65162e2a02..b230d8c7b4 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/ko_kr.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/ko_kr.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "준비되었어!", "spouse.interaction.procreate.fail.lowhearts/1": "나랑 시간을 좀 더 보내줘! 난 아직 아이를 가질 준비가 안 됐어.", "spouse.interaction.procreate.fail.lowhearts/2": "흠... 지금은 아니야. 일단 함께 더 많은 시간을 보내보자.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "오늘은 내 생애 최고로 행복한 날이야!", "interaction.adopt.success/2": "*운다* 이거 진짜야? 난 정말.. 너희 둘 다 너무 사랑해!", "adult.welcome/1": "어서 와, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/mt_mt.json b/common/src/main/resources/assets/mca_dialogue/lang/mt_mt.json index 70719ed930..b03a2e358c 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/mt_mt.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/mt_mt.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Spend more time with me! I'm not ready for a child.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm...not just yet. I think we need to spend more time together first.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Welcome back, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/pl_pl.json b/common/src/main/resources/assets/mca_dialogue/lang/pl_pl.json index 871907a42e..6ab3da85fb 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/pl_pl.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/pl_pl.json @@ -279,9 +279,9 @@ "spouse.interaction.sethome.success/1": "Naprawdę lubię to miejsce, dobra robota %1$s!", "spouse.interaction.sethome.success/2": "To nasz wymarzony dom!", "spouse.interaction.sethome.success/3": "Cieszę się, że w końcu się wprowadzamy!", - "spouse.interaction.sethome.success/4": "Thank you, this looks really nice %1$s.", + "spouse.interaction.sethome.success/4": "Dziękuję, wygląda to naprawdę ładnie %1$s.", "spouse.interaction.sethome.success/5": "Ahh, czy to prawda? Naprawdę mi się to podoba!", - "spouse.interaction.sethome.success/6": "*embraces you* Thank you, %1$s!", + "spouse.interaction.sethome.success/6": "*obejmuje cię* Dziękuję, %1$s!", "spouse.interaction.sethome.success/7": "Jeśli jesteśmy tam razem, to jest to dla mnie wymarzony dom.", "spouse.interaction.sethome.success/8": "To naprawdę fajne miejsce!", "childp.interaction.sethome.success/1": "Dobra w porządku, gdzie mój pokój?", @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "Jestem gotów!", "spouse.interaction.procreate.fail.lowhearts/1": "Spędźmy razem więcej czasu! Jest jeszcze za wcześnie na dziecko.", "spouse.interaction.procreate.fail.lowhearts/2": "Hm... Jeszcze nie. Myślę że potrzebujemy więcej czasu razem.", + "interaction.procreate.fail.toosoon/1": "Daj mi spokój!", + "interaction.procreate.fail.toosoon/2": "Znowu?!", + "interaction.procreate.fail.toosoon/3": "Może później...", "interaction.adopt.success/1": "To najszczęśliwszy dzień w moim życiu!", "interaction.adopt.success/2": "*płacze* Czy to jest prawdziwe? Nie mogę nawet... Tak bardzo was kocham!", "adult.welcome/1": "Witaj z powrotem, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/pt_br.json b/common/src/main/resources/assets/mca_dialogue/lang/pt_br.json index aba9b97deb..50dcd328d0 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/pt_br.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/pt_br.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "Estou pronto(a)!", "spouse.interaction.procreate.fail.lowhearts/1": "Fique mais tempo comigo! Não estou pronto(a) para um filho.", "spouse.interaction.procreate.fail.lowhearts/2": "Humm...ainda não. Eu acho que precisamos ficar mais tempo juntos primeiro.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "Esse é o melhor dia da minha vida!", "interaction.adopt.success/2": "*choro* É isso real? Não consigo nem acreditar... Eu amo tanto vocês dois!", "adult.welcome/1": "Bem-vindo de volta, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/pt_pt.json b/common/src/main/resources/assets/mca_dialogue/lang/pt_pt.json index 6aab0de929..8daea5c3cf 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/pt_pt.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/pt_pt.json @@ -192,7 +192,7 @@ "interaction.relationship.fail.isparent/1": "Não mantenhas isto na família por favor...", "interaction.relationship.fail.isparent/2": "Tenho a certeza que não é assim que funciona.", "interaction.relationship.fail.isparent/3": "De acordo com a Enciclopédia da Vida, incesto é pecado. Por isso, não.", - "interaction.relationship.fail.isparent/4": "We aren't the Sawyers...", + "interaction.relationship.fail.isparent/4": "Nós não somos os Sawyers...", "interaction.relationship.fail.lowhearts/1": "O quê? Não! Eu não gosto nada de ti!", "interaction.relationship.fail.lowhearts/2": "Oh, que brilhante! Peraí... é para mim? Hm... não.", "interaction.relationship.fail.lowhearts/3": "Isso é para mim? Desculpa, mas eu não te conheço o suficiente.", @@ -200,26 +200,26 @@ "interaction.relationship.fail.lowhearts/5": "Os meus padrões são baixos... mas nem assim tanto.", "interaction.relationship.fail.lowhearts/6": "Não sou assim tão desesperado.", "interaction.relationship.fail.lowhearts/7": "Eu... Eu ainda não estou preparado(a)...", - "interaction.relationship.fail.lowhearts/8": "I can not take your proposal seriously yet...", - "interaction.relationship.fail.lowhearts/9": "I think we would need to spend more time getting to know each other first...", - "interaction.relationship.fail.lowhearts/10": "It's not the right time... I'm sorry.", - "interaction.relationship.fail.engaged/4": "Sorry, but I am already engaged.", + "interaction.relationship.fail.lowhearts/8": "Ainda não posso levar o teu pedido de casamento a sério...", + "interaction.relationship.fail.lowhearts/9": "Acho que precisamos de nos conhecer melhor primeiro...", + "interaction.relationship.fail.lowhearts/10": "Não é a altura certa... Lamento muito.", + "interaction.relationship.fail.engaged/4": "Desculpa, mas já sou noivo.", "interaction.relationship.fail.playermarried/1": "Ah...Eu estou vendo esse anel no seu dedo. Você já é casado!", "interaction.relationship.fail.playermarried/2": "O que você está tentando fazer? Você já é casado!", "interaction.relationship.fail.playermarried/3": "O quê? Sério? Eu acho que você está casado com outra pessoa, não é?", "interaction.relationship.fail.playermarried/4": "Estou chocado(a)! Você já é casado.", - "interaction.relationship.fail.playermarried/5": "I don't know where you came from, but around here we don't accept polygamy!", - "interaction.relationship.fail.playermarried/6": "How could you?! I'm telling your spouse!", - "interaction.relationship.fail.incompatible/1": "I'm sorry, but I just don't think we are right for each other.", - "interaction.relationship.fail.incompatible/2": "It's not you, it's me! Or...maybe it's us...", + "interaction.relationship.fail.playermarried/5": "Não sei de onde é que veio, mas aqui não aceitamos a poligamia!", + "interaction.relationship.fail.playermarried/6": "Como é que te atreves?! Vou contar ao teu cônjuge!", + "interaction.relationship.fail.incompatible/1": "Sinto muito, mas acho que não somos feitos um para o outro.", + "interaction.relationship.fail.incompatible/2": "Não és tu, sou eu! Ou... talvez sejamos nós...", "interaction.relationship.fail.incompatible/3": "Desculpa lá amigo(a)! Mas não tenho esses interesses!", - "interaction.relationship.fail.incompatible/4": "I really like you, but not that way...", + "interaction.relationship.fail.incompatible/4": "Gosto muito de ti, mas não dessa forma...", "spouse.interaction.marry.success/1": "É um sonho se tornando realidade! Eu irei te amar para sempre!", "spouse.interaction.marry.success/2": "Nós estamos finalmente casados! E agora?", "spouse.interaction.marry.success/3": "Eu estou feliz por ter me casado com você, %1$s.", "spouse.interaction.marry.success/4": "Mal posso esperar para começar nossa vida juntos!", - "spouse.interaction.marry.success/5": "You're stuck with me forever now!", - "spouse.interaction.marry.success/6": "Now that I found you, I don't want to ever have to be without you.", + "spouse.interaction.marry.success/5": "Você está preso comigo para sempre!", + "spouse.interaction.marry.success/6": "Agora que te encontrei, nunca quero ter de ficar sem ti.", "spouse.interaction.marry.success/7": "I didn't know it possible to ever love someone as much as I love you.", "spouse.interaction.marry.success/8": "I feel as if I'll be able to face anything life throws at me from now on because you're by my side.", "spouse.interaction.marry.success/9": "*sniffle* If I say anything sappy I'm really going to start to cry..!", @@ -260,7 +260,7 @@ "adult.interaction.matchmaker.fail.needtwo/5": "I'm so excited! That'll be a good ring, we need two of them though.", "adult.interaction.matchmaker.fail.needtwo/6": "I want us both to have rings, if that's okay... Thank you!", "adult.interaction.matchmaker.fail.needtwo/7": "Can we both get a ring?", - "adult.interaction.matchmaker.fail.needtwo/8": "Ahh, thank you. Is there a second ring?", + "adult.interaction.matchmaker.fail.needtwo/8": "Ahh, obrigado. Tens um segundo anel?", "adult.interaction.matchmaker.fail.novillagers/1": "Não tem ninguém perto. Com quem quer vou casar?", "adult.interaction.matchmaker.fail.novillagers/2": "Eu não sei...me leve para perto de alguém que você ache que é certo para mim.", "adult.interaction.matchmaker.fail.novillagers/3": "Oh, mas não me parece que seja com alguém aqui por perto. Com quem me devo casar?", @@ -340,10 +340,13 @@ "interaction.ridehorse.success/2": "Estou pronto(a)!", "spouse.interaction.procreate.fail.lowhearts/1": "Passa mais tempo comigo! Ainda não estou preparado(a) para uma criança.", "spouse.interaction.procreate.fail.lowhearts/2": "Hum... ainda não. Acho que precisamos de passar mais tempo juntos.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Outra vez?!", + "interaction.procreate.fail.toosoon/3": "Talvez mais tarde...", "interaction.adopt.success/1": "Este é o dia mais feliz da minha vida!", "interaction.adopt.success/2": "*choro* Isto é real? Eu nem consigo... Amo-vos tanto!", "adult.welcome/1": "Bem vindo(a) de volta, %1$s", - "adult.welcome/2": "Hey %1$s! Welcome back!", + "adult.welcome/2": "Olá %1$s! Bem-vindo(a) de volta!", "male.child.welcome/1": "Hi Mr. %1$s!", "female.child.welcome/1": "Hi Ms. %1$s!", "male.childp.welcome/1": "Olá, pai!", @@ -572,7 +575,7 @@ "child.dialogue.first.generic/3": "Você é um viajante?! Uau! Eu também quero ser um viajante quando crescer!", "teen.dialogue.first.generic/1": "Huh, it must be cool to get to just travel the world…", "teen.dialogue.first.generic/2": "Oh? A traveler. We're nothing special. You probably won't stay more than a day, two tops. Nice getting to know you though, I guess.", - "teen.dialogue.first.generic/3": "Oh, welcome. So, you're a traveler…? I used to dream of becoming a traveler when I was a kid, but now that I'm getting older, I'm not so sure anymore… it's so dangerous outside of the village, isn't it?", + "teen.dialogue.first.generic/3": "Ah, bem-vindo. Então, és um viajante…? Eu sonhava em ser um viajante quando era criança, mas agora que estou a envelhecer, já não tenho tanta certeza… é tão perigoso fora da aldeia, não é?", "teen.dialogue.first.generic/4": "Oh, hello! It's always cool to see another traveler! Do you have some interesting stories, perhaps?!", "teen.dialogue.first.generic/5": "Um viajante...? Tsc, quem é que perguntou...", "guard.dialogue.first.generic/1": "Welcome, you are expected to abide by our laws during your stay. I expect no trouble from you.", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/ro_ro.json b/common/src/main/resources/assets/mca_dialogue/lang/ro_ro.json index 0e673e2a95..28c1fd607e 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/ro_ro.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/ro_ro.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Petrece mai mult timp cu mine! Nu sunt pregatit(ă) pentru un copil.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm... nu încă. Cred că trebuie să petrecem mai mult timp împreună mai întâi.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Bine ai revenit, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/ru_ru.json b/common/src/main/resources/assets/mca_dialogue/lang/ru_ru.json index 728287d8de..2f3b6c6eab 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/ru_ru.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/ru_ru.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "Полная готовность!", "spouse.interaction.procreate.fail.lowhearts/1": "Проводи больше времени со мной! Я не готов к ребенку.", "spouse.interaction.procreate.fail.lowhearts/2": "Хм... пока нет. Думаю, сначала нам нужно провести больше времени вместе.", + "interaction.procreate.fail.toosoon/1": "Дай отдохнуть!", + "interaction.procreate.fail.toosoon/2": "Уже?!", + "interaction.procreate.fail.toosoon/3": "Может быть, позже...", "interaction.adopt.success/1": "Это самый счастливый день в моей жизни!", "interaction.adopt.success/2": "*плачет* Это правда? Я даже не могу... Я так сильно люблю вас обоих!", "adult.welcome/1": "С возвращением, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/sr_sp.json b/common/src/main/resources/assets/mca_dialogue/lang/sr_sp.json index 41ea99cfa4..e54ede3a84 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/sr_sp.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/sr_sp.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Spend more time with me! I'm not ready for a child.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm...not just yet. I think we need to spend more time together first.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Welcome back, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/sv_se.json b/common/src/main/resources/assets/mca_dialogue/lang/sv_se.json index 1ce6996686..900996e3d2 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/sv_se.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/sv_se.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Spend more time with me! I'm not ready for a child.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm...not just yet. I think we need to spend more time together first.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Welcome back, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/th_th.json b/common/src/main/resources/assets/mca_dialogue/lang/th_th.json index 439dbf4c0a..726eb55478 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/th_th.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/th_th.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "ฉันพร้อมแล้ว!", "spouse.interaction.procreate.fail.lowhearts/1": "ใช้เวลากับฉันมากกว่านี้! ฉันยังไม่พร้อมจะมีลูก", "spouse.interaction.procreate.fail.lowhearts/2": "หืมม...ยังล่ะ ฉันว่าเราควรใช้เวลาด้วยกันมากกว่านี้ก่อน", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "ยินดีต้อนรับกลับ %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/tr_tr.json b/common/src/main/resources/assets/mca_dialogue/lang/tr_tr.json index 5fa7307cdd..c02a0ce9d2 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/tr_tr.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/tr_tr.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "Hazırım!", "spouse.interaction.procreate.fail.lowhearts/1": "Lütfen benimle daha fazla zaman geçir! Bir çocuk için daha hazır değilim.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm... bunu daha yapamayız. Beraber biraz daha vakit geçirsek iyi olur.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "Hayatımın en mutlu günü bu!", "interaction.adopt.success/2": "*Ağlıyor* Bu gerçek mi? Hatta söyleyecek sözüm bile yok... Sizi çok seviyorum!", "adult.welcome/1": "Hoş geldin, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/uk_ua.json b/common/src/main/resources/assets/mca_dialogue/lang/uk_ua.json index f41a15fa9c..84c62c83ec 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/uk_ua.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/uk_ua.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "Я готова.", "spouse.interaction.procreate.fail.lowhearts/1": "Проводь більше часу зі мною! Я не готова до дитини.", "spouse.interaction.procreate.fail.lowhearts/2": "Хм... поки що ні. Думаю, спочатку нам треба провести більше часу разом.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "Це найщасливіший день у моєму житті!", "interaction.adopt.success/2": "*плаче* Це правда? Я навіть не можу... Я так вас обох люблю!", "adult.welcome/1": "З поверненням, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/zh_cn.json b/common/src/main/resources/assets/mca_dialogue/lang/zh_cn.json index 0a37d1fa62..bd456f6be9 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/zh_cn.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/zh_cn.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "我准备好了!", "spouse.interaction.procreate.fail.lowhearts/1": "花更多时间陪陪我吧!我还没准备好生宝宝呢。", "spouse.interaction.procreate.fail.lowhearts/2": "呃……还没怀上呢。我觉得我们还需要先花些时间在一起。", + "interaction.procreate.fail.toosoon/1": "求你让我休息会吧!", + "interaction.procreate.fail.toosoon/2": "还要继续?!", + "interaction.procreate.fail.toosoon/3": "晚点再说吧……", "interaction.adopt.success/1": "这是我一生中最美好的一天!", "interaction.adopt.success/2": "*哭哭* 这是真的吗?我甚至不能……我太爱你们俩了!", "adult.welcome/1": "欢迎回来,%1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/zh_hk.json b/common/src/main/resources/assets/mca_dialogue/lang/zh_hk.json index e6f9536720..ec8ec76625 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/zh_hk.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/zh_hk.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Spend more time with me! I'm not ready for a child.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm...not just yet. I think we need to spend more time together first.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Welcome back, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/zh_tw.json b/common/src/main/resources/assets/mca_dialogue/lang/zh_tw.json index 25b66b7ccb..4780a174de 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/zh_tw.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/zh_tw.json @@ -340,6 +340,9 @@ "interaction.ridehorse.success/2": "I'm ready!", "spouse.interaction.procreate.fail.lowhearts/1": "Spend more time with me! I'm not ready for a child.", "spouse.interaction.procreate.fail.lowhearts/2": "Hmm...not just yet. I think we need to spend more time together first.", + "interaction.procreate.fail.toosoon/1": "Give me a break!", + "interaction.procreate.fail.toosoon/2": "Again?!", + "interaction.procreate.fail.toosoon/3": "Maybe later...", "interaction.adopt.success/1": "This is the happiest day of my life!", "interaction.adopt.success/2": "*cries* Is this real? I can't even.. I love you both so much!", "adult.welcome/1": "Welcome back, %1$s!", From bc7ccf321b7aacc4fe015fbeeb6b3022a78e5098 Mon Sep 17 00:00:00 2001 From: Phyrra1 <135467768+Phyrra1@users.noreply.github.com> Date: Mon, 16 Oct 2023 10:22:37 -0400 Subject: [PATCH 06/21] For compatibility with Let's Do Bakery (#789) * Create letsdobakery Gift compatibility with the Let's Do Bakery Mod * Bakery pastries * breads * jams * strawberry * sandwich --- .../resources/data/bakery/gifts/breads.json | 38 +++++++++++++ .../resources/data/bakery/gifts/jams.json | 34 ++++++++++++ .../resources/data/bakery/gifts/pastries.json | 54 +++++++++++++++++++ .../resources/data/bakery/gifts/sandwich.json | 26 +++++++++ .../data/bakery/gifts/strawberry.json | 18 +++++++ 5 files changed, 170 insertions(+) create mode 100644 common/src/main/resources/data/bakery/gifts/breads.json create mode 100644 common/src/main/resources/data/bakery/gifts/jams.json create mode 100644 common/src/main/resources/data/bakery/gifts/pastries.json create mode 100644 common/src/main/resources/data/bakery/gifts/sandwich.json create mode 100644 common/src/main/resources/data/bakery/gifts/strawberry.json diff --git a/common/src/main/resources/data/bakery/gifts/breads.json b/common/src/main/resources/data/bakery/gifts/breads.json new file mode 100644 index 0000000000..88421e68b8 --- /dev/null +++ b/common/src/main/resources/data/bakery/gifts/breads.json @@ -0,0 +1,38 @@ +{ + "conditions": [ + { + "profession": "mca:baker", + "satisfaction_boost": 10 + }, + { + "profession": "mca:guard", + "satisfaction_boost": -5 + }, + { + "age_group": "child", + "satisfaction_boost": 10 + }, + { + "trait": "coeliac_disease", + "satisfaction_boost": -20 + } + ], + "responses": { + "fail": "gift.confectionary.fail", + "good": "gift.confectionary.good", + "better": "gift.confectionary.better", + "best": "gift.confectionary.best" + }, + "items": { + "bakery:bread_crate": 20, + "bakery:croissant": 10, + "bakery:crusty_bread": 10, + "bakery:bread": 10, + "bakery:baguette": 10, + "bakery:braided_bread": 10, + "bakery:bun": 10, + "bakery:toast": 7, + "bakery:dough": -5, + "bakery:vegetable_sandwich": 13, + } +} diff --git a/common/src/main/resources/data/bakery/gifts/jams.json b/common/src/main/resources/data/bakery/gifts/jams.json new file mode 100644 index 0000000000..739fa27a0a --- /dev/null +++ b/common/src/main/resources/data/bakery/gifts/jams.json @@ -0,0 +1,34 @@ +{ + "conditions": [ + { + "profession": "mca:baker", + "satisfaction_boost": 10 + }, + { + "profession": "mca:guard", + "satisfaction_boost": -5 + }, + { + "age_group": "child", + "satisfaction_boost": 10 + }, + { + "trait": "diabetes", + "satisfaction_boost": -15 + } + ], + "responses": { + "fail": "gift.confectionary.fail", + "good": "gift.confectionary.good", + "better": "gift.confectionary.better", + "best": "gift.confectionary.best" + }, + "items": { + "bakery:chocolate_jam": 8, + "bakery:apple_jam": 8, + "bakery:apple_jam": 8, + "bakery:glowberry_jam": 8, + "bakery:sweetberry_jam": 8, + "bakery:strawberry_jam": 8, + } +} diff --git a/common/src/main/resources/data/bakery/gifts/pastries.json b/common/src/main/resources/data/bakery/gifts/pastries.json new file mode 100644 index 0000000000..9f9e9a2653 --- /dev/null +++ b/common/src/main/resources/data/bakery/gifts/pastries.json @@ -0,0 +1,54 @@ +{ + "conditions": [ + { + "profession": "mca:baker", + "satisfaction_boost": 10 + }, + { + "age_group": "child", + "satisfaction_boost": 10 + }, + { + "trait": "diabetes", + "trait": "lactose_intolerant", + "trait": "coeliac_disease", + "satisfaction_boost": -15 + } + ], + "responses": { + "fail": "gift.confectionary.fail", + "good": "gift.confectionary.good", + "better": "gift.confectionary.better", + "best": "gift.confectionary.best" + }, + "items": { + "bakery:chocolate_glazed_cookie": 10, + "bakery:sweetberry_glazed_cookie": 10, + "bakery:strawberry_glazed_cookie": 10, + "bakery:jam_roll": 10, + "bakery:chocolate_cake_slice": 15, + "bakery:strawberry_cake_slice": 15, + "bakery:pudding_slice": 15, + "bakery:bundt_cake_slice": 12, + "bakery:linzer_tart_slice": 12, + "bakery:apple_pie_slice": 12, + "bakery:glowberry_pie_slice": 12, + "bakery:chocolate_cake_slice": 12, + "bakery:apple_cupcake": 10, + "bakery:sweetberry_cupcake": 10, + "bakery:strawberry_cupcake": 10, + "bakery:waffle": 12, + "bakery:chocolate_cake": 20, + "bakery:strawberry_cake": 20, + "bakery:sweetberry_cake": 20, + "bakery:pudding": 20, + "bakery:bundt_cake": 18, + "bakery:linzer_tart": 18, + "bakery:apple_pie": 18, + "bakery:glowberry_tart": 18, + "bakery:chocolate_tart": 18, + "bakery:sweet_dough": -5, + "bakery:chocolate_truffle": 3, + "bakery:chocolate_box": 19, + } +} diff --git a/common/src/main/resources/data/bakery/gifts/sandwich.json b/common/src/main/resources/data/bakery/gifts/sandwich.json new file mode 100644 index 0000000000..cb94333492 --- /dev/null +++ b/common/src/main/resources/data/bakery/gifts/sandwich.json @@ -0,0 +1,26 @@ +{ + "conditions": [ + { + "profession": "mca:farmer", + "satisfaction_boost": 10 + }, + { + "profession": "mca:librarian", + "satisfaction_boost": -5 + }, + + { + "trait": "vegetarian", + "satisfaction_boost": -5 + } + ], + "responses": { + "fail": "gift.meats.fail", + "good": "gift.meats.good", + "better": "gift.meats.better", + "best": "gift.meats.best" + }, + "items": { + "bakery:sandwich": 8, + } +} diff --git a/common/src/main/resources/data/bakery/gifts/strawberry.json b/common/src/main/resources/data/bakery/gifts/strawberry.json new file mode 100644 index 0000000000..e1d41f00b7 --- /dev/null +++ b/common/src/main/resources/data/bakery/gifts/strawberry.json @@ -0,0 +1,18 @@ +{ + "conditions": [ + { + "profession": "mca:farmer", + "satisfaction_boost": 10 + }, + { + "profession": "mca:librarian", + "satisfaction_boost": -5 + }, + + { + "trait": "vegetarian", + "satisfaction_boost": 5 + } + "items": { + "bakery:strawberry": 3, + } From 8aa395fe5062a4c961ec57d9d73cbdc3e7170e92 Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Sun, 29 Oct 2023 22:33:06 +0100 Subject: [PATCH 07/21] New Crowdin updates (#785) * New translations en_us.json (Portuguese, Brazilian) * New translations en_us.json (Korean) * New translations en_us.json (Korean) --- common/src/main/resources/assets/mca/lang/ko_kr.json | 4 ++-- .../src/main/resources/assets/mca_dialogue/lang/ko_kr.json | 6 +++--- .../src/main/resources/assets/mca_dialogue/lang/pt_br.json | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/src/main/resources/assets/mca/lang/ko_kr.json b/common/src/main/resources/assets/mca/lang/ko_kr.json index 05cf8991fb..6b37cda6e6 100644 --- a/common/src/main/resources/assets/mca/lang/ko_kr.json +++ b/common/src/main/resources/assets/mca/lang/ko_kr.json @@ -11,14 +11,14 @@ "entity.minecraft.villager.mca.archer": "궁수", "entity.minecraft.villager.mca.adventurer": "모험가", "entity.minecraft.villager.mca.mercenary": "용병", - "entity.minecraft.villager.mca.cultist": "광신자", + "entity.minecraft.villager.mca.cultist": "광신도", "entity.minecraft.villager.mca.child": "어린이", "entity.mca.grim_reaper": "사신", "entity.mca.male_villager": "남성 주민", "entity.mca.female_villager": "여성 주민", "entity.mca.male_zombie_villager": "남성 주민 좀비", "entity.mca.female_zombie_villager": "여성 주민 좀비", - "entity.mca.ancient_cultist": "고대의 광신자", + "entity.mca.ancient_cultist": "고대의 광신도", "item.mca.scythe": "큰낫", "item.mca.scythe.tooltip": "주민을 죽여 그의 영혼을 거둬들이고, 묘비를 우클릭하여 죽은 주민을 되살립니다. 하지만 조심하세요. 되살아난 주민은 언데드가 되어 깨어날 것입니다.", "item.mca.wedding_ring": "결혼 반지", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/ko_kr.json b/common/src/main/resources/assets/mca_dialogue/lang/ko_kr.json index b230d8c7b4..b1310ba1e7 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/ko_kr.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/ko_kr.json @@ -340,9 +340,9 @@ "interaction.ridehorse.success/2": "준비되었어!", "spouse.interaction.procreate.fail.lowhearts/1": "나랑 시간을 좀 더 보내줘! 난 아직 아이를 가질 준비가 안 됐어.", "spouse.interaction.procreate.fail.lowhearts/2": "흠... 지금은 아니야. 일단 함께 더 많은 시간을 보내보자.", - "interaction.procreate.fail.toosoon/1": "Give me a break!", - "interaction.procreate.fail.toosoon/2": "Again?!", - "interaction.procreate.fail.toosoon/3": "Maybe later...", + "interaction.procreate.fail.toosoon/1": "좀 쉬게 해줘!", + "interaction.procreate.fail.toosoon/2": "또야?", + "interaction.procreate.fail.toosoon/3": "다음으로 미루자...", "interaction.adopt.success/1": "오늘은 내 생애 최고로 행복한 날이야!", "interaction.adopt.success/2": "*운다* 이거 진짜야? 난 정말.. 너희 둘 다 너무 사랑해!", "adult.welcome/1": "어서 와, %1$s!", diff --git a/common/src/main/resources/assets/mca_dialogue/lang/pt_br.json b/common/src/main/resources/assets/mca_dialogue/lang/pt_br.json index 50dcd328d0..36e892f9db 100644 --- a/common/src/main/resources/assets/mca_dialogue/lang/pt_br.json +++ b/common/src/main/resources/assets/mca_dialogue/lang/pt_br.json @@ -340,9 +340,9 @@ "interaction.ridehorse.success/2": "Estou pronto(a)!", "spouse.interaction.procreate.fail.lowhearts/1": "Fique mais tempo comigo! Não estou pronto(a) para um filho.", "spouse.interaction.procreate.fail.lowhearts/2": "Humm...ainda não. Eu acho que precisamos ficar mais tempo juntos primeiro.", - "interaction.procreate.fail.toosoon/1": "Give me a break!", - "interaction.procreate.fail.toosoon/2": "Again?!", - "interaction.procreate.fail.toosoon/3": "Maybe later...", + "interaction.procreate.fail.toosoon/1": "Me deixe descansar!", + "interaction.procreate.fail.toosoon/2": "Outra vez?!", + "interaction.procreate.fail.toosoon/3": "Talvez mais tarde...", "interaction.adopt.success/1": "Esse é o melhor dia da minha vida!", "interaction.adopt.success/2": "*choro* É isso real? Não consigo nem acreditar... Eu amo tanto vocês dois!", "adult.welcome/1": "Bem-vindo de volta, %1$s!", From ea729d296e1f1297e3c1ba8c7e6100f01d7b2f81 Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Sun, 29 Oct 2023 22:33:37 +0100 Subject: [PATCH 08/21] removed string.format wherever possible --- changelog.md | 4 +++ .../java/net/mca/block/JewelerWorkbench.java | 10 ------ .../java/net/mca/client/SpeechManager.java | 5 +-- .../main/java/net/mca/client/book/Book.java | 2 +- .../net/mca/client/book/pages/TextPage.java | 2 +- .../net/mca/client/gui/SkinLibraryScreen.java | 12 +++---- .../mca/client/gui/VillagerEditorScreen.java | 7 +--- .../gui/immersive_library/SkinCache.java | 2 +- .../java/net/mca/entity/VillagerLike.java | 21 ++++++------ .../entity/ai/gpt3Modules/VillageModule.java | 4 +-- .../main/java/net/mca/resources/HairList.java | 3 +- .../data/analysis/ChanceAnalysis.java | 3 +- .../net/mca/server/command/AdminCommand.java | 32 +++++++------------ .../mca/server/world/data/PlayerSaveData.java | 11 +++---- 14 files changed, 48 insertions(+), 70 deletions(-) diff --git a/changelog.md b/changelog.md index 6b071e83a4..c095af1458 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +# 7.5.10 + +* Fixed data loading issues on systems with locales having non-western digits. + # 7.5.9 * Wrong procreation cooldown on new worlds diff --git a/common/src/main/java/net/mca/block/JewelerWorkbench.java b/common/src/main/java/net/mca/block/JewelerWorkbench.java index 769c894319..ebcd17e11b 100644 --- a/common/src/main/java/net/mca/block/JewelerWorkbench.java +++ b/common/src/main/java/net/mca/block/JewelerWorkbench.java @@ -67,16 +67,6 @@ public VoxelShape getOutlineShape(BlockState state, BlockView worldIn, BlockPos return SHAPE; } - public VoxelShape getRayTraceShape(BlockState state, BlockView reader, BlockPos pos, ShapeContext context) { - return SHAPE; - } - - public void addInformation(ItemStack item, @Nullable BlockView iBlock, List tooltip, TooltipContext iTooltipFlag) { - tooltip.add(Text.literal("Workbench allows you to buy rings from Jeweler").formatted(Formatting.GRAY)); - tooltip.add(Text.translatable(String.format("tooltip.%s.block.statue.line1", MCA.MOD_ID)).formatted(Formatting.GRAY)); - tooltip.add(Text.translatable(String.format("tooltip.%s.block.statue.line2", MCA.MOD_ID)).formatted(Formatting.GRAY)); - } - @Nullable @Override public BlockState getPlacementState(ItemPlacementContext context) { diff --git a/common/src/main/java/net/mca/client/SpeechManager.java b/common/src/main/java/net/mca/client/SpeechManager.java index 17901cd17d..ea3f3f908b 100644 --- a/common/src/main/java/net/mca/client/SpeechManager.java +++ b/common/src/main/java/net/mca/client/SpeechManager.java @@ -57,9 +57,10 @@ private void speak(String phrase, UUID sender) { float pitch = villager.getSoundPitch(); float gene = villager.getGenetics().getGene(Genetics.VOICE_TONE); - int tone = Math.min(9, (int)Math.floor(gene * 10.0f)); + int tone = Math.min(9, (int) Math.floor(gene * 10.0f)); - Identifier sound = new Identifier("mca_voices", "%s/%s_%d".formatted(phrase, villager.getGenetics().getGender().binary().getDataName(), tone).toLowerCase(Locale.ROOT)); + String gender = villager.getGenetics().getGender().binary().getDataName(); + Identifier sound = new Identifier("mca_voices", phrase.toLowerCase(Locale.ROOT) + "/" + gender + "_" + tone); if (client.world != null && client.player != null) { Collection keys = client.getSoundManager().getKeys(); diff --git a/common/src/main/java/net/mca/client/book/Book.java b/common/src/main/java/net/mca/client/book/Book.java index 7f509765b1..2b8c95b444 100644 --- a/common/src/main/java/net/mca/client/book/Book.java +++ b/common/src/main/java/net/mca/client/book/Book.java @@ -20,7 +20,7 @@ public class Book { private boolean pageTurnSound = true; public Book(String bookName) { - this(bookName, Text.translatable(String.format("mca.books.%s.author", bookName)).formatted(Formatting.GRAY)); + this(bookName, Text.translatable("mca.books." + bookName + ".author").formatted(Formatting.GRAY)); } public Book(String bookName, Text bookAuthor) { diff --git a/common/src/main/java/net/mca/client/book/pages/TextPage.java b/common/src/main/java/net/mca/client/book/pages/TextPage.java index dfab6c3b1c..6146ba1c83 100644 --- a/common/src/main/java/net/mca/client/book/pages/TextPage.java +++ b/common/src/main/java/net/mca/client/book/pages/TextPage.java @@ -13,7 +13,7 @@ public class TextPage extends Page { private List cachedPage; public TextPage(String name, int page) { - content = String.format("{ \"translate\": \"mca.books.%s.%d\" }", name, page); + content = "{ \"translate\": \"mca.books." + name + "." + page + "\" }"; } public TextPage(String content) { diff --git a/common/src/main/java/net/mca/client/gui/SkinLibraryScreen.java b/common/src/main/java/net/mca/client/gui/SkinLibraryScreen.java index aa4b65cafc..e05e7f292c 100644 --- a/common/src/main/java/net/mca/client/gui/SkinLibraryScreen.java +++ b/common/src/main/java/net/mca/client/gui/SkinLibraryScreen.java @@ -1603,7 +1603,7 @@ private void publish() { if (Auth.getToken() != null) { Response request = null; try { - request = request(workspace.contentid == -1 ? Api.HttpMethod.POST : Api.HttpMethod.PUT, workspace.contentid == -1 ? ContentIdResponse.class : SuccessResponse.class, workspace.contentid == -1 ? "content/mca" : "content/mca/%s".formatted(workspace.contentid), Map.of( + request = request(workspace.contentid == -1 ? Api.HttpMethod.POST : Api.HttpMethod.PUT, workspace.contentid == -1 ? ContentIdResponse.class : SuccessResponse.class, workspace.contentid == -1 ? "content/mca" : ("content/mca/" + workspace.contentid), Map.of( "token", Auth.getToken() ), Map.of( "title", workspace.title, @@ -1664,7 +1664,7 @@ private Optional getSubmittedContent(int contentid) { private void setTag(int contentid, String tag, boolean add) { if (Auth.getToken() != null) { - request(add ? Api.HttpMethod.POST : Api.HttpMethod.DELETE, SuccessResponse.class, "tag/mca/%s/%s".formatted(contentid, tag), Map.of( + request(add ? Api.HttpMethod.POST : Api.HttpMethod.DELETE, SuccessResponse.class, "tag/mca/" + contentid + "/" + tag, Map.of( "token", Auth.getToken() )); getContentById(contentid).ifPresent(c -> { @@ -1686,7 +1686,7 @@ private void setTag(int contentid, String tag, boolean add) { private void removeContent(int contentId) { if (Auth.getToken() != null) { - request(Api.HttpMethod.DELETE, SuccessResponse.class, "content/mca/%s".formatted(contentId), Map.of( + request(Api.HttpMethod.DELETE, SuccessResponse.class, "content/mca/" + contentId, Map.of( "token", Auth.getToken() )); removeContentLocally(contentId); @@ -1704,7 +1704,7 @@ private void removeContentLocally(int contentId) { private void reportContent(int contentId, String reason) { if (Auth.getToken() != null) { - request(Api.HttpMethod.POST, SuccessResponse.class, "report/mca/%s/%s".formatted(contentId, reason), Map.of( + request(Api.HttpMethod.POST, SuccessResponse.class, "report/mca/" + contentId + "/" + reason, Map.of( "token", Auth.getToken() )); @@ -1718,7 +1718,7 @@ private void reportContent(int contentId, String reason) { private void setLike(int contentid, boolean add) { if (Auth.getToken() != null && currentUser != null) { - request(add ? Api.HttpMethod.POST : Api.HttpMethod.DELETE, SuccessResponse.class, "like/mca/%s".formatted(contentid), Map.of( + request(add ? Api.HttpMethod.POST : Api.HttpMethod.DELETE, SuccessResponse.class, "like/mca/" + contentid, Map.of( "token", Auth.getToken() )); @@ -1732,7 +1732,7 @@ private void setLike(int contentid, boolean add) { private void setBan(int userid, boolean banned) { if (Auth.getToken() != null && currentUser != null) { - request(Api.HttpMethod.PUT, SuccessResponse.class, "user/%s".formatted(userid), Map.of( + request(Api.HttpMethod.PUT, SuccessResponse.class, "user/" + userid, Map.of( "token", Auth.getToken(), "banned", Boolean.toString(banned) )); diff --git a/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java b/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java index 2b4064ba5e..98990a4bd1 100644 --- a/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java +++ b/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java @@ -660,7 +660,7 @@ public boolean mouseClicked(double mouseX, double mouseY, int button) { } protected void eventCallback(String event) { - + // nop } protected boolean shouldUsePlayerModel() { @@ -742,11 +742,6 @@ public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) { super.render(matrices, mouseX, mouseY, delta); } - @Override - public boolean mouseReleased(double mouseX, double mouseY, int button) { - return super.mouseReleased(mouseX, mouseY, button); - } - protected boolean shouldDrawEntity() { return !page.equals("loading") && !page.equals("clothing") && !page.equals("hair"); } diff --git a/common/src/main/java/net/mca/client/gui/immersive_library/SkinCache.java b/common/src/main/java/net/mca/client/gui/immersive_library/SkinCache.java index fdedc6b3f5..c8004d7505 100644 --- a/common/src/main/java/net/mca/client/gui/immersive_library/SkinCache.java +++ b/common/src/main/java/net/mca/client/gui/immersive_library/SkinCache.java @@ -118,7 +118,7 @@ public static void sync(int contentid, int currentVersion) { requested.put(contentid, true); CompletableFuture.runAsync(() -> { logger("Requested asset " + contentid + " with version " + version + " and current version " + currentVersion); - Response response = request(Api.HttpMethod.GET, ContentResponse.class, "content/mca/%s".formatted(contentid)); + Response response = request(Api.HttpMethod.GET, ContentResponse.class, "content/mca/" + contentid); if (response instanceof ContentResponse contentResponse) { int newVersion = contentResponse.content().version(); write(contentid + ".png", Base64.getDecoder().decode(contentResponse.content().data())); diff --git a/common/src/main/java/net/mca/entity/VillagerLike.java b/common/src/main/java/net/mca/entity/VillagerLike.java index 9d2113c6b1..dca65006e2 100644 --- a/common/src/main/java/net/mca/entity/VillagerLike.java +++ b/common/src/main/java/net/mca/entity/VillagerLike.java @@ -14,11 +14,11 @@ import net.mca.entity.ai.relationship.EntityRelationship; import net.mca.entity.ai.relationship.Gender; import net.mca.entity.ai.relationship.VillagerDimensions; -import net.mca.server.world.data.FamilyTreeNode; import net.mca.entity.interaction.EntityCommandHandler; import net.mca.resources.ClothingList; import net.mca.resources.HairList; import net.mca.resources.Names; +import net.mca.server.world.data.FamilyTreeNode; import net.mca.server.world.data.PlayerSaveData; import net.mca.util.network.datasync.*; import net.minecraft.client.MinecraftClient; @@ -43,10 +43,7 @@ import net.minecraft.util.math.random.Random; import net.minecraft.village.VillagerDataContainer; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.UUID; +import java.util.*; public interface VillagerLike> extends CTrackedEntity, VillagerDataContainer, Infectable, Messenger { CDataParameter VILLAGER_NAME = CParameter.create("villagerName", ""); @@ -258,7 +255,7 @@ default void clearHairDye() { } default float[] getHairDye() { - return new float[] { + return new float[]{ getTrackedValue(HAIR_COLOR_RED), getTrackedValue(HAIR_COLOR_GREEN), getTrackedValue(HAIR_COLOR_BLUE) @@ -389,17 +386,17 @@ default void validateClothes() { if (ClothingList.getInstance().clothing.containsKey(id)) { setClothes(id); } else { - MCA.LOGGER.info(String.format("Villagers clothing %s does not exist!", getClothes())); + MCA.LOGGER.info(String.format(Locale.ROOT, "Villagers clothing %s does not exist!", getClothes())); randomizeClothes(); } } else { - MCA.LOGGER.info(String.format("Villagers clothing %s does not exist!", getClothes())); + MCA.LOGGER.info(String.format(Locale.ROOT, "Villagers clothing %s does not exist!", getClothes())); randomizeClothes(); } } if (!getHair().startsWith("immersive_library") && !HairList.getInstance().hair.containsKey(getHair())) { - MCA.LOGGER.info(String.format("Villagers hair %s does not exist!", getHair())); + MCA.LOGGER.info(String.format(Locale.ROOT, "Villagers hair %s does not exist!", getHair())); randomizeHair(); } } @@ -408,13 +405,13 @@ default void validateClothes() { @SuppressWarnings({"unchecked", "RedundantSuppression"}) default NbtCompound toNbtForConversion(EntityType convertingTo) { NbtCompound output = new NbtCompound(); - this.getTypeDataManager().save((E)asEntity(), output); + this.getTypeDataManager().save((E) asEntity(), output); return output; } @SuppressWarnings({"unchecked", "RedundantSuppression"}) default void readNbtForConversion(EntityType convertingFrom, NbtCompound input) { - this.getTypeDataManager().load((E)asEntity(), input); + this.getTypeDataManager().load((E) asEntity(), input); } default void copyVillagerAttributesFrom(VillagerLike other) { @@ -431,7 +428,7 @@ static VillagerLike toVillager(PlayerSaveData player) { static VillagerLike toVillager(Entity entity) { if (entity instanceof VillagerLike) { - return (VillagerLike)entity; + return (VillagerLike) entity; } else if (entity instanceof ServerPlayerEntity playerEntity) { return toVillager(PlayerSaveData.get(playerEntity)); } else { diff --git a/common/src/main/java/net/mca/entity/ai/gpt3Modules/VillageModule.java b/common/src/main/java/net/mca/entity/ai/gpt3Modules/VillageModule.java index c08a807ab4..ebed90f3cd 100644 --- a/common/src/main/java/net/mca/entity/ai/gpt3Modules/VillageModule.java +++ b/common/src/main/java/net/mca/entity/ai/gpt3Modules/VillageModule.java @@ -12,7 +12,7 @@ import java.util.stream.Collectors; public class VillageModule { - private final static Map nameExceptions = Map.of( + private static final Map nameExceptions = Map.of( "fishermans_hut", "fisherman's hut", "weaving_mill", "weaving mill", "big_house", "big house", @@ -42,7 +42,7 @@ public static void apply(List input, VillagerEntityMCA villager, ServerP } } - input.add(String.format("$villager lives in a " + size + ", medieval village in a %s biom. ", biome.replace("_", " "))); + input.add("$villager lives in a " + size + ", medieval village in a " + biome.replace("_", " ") + " biom. "); } // Buildings diff --git a/common/src/main/java/net/mca/resources/HairList.java b/common/src/main/java/net/mca/resources/HairList.java index 6d53b04c44..37d450dee1 100644 --- a/common/src/main/java/net/mca/resources/HairList.java +++ b/common/src/main/java/net/mca/resources/HairList.java @@ -12,6 +12,7 @@ import net.minecraft.util.profiler.Profiler; import java.util.HashMap; +import java.util.Locale; import java.util.Map; public class HairList extends JsonDataLoader { @@ -46,7 +47,7 @@ protected void apply(Map data, ResourceManager manager, JsonObject object = file.getAsJsonObject().get(key).getAsJsonObject(); for (int i = 0; i < JsonHelper.getInt(object, "count", 1); i++) { - String identifier = String.format(key, i); + String identifier = String.format(Locale.ROOT, key, i); Hair c = new Hair(identifier, gender, JsonHelper.getFloat(object, "chance", 1.0f)); diff --git a/common/src/main/java/net/mca/resources/data/analysis/ChanceAnalysis.java b/common/src/main/java/net/mca/resources/data/analysis/ChanceAnalysis.java index fc7490c484..1d530d1613 100644 --- a/common/src/main/java/net/mca/resources/data/analysis/ChanceAnalysis.java +++ b/common/src/main/java/net/mca/resources/data/analysis/ChanceAnalysis.java @@ -21,7 +21,8 @@ public String asString(Integer v) { public String getTotalAsString() { float positive = getSummands().stream().mapToInt(SerializablePair::getRight).filter(v -> v > 0).sum(); float negative = -getSummands().stream().mapToInt(SerializablePair::getRight).filter(v -> v < 0).sum(); - return String.format("%d%% chance", (int)(positive / (positive + negative) * 100.0f)); + int chance = (int) (positive / (positive + negative) * 100.0f); + return chance + "% chance"; } @Override diff --git a/common/src/main/java/net/mca/server/command/AdminCommand.java b/common/src/main/java/net/mca/server/command/AdminCommand.java index 5a5e611a50..5b96c421e6 100644 --- a/common/src/main/java/net/mca/server/command/AdminCommand.java +++ b/common/src/main/java/net/mca/server/command/AdminCommand.java @@ -10,14 +10,9 @@ import net.mca.entity.EntitiesMCA; import net.mca.entity.VillagerEntityMCA; import net.mca.entity.ai.relationship.RelationshipState; -import net.mca.server.world.data.FamilyTree; -import net.mca.server.world.data.FamilyTreeNode; import net.mca.item.BabyItem; import net.mca.server.SpawnQueue; -import net.mca.server.world.data.Building; -import net.mca.server.world.data.PlayerSaveData; -import net.mca.server.world.data.Village; -import net.mca.server.world.data.VillageManager; +import net.mca.server.world.data.*; import net.minecraft.command.argument.UuidArgumentType; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; @@ -37,10 +32,7 @@ import net.minecraft.util.Util; import net.minecraft.util.math.BlockPos; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; -import java.util.UUID; +import java.util.*; import java.util.stream.Stream; import static net.minecraft.util.Formatting.*; @@ -75,7 +67,7 @@ public static void register(CommandDispatcher dispatcher) { private static int listVillages(CommandContext ctx) { for (Village village : VillageManager.get(ctx.getSource().getWorld())) { final BlockPos pos = village.getBox().getCenter(); - success(String.format("%d: %s with %d buildings and %d/%d villager(s)", + success(String.format(Locale.ROOT, "%d: %s with %d buildings and %d/%d villager(s)", village.getId(), village.getName(), village.getBuildings().size(), @@ -255,13 +247,13 @@ private static int forceBabyGrowth(CommandContext ctx) { if (player != null) { heldStack = player.getMainHandStack(); - if (heldStack.getItem() instanceof BabyItem) { - NbtCompound nbt = BabyItem.getBabyNbt(heldStack); - nbt.putInt("age", Config.getInstance().babyItemGrowUpTime); - success("Baby is old enough to place now.", ctx); - } else { - fail("Hold a baby first.", ctx); - } + if (heldStack.getItem() instanceof BabyItem) { + NbtCompound nbt = BabyItem.getBabyNbt(heldStack); + nbt.putInt("age", Config.getInstance().babyItemGrowUpTime); + success("Baby is old enough to place now.", ctx); + } else { + fail("Hold a baby first.", ctx); + } } return 0; } @@ -269,9 +261,9 @@ private static int forceBabyGrowth(CommandContext ctx) { private static int forceFullHearts(CommandContext ctx) { PlayerEntity player = ctx.getSource().getPlayer(); if (player != null) { - getLoadedVillagers(ctx).forEach(v -> { + getLoadedVillagers(ctx).forEach(v -> { v.getVillagerBrain().getMemoriesForPlayer(player).setHearts(1000); - }); + }); } return 0; } diff --git a/common/src/main/java/net/mca/server/world/data/PlayerSaveData.java b/common/src/main/java/net/mca/server/world/data/PlayerSaveData.java index efce984b8f..5c0e1e7369 100644 --- a/common/src/main/java/net/mca/server/world/data/PlayerSaveData.java +++ b/common/src/main/java/net/mca/server/world/data/PlayerSaveData.java @@ -101,7 +101,7 @@ private void resetEntityData() { villager.getGenetics().randomize(); villager.getTraits().randomize(); villager.getVillagerBrain().randomize(); - ((MobEntity)villager).writeCustomDataToNbt(entityData); + ((MobEntity) villager).writeCustomDataToNbt(entityData); } public boolean isEntityDataSet() { @@ -238,7 +238,7 @@ public void sendMail(NbtCompound nbt) { } public boolean hasMail() { - return inbox.size() > 0; + return !inbox.isEmpty(); } public ItemStack getMail() { @@ -253,10 +253,7 @@ public ItemStack getMail() { } public void sendLetterOfCondolence(String name, String village) { - sendLetter(List.of( - String.format("{ \"translate\": \"mca.letter.condolence\", \"with\": [\"%s\", \"%s\", \"%s\"] }", - getFamilyEntry().getName(), name, village) - )); + sendLetter(List.of("{ \"translate\": \"mca.letter.condolence\", \"with\": [\"" + getFamilyEntry().getName() + "\", \"" + name + "\", \"" + village + "\"] }")); } public void sendLetter(List lines) { @@ -268,7 +265,7 @@ public void sendLetter(List lines) { nbt.put("pages", l); sendMail(nbt); - Optional.ofNullable(world.getPlayerByUuid(uuid)).ifPresent(p -> showMailNotification((ServerPlayerEntity)p)); + Optional.ofNullable(world.getPlayerByUuid(uuid)).ifPresent(p -> showMailNotification((ServerPlayerEntity) p)); } public static void showMailNotification(ServerPlayerEntity player) { From d631c020b26eab046007098171e473bb6512d863 Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Sun, 29 Oct 2023 22:53:39 +0100 Subject: [PATCH 09/21] fixed #779 --- changelog.md | 1 + .../ai/brain/tasks/chore/ChoppingTask.java | 23 +++++++++----- .../ai/brain/tasks/chore/HarvestingTask.java | 30 +++++++++---------- .../ai/brain/tasks/chore/HuntingTask.java | 7 ++--- 4 files changed, 34 insertions(+), 27 deletions(-) diff --git a/changelog.md b/changelog.md index c095af1458..3780c3136a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,7 @@ # 7.5.10 * Fixed data loading issues on systems with locales having non-western digits. +* Villagers no longer harvest blocks in claimed regions # 7.5.9 diff --git a/common/src/main/java/net/mca/entity/ai/brain/tasks/chore/ChoppingTask.java b/common/src/main/java/net/mca/entity/ai/brain/tasks/chore/ChoppingTask.java index 480996d6a5..8dc415ae63 100644 --- a/common/src/main/java/net/mca/entity/ai/brain/tasks/chore/ChoppingTask.java +++ b/common/src/main/java/net/mca/entity/ai/brain/tasks/chore/ChoppingTask.java @@ -125,15 +125,19 @@ protected void keepRunning(ServerWorld world, VillagerEntityMCA villager, long t * Returns trues if origin is bottom point of tree. */ private boolean isTreeStartLog(ServerWorld world, BlockPos origin) { - if (!world.getBlockState(origin).isIn(BlockTags.LOGS)) {return false;} + if (!world.getBlockState(origin).isIn(BlockTags.LOGS)) { + return false; + } // ensure we're looking at a valid tree before continuing - if (!isValidTree(world, origin.down())) {return false;} + if (!isValidTree(world, origin.down())) { + return false; + } // check upside continues and valid leaves exist. - BlockPos.Mutable pos_up = origin.mutableCopy(); // copy as mutable for reduce resources + BlockPos.Mutable posUp = origin.mutableCopy(); // copy as mutable for reduce resources for (int y = 0; y < Config.getInstance().maxTreeHeight; y++) { - BlockState up = world.getBlockState(pos_up.setY(pos_up.getY() + 1)); // use set directly instead of "pos_up.move(Direction.UP)" (set is faster) + BlockState up = world.getBlockState(posUp.setY(posUp.getY() + 1)); // use set directly instead of "pos_up.move(Direction.UP)" (set is faster) if (!up.isIn(BlockTags.LOGS)) return up.isIn(BlockTags.LEAVES); } return false; @@ -145,10 +149,13 @@ private void destroyTree(ServerWorld world, BlockPos origin) { BlockState state; while ((state = world.getBlockState(pos)).isIn(BlockTags.LOGS)) { - world.breakBlock(pos, false, villager); - pos = pos.add(0, 1, 0); - villager.getInventory().addStack(new ItemStack(state.getBlock(), 1)); - stack.damage(1, villager, e -> e.sendEquipmentBreakStatus(e.getDominantSlot())); + if (world.breakBlock(pos, false, villager)) { + pos = pos.add(0, 1, 0); + villager.getInventory().addStack(new ItemStack(state.getBlock(), 1)); + stack.damage(1, villager, e -> e.sendEquipmentBreakStatus(e.getDominantSlot())); + } else { + break; + } } } diff --git a/common/src/main/java/net/mca/entity/ai/brain/tasks/chore/HarvestingTask.java b/common/src/main/java/net/mca/entity/ai/brain/tasks/chore/HarvestingTask.java index dcc53bf262..4e8ca4c088 100644 --- a/common/src/main/java/net/mca/entity/ai/brain/tasks/chore/HarvestingTask.java +++ b/common/src/main/java/net/mca/entity/ai/brain/tasks/chore/HarvestingTask.java @@ -244,7 +244,7 @@ private void plantSeeds(ServerWorld world, VillagerEntityMCA villager, BlockPos } stack.ifPresentOrElse(s -> { - world.setBlockState(hitResult.getBlockPos(), ((BlockItem)s.getItem()).getBlock().getDefaultState(), Block.NOTIFY_ALL); + world.setBlockState(hitResult.getBlockPos(), ((BlockItem) s.getItem()).getBlock().getDefaultState(), Block.NOTIFY_ALL); s.decrement(1); villager.swingHand(villager.getDominantHand()); bonemealable.add(target); @@ -260,20 +260,20 @@ private void bonemealCrop(ServerWorld world, VillagerEntityMCA villager, BlockPo } private void harvestCrops(ServerWorld world, BlockPos pos) { - BlockState state = world.getBlockState(pos); - LootContext.Builder lootContext$builder = new LootContext.Builder(world) - .parameter(LootContextParameters.ORIGIN, villager.getPos()) - .parameter(LootContextParameters.TOOL, ItemStack.EMPTY) - .parameter(LootContextParameters.THIS_ENTITY, villager) - .parameter(LootContextParameters.BLOCK_STATE, state) - .random(villager.getRandom()) - .luck(0); - - List drops = world.getServer().getLootManager().getTable(state.getBlock().getLootTableId()).generateLoot(lootContext$builder.build(LootContextTypes.BLOCK)); - for (ItemStack stack : drops) { - villager.getInventory().addStack(stack); + if (world.breakBlock(pos, false, villager)) { + BlockState state = world.getBlockState(pos); + LootContext.Builder builder = new LootContext.Builder(world) + .parameter(LootContextParameters.ORIGIN, villager.getPos()) + .parameter(LootContextParameters.TOOL, ItemStack.EMPTY) + .parameter(LootContextParameters.THIS_ENTITY, villager) + .parameter(LootContextParameters.BLOCK_STATE, state) + .random(villager.getRandom()) + .luck(0); + + List drops = world.getServer().getLootManager().getTable(state.getBlock().getLootTableId()).generateLoot(builder.build(LootContextTypes.BLOCK)); + for (ItemStack stack : drops) { + villager.getInventory().addStack(stack); + } } - - world.breakBlock(pos, false, villager); } } diff --git a/common/src/main/java/net/mca/entity/ai/brain/tasks/chore/HuntingTask.java b/common/src/main/java/net/mca/entity/ai/brain/tasks/chore/HuntingTask.java index 16f3c527e2..fffee3c030 100644 --- a/common/src/main/java/net/mca/entity/ai/brain/tasks/chore/HuntingTask.java +++ b/common/src/main/java/net/mca/entity/ai/brain/tasks/chore/HuntingTask.java @@ -56,7 +56,6 @@ protected void run(ServerWorld world, VillagerEntityMCA villager, long time) { villager.setStackInHand(villager.getDominantHand(), stack); } } - } @Override @@ -78,8 +77,8 @@ protected void keepRunning(ServerWorld world, VillagerEntityMCA villager, long t ticks = 0; if (villager.world.random.nextFloat() >= 0.0D) { villager.world.getNonSpectatingEntities(AnimalEntity.class, villager.getBoundingBox().expand(15, 3, 15)).stream() - .filter((a) -> !(a instanceof TameableEntity)) - .filter((a) -> !a.isBaby()) + .filter(a -> !(a instanceof TameableEntity)) + .filter(a -> !a.isBaby()) .min(Comparator.comparingDouble(villager::squaredDistanceTo)) .ifPresent(animal -> { target = animal; @@ -98,7 +97,7 @@ protected void keepRunning(ServerWorld world, VillagerEntityMCA villager, long t if (target.isDead()) { // search for EntityItems around the target and grab them - villager.world.getNonSpectatingEntities(ItemEntity.class, villager.getBoundingBox().expand(15, 3, 15)).forEach((item) -> { + villager.world.getNonSpectatingEntities(ItemEntity.class, villager.getBoundingBox().expand(15, 3, 15)).forEach(item -> { villager.getInventory().addStack(item.getStack()); item.discard(); }); From ae5fda2ebec7be6c79446725b13e84bf475e0fae Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Sun, 29 Oct 2023 22:57:06 +0100 Subject: [PATCH 10/21] syntax errors begone --- changelog.md | 1 + .../src/main/resources/data/bakery/gifts/breads.json | 2 +- common/src/main/resources/data/bakery/gifts/jams.json | 3 +-- .../main/resources/data/bakery/gifts/pastries.json | 11 ++++++++--- .../main/resources/data/bakery/gifts/sandwich.json | 2 +- .../main/resources/data/bakery/gifts/strawberry.json | 7 ++++--- 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/changelog.md b/changelog.md index 3780c3136a..f6180833ef 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ * Fixed data loading issues on systems with locales having non-western digits. * Villagers no longer harvest blocks in claimed regions +* Added support for Let's Do Bakery # 7.5.9 diff --git a/common/src/main/resources/data/bakery/gifts/breads.json b/common/src/main/resources/data/bakery/gifts/breads.json index 88421e68b8..a8a5140227 100644 --- a/common/src/main/resources/data/bakery/gifts/breads.json +++ b/common/src/main/resources/data/bakery/gifts/breads.json @@ -33,6 +33,6 @@ "bakery:bun": 10, "bakery:toast": 7, "bakery:dough": -5, - "bakery:vegetable_sandwich": 13, + "bakery:vegetable_sandwich": 13 } } diff --git a/common/src/main/resources/data/bakery/gifts/jams.json b/common/src/main/resources/data/bakery/gifts/jams.json index 739fa27a0a..afa0a7912b 100644 --- a/common/src/main/resources/data/bakery/gifts/jams.json +++ b/common/src/main/resources/data/bakery/gifts/jams.json @@ -26,9 +26,8 @@ "items": { "bakery:chocolate_jam": 8, "bakery:apple_jam": 8, - "bakery:apple_jam": 8, "bakery:glowberry_jam": 8, "bakery:sweetberry_jam": 8, - "bakery:strawberry_jam": 8, + "bakery:strawberry_jam": 8 } } diff --git a/common/src/main/resources/data/bakery/gifts/pastries.json b/common/src/main/resources/data/bakery/gifts/pastries.json index 9f9e9a2653..b09c188ea4 100644 --- a/common/src/main/resources/data/bakery/gifts/pastries.json +++ b/common/src/main/resources/data/bakery/gifts/pastries.json @@ -4,13 +4,19 @@ "profession": "mca:baker", "satisfaction_boost": 10 }, - { + { "age_group": "child", "satisfaction_boost": 10 }, { "trait": "diabetes", + "satisfaction_boost": -15 + }, + { "trait": "lactose_intolerant", + "satisfaction_boost": -15 + }, + { "trait": "coeliac_disease", "satisfaction_boost": -15 } @@ -26,7 +32,6 @@ "bakery:sweetberry_glazed_cookie": 10, "bakery:strawberry_glazed_cookie": 10, "bakery:jam_roll": 10, - "bakery:chocolate_cake_slice": 15, "bakery:strawberry_cake_slice": 15, "bakery:pudding_slice": 15, "bakery:bundt_cake_slice": 12, @@ -49,6 +54,6 @@ "bakery:chocolate_tart": 18, "bakery:sweet_dough": -5, "bakery:chocolate_truffle": 3, - "bakery:chocolate_box": 19, + "bakery:chocolate_box": 19 } } diff --git a/common/src/main/resources/data/bakery/gifts/sandwich.json b/common/src/main/resources/data/bakery/gifts/sandwich.json index cb94333492..ead25bc39c 100644 --- a/common/src/main/resources/data/bakery/gifts/sandwich.json +++ b/common/src/main/resources/data/bakery/gifts/sandwich.json @@ -21,6 +21,6 @@ "best": "gift.meats.best" }, "items": { - "bakery:sandwich": 8, + "bakery:sandwich": 8 } } diff --git a/common/src/main/resources/data/bakery/gifts/strawberry.json b/common/src/main/resources/data/bakery/gifts/strawberry.json index e1d41f00b7..d53b346d7d 100644 --- a/common/src/main/resources/data/bakery/gifts/strawberry.json +++ b/common/src/main/resources/data/bakery/gifts/strawberry.json @@ -8,11 +8,12 @@ "profession": "mca:librarian", "satisfaction_boost": -5 }, - - { + { "trait": "vegetarian", "satisfaction_boost": 5 } + ], "items": { - "bakery:strawberry": 3, + "bakery:strawberry": 3 } +} From 4b54275fa5890298bfe05e44ac93c9b9b2d601fb Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 31 Oct 2023 10:48:49 +0100 Subject: [PATCH 11/21] fixed root advancement #792 --- changelog.md | 1 + .../resources/data/mca/advancements/root.json | 30 +++++++++++++++---- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/changelog.md b/changelog.md index f6180833ef..feea3fc40a 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,7 @@ * Fixed data loading issues on systems with locales having non-western digits. * Villagers no longer harvest blocks in claimed regions * Added support for Let's Do Bakery +* Fixed root advancement to appear on world load # 7.5.9 diff --git a/common/src/main/resources/data/mca/advancements/root.json b/common/src/main/resources/data/mca/advancements/root.json index ab2b3b5723..30bf2b059b 100644 --- a/common/src/main/resources/data/mca/advancements/root.json +++ b/common/src/main/resources/data/mca/advancements/root.json @@ -19,31 +19,51 @@ "village_desert": { "trigger": "minecraft:location", "conditions": { - "feature": "minecraft:village_desert" + "player": { + "location": { + "structure": "minecraft:village_desert" + } + } } }, "village_plains": { "trigger": "minecraft:location", "conditions": { - "feature": "minecraft:village_plains" + "player": { + "location": { + "structure": "minecraft:village_plains" + } + } } }, "village_savanna": { "trigger": "minecraft:location", "conditions": { - "feature": "minecraft:village_savanna" + "player": { + "location": { + "structure": "minecraft:village_savanna" + } + } } }, "village_taiga": { "trigger": "minecraft:location", "conditions": { - "feature": "minecraft:village_taiga" + "player": { + "location": { + "structure": "minecraft:village_taiga" + } + } } }, "village_snowy": { "trigger": "minecraft:location", "conditions": { - "feature": "minecraft:village_snowy" + "player": { + "location": { + "structure": "minecraft:village_snowy" + } + } } } }, From 527a5acf5c4c9ee63cf0fc96580d79fdbf13a8e3 Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 31 Oct 2023 11:03:06 +0100 Subject: [PATCH 12/21] fixed villager marriage limit math #777 --- changelog.md | 1 + .../world/data/villageComponents/VillageMarriageManager.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index feea3fc40a..a1cf007fc5 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ * Villagers no longer harvest blocks in claimed regions * Added support for Let's Do Bakery * Fixed root advancement to appear on world load +* Fixed villager marriage limit math # 7.5.9 diff --git a/common/src/main/java/net/mca/server/world/data/villageComponents/VillageMarriageManager.java b/common/src/main/java/net/mca/server/world/data/villageComponents/VillageMarriageManager.java index 8928c20838..165accdc71 100644 --- a/common/src/main/java/net/mca/server/world/data/villageComponents/VillageMarriageManager.java +++ b/common/src/main/java/net/mca/server/world/data/villageComponents/VillageMarriageManager.java @@ -33,7 +33,7 @@ public void marry(ServerWorld world) { .filter(v -> !v.getRelationships().isPromised()) .collect(Collectors.toList()); - if (availableVillagers.size() <= 1 || availableVillagers.size() > allVillagers.size() * village.getMarriageThreshold()) { + if (availableVillagers.size() <= 1 || availableVillagers.size() <= allVillagers.size() * (1.0 - village.getMarriageThreshold())) { return; // The village is too small. } From 9670091aa1c9739f55db7d8d2e6d46d7e49b7c94 Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 31 Oct 2023 11:24:02 +0100 Subject: [PATCH 13/21] fixed restricting #774 --- changelog.md | 1 + .../network/c2s/ReportBuildingMessage.java | 25 +++++++++++-------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/changelog.md b/changelog.md index a1cf007fc5..31e10c10de 100644 --- a/changelog.md +++ b/changelog.md @@ -5,6 +5,7 @@ * Added support for Let's Do Bakery * Fixed root advancement to appear on world load * Fixed villager marriage limit math +* You can no longer restrict bells or gravestones, causing them to get stuck # 7.5.9 diff --git a/common/src/main/java/net/mca/network/c2s/ReportBuildingMessage.java b/common/src/main/java/net/mca/network/c2s/ReportBuildingMessage.java index fee0590d17..d6947af8e4 100644 --- a/common/src/main/java/net/mca/network/c2s/ReportBuildingMessage.java +++ b/common/src/main/java/net/mca/network/c2s/ReportBuildingMessage.java @@ -43,23 +43,26 @@ public void receive(ServerPlayerEntity player) { ); case FORCE_TYPE, REMOVE -> { Optional village = villages.findNearestVillage(player); - Optional building = village.flatMap(v -> v.getBuildings().values().stream().filter((b) -> - b.containsPos(player.getBlockPos())).findAny()); - if (building.isPresent()) { + Optional building = village.flatMap(v -> v.getBuildings().values().stream() + .filter(b -> b.containsPos(player.getBlockPos())) + .filter(b -> action != Action.FORCE_TYPE || !b.getBuildingType().grouped()) + .findAny()); + building.ifPresentOrElse(b -> { if (action == Action.FORCE_TYPE) { - if (building.get().getType().equals(data)) { - building.get().setTypeForced(false); - building.get().determineType(); + if (b.getType().equals(data)) { + b.setTypeForced(false); + b.determineType(); } else { - building.get().setTypeForced(true); - building.get().setType(data); + b.setTypeForced(true); + b.setType(data); } } else { - village.get().removeBuilding(building.get().getId()); + //noinspection OptionalGetWithoutIsPresent + village.get().removeBuilding(b.getId()); } - } else { + }, () -> { player.sendMessage(Text.translatable("blueprint.noBuilding"), true); - } + }); } } } From 6bb02fdcb5ea207eed82165eabec38f9c74568ab Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 31 Oct 2023 11:33:14 +0100 Subject: [PATCH 14/21] Vanilla player models no longer modify your eye height #765 --- changelog.md | 1 + .../mca/mixin/client/MixinPlayerEntityClient.java | 15 +++------------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/changelog.md b/changelog.md index 31e10c10de..842c2bc0b9 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,7 @@ * Fixed root advancement to appear on world load * Fixed villager marriage limit math * You can no longer restrict bells or gravestones, causing them to get stuck +* Vanilla player models no longer modify your eye height # 7.5.9 diff --git a/common/src/main/java/net/mca/mixin/client/MixinPlayerEntityClient.java b/common/src/main/java/net/mca/mixin/client/MixinPlayerEntityClient.java index eb0e956471..01c0519f1c 100644 --- a/common/src/main/java/net/mca/mixin/client/MixinPlayerEntityClient.java +++ b/common/src/main/java/net/mca/mixin/client/MixinPlayerEntityClient.java @@ -2,6 +2,7 @@ import net.mca.Config; import net.mca.MCAClient; +import net.mca.entity.VillagerLike; import net.minecraft.entity.EntityDimensions; import net.minecraft.entity.EntityPose; import net.minecraft.entity.EntityType; @@ -23,19 +24,9 @@ protected MixinPlayerEntityClient(EntityType entityType, public void mca$getActiveEyeHeight(EntityPose pose, EntityDimensions dimensions, CallbackInfoReturnable cir) { if (Config.getInstance().adjustPlayerEyesToHeight) { MCAClient.getPlayerData(getUuid()).ifPresent(data -> { - float height; - switch (pose) { - case SWIMMING, FALL_FLYING, SPIN_ATTACK -> { - height = 0.4f; - } - case CROUCHING -> { - height = 1.27f; - } - default -> { - height = 1.62f; - } + if (data.getPlayerModel() != VillagerLike.PlayerModel.VANILLA) { + cir.setReturnValue(Math.min(this.getHeight() - 1.0f / 16.0f, cir.getReturnValue() * data.getRawScaleFactor())); } - cir.setReturnValue(Math.min(this.getHeight() - 1.0f / 16.0f, height * data.getRawScaleFactor())); }); } } From 5c1ce9a54af79d8b9b08eb4c60fbc52491a14d89 Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 31 Oct 2023 13:01:47 +0100 Subject: [PATCH 15/21] fixed eye height sync #765 --- changelog.md | 1 + common/src/main/java/net/mca/MCAClient.java | 10 ++++++++++ .../net/mca/mixin/client/MixinPlayerEntityClient.java | 2 +- .../net/mca/network/ClientInteractionManagerImpl.java | 10 ++++------ 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/changelog.md b/changelog.md index 842c2bc0b9..d7dd3108b9 100644 --- a/changelog.md +++ b/changelog.md @@ -7,6 +7,7 @@ * Fixed villager marriage limit math * You can no longer restrict bells or gravestones, causing them to get stuck * Vanilla player models no longer modify your eye height +* Player eye height now automatically refreshes on world join and editor changes # 7.5.9 diff --git a/common/src/main/java/net/mca/MCAClient.java b/common/src/main/java/net/mca/MCAClient.java index 2df05d301a..f1991eec6c 100644 --- a/common/src/main/java/net/mca/MCAClient.java +++ b/common/src/main/java/net/mca/MCAClient.java @@ -61,4 +61,14 @@ public static void tickClient(MinecraftClient client) { MinecraftClient.getInstance().setScreen(new SkinLibraryScreen()); } } + + public static void addPlayerData(UUID uuid, VillagerEntityMCA villager) { + playerData.put(uuid, villager); + + // Refresh eye height + MinecraftClient client = MinecraftClient.getInstance(); + if (client.player != null) { + client.player.calculateDimensions(); + } + } } diff --git a/common/src/main/java/net/mca/mixin/client/MixinPlayerEntityClient.java b/common/src/main/java/net/mca/mixin/client/MixinPlayerEntityClient.java index 01c0519f1c..b08ce9b618 100644 --- a/common/src/main/java/net/mca/mixin/client/MixinPlayerEntityClient.java +++ b/common/src/main/java/net/mca/mixin/client/MixinPlayerEntityClient.java @@ -20,7 +20,7 @@ protected MixinPlayerEntityClient(EntityType entityType, super(entityType, world); } - @Inject(method = "getActiveEyeHeight(Lnet/minecraft/entity/EntityPose;Lnet/minecraft/entity/EntityDimensions;)F", at = @At("HEAD"), cancellable = true) + @Inject(method = "getActiveEyeHeight(Lnet/minecraft/entity/EntityPose;Lnet/minecraft/entity/EntityDimensions;)F", at = @At("RETURN"), cancellable = true) public void mca$getActiveEyeHeight(EntityPose pose, EntityDimensions dimensions, CallbackInfoReturnable cir) { if (Config.getInstance().adjustPlayerEyesToHeight) { MCAClient.getPlayerData(getUuid()).ifPresent(data -> { diff --git a/common/src/main/java/net/mca/network/ClientInteractionManagerImpl.java b/common/src/main/java/net/mca/network/ClientInteractionManagerImpl.java index da4079d1af..d4bdc2d1dd 100644 --- a/common/src/main/java/net/mca/network/ClientInteractionManagerImpl.java +++ b/common/src/main/java/net/mca/network/ClientInteractionManagerImpl.java @@ -52,7 +52,7 @@ public void handleGuiRequest(OpenGuiRequest message) { ItemStack item = client.player.getStackInHand(Hand.MAIN_HAND); boolean isOnBlacklist = Config.getInstance().villagerInteractionItemBlacklist.contains(Registry.ITEM.getId(item.getItem()).toString()); if (!isOnBlacklist) { - VillagerLike villager = (VillagerLike)client.world.getEntityById(message.villager); + VillagerLike villager = (VillagerLike) client.world.getEntityById(message.villager); client.setScreen(new InteractScreen(villager)); } } @@ -210,7 +210,7 @@ public void handlePlayerDataMessage(PlayerDataMessage response) { VillagerEntityMCA villager = EntitiesMCA.MALE_VILLAGER.get().create(MinecraftClient.getInstance().world); assert villager != null; villager.readCustomDataFromNbt(response.getData()); - MCAClient.playerData.put(response.uuid, villager); + MCAClient.addPlayerData(response.uuid, villager); } @Override @@ -249,10 +249,8 @@ public void handleCustomSkinsChangedMessage(CustomSkinsChangedMessage message) { @Override public void handleCivilRegistryResponse(CivilRegistryResponse response) { Screen screen = client.currentScreen; - if (screen instanceof ExtendedBookScreen extendedBookScreen) { - if (extendedBookScreen.getBook() instanceof CivilRegistryBook civilRegistryBook) { - civilRegistryBook.receive(response.getIndex(), response.getLines()); - } + if (screen instanceof ExtendedBookScreen extendedBookScreen && (extendedBookScreen.getBook() instanceof CivilRegistryBook civilRegistryBook)) { + civilRegistryBook.receive(response.getIndex(), response.getLines()); } } } From 71bd9a82d1da17fa792f8aa4c56c671700ea5df0 Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 31 Oct 2023 13:18:41 +0100 Subject: [PATCH 16/21] fixed #787 --- common/src/main/java/net/mca/entity/ai/Traits.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/net/mca/entity/ai/Traits.java b/common/src/main/java/net/mca/entity/ai/Traits.java index 79ffbc62a2..c6bfe3dbe1 100644 --- a/common/src/main/java/net/mca/entity/ai/Traits.java +++ b/common/src/main/java/net/mca/entity/ai/Traits.java @@ -89,7 +89,7 @@ public boolean isUsableOnPlayer() { } public boolean isEnabled() { - return Config.getInstance().enabledTraits.get(name()); + return Config.getServerConfig().enabledTraits.get(name()); } } From 3ce1e12ea1f774e2a167d579c67b764e8a3c663a Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 31 Oct 2023 13:27:16 +0100 Subject: [PATCH 17/21] refactor --- common/src/main/java/net/mca/MCA.java | 33 +++---------------- common/src/main/java/net/mca/MCAClient.java | 27 ++++++++++++++- .../mca/client/gui/VillagerEditorScreen.java | 5 ++- .../mca/mixin/client/MixinGameRenderer.java | 6 ++-- .../client/MixinPlayerEntityRenderer.java | 5 ++- 5 files changed, 37 insertions(+), 39 deletions(-) diff --git a/common/src/main/java/net/mca/MCA.java b/common/src/main/java/net/mca/MCA.java index 39f12569e5..bf706e4d1f 100644 --- a/common/src/main/java/net/mca/MCA.java +++ b/common/src/main/java/net/mca/MCA.java @@ -16,7 +16,7 @@ public final class MCA { public static final String MOD_ID = "mca"; public static final Logger LOGGER = LogManager.getLogger(); - private static final Map modCacheMap = new HashMap<>(); + private static final Map MOD_CACHE = new HashMap<>(); public static final ExecutorService executorService = Executors.newSingleThreadExecutor(); @@ -30,42 +30,17 @@ public static boolean isBlankString(String string) { return string == null || string.trim().isEmpty(); } - public static boolean isPlayerRendererAllowed() { - return Config.getInstance().enableVillagerPlayerModel && - Config.getInstance().playerRendererBlacklist.entrySet().stream() - .filter(entry -> entry.getValue().equals("all") || entry.getValue().equals("block_player")) - .noneMatch(entry -> doesModExist(entry.getKey())); - } - - public static boolean isVillagerRendererAllowed() { - return !Config.getInstance().forceVillagerPlayerModel && - Config.getInstance().playerRendererBlacklist.entrySet().stream() - .filter(entry -> entry.getValue().equals("all") || entry.getValue().equals("block_villager")) - .noneMatch(entry -> doesModExist(entry.getKey())); - } - - public static boolean areShadersAllowed(String key) { - return Config.getInstance().enablePlayerShaders && - Config.getInstance().playerRendererBlacklist.entrySet().stream() - .filter(entry -> entry.getValue().equals("shaders") || entry.getValue().equals(key)) - .noneMatch(entry -> doesModExist(entry.getKey())); - } - - public static boolean areShadersAllowed() { - return areShadersAllowed("shaders"); - } - public static boolean doesModExist(String modId) { - if (!modCacheMap.containsKey(modId)) { + if (!MOD_CACHE.containsKey(modId)) { Optional modData; try { modData = Optional.of(Platform.getMod(modId)); } catch (Exception ignored) { modData = Optional.empty(); } - modCacheMap.put(modId, modData.isPresent()); + MOD_CACHE.put(modId, modData.isPresent()); } - return modCacheMap.get(modId); + return MOD_CACHE.get(modId); } public static void setServer(MinecraftServer server) { diff --git a/common/src/main/java/net/mca/MCAClient.java b/common/src/main/java/net/mca/MCAClient.java index f1991eec6c..605574989c 100644 --- a/common/src/main/java/net/mca/MCAClient.java +++ b/common/src/main/java/net/mca/MCAClient.java @@ -27,7 +27,7 @@ public static void onLogin() { } public static Optional> getPlayerData(UUID uuid) { - if (MCA.isPlayerRendererAllowed()) { + if (isPlayerRendererAllowed()) { if (!MCAClient.playerDataRequests.contains(uuid) && MinecraftClient.getInstance().getNetworkHandler() != null) { MCAClient.playerDataRequests.add(uuid); NetworkHandler.sendToServer(new PlayerDataRequest(uuid)); @@ -71,4 +71,29 @@ public static void addPlayerData(UUID uuid, VillagerEntityMCA villager) { client.player.calculateDimensions(); } } + + public static boolean isPlayerRendererAllowed() { + return Config.getInstance().enableVillagerPlayerModel && + Config.getInstance().playerRendererBlacklist.entrySet().stream() + .filter(entry -> entry.getValue().equals("all") || entry.getValue().equals("block_player")) + .noneMatch(entry -> MCA.doesModExist(entry.getKey())); + } + + public static boolean isVillagerRendererAllowed() { + return !Config.getInstance().forceVillagerPlayerModel && + Config.getInstance().playerRendererBlacklist.entrySet().stream() + .filter(entry -> entry.getValue().equals("all") || entry.getValue().equals("block_villager")) + .noneMatch(entry -> MCA.doesModExist(entry.getKey())); + } + + public static boolean areShadersAllowed(String key) { + return Config.getInstance().enablePlayerShaders && + Config.getInstance().playerRendererBlacklist.entrySet().stream() + .filter(entry -> entry.getValue().equals("shaders") || entry.getValue().equals(key)) + .noneMatch(entry -> MCA.doesModExist(entry.getKey())); + } + + public static boolean areShadersAllowed() { + return areShadersAllowed("shaders"); + } } diff --git a/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java b/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java index 98990a4bd1..cb68235528 100644 --- a/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java +++ b/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java @@ -2,6 +2,7 @@ import net.mca.Config; import net.mca.MCA; +import net.mca.MCAClient; import net.mca.ProfessionsMCA; import net.mca.client.gui.widget.ColorPickerWidget; import net.mca.client.gui.widget.GeneSliderWidget; @@ -94,9 +95,7 @@ public VillagerEditorScreen(UUID villagerUUID, UUID playerUUID, boolean allowPla } public VillagerEditorScreen(UUID villagerUUID, UUID playerUUID) { - this(villagerUUID, playerUUID, - MCA.isPlayerRendererAllowed(), MCA.isVillagerRendererAllowed() - ); + this(villagerUUID, playerUUID, MCAClient.isPlayerRendererAllowed(), MCAClient.isVillagerRendererAllowed()); } @Override diff --git a/common/src/main/java/net/mca/mixin/client/MixinGameRenderer.java b/common/src/main/java/net/mca/mixin/client/MixinGameRenderer.java index e2acd4da0d..27297715ee 100644 --- a/common/src/main/java/net/mca/mixin/client/MixinGameRenderer.java +++ b/common/src/main/java/net/mca/mixin/client/MixinGameRenderer.java @@ -1,7 +1,7 @@ package net.mca.mixin.client; import net.mca.Config; -import net.mca.MCA; +import net.mca.MCAClient; import net.mca.client.model.CommonVillagerModel; import net.mca.entity.VillagerLike; import net.minecraft.client.MinecraftClient; @@ -31,7 +31,7 @@ public abstract class MixinGameRenderer { @Inject(method = "tick", at = @At("TAIL")) public void onCameraSet(CallbackInfo ci) { - if (MCA.areShadersAllowed()) { + if (MCAClient.areShadersAllowed()) { if (this.client.cameraEntity != null) { VillagerLike villagerLike = CommonVillagerModel.getVillager(this.client.cameraEntity); if (villagerLike != null) { @@ -41,7 +41,7 @@ public void onCameraSet(CallbackInfo ci) { } else { Config.getInstance().shaderLocationsMap.entrySet().stream() .filter(entry -> villagerLike.getTraits().hasTrait(entry.getKey())) - .filter(entry -> MCA.areShadersAllowed(entry.getKey() + "_shader")) + .filter(entry -> MCAClient.areShadersAllowed(entry.getKey() + "_shader")) .findFirst().ifPresent(entry -> { Identifier shaderId = new Identifier(entry.getValue()); currentShader = new Pair<>(entry.getKey(), shaderId); diff --git a/common/src/main/java/net/mca/mixin/client/MixinPlayerEntityRenderer.java b/common/src/main/java/net/mca/mixin/client/MixinPlayerEntityRenderer.java index 63f9590859..1bb1f658cc 100644 --- a/common/src/main/java/net/mca/mixin/client/MixinPlayerEntityRenderer.java +++ b/common/src/main/java/net/mca/mixin/client/MixinPlayerEntityRenderer.java @@ -1,6 +1,5 @@ package net.mca.mixin.client; -import net.mca.MCA; import net.mca.MCAClient; import net.mca.client.model.CommonVillagerModel; import net.mca.client.model.PlayerEntityExtendedModel; @@ -45,7 +44,7 @@ public MixinPlayerEntityRenderer(EntityRendererFactory.Context ctx, PlayerEntity @Inject(method = "(Lnet/minecraft/client/render/entity/EntityRendererFactory$Context;Z)V", at = @At("TAIL")) private void init(EntityRendererFactory.Context ctx, boolean slim, CallbackInfo ci) { - if (MCA.isPlayerRendererAllowed()) { + if (MCAClient.isPlayerRendererAllowed()) { villagerModel = createModel(VillagerEntityModelMCA.bodyData(new Dilation(0.0F), slim)); vanillaModel = model; @@ -76,7 +75,7 @@ private void injectScale(AbstractClientPlayerEntity player, MatrixStack matrices // switch to mca model model = villagerModel; - } else if (MCA.isPlayerRendererAllowed()) { + } else if (MCAClient.isPlayerRendererAllowed()) { // switch to vanilla model model = vanillaModel; } From e0641a78cc816e094915205f67f800c102d053d4 Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 31 Oct 2023 13:41:53 +0100 Subject: [PATCH 18/21] added proper tooltip when custom models are disabled --- changelog.md | 1 + .../net/mca/client/gui/DestinyScreen.java | 2 +- .../gui/LimitedVillagerEditorScreen.java | 2 +- .../mca/client/gui/VillagerEditorScreen.java | 10 +++- .../mca/mixin/client/MixinGameRenderer.java | 55 ++++++++++--------- .../main/resources/assets/mca/lang/en_us.json | 2 + 6 files changed, 41 insertions(+), 31 deletions(-) diff --git a/changelog.md b/changelog.md index d7dd3108b9..ad8d50d520 100644 --- a/changelog.md +++ b/changelog.md @@ -8,6 +8,7 @@ * You can no longer restrict bells or gravestones, causing them to get stuck * Vanilla player models no longer modify your eye height * Player eye height now automatically refreshes on world join and editor changes +* The editor now tells you if an incompatible mod disabled custom models # 7.5.9 diff --git a/common/src/main/java/net/mca/client/gui/DestinyScreen.java b/common/src/main/java/net/mca/client/gui/DestinyScreen.java index ef473d1c50..3c5cc08789 100644 --- a/common/src/main/java/net/mca/client/gui/DestinyScreen.java +++ b/common/src/main/java/net/mca/client/gui/DestinyScreen.java @@ -133,7 +133,7 @@ protected void setPage(String page) { }); drawGender(width / 2 - DATA_WIDTH / 2, height / 2 + 24); - drawModel(width / 2 - DATA_WIDTH / 2, height / 2 + 24 + 22); + addModelSelectionWidgets(width / 2 - DATA_WIDTH / 2, height / 2 + 24 + 22); acceptWidget = addDrawableChild(new ButtonWidget(width / 2 - 32, height / 2 + 60 + 22, 64, 20, Text.translatable("gui.button.accept"), sender -> { if (Config.getInstance().allowBodyCustomizationInDestiny) { diff --git a/common/src/main/java/net/mca/client/gui/LimitedVillagerEditorScreen.java b/common/src/main/java/net/mca/client/gui/LimitedVillagerEditorScreen.java index eef7ec288b..a97c57c2d6 100644 --- a/common/src/main/java/net/mca/client/gui/LimitedVillagerEditorScreen.java +++ b/common/src/main/java/net/mca/client/gui/LimitedVillagerEditorScreen.java @@ -41,7 +41,7 @@ protected void setPage(String page) { //which model to use if (villagerUUID.equals(playerUUID)) { - drawModel(width / 2, y); + addModelSelectionWidgets(width / 2, y); } } } diff --git a/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java b/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java index cb68235528..290630676a 100644 --- a/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java +++ b/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java @@ -41,6 +41,7 @@ import java.util.*; import java.util.function.Consumer; +import java.util.function.IntConsumer; import java.util.function.Supplier; public class VillagerEditorScreen extends Screen implements SkinListUpdateListener { @@ -121,7 +122,7 @@ private int doubleGeneSliders(int y, Genetics.GeneType... genes) { return y + 4 + (right ? 20 : 0); } - private int integerChanger(int y, Consumer onClick, Supplier content) { + private int integerChanger(int y, IntConsumer onClick, Supplier content) { int bw = 22; ButtonWidget current = addDrawableChild(new ButtonWidget(width / 2 + bw * 2, y, DATA_WIDTH - bw * 4, 20, content.get(), b -> { })); @@ -186,7 +187,7 @@ protected void setPage(String page) { y += 22; if (villagerUUID.equals(playerUUID)) { - drawModel(width / 2, y); + addModelSelectionWidgets(width / 2, y); y += 22; } @@ -589,7 +590,7 @@ void drawGender(int x, int y) { genderButtonMale.active = villager.getGenetics().getGender() != Gender.MALE; } - void drawModel(int x, int y) { + void addModelSelectionWidgets(int x, int y) { if (allowPlayerModel && allowVillagerModel) { villagerSkinWidget = addDrawableChild(new TooltipButtonWidget(x, y, DATA_WIDTH / 3, 20, "gui.villager_editor.villager_skin", b -> { villagerData.putInt("playerModel", VillagerLike.PlayerModel.VILLAGER.ordinal()); @@ -617,6 +618,9 @@ void drawModel(int x, int y) { vanillaSkinWidget.active = false; })); vanillaSkinWidget.active = villagerData.getInt("playerModel") != VillagerLike.PlayerModel.VANILLA.ordinal(); + } else { + addDrawableChild(new TooltipButtonWidget(x, y, DATA_WIDTH, 20, "gui.villager_editor.model_blacklist_hint", b -> { + })).active = false; } } diff --git a/common/src/main/java/net/mca/mixin/client/MixinGameRenderer.java b/common/src/main/java/net/mca/mixin/client/MixinGameRenderer.java index 27297715ee..7a7d8e383c 100644 --- a/common/src/main/java/net/mca/mixin/client/MixinGameRenderer.java +++ b/common/src/main/java/net/mca/mixin/client/MixinGameRenderer.java @@ -13,47 +13,50 @@ import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(GameRenderer.class) public abstract class MixinGameRenderer { - @Shadow protected abstract void loadShader(Identifier id); + @Shadow + protected abstract void loadShader(Identifier id); - @Shadow @Final private MinecraftClient client; + @Shadow + @Final + private MinecraftClient client; - @Shadow private @Nullable ShaderEffect shader; + @Shadow + private @Nullable ShaderEffect shader; - @Shadow public abstract void disableShader(); + @Shadow + public abstract void disableShader(); + @Unique private Pair currentShader; @Inject(method = "tick", at = @At("TAIL")) public void onCameraSet(CallbackInfo ci) { - if (MCAClient.areShadersAllowed()) { - if (this.client.cameraEntity != null) { - VillagerLike villagerLike = CommonVillagerModel.getVillager(this.client.cameraEntity); - if (villagerLike != null) { - if (shader == null) { - if (currentShader != null) { - this.loadShader(currentShader.getRight()); - } else { - Config.getInstance().shaderLocationsMap.entrySet().stream() - .filter(entry -> villagerLike.getTraits().hasTrait(entry.getKey())) - .filter(entry -> MCAClient.areShadersAllowed(entry.getKey() + "_shader")) - .findFirst().ifPresent(entry -> { - Identifier shaderId = new Identifier(entry.getValue()); - currentShader = new Pair<>(entry.getKey(), shaderId); - this.loadShader(shaderId); - }); - } - } else if (currentShader != null) { - if (!villagerLike.getTraits().hasTrait(currentShader.getLeft())) { - disableShader(); - this.currentShader = null; - } + if (MCAClient.areShadersAllowed() && this.client.cameraEntity != null) { + VillagerLike villagerLike = CommonVillagerModel.getVillager(this.client.cameraEntity); + if (villagerLike != null) { + if (shader == null) { + if (currentShader != null) { + this.loadShader(currentShader.getRight()); + } else { + Config.getInstance().shaderLocationsMap.entrySet().stream() + .filter(entry -> villagerLike.getTraits().hasTrait(entry.getKey())) + .filter(entry -> MCAClient.areShadersAllowed(entry.getKey() + "_shader")) + .findFirst().ifPresent(entry -> { + Identifier shaderId = new Identifier(entry.getValue()); + currentShader = new Pair<>(entry.getKey(), shaderId); + this.loadShader(shaderId); + }); } + } else if (currentShader != null && !villagerLike.getTraits().hasTrait(currentShader.getLeft())) { + disableShader(); + this.currentShader = null; } } } diff --git a/common/src/main/resources/assets/mca/lang/en_us.json b/common/src/main/resources/assets/mca/lang/en_us.json index 1e3139c96d..9141ccdafa 100644 --- a/common/src/main/resources/assets/mca/lang/en_us.json +++ b/common/src/main/resources/assets/mca/lang/en_us.json @@ -679,6 +679,8 @@ "gui.villager_editor.vanilla_skin.tooltip": "Use the vanilla player model and use this customization only for inheritance", "gui.villager_editor.customization_hint": "Use the comb, needle and thread and the potion of metamorphosis to customize.", "gui.villager_editor.model_hint": "(Customization only used for offspring)", + "gui.villager_editor.model_blacklist_hint": "(Custom models not available)", + "gui.villager_editor.model_blacklist_hint.tooltip": "An installed mod is incompatible with MCAs custom player models.", "command.verify.success": "Verified! Limit increased.", "command.verify.failed": "Whoops, the given email is wrong.", From 69770d0c1b773b71ea57dbbc57ae78471264669e Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 31 Oct 2023 18:04:03 +0100 Subject: [PATCH 19/21] fixed #742 --- changelog.md | 1 + .../java/net/mca/mixin/MixinZombieEntity.java | 27 +++++++++ common/src/main/resources/mca.mixin.json | 58 ++++++------------- 3 files changed, 47 insertions(+), 39 deletions(-) create mode 100644 common/src/main/java/net/mca/mixin/MixinZombieEntity.java diff --git a/changelog.md b/changelog.md index ad8d50d520..8a1f85b9e6 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,7 @@ * Vanilla player models no longer modify your eye height * Player eye height now automatically refreshes on world join and editor changes * The editor now tells you if an incompatible mod disabled custom models +* Removed vanilla mechanics for turning villagers into zombie villagers as this causes undefined behavior # 7.5.9 diff --git a/common/src/main/java/net/mca/mixin/MixinZombieEntity.java b/common/src/main/java/net/mca/mixin/MixinZombieEntity.java new file mode 100644 index 0000000000..d31bbe9fd5 --- /dev/null +++ b/common/src/main/java/net/mca/mixin/MixinZombieEntity.java @@ -0,0 +1,27 @@ +package net.mca.mixin; + +import net.mca.entity.VillagerEntityMCA; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.mob.HostileEntity; +import net.minecraft.entity.mob.ZombieEntity; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.world.World; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Mixin(ZombieEntity.class) +public abstract class MixinZombieEntity extends HostileEntity { + protected MixinZombieEntity(EntityType entityType, World world) { + super(entityType, world); + } + + @Inject(method= "onKilledOther(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;)Z", at=@At("HEAD"), cancellable = true) + public void mca$onKilledOther(ServerWorld world, LivingEntity other, CallbackInfoReturnable cir) { + if (other instanceof VillagerEntityMCA) { + cir.setReturnValue(super.onKilledOther(world, other)); + } + } +} diff --git a/common/src/main/resources/mca.mixin.json b/common/src/main/resources/mca.mixin.json index 7b3177f817..9fe5ba9161 100644 --- a/common/src/main/resources/mca.mixin.json +++ b/common/src/main/resources/mca.mixin.json @@ -1,41 +1,21 @@ { - "required": true, - "minVersion": "0.7", - "package": "net.mca.mixin", - "compatibilityLevel": "JAVA_17", - "mixins": [ - "MixinAbstractFurnaceBlockEntity", - "MixinActivity", - "MixinCriteria", - "MixinDefaultParticleType", - "MixinEntityType", - "MixinGoatEntity", - "MixinHorseBaseEntity", - "MixinMemoryModuleType", - "MixinMilkBucketItem", - "MixinPlayerEntity", - "MixinPlayerInventory", - "MixinProtoChunk", - "MixinSensorType", - "MixinServerPlayNetworkHandler", - "MixinServerWorld", - "MixinTranslatableText", - "MixinVillagerEntity", - "MixinVillagerEntityInvoker", - "MixinVillagerProfession", - "MixinZombieVillagerEntity" - ], - "client": [ - "client.MixinArmorFeatureRenderer", - "client.MixinGameRenderer", - "client.MixinHeldItemFeatureRenderer", - "client.MixinLivingEntityRenderer", - "client.MixinMessageHandler", - "client.MixinPlayerEntityRenderer", - "client.MixinTranslationStorage", - "client.MixinPlayerEntityClient" - ], - "injectors": { - "defaultRequire": 1 - } + "required": true, + "minVersion": "0.7", + "package": "net.mca.mixin", + "compatibilityLevel": "JAVA_17", + "mixins": [ + "MixinAbstractFurnaceBlockEntity", "MixinActivity", "MixinCriteria", "MixinDefaultParticleType", "MixinEntityType", + "MixinGoatEntity", "MixinHorseBaseEntity", "MixinMemoryModuleType", "MixinMilkBucketItem", "MixinPlayerEntity", + "MixinPlayerInventory", "MixinProtoChunk", "MixinSensorType", "MixinServerPlayNetworkHandler", "MixinServerWorld", + "MixinTranslatableText", "MixinVillagerEntity", "MixinVillagerEntityInvoker", "MixinVillagerProfession", + "MixinZombieEntity", "MixinZombieVillagerEntity" + ], + "client": [ + "client.MixinArmorFeatureRenderer", "client.MixinGameRenderer", "client.MixinHeldItemFeatureRenderer", + "client.MixinLivingEntityRenderer", "client.MixinMessageHandler", "client.MixinPlayerEntityClient", + "client.MixinPlayerEntityRenderer", "client.MixinTranslationStorage" + ], + "injectors": { + "defaultRequire": 1 + } } From 319f4f842ba3ba1e720aa6ade856379a39fb0e24 Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 31 Oct 2023 19:12:46 +0100 Subject: [PATCH 20/21] added hsv hair color selection #703 --- changelog.md | 1 + .../net/mca/client/gui/ColorSelector.java | 77 +++++++++++ .../net/mca/client/gui/SkinLibraryScreen.java | 78 +---------- .../mca/client/gui/VillagerEditorScreen.java | 123 ++++++++++++++++-- .../java/net/mca/entity/VillagerLike.java | 10 +- .../main/resources/assets/mca/lang/en_us.json | 4 + 6 files changed, 203 insertions(+), 90 deletions(-) create mode 100644 common/src/main/java/net/mca/client/gui/ColorSelector.java diff --git a/changelog.md b/changelog.md index 8a1f85b9e6..123a1f49ec 100644 --- a/changelog.md +++ b/changelog.md @@ -10,6 +10,7 @@ * Player eye height now automatically refreshes on world join and editor changes * The editor now tells you if an incompatible mod disabled custom models * Removed vanilla mechanics for turning villagers into zombie villagers as this causes undefined behavior +* Added HSV hair color option to editor # 7.5.9 diff --git a/common/src/main/java/net/mca/client/gui/ColorSelector.java b/common/src/main/java/net/mca/client/gui/ColorSelector.java new file mode 100644 index 0000000000..3e156e74be --- /dev/null +++ b/common/src/main/java/net/mca/client/gui/ColorSelector.java @@ -0,0 +1,77 @@ +package net.mca.client.gui; + +import net.mca.client.gui.widget.HorizontalColorPickerWidget; +import net.mca.client.resources.ClientUtils; + +class ColorSelector { + double red, green, blue; + double hue, saturation, brightness; + + public HorizontalColorPickerWidget hueWidget; + public HorizontalColorPickerWidget saturationWidget; + public HorizontalColorPickerWidget brightnessWidget; + + public ColorSelector() { + setHSV(0.5, 0.5, 0.5); + } + + public void setRGB(double red, double green, double blue) { + this.red = red; + this.green = green; + this.blue = blue; + updateHSV(); + } + + public void setHSV(double hue, double saturation, double brightness) { + this.hue = hue; + this.saturation = saturation; + this.brightness = brightness; + updateRGB(); + + if (hueWidget != null) { + hueWidget.setValueX(hue / 360.0); + saturationWidget.setValueX(saturation); + } + if (brightnessWidget != null) { + brightnessWidget.setValueX(brightness); + } + } + + private void updateRGB() { + double[] doubles = ClientUtils.HSV2RGB(hue, saturation, brightness); + this.red = doubles[0]; + this.green = doubles[1]; + this.blue = doubles[2]; + } + + private void updateHSV() { + double[] doubles = ClientUtils.RGB2HSV(red, green, blue); + this.hue = doubles[0]; + this.saturation = doubles[1]; + this.brightness = doubles[2]; + + if (hueWidget != null) { + hueWidget.setValueX(hue / 360.0); + saturationWidget.setValueX(saturation); + } + if (brightnessWidget != null) { + brightnessWidget.setValueX(brightness); + } + } + + public int getRed() { + return (int) (red * 255); + } + + public int getGreen() { + return (int) (green * 255); + } + + public int getBlue() { + return (int) (blue * 255); + } + + public int getColor() { + return 0xFF000000 | getBlue() << 16 | getGreen() << 8 | getRed(); + } +} diff --git a/common/src/main/java/net/mca/client/gui/SkinLibraryScreen.java b/common/src/main/java/net/mca/client/gui/SkinLibraryScreen.java index e05e7f292c..67596f9ebe 100644 --- a/common/src/main/java/net/mca/client/gui/SkinLibraryScreen.java +++ b/common/src/main/java/net/mca/client/gui/SkinLibraryScreen.java @@ -118,9 +118,6 @@ public class SkinLibraryScreen extends Screen implements SkinListUpdateListener private boolean uploading = false; private Thread thread; - private HorizontalColorPickerWidget hueWidget; - private HorizontalColorPickerWidget saturationWidget; - private HorizontalColorPickerWidget brightnessWidget; private TextFieldWidget textFieldWidget; private boolean skipHairWarning; @@ -1116,7 +1113,7 @@ private void rebuild() { if (workspace.skinType == SkinType.CLOTHING) { //hue - hueWidget = addDrawableChild(new HorizontalColorPickerWidget(width / 2 + 100, y, 100, 15, + color.hueWidget = addDrawableChild(new HorizontalColorPickerWidget(width / 2 + 100, y, 100, 15, color.hue / 360.0, MCA.locate("textures/colormap/hue.png"), (vx, vy) -> { @@ -1128,7 +1125,7 @@ private void rebuild() { })); //saturation - saturationWidget = addDrawableChild(new HorizontalGradientWidget(width / 2 + 100, y + 20, 100, 15, + color.saturationWidget = addDrawableChild(new HorizontalGradientWidget(width / 2 + 100, y + 20, 100, 15, color.saturation, () -> { double[] doubles = ClientUtils.HSV2RGB(color.hue, 0.0, 1.0); @@ -1152,7 +1149,7 @@ private void rebuild() { } //brightness - brightnessWidget = addDrawableChild(new HorizontalGradientWidget(width / 2 + 100, y + 40, 100, 15, + color.brightnessWidget = addDrawableChild(new HorizontalGradientWidget(width / 2 + 100, y + 40, 100, 15, color.brightness, () -> { double[] doubles = ClientUtils.HSV2RGB(color.hue, color.saturation, 0.0); @@ -1823,73 +1820,4 @@ public static Text getText(SubscriptionFilter t) { return Text.translatable("gui.skin_library.subscription_filter." + t.name().toLowerCase(Locale.ROOT)); } } - - class ColorSelector { - double red, green, blue; - double hue, saturation, brightness; - - public ColorSelector() { - setHSV(0.5, 0.5, 0.5); - } - - public void setRGB(double red, double green, double blue) { - this.red = red; - this.green = green; - this.blue = blue; - updateHSV(); - } - - public void setHSV(double hue, double saturation, double brightness) { - this.hue = hue; - this.saturation = saturation; - this.brightness = brightness; - updateRGB(); - - if (hueWidget != null) { - hueWidget.setValueX(hue / 360.0); - saturationWidget.setValueX(saturation); - } - if (brightnessWidget != null) { - brightnessWidget.setValueX(brightness); - } - } - - private void updateRGB() { - double[] doubles = ClientUtils.HSV2RGB(hue, saturation, brightness); - this.red = doubles[0]; - this.green = doubles[1]; - this.blue = doubles[2]; - } - - private void updateHSV() { - double[] doubles = ClientUtils.RGB2HSV(red, green, blue); - this.hue = doubles[0]; - this.saturation = doubles[1]; - this.brightness = doubles[2]; - - if (hueWidget != null) { - hueWidget.setValueX(hue / 360.0); - saturationWidget.setValueX(saturation); - } - if (brightnessWidget != null) { - brightnessWidget.setValueX(brightness); - } - } - - public int getRed() { - return (int) (red * 255); - } - - public int getGreen() { - return (int) (green * 255); - } - - public int getBlue() { - return (int) (blue * 255); - } - - public int getColor() { - return 0xFF000000 | getBlue() << 16 | getGreen() << 8 | getRed(); - } - } } diff --git a/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java b/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java index 290630676a..afa02fc0f8 100644 --- a/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java +++ b/common/src/main/java/net/mca/client/gui/VillagerEditorScreen.java @@ -4,10 +4,8 @@ import net.mca.MCA; import net.mca.MCAClient; import net.mca.ProfessionsMCA; -import net.mca.client.gui.widget.ColorPickerWidget; -import net.mca.client.gui.widget.GeneSliderWidget; -import net.mca.client.gui.widget.NamedTextFieldWidget; -import net.mca.client.gui.widget.TooltipButtonWidget; +import net.mca.client.gui.widget.*; +import net.mca.client.resources.ClientUtils; import net.mca.cobalt.network.NetworkHandler; import net.mca.entity.EntitiesMCA; import net.mca.entity.VillagerEntityMCA; @@ -58,6 +56,8 @@ public class VillagerEditorScreen extends Screen implements SkinListUpdateListen private static final int TRAITS_PER_PAGE = 8; protected NbtCompound villagerData; private TextFieldWidget villagerNameField; + private boolean hsvColoredHair; + private final ColorSelector color = new ColorSelector(); private int clothingPage; private int clothingPageCount; @@ -258,6 +258,15 @@ protected void setPage(String page) { })); } case "head" -> { + // HSV Hair selector + addDrawableChild(new TooltipButtonWidget(width / 2 + DATA_WIDTH / 2, y, DATA_WIDTH / 2, 20, + Text.translatable(hsvColoredHair ? "gui.villager_editor.hair_hsv" : "gui.villager_editor.hair_genetic"), + Text.translatable("gui.villager_editor.hair_mode.tooltip"), + b -> { + hsvColoredHair = !hsvColoredHair; + init(); + })); + //genes y = doubleGeneSliders(y, Genetics.FACE); y = doubleGeneSliders(y, Genetics.VOICE_TONE, Genetics.VOICE); @@ -283,14 +292,88 @@ protected void setPage(String page) { y += 22; //hair color - addDrawableChild(new ColorPickerWidget(width / 2 + margin, y, DATA_WIDTH - margin * 2, DATA_WIDTH - margin * 2, - genetics.getGene(Genetics.PHEOMELANIN), - genetics.getGene(Genetics.EUMELANIN), - MCA.locate("textures/colormap/villager_hair.png"), - (vx, vy) -> { - genetics.setGene(Genetics.PHEOMELANIN, vx.floatValue()); - genetics.setGene(Genetics.EUMELANIN, vy.floatValue()); - })); + if (hsvColoredHair) { + //hue + color.hueWidget = addDrawableChild(new HorizontalColorPickerWidget(width / 2 + 20, y, DATA_WIDTH - 40, 15, + color.hue / 360.0, + MCA.locate("textures/colormap/hue.png"), + (vx, vy) -> { + color.setHSV( + vx * 360, + color.saturation, + color.brightness + ); + refreshHairColor(); + })); + + //saturation + color.saturationWidget = addDrawableChild(new HorizontalGradientWidget(width / 2 + 20, y + 20, DATA_WIDTH - 40, 15, + color.saturation, + () -> { + double[] doubles = ClientUtils.HSV2RGB(color.hue, 0.0, 1.0); + return new float[]{ + (float) doubles[0], (float) doubles[1], (float) doubles[2], 1.0f, + }; + }, + () -> { + double[] doubles = ClientUtils.HSV2RGB(color.hue, 1.0, 1.0); + return new float[]{ + (float) doubles[0], (float) doubles[1], (float) doubles[2], 1.0f, + }; + }, + (vx, vy) -> { + color.setHSV( + color.hue, + vx, + color.brightness + ); + refreshHairColor(); + })); + + + //brightness + color.brightnessWidget = addDrawableChild(new HorizontalGradientWidget(width / 2 + 20, y + 40, DATA_WIDTH - 40, 15, + color.brightness, + () -> { + double[] doubles = ClientUtils.HSV2RGB(color.hue, color.saturation, 0.0); + return new float[]{ + (float) doubles[0], (float) doubles[1], (float) doubles[2], 1.0f, + }; + }, + () -> { + double[] doubles = ClientUtils.HSV2RGB(color.hue, color.saturation, 1.0); + return new float[]{ + (float) doubles[0], (float) doubles[1], (float) doubles[2], 1.0f, + }; + }, + (vx, vy) -> { + color.setHSV( + color.hue, + color.saturation, + vx + ); + refreshHairColor(); + })); + + y += 65; + + // Clear hair + addDrawableChild(new ButtonWidget(width / 2, y, DATA_WIDTH, 20, + Text.translatable("gui.villager_editor.clear_hair"), + b -> { + villager.clearHairDye(); + init(); + })); + } else { + addDrawableChild(new ColorPickerWidget(width / 2 + margin, y, DATA_WIDTH - margin * 2, DATA_WIDTH - margin * 2, + genetics.getGene(Genetics.PHEOMELANIN), + genetics.getGene(Genetics.EUMELANIN), + MCA.locate("textures/colormap/villager_hair.png"), + (vx, vy) -> { + genetics.setGene(Genetics.PHEOMELANIN, vx.floatValue()); + genetics.setGene(Genetics.EUMELANIN, vy.floatValue()); + })); + } } case "personality" -> { //personality @@ -439,6 +522,17 @@ protected void setPage(String page) { } } + private void refreshHairColor() { + if (villager.getHairDye()[0] == 0.0f) { + color.setHSV(0.0, 0.5, 0.5); + } + villager.setHairDye( + Math.max(1.0f / 255.0f, (float) color.red), + Math.max(1.0f / 255.0f, (float) color.green), + Math.max(1.0f / 255.0f, (float) color.blue) + ); + } + private Traits.Trait[] getValidTraits() { return (Traits.Trait.values().stream()).filter(e -> { if (villagerUUID.equals(playerUUID)) { @@ -762,6 +856,11 @@ public void setVillagerData(NbtCompound villagerData) { if (villager != null) { this.villagerData = villagerData; villager.readCustomDataFromNbt(villagerData); + + float[] hairDye = villager.getHairDye(); + hsvColoredHair = hairDye[0] > 0.0f; + color.setRGB(hairDye[0], hairDye[1], hairDye[2]); + villagerBreedingAge = villagerData.getInt("Age"); villager.setBreedingAge(villagerBreedingAge); if (client != null && client.player != null) { diff --git a/common/src/main/java/net/mca/entity/VillagerLike.java b/common/src/main/java/net/mca/entity/VillagerLike.java index dca65006e2..4572c099e2 100644 --- a/common/src/main/java/net/mca/entity/VillagerLike.java +++ b/common/src/main/java/net/mca/entity/VillagerLike.java @@ -248,10 +248,14 @@ default void setHairDye(DyeColor color) { setTrackedValue(HAIR_COLOR_BLUE, components[2]); } + default void setHairDye(float r, float g, float b) { + setTrackedValue(HAIR_COLOR_RED, r); + setTrackedValue(HAIR_COLOR_GREEN, g); + setTrackedValue(HAIR_COLOR_BLUE, b); + } + default void clearHairDye() { - setTrackedValue(HAIR_COLOR_RED, 0.0f); - setTrackedValue(HAIR_COLOR_GREEN, 0.0f); - setTrackedValue(HAIR_COLOR_BLUE, 0.0f); + setHairDye(0.0f, 0.0f, 0.0f); } default float[] getHairDye() { diff --git a/common/src/main/resources/assets/mca/lang/en_us.json b/common/src/main/resources/assets/mca/lang/en_us.json index 9141ccdafa..b0877a5c93 100644 --- a/common/src/main/resources/assets/mca/lang/en_us.json +++ b/common/src/main/resources/assets/mca/lang/en_us.json @@ -681,6 +681,10 @@ "gui.villager_editor.model_hint": "(Customization only used for offspring)", "gui.villager_editor.model_blacklist_hint": "(Custom models not available)", "gui.villager_editor.model_blacklist_hint.tooltip": "An installed mod is incompatible with MCAs custom player models.", + "gui.villager_editor.hair_genetic": "Genetic hair", + "gui.villager_editor.hair_hsv": "HSV Hair", + "gui.villager_editor.hair_mode.tooltip": "Toggles HSV dyed hair. Only the underlying genetic hair color is inherited.", + "gui.villager_editor.clear_hair": "Clear HSV color", "command.verify.success": "Verified! Limit increased.", "command.verify.failed": "Whoops, the given email is wrong.", From 394b089b74e7b899bc30dd8840c564bdea524a49 Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 31 Oct 2023 19:43:29 +0100 Subject: [PATCH 21/21] maybe fixed 767 --- changelog.md | 1 + .../java/net/mca/entity/GrimReaperEntity.java | 8 ++--- .../loot_tables/entities/female_villager.json | 3 ++ .../entities/female_zombie_villager.json | 34 +++++++++++++++++++ .../mca/loot_tables/entities/grim_reaper.json | 3 ++ .../loot_tables/entities/male_villager.json | 3 ++ .../entities/male_zombie_villager.json | 34 +++++++++++++++++++ 7 files changed, 81 insertions(+), 5 deletions(-) create mode 100644 common/src/main/resources/data/mca/loot_tables/entities/female_villager.json create mode 100644 common/src/main/resources/data/mca/loot_tables/entities/female_zombie_villager.json create mode 100644 common/src/main/resources/data/mca/loot_tables/entities/grim_reaper.json create mode 100644 common/src/main/resources/data/mca/loot_tables/entities/male_villager.json create mode 100644 common/src/main/resources/data/mca/loot_tables/entities/male_zombie_villager.json diff --git a/changelog.md b/changelog.md index 123a1f49ec..9df262f5e1 100644 --- a/changelog.md +++ b/changelog.md @@ -11,6 +11,7 @@ * The editor now tells you if an incompatible mod disabled custom models * Removed vanilla mechanics for turning villagers into zombie villagers as this causes undefined behavior * Added HSV hair color option to editor +* Added loot tables in case mods rely on them and let zombie villagers drop some flesh # 7.5.9 diff --git a/common/src/main/java/net/mca/entity/GrimReaperEntity.java b/common/src/main/java/net/mca/entity/GrimReaperEntity.java index 18c09b43d2..85862e0c1f 100644 --- a/common/src/main/java/net/mca/entity/GrimReaperEntity.java +++ b/common/src/main/java/net/mca/entity/GrimReaperEntity.java @@ -130,9 +130,9 @@ public boolean isValidPosition(BlockPos pos) { @Override protected void dropEquipment(DamageSource source, int lootingLvl, boolean hitByPlayer) { super.dropEquipment(source, lootingLvl, hitByPlayer); - ItemEntity itementity = dropItem(ItemsMCA.SCYTHE.get()); - if (itementity != null) { - itementity.setCovetedItem(); + ItemEntity itemEntity = dropItem(ItemsMCA.SCYTHE.get()); + if (itemEntity != null) { + itemEntity.setCovetedItem(); } } @@ -151,8 +151,6 @@ public void setAttackState(ReaperAttackState state) { switch (state) { case PRE -> playSound(SoundsMCA.REAPER_SCYTHE_OUT.get(), 1, 1); case POST -> playSound(SoundsMCA.REAPER_SCYTHE_SWING.get(), 1, 1); - default -> { - } } } diff --git a/common/src/main/resources/data/mca/loot_tables/entities/female_villager.json b/common/src/main/resources/data/mca/loot_tables/entities/female_villager.json new file mode 100644 index 0000000000..601c1935a9 --- /dev/null +++ b/common/src/main/resources/data/mca/loot_tables/entities/female_villager.json @@ -0,0 +1,3 @@ +{ + "type": "minecraft:entity" +} \ No newline at end of file diff --git a/common/src/main/resources/data/mca/loot_tables/entities/female_zombie_villager.json b/common/src/main/resources/data/mca/loot_tables/entities/female_zombie_villager.json new file mode 100644 index 0000000000..913354308a --- /dev/null +++ b/common/src/main/resources/data/mca/loot_tables/entities/female_zombie_villager.json @@ -0,0 +1,34 @@ +{ + "type": "minecraft:entity", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 2.0, + "min": 0.0 + }, + "function": "minecraft:set_count" + }, + { + "count": { + "type": "minecraft:uniform", + "max": 1.0, + "min": 0.0 + }, + "function": "minecraft:looting_enchant" + } + ], + "name": "minecraft:rotten_flesh" + } + ], + "rolls": 1 + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/data/mca/loot_tables/entities/grim_reaper.json b/common/src/main/resources/data/mca/loot_tables/entities/grim_reaper.json new file mode 100644 index 0000000000..601c1935a9 --- /dev/null +++ b/common/src/main/resources/data/mca/loot_tables/entities/grim_reaper.json @@ -0,0 +1,3 @@ +{ + "type": "minecraft:entity" +} \ No newline at end of file diff --git a/common/src/main/resources/data/mca/loot_tables/entities/male_villager.json b/common/src/main/resources/data/mca/loot_tables/entities/male_villager.json new file mode 100644 index 0000000000..601c1935a9 --- /dev/null +++ b/common/src/main/resources/data/mca/loot_tables/entities/male_villager.json @@ -0,0 +1,3 @@ +{ + "type": "minecraft:entity" +} \ No newline at end of file diff --git a/common/src/main/resources/data/mca/loot_tables/entities/male_zombie_villager.json b/common/src/main/resources/data/mca/loot_tables/entities/male_zombie_villager.json new file mode 100644 index 0000000000..913354308a --- /dev/null +++ b/common/src/main/resources/data/mca/loot_tables/entities/male_zombie_villager.json @@ -0,0 +1,34 @@ +{ + "type": "minecraft:entity", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 2.0, + "min": 0.0 + }, + "function": "minecraft:set_count" + }, + { + "count": { + "type": "minecraft:uniform", + "max": 1.0, + "min": 0.0 + }, + "function": "minecraft:looting_enchant" + } + ], + "name": "minecraft:rotten_flesh" + } + ], + "rolls": 1 + } + ] +} \ No newline at end of file