This commit is contained in:
Anuken
2023-06-03 11:47:19 -04:00
parent 37daf0a871
commit 038994a95f
5 changed files with 17 additions and 6 deletions

View File

@@ -56,7 +56,9 @@ public class DrawOperation{
void setTile(Tile tile, byte type, short to){
editor.load(() -> {
if(type == OpType.floor.ordinal()){
tile.setFloor((Floor)content.block(to));
if(content.block(to) instanceof Floor floor){
tile.setFloor(floor);
}
}else if(type == OpType.block.ordinal()){
tile.getLinkedTiles(t -> editor.renderer.updatePoint(t.x, t.y));

View File

@@ -104,6 +104,8 @@ public enum EditorTool{
if(!Structs.inBounds(x, y, editor.width(), editor.height())) return;
Tile tile = editor.tile(x, y);
if(tile == null) return;
if(editor.drawBlock.isMultiblock()){
//don't fill multiblocks, thanks
pencil.touched(x, y);