mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
Fixed snouts
This commit is contained in:
parent
44ab173613
commit
dfb338e39d
2 changed files with 7 additions and 4 deletions
|
@ -15,7 +15,9 @@ public class PonySnout {
|
||||||
public PonySnout(AbstractPonyModel pony) {
|
public PonySnout(AbstractPonyModel pony) {
|
||||||
mare = new PlaneRenderer(pony);
|
mare = new PlaneRenderer(pony);
|
||||||
stallion = new PlaneRenderer(pony);
|
stallion = new PlaneRenderer(pony);
|
||||||
|
|
||||||
pony.bipedHead.addChild(stallion);
|
pony.bipedHead.addChild(stallion);
|
||||||
|
pony.bipedHead.addChild(mare);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(float yOffset, float stretch) {
|
public void init(float yOffset, float stretch) {
|
||||||
|
@ -41,7 +43,7 @@ public class PonySnout {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGender(PonyGender gender) {
|
public void setGender(PonyGender gender) {
|
||||||
mare.isHidden = gender != PonyGender.MARE;
|
mare.isHidden = gender == PonyGender.STALLION;
|
||||||
stallion.isHidden = gender != PonyGender.STALLION;
|
stallion.isHidden = !mare.isHidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import java.awt.image.BufferedImage;
|
||||||
* Individual trigger pixels for a pony skin.
|
* Individual trigger pixels for a pony skin.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public enum TriggerPixels {
|
public enum TriggerPixels {
|
||||||
RACE(PonyRace.HUMAN, 0, 0),
|
RACE(PonyRace.HUMAN, 0, 0),
|
||||||
TAIL(TailLengths.FULL, 1, 0),
|
TAIL(TailLengths.FULL, 1, 0),
|
||||||
|
@ -25,7 +26,8 @@ public enum TriggerPixels {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads tis trigger pixel's value and returns the raw colour value.
|
* Reads this trigger pixel's value and returns the raw colour.
|
||||||
|
*
|
||||||
* @param image Image to read
|
* @param image Image to read
|
||||||
* @param mask Colour mask (0xffffff for rgb, -1 for rgba)
|
* @param mask Colour mask (0xffffff for rgb, -1 for rgba)
|
||||||
*/
|
*/
|
||||||
|
@ -38,7 +40,6 @@ public enum TriggerPixels {
|
||||||
*
|
*
|
||||||
* @param image Image to read
|
* @param image Image to read
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public <T extends Enum<T> & ITriggerPixelMapped<T>> T readValue(BufferedImage image) {
|
public <T extends Enum<T> & ITriggerPixelMapped<T>> T readValue(BufferedImage image) {
|
||||||
return ITriggerPixelMapped.getByTriggerPixel((T)def, readColor(image, 0xffffff));
|
return ITriggerPixelMapped.getByTriggerPixel((T)def, readColor(image, 0xffffff));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue