mmb.engine.worlds.world.BlockChangeRequest 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<
/**
*
*/
package mmb.engine.worlds.world;
import mmb.NN;
import mmb.engine.block.BlockType;
import mmb.engine.worlds.MapProxy;
/**
* @author oskar
*
*/
public class BlockChangeRequest {
public final int x, y;
@NN public final BlockType block;
public BlockChangeRequest(int x, int y, BlockType block) {
super();
this.x = x;
this.y = y;
this.block = block;
}
public void apply(World that) {
block.place(x, y, that);
}
void apply0(World that) {
that.place0(block, x, y);
}
public void apply(MapProxy mp) {
mp.place(block, x, y);
}
public void applyImmediately(MapProxy mp) {
mp.placeImmediately(block, x, y);
}
}