small fix for immune to zombification property
This commit is contained in:
parent
1010a18e71
commit
488b9ccb5b
3 changed files with 6 additions and 2 deletions
plugin/src/main/java/lol/pyr/znpcsplus
|
@ -389,7 +389,8 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
|
|||
final int zombificationIndex;
|
||||
if (ver.isNewerThanOrEquals(ServerVersion.V_1_17)) zombificationIndex = 17;
|
||||
else zombificationIndex = 16;
|
||||
register(new BooleanProperty("immune_to_zombification", zombificationIndex, false, legacyBooleans));
|
||||
register(new BooleanProperty("hoglin_immune_to_zombification", zombificationIndex, false, legacyBooleans));
|
||||
register(new BooleanProperty("piglin_immune_to_zombification", zombificationIndex-1, false, legacyBooleans));
|
||||
|
||||
if (!ver.isNewerThanOrEquals(ServerVersion.V_1_17)) return;
|
||||
// Axolotl
|
||||
|
|
|
@ -132,6 +132,9 @@ public class NpcTypeImpl implements NpcType {
|
|||
if (EntityTypes.isTypeInstanceOf(type, EntityTypes.ABSTRACT_EVO_ILLU_ILLAGER)) {
|
||||
addProperties("spell");
|
||||
}
|
||||
if (EntityTypes.isTypeInstanceOf(type, EntityTypes.ABSTRACT_PIGLIN)) {
|
||||
addProperties("piglin_immune_to_zombification");
|
||||
}
|
||||
return new NpcTypeImpl(name, type, hologramOffset, new HashSet<>(allowedProperties), defaultProperties);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -292,7 +292,7 @@ public class NpcTypeRegistryImpl implements NpcTypeRegistry {
|
|||
|
||||
register(builder(p, "hoglin", EntityTypes.HOGLIN)
|
||||
.setHologramOffset(-0.575)
|
||||
.addProperties("immune_to_zombification"));
|
||||
.addProperties("hoglin_immune_to_zombification"));
|
||||
|
||||
register(builder(p, "piglin", EntityTypes.PIGLIN)
|
||||
.setHologramOffset(-1.0)
|
||||
|
|
Loading…
Reference in a new issue