the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 68 lines 1.0 kB view raw
1#include "stdafx.h" 2#include "BlockSourceImpl.h" 3#include "net.minecraft.world.level.h" 4#include "net.minecraft.world.level.tile.h" 5#include "net.minecraft.world.level.tile.entity.h" 6 7BlockSourceImpl::BlockSourceImpl(Level *world, int x, int y, int z) 8{ 9 this->world = world; 10 this->x = x; 11 this->y = y; 12 this->z = z; 13} 14 15Level *BlockSourceImpl::getWorld() 16{ 17 return world; 18} 19 20double BlockSourceImpl::getX() 21{ 22 return x + 0.5; 23} 24 25double BlockSourceImpl::getY() 26{ 27 return y + 0.5; 28} 29 30double BlockSourceImpl::getZ() 31{ 32 return z + 0.5; 33} 34 35int BlockSourceImpl::getBlockX() 36{ 37 return x; 38} 39 40int BlockSourceImpl::getBlockY() 41{ 42 return y; 43} 44 45int BlockSourceImpl::getBlockZ() 46{ 47 return z; 48} 49 50Tile *BlockSourceImpl::getType() 51{ 52 return Tile::tiles[world->getTile(x, y, z)]; 53} 54 55int BlockSourceImpl::getData() 56{ 57 return world->getData(x, y, z); 58} 59 60Material *BlockSourceImpl::getMaterial() 61{ 62 return world->getMaterial(x, y, z); 63} 64 65shared_ptr<TileEntity> BlockSourceImpl::getEntity() 66{ 67 return world->getTileEntity(x, y, z); 68}