mmb.engine.block.BlockEntityDataless Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of multimachinebuilder Show documentation
Show all versions of multimachinebuilder Show documentation
Dependency for the MultiMachineBuilder, a voxel game about building an industrial empire in a finite world.
THIS RELEASE IS NOT PLAYABLE. To play the game, donwload from >ITCH.IO LINK HERE< or >GH releases link here<
The newest version!
/**
*
*/
package mmb.engine.block;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.TextNode;
import mmb.Nil;
/**
* A block entity that does not hold any data.
* @author oskar
*/
public abstract class BlockEntityDataless extends BlockEntity implements Cloneable{
@Override
public void load(@Nil JsonNode data) {
//unused
}
@Override
public final JsonNode save() {
return new TextNode(type().id());
}
@Override
public final BlockEntity blockCopy() {
return (BlockEntity) type().createBlock();
}
}