blob: d5a3c79b5b7bf165dd740f5def42e209e3f0ccd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
#include "stdafx.h"
#include "BlockSourceImpl.h"
#include "net.minecraft.world.level.h"
#include "net.minecraft.world.level.tile.h"
#include "net.minecraft.world.level.tile.entity.h"
BlockSourceImpl::BlockSourceImpl(Level *world, int x, int y, int z)
{
this->world = world;
this->x = x;
this->y = y;
this->z = z;
}
Level *BlockSourceImpl::getWorld()
{
return world;
}
double BlockSourceImpl::getX()
{
return x + 0.5;
}
double BlockSourceImpl::getY()
{
return y + 0.5;
}
double BlockSourceImpl::getZ()
{
return z + 0.5;
}
int BlockSourceImpl::getBlockX()
{
return x;
}
int BlockSourceImpl::getBlockY()
{
return y;
}
int BlockSourceImpl::getBlockZ()
{
return z;
}
Tile *BlockSourceImpl::getType()
{
return Tile::tiles[world->getTile(x, y, z)];
}
int BlockSourceImpl::getData()
{
return world->getData(x, y, z);
}
Material *BlockSourceImpl::getMaterial()
{
return world->getMaterial(x, y, z);
}
shared_ptr<TileEntity> BlockSourceImpl::getEntity()
{
return world->getTileEntity(x, y, z);
}
|