mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-24 06:15:35 +00:00
TU19: merge Minecraft.World/Blocks
This commit is contained in:
@@ -6,16 +6,6 @@
|
||||
#include "../Headers/net.minecraft.stats.h"
|
||||
#include "../Util/Facing.h"
|
||||
|
||||
/*package net.minecraft.world.level.tile;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import net.minecraft.Facing;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.*;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.phys.AABB;*/
|
||||
|
||||
HalfSlabTile::HalfSlabTile(int id, bool fullSize, Material* material)
|
||||
: Tile(id, material, fullSize) {
|
||||
this->fullSize = fullSize;
|
||||
@@ -119,3 +109,20 @@ bool HalfSlabTile::shouldRenderFace(LevelSource* level, int x, int y, int z,
|
||||
bool HalfSlabTile::isHalfSlab(int tileId) {
|
||||
return tileId == Tile::stoneSlabHalf_Id || tileId == Tile::woodSlabHalf_Id;
|
||||
}
|
||||
|
||||
int HalfSlabTile::cloneTileData(Level* level, int x, int y, int z) {
|
||||
return Tile::cloneTileData(level, x, y, z) & TYPE_MASK;
|
||||
}
|
||||
|
||||
int HalfSlabTile::cloneTileId(Level* level, int x, int y, int z) {
|
||||
if (isHalfSlab(id)) {
|
||||
return id;
|
||||
}
|
||||
if (id == Tile::stoneSlab_Id) {
|
||||
return Tile::stoneSlabHalf_Id;
|
||||
}
|
||||
if (id == Tile::woodSlab_Id) {
|
||||
return Tile::woodSlabHalf_Id;
|
||||
}
|
||||
return Tile::stoneSlabHalf_Id;
|
||||
}
|
||||
Reference in New Issue
Block a user