the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2#include "net.minecraft.world.level.h"
3
4#include "net.minecraft.world.item.h"
5#include "SnowTile.h"
6
7SnowTile::SnowTile(int id) : Tile(id, Material::snow)
8{
9 setTicking(true);
10}
11
12
13int SnowTile::getResource(int data, Random *random, int playerBonusLevel)
14{
15 return Item::snowBall->id;
16}
17
18int SnowTile::getResourceCount(Random *random)
19{
20 return 4;
21}
22
23void SnowTile::tick(Level *level, int x, int y, int z, Random *random)
24{
25 if (level->getBrightness(LightLayer::Block, x, y, z) > 11)
26 {
27 this->spawnResources(level, x, y, z, level->getData(x, y, z), 0);
28 level->removeTile(x, y, z);
29 }
30}
31
32bool SnowTile::shouldTileTick(Level *level, int x,int y,int z)
33{
34 return level->getBrightness(LightLayer::Block, x, y, z) > 11;
35}