mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 09:07:48 +00:00
18 lines
564 B
C++
18 lines
564 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) {}
|
|
|
|
std::optional<AABB> SoulSandTile::getAABB(Level* level, int x, int y, int z) {
|
|
float r = 2 / 16.0f;
|
|
return AABB(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;
|
|
}
|