diff --git a/annotations/src/io/anuke/annotations/Annotations.java b/annotations/src/io/anuke/annotations/Annotations.java index feb4dc0ec9..eae4030b44 100644 --- a/annotations/src/io/anuke/annotations/Annotations.java +++ b/annotations/src/io/anuke/annotations/Annotations.java @@ -9,7 +9,7 @@ public class Annotations{ /** Marks a class as serializable.*/ @Target(ElementType.TYPE) - @Retention(RetentionPolicy.CLASS) + @Retention(RetentionPolicy.SOURCE) public @interface Serialize{ } @@ -63,7 +63,7 @@ public class Annotations{ /** Marks a method as invokable remotely across a server/client connection. */ @Target(ElementType.METHOD) - @Retention(RetentionPolicy.CLASS) + @Retention(RetentionPolicy.SOURCE) public @interface Remote{ /** Specifies the locations from which this method can be invoked. */ Loc targets() default Loc.server; @@ -93,7 +93,7 @@ public class Annotations{ * being the type returned by {@link #value()}. */ @Target(ElementType.METHOD) - @Retention(RetentionPolicy.CLASS) + @Retention(RetentionPolicy.SOURCE) public @interface WriteClass{ Class value(); } @@ -104,7 +104,7 @@ public class Annotations{ * and have one parameter, being of type {@link java.nio.ByteBuffer}. */ @Target(ElementType.METHOD) - @Retention(RetentionPolicy.CLASS) + @Retention(RetentionPolicy.SOURCE) public @interface ReadClass{ Class value(); } diff --git a/core/src/io/anuke/mindustry/input/MobileInput.java b/core/src/io/anuke/mindustry/input/MobileInput.java index eaf99540a9..3e43615eb8 100644 --- a/core/src/io/anuke/mindustry/input/MobileInput.java +++ b/core/src/io/anuke/mindustry/input/MobileInput.java @@ -468,7 +468,7 @@ public class MobileInput extends InputHandler implements GestureListener{ int y = lineStartY + i * Mathf.sign(tile.y - lineStartY) * Mathf.bool(!result.isX()); if(!checkOverlapPlacement(x, y, recipe.result) && validPlace(x, y, recipe.result, result.rotation)){ - PlaceRequest request = new PlaceRequest(x * tilesize, y * tilesize, recipe, result.rotation); + PlaceRequest request = new PlaceRequest(x * tilesize + recipe.result.offset(), y * tilesize + recipe.result.offset(), recipe, result.rotation); request.scale = 1f; selection.add(request); } @@ -557,7 +557,7 @@ public class MobileInput extends InputHandler implements GestureListener{ removeRequest(getRequest(cursor)); }else if(mode == placing && isPlacing() && validPlace(cursor.x, cursor.y, recipe.result, rotation) && !checkOverlapPlacement(cursor.x, cursor.y, recipe.result)){ //add to selection queue if it's a valid place position - selection.add(lastPlaced = new PlaceRequest(cursor.worldx(), cursor.worldy(), recipe, rotation)); + selection.add(lastPlaced = new PlaceRequest(cursor.worldx() + recipe.result.offset(), cursor.worldy() + recipe.result.offset(), recipe, rotation)); }else if(mode == breaking && validBreak(cursor.target().x, cursor.target().y) && !hasRequest(cursor.target())){ //add to selection queue if it's a valid BREAK position cursor = cursor.target();