RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
Interactable.java
1package com.osroyale.game.world;
2
3import com.osroyale.game.world.position.Position;
4
10public interface Interactable {
11
14
16 default int getX() {
17 return getPosition().getX();
18 }
19
21 default int getY() {
22 return getPosition().getY();
23 }
24
26 default int getHeight() {
27 return getPosition().getHeight();
28 }
29
31 int width();
32
34 int length();
35
42 static Interactable create(Position position) {
43 return new Interactable() {
44 @Override
45 public Position getPosition() {
46 return position;
47 }
48
49 @Override
50 public int width() {
51 return 1;
52 }
53
54 @Override
55 public int length() {
56 return 1;
57 }
58 };
59 }
60
69 static Interactable create(Position position, int width, int length) {
70 return new Interactable() {
71 @Override
72 public Position getPosition() {
73 return position;
74 }
75
76 @Override
77 public int width() {
78 return width;
79 }
80
81 @Override
82 public int length() {
83 return length;
84 }
85 };
86 }
87
88}
static Interactable create(Position position, int width, int length)
static Interactable create(Position position)