Added Piglin properties
This commit is contained in:
parent
b1f87d12bd
commit
5f5ed6ccb5
2 changed files with 10 additions and 6 deletions
plugin/src/main/java/lol/pyr/znpcsplus
|
@ -128,10 +128,6 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
|
|||
registerType("shield_height", 0); // TODO: figure this out
|
||||
registerType("shulker_color", DyeColor.RED); // TODO
|
||||
|
||||
// Piglin
|
||||
registerType("piglin_dancing", false); // TODO
|
||||
registerType("piglin_charging_crossbow", false); // TODO
|
||||
|
||||
// Vindicator
|
||||
registerType("celebrating", false); // TODO
|
||||
|
||||
|
@ -440,12 +436,19 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
|
|||
|
||||
if (!ver.isNewerThanOrEquals(ServerVersion.V_1_16)) return;
|
||||
|
||||
// Hoglin and Piglin Zombification
|
||||
final int zombificationIndex;
|
||||
if (ver.isNewerThanOrEquals(ServerVersion.V_1_17)) zombificationIndex = 17;
|
||||
if (ver.isNewerThanOrEquals(ServerVersion.V_1_17)) zombificationIndex = 17; // Change piglinIndex 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));
|
||||
|
||||
// Piglin
|
||||
int piglinIndex = zombificationIndex;
|
||||
register(new BooleanProperty("piglin_baby", piglinIndex++, false, legacyBooleans));
|
||||
register(new BooleanProperty("piglin_charging_crossbow", piglinIndex++, false, legacyBooleans));
|
||||
register(new BooleanProperty("piglin_dancing", piglinIndex, false, legacyBooleans));
|
||||
|
||||
if (!ver.isNewerThanOrEquals(ServerVersion.V_1_17)) return;
|
||||
// Axolotl
|
||||
register(new EncodedIntegerProperty<>("axolotl_variant", AxolotlVariant.LUCY, 17, Enum::ordinal));
|
||||
|
|
|
@ -302,7 +302,8 @@ public class NpcTypeRegistryImpl implements NpcTypeRegistry {
|
|||
|
||||
register(builder(p, "piglin", EntityTypes.PIGLIN)
|
||||
.setHologramOffset(-1.0)
|
||||
.addEquipmentProperties());
|
||||
.addEquipmentProperties()
|
||||
.addProperties("piglin_baby", "piglin_charging_crossbow", "piglin_dancing"));
|
||||
|
||||
register(builder(p, "piglin_brute", EntityTypes.PIGLIN_BRUTE)
|
||||
.setHologramOffset(-0.025)
|
||||
|
|
Loading…
Reference in a new issue