added Strider properties (needs small fix) and fixed sniffer property

This commit is contained in:
D3v1s0m 2023-10-02 10:20:47 +05:30
parent 6faf0a3e93
commit b1b10a04ee
No known key found for this signature in database
GPG Key ID: FA1F770C7B1D40C1
2 changed files with 11 additions and 16 deletions

@ -99,20 +99,6 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
// Guardian
registerType("is_elder", false); // TODO: ensure it only works till 1.10. Note: index is wrong on wiki.vg
// Sniffer
registerType("sniffer_state", null); // TODO: Nothing on wiki.vg, look in mc source
// Rabbit
registerType("rabbit_type", 0); // TODO: Figure this out
// Sheep
registerType("sheep_color", DyeColor.WHITE); // TODO: Figure this out
registerType("sheep_sheared", false); // TODO
// Strider
registerType("strider_shaking", false); // TODO
registerType("strider_saddle", false); // TODO
// Wolf
registerType("wolf_collar_color", DyeColor.RED); // TODO
registerType("wolf_angry", false); // TODO
@ -511,7 +497,7 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
// Hoglin and Piglin Zombification
final int zombificationIndex;
if (ver.isNewerThanOrEquals(ServerVersion.V_1_17)) zombificationIndex = 17; // Change piglinIndex and pillagerIndex if you change this
if (ver.isNewerThanOrEquals(ServerVersion.V_1_17)) zombificationIndex = 17; // Change piglinIndex, pillagerIndex, striderIndex and vindicatorIndex 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));
@ -525,6 +511,11 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
// Pillager
register(new BooleanProperty("pillager_charging", zombificationIndex, false, legacyBooleans));
// Strider
int striderIndex = zombificationIndex + 1;
register(new BooleanProperty("strider_shaking", striderIndex++, false, legacyBooleans)); // TODO: Fix this, it needs to be set constantly i guess
register(new BooleanProperty("strider_saddled", striderIndex, false, legacyBooleans));
// Vindicator
int vindicatorIndex = zombificationIndex -1;
register(new BooleanProperty("celebrating", vindicatorIndex, false, legacyBooleans));
@ -547,6 +538,9 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
// Camel
register(new BooleanProperty("bashing", 18, false, legacyBooleans));
// Sniffer
register(new SnifferStateProperty(17));
}
private void registerSerializer(PropertySerializer<?> serializer) {

@ -317,7 +317,8 @@ public class NpcTypeRegistryImpl implements NpcTypeRegistry {
.addEquipmentProperties());
register(builder(p, "strider", EntityTypes.STRIDER)
.setHologramOffset(-0.275));
.setHologramOffset(-0.275)
.addProperties("strider_shaking", "strider_saddled"));
register(builder(p, "zoglin", EntityTypes.ZOGLIN)
.setHologramOffset(-0.575));