Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,10 @@ public void registerTypes(PacketFactory packetFactory, LegacyComponentSerializer
register(new CustomTypeProperty<>("sniffer_state", 17, SnifferState.IDLING, EntityDataTypes.SNIFFER_STATE, state -> com.github.retrooper.packetevents.protocol.entity.sniffer.SnifferState.valueOf(state.name())));

if (!ver.isNewerThanOrEquals(ServerVersion.V_1_20_5)) return;

// Attribute Scale
register(new AttributeProperty(packetFactory, "scale", Attributes.SCALE));

// Armadillo
register(new CustomTypeProperty<>("armadillo_state", 17, ArmadilloState.IDLE, EntityDataTypes.ARMADILLO_STATE, state ->
com.github.retrooper.packetevents.protocol.entity.armadillo.ArmadilloState.valueOf(state.name())));
Expand Down
3 changes: 3 additions & 0 deletions plugin/src/main/java/lol/pyr/znpcsplus/npc/NpcTypeImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ public NpcTypeImpl build() {
if (!type.equals(EntityTypes.PLAYER)) addProperties("dinnerbone");
if (EntityTypes.isTypeInstanceOf(type, EntityTypes.LIVINGENTITY)) {
addProperties("health", "attribute_max_health");
if (version.isNewerThanOrEquals(ServerVersion.V_1_20_5)) {
addProperties("scale");
}
}
// TODO: make this look nicer after completing the rest of the properties
if (version.isNewerThanOrEquals(ServerVersion.V_1_9)) addProperties("glow");
Expand Down