added axolotl properties
This commit is contained in:
parent
622d6efd42
commit
beb3d21ba4
4 changed files with 16 additions and 0 deletions
|
@ -0,0 +1,9 @@
|
|||
package lol.pyr.znpcsplus.util;
|
||||
|
||||
public enum AxolotlVariant {
|
||||
LUCY,
|
||||
WILD,
|
||||
GOLD,
|
||||
CYAN,
|
||||
BLUE
|
||||
}
|
|
@ -264,6 +264,7 @@ public class ZNpcsPlus extends JavaPlugin {
|
|||
registerEnumParser(manager, VillagerType.class, incorrectUsageMessage);
|
||||
registerEnumParser(manager, VillagerProfession.class, incorrectUsageMessage);
|
||||
registerEnumParser(manager, VillagerLevel.class, incorrectUsageMessage);
|
||||
registerEnumParser(manager, AxolotlVariant.class, incorrectUsageMessage);
|
||||
|
||||
manager.registerCommand("npc", new MultiCommand(loadHelpMessage("root"))
|
||||
.addSubcommand("create", new CreateCommand(npcRegistry, typeRegistry))
|
||||
|
|
|
@ -131,6 +131,7 @@ public class PropertySetCommand implements CommandHandler {
|
|||
if (type == VillagerType.class) return context.suggestEnum(VillagerType.values());
|
||||
if (type == VillagerProfession.class) return context.suggestEnum(VillagerProfession.values());
|
||||
if (type == VillagerLevel.class) return context.suggestEnum(VillagerLevel.values());
|
||||
if (type == AxolotlVariant.class) return context.suggestEnum(AxolotlVariant.values());
|
||||
}
|
||||
else if (context.argSize() == 4) {
|
||||
if (type == BlockState.class) {
|
||||
|
|
|
@ -58,6 +58,7 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
|
|||
registerEnumSerializer(VillagerType.class);
|
||||
registerEnumSerializer(VillagerProfession.class);
|
||||
registerEnumSerializer(VillagerLevel.class);
|
||||
registerEnumSerializer(AxolotlVariant.class);
|
||||
/*
|
||||
registerType("using_item", false); // TODO: fix it for 1.8 and add new property to use offhand item and riptide animation
|
||||
|
||||
|
@ -301,6 +302,7 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
|
|||
register(new BitsetProperty("fox_faceplanted", foxIndex, 0x40));
|
||||
linkProperties("fox_sitting", "fox_crouching", "fox_sleeping", "fox_faceplanted");
|
||||
|
||||
// Bee
|
||||
int beeIndex;
|
||||
if (ver.isNewerThanOrEquals(ServerVersion.V_1_17)) beeIndex = 17;
|
||||
else beeIndex = 18;
|
||||
|
@ -315,6 +317,9 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
|
|||
register(new BooleanProperty("immune_to_zombification", zombificationIndex, false, legacyBooleans));
|
||||
|
||||
if (!ver.isNewerThanOrEquals(ServerVersion.V_1_17)) return;
|
||||
// Axolotl
|
||||
register(new EncodedIntegerProperty<>("axolotl_variant", AxolotlVariant.LUCY, 17, Enum::ordinal));
|
||||
register(new BooleanProperty("playing_dead", 18, false, legacyBooleans));
|
||||
|
||||
// Goat
|
||||
register(new BooleanProperty("has_left_horn", 18, true, legacyBooleans));
|
||||
|
|
Loading…
Reference in a new issue