RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
Obstacle.java
1package com.osroyale.content.skill.impl.agility.obstacle;
2
3import com.osroyale.game.world.entity.mob.player.Player;
4import com.osroyale.game.world.position.Position;
5
40
41public final class Obstacle {
42 private final ObstacleType type;
43 private Position objectPosition;
44 private final Position start;
45 private final Position end;
46 private final int level;
47 private final float experience;
48 private final int ordinal;
49 private final Obstacle next;
50
51 Obstacle(ObstacleBuilder builder) {
52 type = builder.type;
53 objectPosition = builder.objectPosition;
54 start = builder.start;
55 end = builder.end;
56 level = builder.level;
57 experience = builder.experience;
58 ordinal = builder.ordinal;
59 next = builder.next;
60 }
61
62 public void setObjectPosition(Position objectPosition) {
63 this.objectPosition = objectPosition;
64 }
65
66 public Position getObjectPosition() {
67 return objectPosition;
68 }
69
70 public Position getStart() {
71 return start;
72 }
73
74 public Position getEnd() {
75 return end;
76 }
77
78 public Obstacle getNext() {
79 return next;
80 }
81
82 public int getOrdinal() {
83 return ordinal;
84 }
85
86 public ObstacleType getType() {
87 return type;
88 }
89
90 public void execute(Player player) {
91 type.execute(player, next, start, end, level, experience, ordinal);
92 }
93
94 @Override
95 public String toString() {
96 return "OBSTACLE [Type: " + type + ", Start: " + start + ", End: " + end + ", Level: " + level + ", Experience: " + experience + ", Ordinal: " + ordinal + "]";
97 }
98
99}