373 if (data.size() == 0)
379 size_t length = data.size();
383 const unsigned char index = ProtocolCraft::ReadData<unsigned char>(iter, length);
389 const int type = ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length);
392 enum EntityMetadataTypes
396#if PROTOCOL_VERSION > 760
402#if PROTOCOL_VERSION > 340
409 OptionalBlockPosition,
411#if PROTOCOL_VERSION > 769
412 OptionalLivingEntityReference,
417#if PROTOCOL_VERSION > 761
420#if PROTOCOL_VERSION < 773
423#if PROTOCOL_VERSION > 340
426#if PROTOCOL_VERSION > 765
429#if PROTOCOL_VERSION > 404
434#if PROTOCOL_VERSION > 758
437#if PROTOCOL_VERSION > 774
440#if PROTOCOL_VERSION > 769
443#if PROTOCOL_VERSION > 774
446#if PROTOCOL_VERSION > 765
449#if PROTOCOL_VERSION > 769
452#if PROTOCOL_VERSION > 758
455#if PROTOCOL_VERSION > 769
458#if PROTOCOL_VERSION > 774
461#if PROTOCOL_VERSION > 769
464#if PROTOCOL_VERSION > 774
467#if PROTOCOL_VERSION > 773
468 ZombieNautilusVariant,
470#if PROTOCOL_VERSION > 758
474#if PROTOCOL_VERSION > 761
476#if PROTOCOL_VERSION > 765
479#if PROTOCOL_VERSION > 772
481 WeatheringCopperState,
485#if PROTOCOL_VERSION > 772
489#if PROTOCOL_VERSION > 773
492#if PROTOCOL_VERSION > 776
499 case EntityMetadataTypes::Char:
500 value = ProtocolCraft::ReadData<char>(iter, length);
502 case EntityMetadataTypes::Int:
503 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
505#if PROTOCOL_VERSION > 760
506 case EntityMetadataTypes::Long:
507 value =
static_cast<long long int>(ProtocolCraft::ReadData<ProtocolCraft::VarLong>(iter, length));
510 case EntityMetadataTypes::Float:
511 value = ProtocolCraft::ReadData<float>(iter, length);
513 case EntityMetadataTypes::String:
514 value = ProtocolCraft::ReadData<std::string>(iter, length);
516 case EntityMetadataTypes::Chat:
518 std::any_cast<ProtocolCraft::Chat&>(value).Read(iter, length);
520#if PROTOCOL_VERSION > 340
521 case EntityMetadataTypes::OptionalChat:
522 if (ProtocolCraft::ReadData<bool>(iter, length))
525 std::any_cast<std::optional<ProtocolCraft::Chat>&>(value).value().Read(iter, length);
529 value = std::optional<ProtocolCraft::Chat>();
533 case EntityMetadataTypes::Slot:
535 std::any_cast<ProtocolCraft::Slot&>(value).Read(iter, length);
537 case EntityMetadataTypes::Bool:
538 value = ProtocolCraft::ReadData<bool>(iter, length);
540 case EntityMetadataTypes::Rotations:
543 for (
int i = 0; i < 3; ++i)
545 rotation[i] = ProtocolCraft::ReadData<float>(iter, length);
550 case EntityMetadataTypes::BlockPosition:
557 case EntityMetadataTypes::OptionalBlockPosition:
558 if (ProtocolCraft::ReadData<bool>(iter, length))
562 value = std::optional<Position>(
position);
566 value = std::optional<Position>();
569 case EntityMetadataTypes::DirectionType:
570 value =
static_cast<Direction>(
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length)));
572#if PROTOCOL_VERSION > 769
573 case EntityMetadataTypes::OptionalLivingEntityReference:
575 case EntityMetadataTypes::OptionalUUID:
577 if (ProtocolCraft::ReadData<bool>(iter, length))
579 value = std::optional<ProtocolCraft::UUID>(ProtocolCraft::ReadData<ProtocolCraft::UUID>(iter, length));
583 value = std::optional<ProtocolCraft::UUID>();
586 case EntityMetadataTypes::BlockstateType:
587 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
589#if PROTOCOL_VERSION > 761
590 case EntityMetadataTypes::OptionalBlockstate:
591 if (
const int n = ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length))
593 value = std::optional<int>(n);
597 value = std::optional<int>();
601#if PROTOCOL_VERSION < 773
602 case EntityMetadataTypes::NBT:
605 unnamed_value.
Read(iter, length);
610#if PROTOCOL_VERSION > 340
611 case EntityMetadataTypes::Particle:
614 particle.
Read(iter, length);
619#if PROTOCOL_VERSION > 765
620 case EntityMetadataTypes::Particles:
621 value = ProtocolCraft::ReadData<std::vector<ProtocolCraft::Particle>>(iter, length);
624#if PROTOCOL_VERSION > 404
625 case EntityMetadataTypes::VillagerDataType:
627 ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length),
628 ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length),
629 ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length)
632 case EntityMetadataTypes::OptionalUint:
634 const int val = ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length);
635 value = val > 0 ? std::optional<int>(val - 1) : std::optional<int>();
638 case EntityMetadataTypes::PoseType:
639 value =
static_cast<Pose>(
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length)));
642#if PROTOCOL_VERSION > 758
643 case EntityMetadataTypes::CatVariant:
644 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
647#if PROTOCOL_VERSION > 774
648 case EntityMetadataTypes::CatSoundVariant:
649 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
652#if PROTOCOL_VERSION > 769
653 case EntityMetadataTypes::CowVariant:
654 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
657#if PROTOCOL_VERSION > 774
658 case EntityMetadataTypes::CowSoundVariant:
659 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
662#if PROTOCOL_VERSION > 765
663 case EntityMetadataTypes::WolfVariant:
664 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
667#if PROTOCOL_VERSION > 769
668 case EntityMetadataTypes::WolfSoundVariant:
669 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
672#if PROTOCOL_VERSION > 758
673 case EntityMetadataTypes::FrogVariant:
674 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
677#if PROTOCOL_VERSION > 769
678 case EntityMetadataTypes::PigVariant:
679 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
682#if PROTOCOL_VERSION > 774
683 case EntityMetadataTypes::PigSoundVariant:
684 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
687#if PROTOCOL_VERSION > 769
688 case EntityMetadataTypes::ChickenVariant:
689 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
692#if PROTOCOL_VERSION > 774
693 case EntityMetadataTypes::ChickenSoundVariant:
694 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
697#if PROTOCOL_VERSION > 773
698 case EntityMetadataTypes::ZombieNautilusVariant:
699 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
702#if PROTOCOL_VERSION > 758
703 case EntityMetadataTypes::OptionalGlobalPos:
704 if (ProtocolCraft::ReadData<bool>(iter, length))
707 dimension.
Read(iter, length);
709 pos.
Read(iter, length);
711 value = std::optional<GlobalPos>({
718 value = std::optional<GlobalPos>();
721 case EntityMetadataTypes::PaintingVariant:
722 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
725#if PROTOCOL_VERSION > 761
726 case EntityMetadataTypes::SnifferState:
727 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
729#if PROTOCOL_VERSION > 765
730 case EntityMetadataTypes::ArmadilloState:
731 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
734#if PROTOCOL_VERSION > 772
735 case EntityMetadataTypes::CopperGolemState:
736 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
738 case EntityMetadataTypes::WeatheringCopperState:
739 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
742 case EntityMetadataTypes::Vec3:
744 const float x = ProtocolCraft::ReadData<float>(iter, length);
745 const float y = ProtocolCraft::ReadData<float>(iter, length);
746 const float z = ProtocolCraft::ReadData<float>(iter, length);
750 case EntityMetadataTypes::Quaternion:
752 const float x = ProtocolCraft::ReadData<float>(iter, length);
753 const float y = ProtocolCraft::ReadData<float>(iter, length);
754 const float z = ProtocolCraft::ReadData<float>(iter, length);
755 const float w = ProtocolCraft::ReadData<float>(iter, length);
756 value = std::array<float, 4>{x, y, z, w};
760#if PROTOCOL_VERSION > 772
761 case EntityMetadataTypes::ResolvableProfile:
762 value = ProtocolCraft::ReadData<ProtocolCraft::Components::DataComponentTypeResolvableProfile>(iter, length);
765#if PROTOCOL_VERSION > 773
766 case EntityMetadataTypes::HumanoidArm:
767 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
770#if PROTOCOL_VERSION > 776
771 case EntityMetadataTypes::DyeColor:
772 value =
static_cast<int>(ProtocolCraft::ReadData<ProtocolCraft::VarInt>(iter, length));
776 LOG_ERROR(
"Unknown type in entity metadata : " << type <<
".Stopping current metadata parsing.");
1586#if PROTOCOL_VERSION > 758
1588 return std::make_shared<AllayEntity>();
1591 return std::make_shared<AreaEffectCloudEntity>();
1592#if PROTOCOL_VERSION > 765
1594 return std::make_shared<ArmadilloEntity>();
1597 return std::make_shared<ArmorStandEntity>();
1599 return std::make_shared<ArrowEntity>();
1600#if PROTOCOL_VERSION > 754
1602 return std::make_shared<AxolotlEntity>();
1605 return std::make_shared<BatEntity>();
1606#if PROTOCOL_VERSION > 498
1608 return std::make_shared<BeeEntity>();
1611 return std::make_shared<BlazeEntity>();
1612#if PROTOCOL_VERSION < 768
1613 case EntityType::Boat:
1614 return std::make_shared<BoatEntity>();
1625 return std::make_shared<BoatEntity>(type);
1627#if PROTOCOL_VERSION > 765
1629 return std::make_shared<BoggedEntity>();
1631#if PROTOCOL_VERSION > 764
1633 return std::make_shared<BreezeEntity>();
1635#if PROTOCOL_VERSION > 765
1637 return std::make_shared<BreezeWindChargeEntity>();
1639#if PROTOCOL_VERSION > 758
1640#if PROTOCOL_VERSION < 768
1641 case EntityType::ChestBoat:
1642 return std::make_shared<ChestBoatEntity>();
1653 return std::make_shared<ChestBoatEntity>(type);
1656#if PROTOCOL_VERSION > 767
1658 return std::make_shared<ChestRaftEntity>(type);
1660#if PROTOCOL_VERSION > 404
1662 return std::make_shared<CatEntity>();
1664#if PROTOCOL_VERSION > 760
1666 return std::make_shared<CamelEntity>();
1668#if PROTOCOL_VERSION > 773
1670 return std::make_shared<CamelHuskEntity>();
1673 return std::make_shared<CaveSpiderEntity>();
1675 return std::make_shared<ChickenEntity>();
1676#if PROTOCOL_VERSION > 340
1678 return std::make_shared<CodEntity>();
1680#if PROTOCOL_VERSION > 772
1682 return std::make_shared<CopperGolemEntity>();
1685 return std::make_shared<CowEntity>();
1686#if PROTOCOL_VERSION > 767
1688 return std::make_shared<CreakingEntity>();
1690#if PROTOCOL_VERSION > 767 && PROTOCOL_VERSION < 769
1691 case EntityType::CreakingTransient:
1692 return std::make_shared<CreakingTransientEntity>();
1695 return std::make_shared<CreeperEntity>();
1696#if PROTOCOL_VERSION > 776
1698 return std::make_shared<CushionEntity>();
1700#if PROTOCOL_VERSION > 761
1702 return std::make_shared<DisplayBlockDisplayEntity>();
1704 return std::make_shared<DisplayItemDisplayEntity>();
1706 return std::make_shared<DisplayTextDisplayEntity>();
1708#if PROTOCOL_VERSION > 340
1710 return std::make_shared<DolphinEntity>();
1713 return std::make_shared<DonkeyEntity>();
1715 return std::make_shared<DragonFireballEntity>();
1716#if PROTOCOL_VERSION > 340
1718 return std::make_shared<DrownedEntity>();
1721 return std::make_shared<ElderGuardianEntity>();
1723 return std::make_shared<EndCrystalEntity>();
1725 return std::make_shared<EnderDragonEntity>();
1727 return std::make_shared<EnderManEntity>();
1729 return std::make_shared<EndermiteEntity>();
1731 return std::make_shared<EvokerEntity>();
1733 return std::make_shared<EvokerFangsEntity>();
1735 return std::make_shared<ExperienceOrbEntity>();
1737 return std::make_shared<EyeOfEnderEntity>();
1739 return std::make_shared<FallingBlockEntity>();
1741 return std::make_shared<FireworkRocketEntity>();
1742#if PROTOCOL_VERSION > 404
1744 return std::make_shared<FoxEntity>();
1746#if PROTOCOL_VERSION > 758
1748 return std::make_shared<FrogEntity>();
1751 return std::make_shared<GhastEntity>();
1752#if PROTOCOL_VERSION > 770
1754 return std::make_shared<HappyGhastEntity>();
1757 return std::make_shared<GiantEntity>();
1758#if PROTOCOL_VERSION > 754
1760 return std::make_shared<GlowItemFrameEntity>();
1762 return std::make_shared<GlowSquidEntity>();
1764 return std::make_shared<GoatEntity>();
1767 return std::make_shared<GuardianEntity>();
1768#if PROTOCOL_VERSION > 578
1770 return std::make_shared<HoglinEntity>();
1773 return std::make_shared<HorseEntity>();
1775 return std::make_shared<HuskEntity>();
1777 return std::make_shared<IllusionerEntity>();
1778#if PROTOCOL_VERSION > 761
1780 return std::make_shared<InteractionEntity>();
1783 return std::make_shared<IronGolemEntity>();
1785 return std::make_shared<ItemEntity>();
1787 return std::make_shared<ItemFrameEntity>();
1788#if PROTOCOL_VERSION > 765
1790 return std::make_shared<OminousItemSpawnerEntity>();
1793 return std::make_shared<LargeFireballEntity>();
1795 return std::make_shared<LeashFenceKnotEntity>();
1796#if PROTOCOL_VERSION > 340
1798 return std::make_shared<LightningBoltEntity>();
1801 return std::make_shared<LlamaEntity>();
1803 return std::make_shared<LlamaSpitEntity>();
1805 return std::make_shared<MagmaCubeEntity>();
1806#if PROTOCOL_VERSION > 772
1808 return std::make_shared<MannequinEntity>();
1810#if PROTOCOL_VERSION > 754
1812 return std::make_shared<MarkerEntity>();
1815 return std::make_shared<MinecartEntity>();
1817 return std::make_shared<MinecartChestEntity>();
1819 return std::make_shared<MinecartCommandBlockEntity>();
1821 return std::make_shared<MinecartFurnaceEntity>();
1823 return std::make_shared<MinecartHopperEntity>();
1825 return std::make_shared<MinecartSpawnerEntity>();
1827 return std::make_shared<MinecartTNTEntity>();
1829 return std::make_shared<MuleEntity>();
1830#if PROTOCOL_VERSION > 773
1832 return std::make_shared<NautilusEntity>();
1835 return std::make_shared<MushroomCowEntity>();
1837 return std::make_shared<OcelotEntity>();
1839 return std::make_shared<PaintingEntity>();
1840#if PROTOCOL_VERSION > 404
1842 return std::make_shared<PandaEntity>();
1844#if PROTOCOL_VERSION > 773
1846 return std::make_shared<ParchedEntity>();
1849 return std::make_shared<ParrotEntity>();
1850#if PROTOCOL_VERSION > 340
1852 return std::make_shared<PhantomEntity>();
1855 return std::make_shared<PigEntity>();
1856#if PROTOCOL_VERSION > 578
1858 return std::make_shared<PiglinEntity>();
1860#if PROTOCOL_VERSION > 736
1862 return std::make_shared<PiglinBruteEntity>();
1864#if PROTOCOL_VERSION > 404
1866 return std::make_shared<PillagerEntity>();
1869 return std::make_shared<PolarBearEntity>();
1870#if PROTOCOL_VERSION > 776
1877 return std::make_shared<PrimedTntEntity>();
1878#if PROTOCOL_VERSION > 340
1880 return std::make_shared<PufferfishEntity>();
1883 return std::make_shared<RabbitEntity>();
1884#if PROTOCOL_VERSION > 767
1886 return std::make_shared<RaftEntity>(type);
1888#if PROTOCOL_VERSION > 404
1890 return std::make_shared<RavagerEntity>();
1892#if PROTOCOL_VERSION > 340
1894 return std::make_shared<SalmonEntity>();
1897 return std::make_shared<SheepEntity>();
1899 return std::make_shared<ShulkerEntity>();
1901 return std::make_shared<ShulkerBulletEntity>();
1903 return std::make_shared<SilverfishEntity>();
1905 return std::make_shared<SkeletonEntity>();
1907 return std::make_shared<SkeletonHorseEntity>();
1909 return std::make_shared<SlimeEntity>();
1911 return std::make_shared<SmallFireballEntity>();
1912#if PROTOCOL_VERSION > 761
1914 return std::make_shared<SnifferEntity>();
1917 return std::make_shared<SnowGolemEntity>();
1919 return std::make_shared<SnowballEntity>();
1921 return std::make_shared<SpectralArrowEntity>();
1923 return std::make_shared<SpiderEntity>();
1925 return std::make_shared<SquidEntity>();
1927 return std::make_shared<StrayEntity>();
1928#if PROTOCOL_VERSION > 578
1930 return std::make_shared<StriderEntity>();
1932#if PROTOCOL_VERSION > 775
1934 return std::make_shared<SulfurCubeEntity>();
1936#if PROTOCOL_VERSION > 758
1938 return std::make_shared<TadpoleEntity>();
1941 return std::make_shared<ThrownEggEntity>();
1943 return std::make_shared<ThrownEnderpearlEntity>();
1945 return std::make_shared<ThrownExperienceBottleEntity>();
1946#if PROTOCOL_VERSION < 770
1947 case EntityType::ThrownPotion:
1948 return std::make_shared<ThrownPotionEntity>();
1951 return std::make_shared<ThrownSplashPotionEntity>();
1953 return std::make_shared<ThrownLingeringPotionEntity>();
1955#if PROTOCOL_VERSION > 340
1957 return std::make_shared<ThrownTridentEntity>();
1959#if PROTOCOL_VERSION > 404
1961 return std::make_shared<TraderLlamaEntity>();
1963#if PROTOCOL_VERSION > 340
1965 return std::make_shared<TropicalFishEntity>();
1967#if PROTOCOL_VERSION > 340
1969 return std::make_shared<TurtleEntity>();
1972 return std::make_shared<VexEntity>();
1974 return std::make_shared<VillagerEntity>();
1976 return std::make_shared<VindicatorEntity>();
1977#if PROTOCOL_VERSION > 404
1979 return std::make_shared<WanderingTraderEntity>();
1981#if PROTOCOL_VERSION > 758
1983 return std::make_shared<WardenEntity>();
1985#if PROTOCOL_VERSION > 764
1987 return std::make_shared<WindChargeEntity>();
1990 return std::make_shared<WitchEntity>();
1992 return std::make_shared<WitherBossEntity>();
1994 return std::make_shared<WitherSkeletonEntity>();
1996 return std::make_shared<WitherSkullEntity>();
1998 return std::make_shared<WolfEntity>();
1999#if PROTOCOL_VERSION > 578
2001 return std::make_shared<ZoglinEntity>();
2004 return std::make_shared<ZombieEntity>();
2006 return std::make_shared<ZombieHorseEntity>();
2007#if PROTOCOL_VERSION > 773
2009 return std::make_shared<ZombieNautilusEntity>();
2012 return std::make_shared<ZombieVillagerEntity>();
2013#if PROTOCOL_VERSION > 578
2015 return std::make_shared<ZombifiedPiglinEntity>();
2017 case EntityType::PigZombie:
2018 return std::make_shared<PigZombieEntity>();
2021 return std::make_shared<PlayerEntity>();
2022#if PROTOCOL_VERSION > 340
2024 return std::make_shared<FishingHookEntity>();
2103 std::scoped_lock<std::shared_mutex> lock(
entity_mutex);
2108 faces = std::vector<Renderer::Face>(6);
2111 for (
int i = 0; i < 6; ++i)
2119 face_descriptors[i].transformations.scales.push_back(std::make_shared<Renderer::Scale>(
2120 static_cast<float>(half_width),
2121 static_cast<float>(half_height),
2122 static_cast<float>(half_width)
2125 face_descriptors[i].transformations.translations.push_back(std::make_shared<Renderer::Translation>(0.0f,
static_cast<float>(half_height), 0.0f));
2127 face_descriptors[i].transformations.translations.push_back(std::make_shared<Renderer::Translation>(
2133 face_descriptors[i].transformations.rotations.push_back(std::make_shared<Renderer::Rotation>(0.0f, 1.0f, 0.0f,
yaw));
2134 face_descriptors[i].transformations.rotations.push_back(std::make_shared<Renderer::Rotation>(1.0f, 0.0f, 0.0f,
pitch));
2139 faces[i].SetDisplayBackface(
false);
2140 faces[i].SetTextureMultipliers({ 0xFFFFFFFF, 0xFFFFFFFF });
2143 std::array<unsigned short, 4> texture_pos = { 0, 0, 0, 0 };
2144 std::array<unsigned short, 4> texture_size = { 0, 0, 0, 0 };
2148 for (
int j = 0; j < std::min(2, static_cast<int>(
face_descriptors[i].texture_names.size())); ++j)
2151 std::tie(texture_pos[2 * j + 0], texture_pos[2 * j + 1]) = texture_data.
position;
2152 std::tie(texture_size[2 * j + 0], texture_size[2 * j + 1]) = texture_data.
size;
2158 std::array<float, 4> coords =
faces[i].GetTextureCoords(
false);
2160 coords[0] = (texture_pos[0] + coords[0] / 16.0f * texture_size[0]) / atlas->
GetWidth();
2161 coords[1] = (texture_pos[1] + coords[1] / 16.0f * height_normalizer) / atlas->
GetHeight();
2162 coords[2] = (texture_pos[0] + coords[2] / 16.0f * texture_size[0]) / atlas->
GetWidth();
2163 coords[3] = (texture_pos[1] + coords[3] / 16.0f * height_normalizer) / atlas->
GetHeight();
2164 faces[i].SetTextureCoords(coords,
false);
2169 coords =
faces[i].GetTextureCoords(
true);
2171 coords[0] = (texture_pos[2] + coords[0] / 16.0f * texture_size[2]) / atlas->
GetWidth();
2172 coords[1] = (texture_pos[3] + coords[1] / 16.0f * height_normalizer) / atlas->
GetHeight();
2173 coords[2] = (texture_pos[2] + coords[2] / 16.0f * texture_size[2]) / atlas->
GetWidth();
2174 coords[3] = (texture_pos[3] + coords[3] / 16.0f * height_normalizer) / atlas->
GetHeight();
2175 faces[i].SetTextureCoords(coords,
true);
2178 faces[i].SetTransparencyData(transparencies[0]);