Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 09:00:09 +01:00
Improve horse armor patch in 1.8->1.9 (#3773)
Dieser Commit ist enthalten in:
Ursprung
868a5bd24e
Commit
5569caf610
@ -175,12 +175,14 @@ public class EntityTracker1_9 extends EntityTrackerBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//ECHOPET Patch
|
// 1.8 can handle out of range values and will just not show any armor, 1.9+ clients will get
|
||||||
if (type == EntityType.HORSE) {
|
// exceptions and won't render the entity at all
|
||||||
// Wrong metadata value from EchoPet, patch since it's discontinued. (https://github.com/DSH105/EchoPet/blob/06947a8b08ce40be9a518c2982af494b3b99d140/modules/API/src/main/java/com/dsh105/echopet/compat/api/entity/HorseArmour.java#L22)
|
if (type == EntityType.HORSE && metadata.id() == 16) {
|
||||||
if (metadata.id() == 16 && (int) metadata.getValue() == Integer.MIN_VALUE)
|
final int value = metadata.value();
|
||||||
|
if (value < 0 || value > 3) { // no armor, iron armor, gold armor and diamond armor
|
||||||
metadata.setValue(0);
|
metadata.setValue(0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (type == EntityType.PLAYER) {
|
if (type == EntityType.PLAYER) {
|
||||||
if (metadata.id() == 0) {
|
if (metadata.id() == 0) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren