Source reformat
This commit is contained in:
@@ -2,9 +2,7 @@ package io.anuke.mindustry.input;
|
||||
|
||||
import io.anuke.arc.Application.ApplicationType;
|
||||
import io.anuke.arc.Core;
|
||||
import io.anuke.arc.KeyBinds.Axis;
|
||||
import io.anuke.arc.KeyBinds.KeyBind;
|
||||
import io.anuke.arc.KeyBinds.KeybindValue;
|
||||
import io.anuke.arc.KeyBinds.*;
|
||||
import io.anuke.arc.input.InputDevice.DeviceType;
|
||||
import io.anuke.arc.input.KeyCode;
|
||||
|
||||
@@ -37,9 +35,22 @@ public enum Binding implements KeyBind{
|
||||
private final KeybindValue defaultValue;
|
||||
private final String category;
|
||||
|
||||
Binding(KeybindValue defaultValue, String category){ this.defaultValue = defaultValue; this.category = category; }
|
||||
Binding(KeybindValue defaultValue){ this(defaultValue, null); }
|
||||
Binding(KeybindValue defaultValue, String category){
|
||||
this.defaultValue = defaultValue;
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
@Override public KeybindValue defaultValue(DeviceType type){ return defaultValue; }
|
||||
@Override public String category(){ return category; }
|
||||
Binding(KeybindValue defaultValue){
|
||||
this(defaultValue, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KeybindValue defaultValue(DeviceType type){
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String category(){
|
||||
return category;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,34 +21,35 @@ import static io.anuke.mindustry.Vars.*;
|
||||
import static io.anuke.mindustry.input.PlaceMode.*;
|
||||
|
||||
public class DesktopInput extends InputHandler{
|
||||
/**Current cursor type.*/
|
||||
/** Current cursor type. */
|
||||
private Cursor cursorType = SystemCursor.arrow;
|
||||
|
||||
/**Position where the player started dragging a line.*/
|
||||
/** Position where the player started dragging a line. */
|
||||
private int selectX, selectY;
|
||||
/**Whether selecting mode is active.*/
|
||||
/** Whether selecting mode is active. */
|
||||
private PlaceMode mode;
|
||||
/**Animation scale for line.*/
|
||||
/** Animation scale for line. */
|
||||
private float selectScale;
|
||||
|
||||
private int prevX, prevY, prevRotation;
|
||||
|
||||
/**Draws a placement icon for a specific block.*/
|
||||
/** Draws a placement icon for a specific block. */
|
||||
void drawPlace(int x, int y, Block block, int rotation, int prevX, int prevY, int prevRotation){
|
||||
if(validPlace(x, y, block, rotation)){
|
||||
block.getPlaceDraw(placeDraw, rotation, prevX, prevY, prevRotation);
|
||||
|
||||
Draw.color();
|
||||
Draw.rect(placeDraw.region, x * tilesize + block.offset(), y * tilesize + block.offset(),
|
||||
placeDraw.region.getWidth() * selectScale * Draw.scl * placeDraw.scalex,
|
||||
placeDraw.region.getHeight() * selectScale * Draw.scl * placeDraw.scaley,
|
||||
block.rotate ? placeDraw.rotation * 90 : 0);
|
||||
placeDraw.region.getWidth() * selectScale * Draw.scl * placeDraw.scalex,
|
||||
placeDraw.region.getHeight() * selectScale * Draw.scl * placeDraw.scaley,
|
||||
block.rotate ? placeDraw.rotation * 90 : 0);
|
||||
|
||||
Draw.color(Pal.accent);
|
||||
for(int i = 0; i < 4; i++){
|
||||
Point2 p = Geometry.d8edge[i];
|
||||
float offset = -Math.max(block.size-1, 0)/2f * tilesize;
|
||||
if(i % 2 == 0)Draw.rect("block-select", x * tilesize + block.offset() + offset * p.x, y * tilesize + block.offset() + offset * p.y, i * 90);
|
||||
float offset = -Math.max(block.size - 1, 0) / 2f * tilesize;
|
||||
if(i % 2 == 0)
|
||||
Draw.rect("block-select", x * tilesize + block.offset() + offset * p.x, y * tilesize + block.offset() + offset * p.y, i * 90);
|
||||
}
|
||||
Draw.color();
|
||||
}else{
|
||||
@@ -98,7 +99,7 @@ public class DesktopInput extends InputHandler{
|
||||
tile = tile.target();
|
||||
|
||||
Draw.color(Pal.removeBack);
|
||||
Lines.square(tile.drawx(), tile.drawy()-1, tile.block().size * tilesize / 2f - 1);
|
||||
Lines.square(tile.drawx(), tile.drawy() - 1, tile.block().size * tilesize / 2f - 1);
|
||||
Draw.color(Pal.remove);
|
||||
Lines.square(tile.drawx(), tile.drawy(), tile.block().size * tilesize / 2f - 1);
|
||||
}
|
||||
@@ -161,7 +162,7 @@ public class DesktopInput extends InputHandler{
|
||||
selectScale = 0f;
|
||||
}
|
||||
|
||||
rotation = Mathf.mod(rotation + (int) Core.input.axisTap(Binding.rotate), 4);
|
||||
rotation = Mathf.mod(rotation + (int)Core.input.axisTap(Binding.rotate), 4);
|
||||
|
||||
Tile cursor = tileAt(Core.input.mouseX(), Core.input.mouseY());
|
||||
|
||||
@@ -206,8 +207,8 @@ public class DesktopInput extends InputHandler{
|
||||
mode = placing;
|
||||
}else if(selected != null){
|
||||
//only begin shooting if there's no cursor event
|
||||
if (!tileTapped(selected) && !tryTapPlayer(Core.input.mouseWorld().x, Core.input.mouseWorld().y) && player.getPlaceQueue().size == 0 && !droppingItem &&
|
||||
!tryBeginMine(selected) && player.getMineTile() == null && !ui.chatfrag.chatOpen()) {
|
||||
if(!tileTapped(selected) && !tryTapPlayer(Core.input.mouseWorld().x, Core.input.mouseWorld().y) && player.getPlaceQueue().size == 0 && !droppingItem &&
|
||||
!tryBeginMine(selected) && player.getMineTile() == null && !ui.chatfrag.chatOpen()){
|
||||
player.isShooting = true;
|
||||
}
|
||||
}else if(!ui.chatfrag.chatOpen()){ //if it's out of bounds, shooting is just fine
|
||||
|
||||
@@ -29,19 +29,17 @@ import io.anuke.mindustry.net.ValidateException;
|
||||
import io.anuke.mindustry.type.Item;
|
||||
import io.anuke.mindustry.type.ItemStack;
|
||||
import io.anuke.mindustry.ui.fragments.OverlayFragment;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.Build;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.*;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
public abstract class InputHandler implements InputProcessor{
|
||||
/**Used for dropping items.*/
|
||||
/** Used for dropping items. */
|
||||
final static float playerSelectRange = mobile ? 17f : 11f;
|
||||
/**Maximum line length.*/
|
||||
/** Maximum line length. */
|
||||
final static int maxLength = 100;
|
||||
final static Vector2 stackTrns = new Vector2();
|
||||
/**Distance on the back from where items originate.*/
|
||||
/** Distance on the back from where items originate. */
|
||||
final static float backTrns = 3f;
|
||||
|
||||
public final OverlayFragment frag = new OverlayFragment(this);
|
||||
@@ -91,17 +89,17 @@ public abstract class InputHandler implements InputProcessor{
|
||||
tile.block().getStackOffset(item, tile, stackTrns);
|
||||
|
||||
ItemTransfer.create(item,
|
||||
player.x + Angles.trnsx(player.rotation + 180f, backTrns), player.y + Angles.trnsy(player.rotation + 180f, backTrns),
|
||||
new Vector2(tile.drawx() + stackTrns.x, tile.drawy() + stackTrns.y), () -> {
|
||||
if(tile.block() != block || tile.entity == null || tile.entity.items == null) return;
|
||||
player.x + Angles.trnsx(player.rotation + 180f, backTrns), player.y + Angles.trnsy(player.rotation + 180f, backTrns),
|
||||
new Vector2(tile.drawx() + stackTrns.x, tile.drawy() + stackTrns.y), () -> {
|
||||
if(tile.block() != block || tile.entity == null || tile.entity.items == null) return;
|
||||
|
||||
tile.block().handleStack(item, removed, tile, player);
|
||||
remaining[1] -= removed;
|
||||
tile.block().handleStack(item, removed, tile, player);
|
||||
remaining[1] -= removed;
|
||||
|
||||
if(end && remaining[1] > 0){
|
||||
tile.block().handleStack(item, remaining[1], tile, player);
|
||||
}
|
||||
});
|
||||
if(end && remaining[1] > 0){
|
||||
tile.block().handleStack(item, remaining[1], tile, player);
|
||||
}
|
||||
});
|
||||
|
||||
remaining[0] -= removed;
|
||||
|
||||
@@ -154,7 +152,7 @@ public abstract class InputHandler implements InputProcessor{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**Handles tile tap events that are not platform specific.*/
|
||||
/** Handles tile tap events that are not platform specific. */
|
||||
boolean tileTapped(Tile tile){
|
||||
tile = tile.target();
|
||||
|
||||
@@ -164,8 +162,8 @@ public abstract class InputHandler implements InputProcessor{
|
||||
if(tile.block().configurable && tile.interactable(player.getTeam())){
|
||||
consumed = true;
|
||||
if(((!frag.config.isShown() && tile.block().shouldShowConfigure(tile, player)) //if the config fragment is hidden, show
|
||||
//alternatively, the current selected block can 'agree' to switch config tiles
|
||||
|| (frag.config.isShown() && frag.config.getSelectedTile().block().onConfigureTileTapped(frag.config.getSelectedTile(), tile)))){
|
||||
//alternatively, the current selected block can 'agree' to switch config tiles
|
||||
|| (frag.config.isShown() && frag.config.getSelectedTile().block().onConfigureTileTapped(frag.config.getSelectedTile(), tile)))){
|
||||
frag.config.showConfig(tile);
|
||||
}
|
||||
//otherwise...
|
||||
@@ -210,7 +208,7 @@ public abstract class InputHandler implements InputProcessor{
|
||||
return consumed;
|
||||
}
|
||||
|
||||
/**Tries to select the player to drop off items, returns true if successful.*/
|
||||
/** Tries to select the player to drop off items, returns true if successful. */
|
||||
boolean tryTapPlayer(float x, float y){
|
||||
if(canTapPlayer(x, y)){
|
||||
droppingItem = true;
|
||||
@@ -223,7 +221,7 @@ public abstract class InputHandler implements InputProcessor{
|
||||
return Mathf.dst(x, y, player.x, player.y) <= playerSelectRange && player.item().amount > 0;
|
||||
}
|
||||
|
||||
/**Tries to begin mining a tile, returns true if successful.*/
|
||||
/** Tries to begin mining a tile, returns true if successful. */
|
||||
boolean tryBeginMine(Tile tile){
|
||||
if(canMine(tile)){
|
||||
//if a block is clicked twice, reset it
|
||||
@@ -235,13 +233,13 @@ public abstract class InputHandler implements InputProcessor{
|
||||
|
||||
boolean canMine(Tile tile){
|
||||
return !Core.scene.hasMouse()
|
||||
&& tile.drop() != null && tile.drop().hardness <= player.mech.drillPower
|
||||
&& !(tile.floor().playerUnmineable && tile.ore() == Blocks.air)
|
||||
&& player.acceptsItem(tile.drop())
|
||||
&& tile.block() == Blocks.air && player.dst(tile.worldx(), tile.worldy()) <= Player.mineDistance;
|
||||
&& tile.drop() != null && tile.drop().hardness <= player.mech.drillPower
|
||||
&& !(tile.floor().playerUnmineable && tile.ore() == Blocks.air)
|
||||
&& player.acceptsItem(tile.drop())
|
||||
&& tile.block() == Blocks.air && player.dst(tile.worldx(), tile.worldy()) <= Player.mineDistance;
|
||||
}
|
||||
|
||||
/**Returns the tile at the specified MOUSE coordinates.*/
|
||||
/** Returns the tile at the specified MOUSE coordinates. */
|
||||
Tile tileAt(float x, float y){
|
||||
return world.tile(tileX(x), tileY(y));
|
||||
}
|
||||
@@ -374,7 +372,7 @@ public abstract class InputHandler implements InputProcessor{
|
||||
for(int i = 0; i < points.size; i++){
|
||||
Point2 point = points.get(i);
|
||||
|
||||
if(block != null && Tmp.r2.setSize(block.size * tilesize).setCenter(point.x*tilesize + block.offset(), point.y*tilesize + block.offset()).overlaps(Tmp.r3)){
|
||||
if(block != null && Tmp.r2.setSize(block.size * tilesize).setCenter(point.x * tilesize + block.offset(), point.y * tilesize + block.offset()).overlaps(Tmp.r3)){
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -385,7 +383,7 @@ public abstract class InputHandler implements InputProcessor{
|
||||
line.last = next == null;
|
||||
cons.accept(line);
|
||||
|
||||
Tmp.r3.setSize(block.size * tilesize).setCenter(point.x*tilesize + block.offset(), point.y*tilesize + block.offset());
|
||||
Tmp.r3.setSize(block.size * tilesize).setCenter(point.x * tilesize + block.offset(), point.y * tilesize + block.offset());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,24 +4,17 @@ import io.anuke.arc.Core;
|
||||
import io.anuke.arc.collection.Array;
|
||||
import io.anuke.arc.function.BooleanProvider;
|
||||
import io.anuke.arc.graphics.Color;
|
||||
import io.anuke.arc.graphics.g2d.Draw;
|
||||
import io.anuke.arc.graphics.g2d.Lines;
|
||||
import io.anuke.arc.graphics.g2d.TextureRegion;
|
||||
import io.anuke.arc.graphics.g2d.*;
|
||||
import io.anuke.arc.input.GestureDetector;
|
||||
import io.anuke.arc.input.GestureDetector.GestureListener;
|
||||
import io.anuke.arc.input.KeyCode;
|
||||
import io.anuke.arc.math.Interpolation;
|
||||
import io.anuke.arc.math.Mathf;
|
||||
import io.anuke.arc.math.geom.Geometry;
|
||||
import io.anuke.arc.math.geom.Point2;
|
||||
import io.anuke.arc.math.geom.Rectangle;
|
||||
import io.anuke.arc.math.geom.Vector2;
|
||||
import io.anuke.arc.math.geom.*;
|
||||
import io.anuke.arc.scene.actions.Actions;
|
||||
import io.anuke.arc.scene.event.Touchable;
|
||||
import io.anuke.arc.scene.ui.layout.Table;
|
||||
import io.anuke.arc.util.Align;
|
||||
import io.anuke.arc.util.Time;
|
||||
import io.anuke.arc.util.Tmp;
|
||||
import io.anuke.arc.util.*;
|
||||
import io.anuke.mindustry.content.Blocks;
|
||||
import io.anuke.mindustry.content.Fx;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
@@ -60,7 +53,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
/** Animation data for crosshair. */
|
||||
private float crosshairScale;
|
||||
private TargetTrait lastTarget;
|
||||
/** Used for shifting build requests.*/
|
||||
/** Used for shifting build requests. */
|
||||
private float shiftDeltaX, shiftDeltaY;
|
||||
|
||||
/** List of currently selected tiles to place. */
|
||||
@@ -173,7 +166,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
Core.scene.table("guideDim", t -> {
|
||||
t.margin(10f);
|
||||
t.touchable(Touchable.disabled);
|
||||
t.top().table("button", s -> s.add("$"+type).growX().wrap().labelAlign(Align.center, Align.center)).growX();
|
||||
t.top().table("button", s -> s.add("$" + type).growX().wrap().labelAlign(Align.center, Align.center)).growX();
|
||||
t.update(() -> {
|
||||
if((done.get() || state.is(State.menu)) && t.getUserObject() == null){
|
||||
t.actions(Actions.delay(1f), Actions.fadeOut(1f, Interpolation.fade), Actions.remove());
|
||||
@@ -187,11 +180,11 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
}
|
||||
|
||||
boolean isLinePlacing(){
|
||||
return mode == placing && lineMode && Mathf.dst(lineStartX * tilesize, lineStartY * tilesize, Core.input.mouseWorld().x, Core.input.mouseWorld().y) >= 3*tilesize;
|
||||
return mode == placing && lineMode && Mathf.dst(lineStartX * tilesize, lineStartY * tilesize, Core.input.mouseWorld().x, Core.input.mouseWorld().y) >= 3 * tilesize;
|
||||
}
|
||||
|
||||
boolean isAreaBreaking(){
|
||||
return mode == breaking && lineMode && Mathf.dst(lineStartX * tilesize, lineStartY * tilesize, Core.input.mouseWorld().x, Core.input.mouseWorld().y) >= 2*tilesize;
|
||||
return mode == breaking && lineMode && Mathf.dst(lineStartX * tilesize, lineStartY * tilesize, Core.input.mouseWorld().x, Core.input.mouseWorld().y) >= 2 * tilesize;
|
||||
}
|
||||
|
||||
//endregion
|
||||
@@ -222,10 +215,11 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
Draw.mixcol(Pal.accent, 1f);
|
||||
for(int i = 0; i < 4; i++){
|
||||
Point2 p = Geometry.d8edge[i];
|
||||
float poffset = -Math.max(request.block.size-1, 0)/2f * tilesize;
|
||||
float poffset = -Math.max(request.block.size - 1, 0) / 2f * tilesize;
|
||||
TextureRegion find = Core.atlas.find("block-select");
|
||||
if(i%2 == 0) Draw.rect("block-select", request.tile().x * tilesize + request.block.offset() + poffset * p.x, request.tile().y * tilesize + request.block.offset() + poffset * p.y,
|
||||
find.getWidth() * Draw.scl * request.scale, find.getHeight() * Draw.scl * request.scale, i * 90);
|
||||
if(i % 2 == 0)
|
||||
Draw.rect("block-select", request.tile().x * tilesize + request.block.offset() + poffset * p.x, request.tile().y * tilesize + request.block.offset() + poffset * p.y,
|
||||
find.getWidth() * Draw.scl * request.scale, find.getHeight() * Draw.scl * request.scale, i * 90);
|
||||
}
|
||||
Draw.color();
|
||||
}else{
|
||||
@@ -235,13 +229,13 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
Draw.mixcol();
|
||||
//draw removing request
|
||||
Draw.tint(Pal.removeBack);
|
||||
Lines.square(tile.drawx(), tile.drawy()-1, rad);
|
||||
Lines.square(tile.drawx(), tile.drawy() - 1, rad);
|
||||
Draw.tint(Pal.remove);
|
||||
Lines.square(tile.drawx(), tile.drawy(), rad);
|
||||
}
|
||||
}
|
||||
|
||||
/**Draws a placement icon for a specific block.*/
|
||||
/** Draws a placement icon for a specific block. */
|
||||
void drawPlace(int x, int y, Block block, int rotation, int prevX, int prevY, int prevRotation){
|
||||
if(validPlace(x, y, block, rotation)){
|
||||
block.getPlaceDraw(placeDraw, rotation, prevX, prevY, prevRotation);
|
||||
@@ -255,8 +249,9 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
Draw.color(Pal.accent);
|
||||
for(int i = 0; i < 4; i++){
|
||||
Point2 p = Geometry.d8edge[i];
|
||||
float offset = -Math.max(block.size-1, 0)/2f * tilesize;
|
||||
if(i % 2 == 0)Draw.rect("block-select", x * tilesize + block.offset() + offset * p.x, y * tilesize + block.offset() + offset * p.y, i * 90);
|
||||
float offset = -Math.max(block.size - 1, 0) / 2f * tilesize;
|
||||
if(i % 2 == 0)
|
||||
Draw.rect("block-select", x * tilesize + block.offset() + offset * p.x, y * tilesize + block.offset() + offset * p.y, i * 90);
|
||||
}
|
||||
Draw.color();
|
||||
}else{
|
||||
@@ -353,7 +348,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
if(tile == null) continue;
|
||||
|
||||
if((!request.remove && validPlace(tile.x, tile.y, request.block, request.rotation))
|
||||
|| (request.remove && validBreak(tile.x, tile.y))){
|
||||
|| (request.remove && validBreak(tile.x, tile.y))){
|
||||
request.scale = Mathf.lerpDelta(request.scale, 1f, 0.2f);
|
||||
request.redness = Mathf.lerpDelta(request.redness, 0f, 0.2f);
|
||||
}else{
|
||||
@@ -418,7 +413,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
other = other.target();
|
||||
|
||||
Draw.color(Pal.removeBack);
|
||||
Lines.square(other.drawx(), other.drawy()-1, other.block().size * tilesize / 2f - 1);
|
||||
Lines.square(other.drawx(), other.drawy() - 1, other.block().size * tilesize / 2f - 1);
|
||||
Draw.color(Pal.remove);
|
||||
Lines.square(other.drawx(), other.drawy(), other.block().size * tilesize / 2f - 1);
|
||||
}
|
||||
@@ -658,7 +653,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
panY = (screenY - Core.graphics.getHeight()) + edgePan;
|
||||
}
|
||||
|
||||
vector.set(panX, panY).scl((Core.camera.width ) / Core.graphics.getWidth());
|
||||
vector.set(panX, panY).scl((Core.camera.width) / Core.graphics.getWidth());
|
||||
vector.limit(maxPanSpeed);
|
||||
|
||||
//pan view
|
||||
|
||||
@@ -15,26 +15,26 @@ public class PlaceUtils{
|
||||
private static Bresenham2 bres = new Bresenham2();
|
||||
private static Array<Point2> points = new Array<>();
|
||||
|
||||
/**Normalize a diagonal line into points. */
|
||||
/** Normalize a diagonal line into points. */
|
||||
public static Array<Point2> normalizeDiagonal(int startX, int startY, int endX, int endY){
|
||||
Pools.freeAll(points);
|
||||
points.clear();
|
||||
return bres.lineNoDiagonal(startX, startY, endX, endY, Pools.get(Point2.class, Point2::new), points);
|
||||
}
|
||||
|
||||
/**Normalize two points into one straight line, no diagonals.*/
|
||||
/** Normalize two points into one straight line, no diagonals. */
|
||||
public static Array<Point2> normalizeLine(int startX, int startY, int endX, int endY){
|
||||
Pools.freeAll(points);
|
||||
points.clear();
|
||||
if(Math.abs(startX - endX) > Math.abs(startY - endY)){
|
||||
//go width
|
||||
for(int i = 0; i <= Math.abs(startX - endX); i++){
|
||||
points.add(Pools.obtain(Point2.class, Point2::new).set(startX + i*Mathf.sign(endX - startX), startY));
|
||||
points.add(Pools.obtain(Point2.class, Point2::new).set(startX + i * Mathf.sign(endX - startX), startY));
|
||||
}
|
||||
}else{
|
||||
//go height
|
||||
for(int i = 0; i <= Math.abs(startY - endY); i++){
|
||||
points.add(Pools.obtain(Point2.class, Point2::new).set(startX, startY + i*Mathf.sign(endY - startY)));
|
||||
points.add(Pools.obtain(Point2.class, Point2::new).set(startX, startY + i * Mathf.sign(endY - startY)));
|
||||
}
|
||||
}
|
||||
return points;
|
||||
@@ -43,7 +43,6 @@ public class PlaceUtils{
|
||||
/**
|
||||
* Normalizes a placement area and returns the result, ready to be used for drawing a rectangle.
|
||||
* Returned x2 and y2 will <i>always</i> be greater than x and y.
|
||||
*
|
||||
* @param block block that will be drawn
|
||||
* @param startx starting X coordinate
|
||||
* @param starty starting Y coordinate
|
||||
@@ -80,7 +79,6 @@ public class PlaceUtils{
|
||||
/**
|
||||
* Normalizes a placement area and returns the result.
|
||||
* Returned x2 and y2 will <i>always</i> be greater than x and y.
|
||||
*
|
||||
* @param tilex starting X coordinate
|
||||
* @param tiley starting Y coordinate
|
||||
* @param endx ending X coordinate
|
||||
|
||||
Reference in New Issue
Block a user