feat: Give item on dialog
This commit is contained in:
@@ -6,6 +6,7 @@ import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@@ -16,6 +17,13 @@ public class RoomCords implements Cloneable, Serializable {
|
||||
private int x;
|
||||
private int y;
|
||||
|
||||
public RoomCords calculateCenter(BufferedImage texture) {
|
||||
return new RoomCords(
|
||||
x + texture.getWidth() / 2,
|
||||
y + texture.getHeight() / 2
|
||||
);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public RoomCords(
|
||||
@JsonProperty("x") int x,
|
||||
|
||||
Reference in New Issue
Block a user