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
|
@ -389,7 +389,8 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
|
||||||
final int zombificationIndex;
|
final int zombificationIndex;
|
||||||
if (ver.isNewerThanOrEquals(ServerVersion.V_1_17)) zombificationIndex = 17;
|
if (ver.isNewerThanOrEquals(ServerVersion.V_1_17)) zombificationIndex = 17;
|
||||||
else zombificationIndex = 16;
|
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;
|
if (!ver.isNewerThanOrEquals(ServerVersion.V_1_17)) return;
|
||||||
// Axolotl
|
// Axolotl
|
||||||
|
|
|
@ -132,6 +132,9 @@ public class NpcTypeImpl implements NpcType {
|
||||||
if (EntityTypes.isTypeInstanceOf(type, EntityTypes.ABSTRACT_EVO_ILLU_ILLAGER)) {
|
if (EntityTypes.isTypeInstanceOf(type, EntityTypes.ABSTRACT_EVO_ILLU_ILLAGER)) {
|
||||||
addProperties("spell");
|
addProperties("spell");
|
||||||
}
|
}
|
||||||
|
if (EntityTypes.isTypeInstanceOf(type, EntityTypes.ABSTRACT_PIGLIN)) {
|
||||||
|
addProperties("piglin_immune_to_zombification");
|
||||||
|
}
|
||||||
return new NpcTypeImpl(name, type, hologramOffset, new HashSet<>(allowedProperties), defaultProperties);
|
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)
|
register(builder(p, "hoglin", EntityTypes.HOGLIN)
|
||||||
.setHologramOffset(-0.575)
|
.setHologramOffset(-0.575)
|
||||||
.addProperties("immune_to_zombification"));
|
.addProperties("hoglin_immune_to_zombification"));
|
||||||
|
|
||||||
register(builder(p, "piglin", EntityTypes.PIGLIN)
|
register(builder(p, "piglin", EntityTypes.PIGLIN)
|
||||||
.setHologramOffset(-1.0)
|
.setHologramOffset(-1.0)
|
||||||
|
|
Loading…
Reference in a new issue