Skip to content

Commit 703361d

Browse files
authored
Fix 1.21.4 compilation
1 parent 2eb9a81 commit 703361d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎protocolCraft/src/Types/Components/DataComponents.cpp‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,14 +489,13 @@ namespace ProtocolCraft
489489
return std::make_shared<DataComponentTypeRarity>();
490490
case DataComponentTypes::Profile:
491491
return std::make_shared<DataComponentTypeResolvableProfile>();
492-
case DataComponentTypes::NoteBlockSound:
493-
return std::make_shared<DataComponentTypeIdentifier>();
494492
#if PROTOCOL_VERSION > 767 /* > 1.21.1 */
495493
case DataComponentTypes::DamageResistant:
496494
return std::make_shared<DataComponentTypeDamageResistant>();
497495
case DataComponentTypes::ItemModel:
498496
case DataComponentTypes::TooltipStyle:
499497
#endif
498+
case DataComponentTypes::NoteBlockSound:
500499
#if PROTOCOL_VERSION < 774 /* < 1.21.11 */
501500
return std::make_shared<DataComponentTypeResourceLocation>();
502501
#else
@@ -841,6 +840,8 @@ namespace ProtocolCraft
841840

842841
DEFINE_NETWORK_TYPE(HashedDataComponentPatch);
843842
#endif
843+
844+
#if PROTOCOL_VERSION > 769 /* > 1.21.4 */
844845
LengthPrefixedDataComponentPatch::LengthPrefixedDataComponentPatch(const DataComponentPatch& p)
845846
{
846847
map = p.GetMap();
@@ -935,6 +936,7 @@ namespace ProtocolCraft
935936

936937
return output;
937938
}
938-
}
939+
#endif
940+
}
939941
}
940942
#endif

0 commit comments

Comments
 (0)