From c3be5cb9768f0aa5a16e7fd39a9546483d42d64d Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 27 Oct 2018 17:12:18 +0200 Subject: [PATCH] Added a third gender. My aren't we progressive today... --- .../minelittlepony/model/components/PonySnout.java | 4 ++-- .../java/com/minelittlepony/pony/data/PonyGender.java | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/minelittlepony/model/components/PonySnout.java b/src/main/java/com/minelittlepony/model/components/PonySnout.java index edf79eaa..d6f9d009 100644 --- a/src/main/java/com/minelittlepony/model/components/PonySnout.java +++ b/src/main/java/com/minelittlepony/model/components/PonySnout.java @@ -61,7 +61,7 @@ public class PonySnout { public void setGender(PonyGender gender) { boolean show = !head.hasHeadGear() && !isHidden && MineLittlePony.getConfig().snuzzles; - mare.isHidden = !show || gender == PonyGender.STALLION; - stallion.isHidden = !show || gender == PonyGender.MARE; + mare.isHidden = !(show && gender.isMare()); + stallion.isHidden = !(show && gender.isStallion()); } } diff --git a/src/main/java/com/minelittlepony/pony/data/PonyGender.java b/src/main/java/com/minelittlepony/pony/data/PonyGender.java index 4ef71a31..7514d2a7 100644 --- a/src/main/java/com/minelittlepony/pony/data/PonyGender.java +++ b/src/main/java/com/minelittlepony/pony/data/PonyGender.java @@ -2,7 +2,8 @@ package com.minelittlepony.pony.data; public enum PonyGender implements ITriggerPixelMapped { MARE(0), - STALLION(0xffffff); + STALLION(0xffffff), + ABOMONATION(0x888888); private int triggerValue; @@ -14,4 +15,12 @@ public enum PonyGender implements ITriggerPixelMapped { public int getTriggerPixel() { return triggerValue; } + + public boolean isMare() { + return this == MARE; + } + + public boolean isStallion() { + return this == STALLION; + } }