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 "MelonTile.h"
3#include "net.minecraft.world.item.h"
4#include "net.minecraft.world.h"
5#include "Facing.h"
6
7MelonTile::MelonTile(int id) : Tile(id, Material::vegetable)
8{
9 iconTop = NULL;
10}
11
12Icon *MelonTile::getTexture(int face, int data)
13{
14 if (face == Facing::UP || face == Facing::DOWN) return iconTop;
15 return icon;
16}
17
18int MelonTile::getResource(int data, Random *random, int playerBonusLevel)
19{
20 return Item::melon->id;
21}
22
23int MelonTile::getResourceCount(Random *random)
24{
25 return 3 + random->nextInt(5);
26}
27
28int MelonTile::getResourceCountForLootBonus(int bonusLevel, Random *random)
29{
30 int total = getResourceCount(random) + random->nextInt(1 + bonusLevel);
31 if (total > 9)
32 {
33 total = 9;
34 }
35 return total;
36}
37
38void MelonTile::registerIcons(IconRegister *iconRegister)
39{
40 icon = iconRegister->registerIcon(getIconName() + L"_side");
41 iconTop = iconRegister->registerIcon(getIconName() + L"_top");
42}