mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 08:03:41 +00:00
28 lines
739 B
C++
28 lines
739 B
C++
#include "../../Platform/stdafx.h"
|
|
|
|
#include "ComparatorTileEntity.h"
|
|
|
|
void ComparatorTileEntity::save(CompoundTag* tag) {
|
|
TileEntity::save(tag);
|
|
tag->putInt(L"OutputSignal", output);
|
|
}
|
|
|
|
void ComparatorTileEntity::load(CompoundTag* tag) {
|
|
TileEntity::load(tag);
|
|
output = tag->getInt(L"OutputSignal");
|
|
}
|
|
|
|
int ComparatorTileEntity::getOutputSignal() { return output; }
|
|
|
|
void ComparatorTileEntity::setOutputSignal(int value) { output = value; }
|
|
|
|
// 4J Added
|
|
std::shared_ptr<TileEntity> ComparatorTileEntity::clone() {
|
|
std::shared_ptr<ComparatorTileEntity> result =
|
|
std::shared_ptr<ComparatorTileEntity>(new ComparatorTileEntity());
|
|
TileEntity::clone(result);
|
|
|
|
result->output = output;
|
|
|
|
return result;
|
|
} |