mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-07-19 00:38:15 +00:00
TU19: merge Minecraft.World/Blocks
This commit is contained in:
17
Minecraft.World/Blocks/SoulSandTile.cpp
Normal file
17
Minecraft.World/Blocks/SoulSandTile.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user