4jcraft/Minecraft.World/Blocks/SoulSandTile.cpp
2026-03-21 15:52:50 -05:00

17 lines
558 B
C++

#include "../Platform/stdafx.h"
#include "../Headers/net.minecraft.world.entity.h"
#include "../Headers/net.minecraft.world.phys.h"
#include "SoulSandTile.h"
SoulSandTile::SoulSandTile(int id) : Tile(id, Material::sand) {}
AABB* SoulSandTile::getAABB(Level* level, int x, int y, int z) {
float r = 2 / 16.0f;
return AABB::newTemp(x, y, z, x + 1, y + 1 - r, z + 1);
}
void SoulSandTile::entityInside(Level* level, int x, int y, int z,
std::shared_ptr<Entity> entity) {
entity->xd *= 0.4;
entity->zd *= 0.4;
}