Added pillager_charging and celebrating properties

This commit is contained in:
D3v1s0m 2023-09-13 00:14:50 +05:30
parent 5f5ed6ccb5
commit e4ff39bc79
No known key found for this signature in database
GPG Key ID: FA1F770C7B1D40C1
2 changed files with 13 additions and 6 deletions

@ -128,9 +128,6 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
registerType("shield_height", 0); // TODO: figure this out
registerType("shulker_color", DyeColor.RED); // TODO
// Vindicator
registerType("celebrating", false); // TODO
// Wither
registerType("invulnerable_time", 0); // TODO
@ -438,7 +435,7 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
// Hoglin and Piglin Zombification
final int zombificationIndex;
if (ver.isNewerThanOrEquals(ServerVersion.V_1_17)) zombificationIndex = 17; // Change piglinIndex if you change this
if (ver.isNewerThanOrEquals(ServerVersion.V_1_17)) zombificationIndex = 17; // Change piglinIndex and pillagerIndex if you change this
else zombificationIndex = 16;
register(new BooleanProperty("hoglin_immune_to_zombification", zombificationIndex, false, legacyBooleans));
register(new BooleanProperty("piglin_immune_to_zombification", zombificationIndex-1, false, legacyBooleans));
@ -449,6 +446,14 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
register(new BooleanProperty("piglin_charging_crossbow", piglinIndex++, false, legacyBooleans));
register(new BooleanProperty("piglin_dancing", piglinIndex, false, legacyBooleans));
// Pillager
int pillagerIndex = zombificationIndex;
register(new BooleanProperty("pillager_charging", pillagerIndex, false, legacyBooleans));
// Vindicator
int vindicatorIndex = pillagerIndex-1;
register(new BooleanProperty("celebrating", vindicatorIndex, false, legacyBooleans));
if (!ver.isNewerThanOrEquals(ServerVersion.V_1_17)) return;
// Axolotl
register(new EncodedIntegerProperty<>("axolotl_variant", AxolotlVariant.LUCY, 17, Enum::ordinal));

@ -212,7 +212,8 @@ public class NpcTypeRegistryImpl implements NpcTypeRegistry {
.addHandProperties());
register(builder(p, "vindicator", EntityTypes.VINDICATOR)
.setHologramOffset(-0.025));
.setHologramOffset(-0.025)
.addProperties("celebrating"));
register(builder(p, "wither_skeleton", EntityTypes.WITHER_SKELETON)
.setHologramOffset(0.425)
@ -275,7 +276,8 @@ public class NpcTypeRegistryImpl implements NpcTypeRegistry {
register(builder(p, "pillager", EntityTypes.PILLAGER)
.setHologramOffset(-0.025)
.addHandProperties());
.addHandProperties()
.addProperties("pillager_charging"));
register(builder(p, "ravager", EntityTypes.RAVAGER)
.setHologramOffset(0.225));