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.tile.h"
3#include "net.minecraft.network.packet.h"
4#include "MinecartChest.h"
5
6MinecartChest::MinecartChest(Level *level) : MinecartContainer(level)
7{
8 // 4J Stu - This function call had to be moved here from the Entity ctor to ensure that
9 // the derived version of the function is called
10 this->defineSynchedData();
11}
12
13MinecartChest::MinecartChest(Level *level, double x, double y, double z) : MinecartContainer(level, x, y, z)
14{
15 // 4J Stu - This function call had to be moved here from the Entity ctor to ensure that
16 // the derived version of the function is called
17 this->defineSynchedData();
18}
19
20// 4J Added
21int MinecartChest::getContainerType()
22{
23 return ContainerOpenPacket::MINECART_CHEST;
24}
25
26void MinecartChest::destroy(DamageSource *source)
27{
28 MinecartContainer::destroy(source);
29
30 spawnAtLocation(Tile::chest_Id, 1, 0);
31}
32
33unsigned int MinecartChest::getContainerSize()
34{
35 return 9 * 3;
36}
37
38int MinecartChest::getType()
39{
40 return TYPE_CHEST;
41}
42
43Tile *MinecartChest::getDefaultDisplayTile()
44{
45 return Tile::chest;
46}
47
48int MinecartChest::getDefaultDisplayOffset()
49{
50 return 8;
51}