3030#include " mc/world/effect/EffectDuration.h"
3131#include " mc/world/effect/MobEffectInstance.h"
3232#include " mc/world/level/BlockSource.h"
33- #include " mc/world/level/IConstBlockSource.h"
34- #include " mc/world/level/Level.h"
3533#include " mc/world/level/Spawner.h"
3634#include " mc/world/level/block/Block.h"
3735#include " mc/world/level/material/Material.h"
3836#include " mc/world/phys/AABB.h"
39- #include " mc/world/phys/HitDetection.h"
4037#include " mc/world/phys/HitResult.h"
38+ #include " mc/world/level/biome/Biome.h"
4139
4240#include < climits>
43- #include < entt/entt.hpp>
44- #include < magic_enum.hpp>
4541#include < memory>
4642
4743using magic_enum::enum_integer;
@@ -1447,7 +1443,7 @@ Local<Value> EntityClass::getBiomeId() {
14471443 Actor* actor = get ();
14481444 if (!actor) return Local<Value>();
14491445 auto & bio = actor->getDimensionBlockSource ().getBiome (actor->getFeetBlockPos ());
1450- return Number::newNumber (ll::memory::dAccess< int >(& bio, 0x80 ) );
1446+ return Number::newNumber (bio. mId );
14511447 }
14521448 CATCH (" Fail in getBiomeId!" );
14531449}
@@ -1457,7 +1453,7 @@ Local<Value> EntityClass::getBiomeName() {
14571453 Actor* actor = get ();
14581454 if (!actor) return Local<Value>();
14591455 auto & bio = actor->getDimensionBlockSource ().getBiome (actor->getFeetBlockPos ());
1460- return String::newString (ll::memory::dAccess<HashedString>(& bio, 0x08 ). getString ());
1456+ return String::newString (bio. mHash -> getString ());
14611457 }
14621458 CATCH (" Fail in getBiomeName!" );
14631459}
0 commit comments