added invulnerable_time property for Wither
This commit is contained in:
parent
6ebc60c11e
commit
51f4f709f6
2 changed files with 13 additions and 9 deletions
|
@ -102,14 +102,6 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
|
||||||
// Guardian
|
// Guardian
|
||||||
registerType("is_elder", false); // TODO: ensure it only works till 1.10. Note: index is wrong on wiki.vg
|
registerType("is_elder", false); // TODO: ensure it only works till 1.10. Note: index is wrong on wiki.vg
|
||||||
|
|
||||||
// Shulker
|
|
||||||
registerType("attach_direction", null); // TODO: make a direction enum
|
|
||||||
registerType("shield_height", 0); // TODO: figure this out
|
|
||||||
registerType("shulker_color", DyeColor.RED); // TODO
|
|
||||||
|
|
||||||
// Wither
|
|
||||||
registerType("invulnerable_time", 0); // TODO
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -366,6 +358,17 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
|
||||||
linkProperties("wolf_angry", "tamed", "sitting");
|
linkProperties("wolf_angry", "tamed", "sitting");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wither
|
||||||
|
int witherIndex;
|
||||||
|
if (ver.isNewerThanOrEquals(ServerVersion.V_1_17)) witherIndex = 16; // using the first index, so we can add the other properties later if needed
|
||||||
|
else if (ver.isNewerThanOrEquals(ServerVersion.V_1_15)) witherIndex = 15;
|
||||||
|
else if (ver.isNewerThanOrEquals(ServerVersion.V_1_14)) witherIndex = 14;
|
||||||
|
else if (ver.isNewerThanOrEquals(ServerVersion.V_1_10)) witherIndex = 12;
|
||||||
|
else if (ver.isNewerThanOrEquals(ServerVersion.V_1_9)) witherIndex = 11;
|
||||||
|
else witherIndex = 17;
|
||||||
|
witherIndex += 3; // skip the first 3 indexes, will be used for the other properties later
|
||||||
|
register(new IntegerProperty("invulnerable_time", witherIndex++, 0, false));
|
||||||
|
|
||||||
if (!ver.isNewerThanOrEquals(ServerVersion.V_1_9)) return;
|
if (!ver.isNewerThanOrEquals(ServerVersion.V_1_9)) return;
|
||||||
// Shulker
|
// Shulker
|
||||||
int shulkerIndex;
|
int shulkerIndex;
|
||||||
|
|
|
@ -153,7 +153,8 @@ public class NpcTypeRegistryImpl implements NpcTypeRegistry {
|
||||||
.addProperties("hand"));
|
.addProperties("hand"));
|
||||||
|
|
||||||
register(builder(p, "wither", EntityTypes.WITHER)
|
register(builder(p, "wither", EntityTypes.WITHER)
|
||||||
.setHologramOffset(1.525));
|
.setHologramOffset(1.525)
|
||||||
|
.addProperties("invulnerable_time"));
|
||||||
|
|
||||||
register(builder(p, "wolf", EntityTypes.WOLF)
|
register(builder(p, "wolf", EntityTypes.WOLF)
|
||||||
.setHologramOffset(-1.125)
|
.setHologramOffset(-1.125)
|
||||||
|
|
Loading…
Reference in a new issue