@@ -57,59 +57,59 @@ public class OneBlockIslands implements DataObject {
57
57
*/
58
58
@ NonNull
59
59
public String getPhaseName () {
60
- return phaseName == null ? "" : phaseName ;
60
+ return phaseName == null ? "" : phaseName ;
61
61
}
62
62
63
63
/**
64
64
* @param phaseName the phaseName to set
65
65
*/
66
66
public void setPhaseName (String phaseName ) {
67
- this .phaseName = phaseName ;
67
+ this .phaseName = phaseName ;
68
68
}
69
69
70
70
public OneBlockIslands (String uniqueId ) {
71
- this .uniqueId = uniqueId ;
71
+ this .uniqueId = uniqueId ;
72
72
}
73
73
74
74
/**
75
75
* @return the blockNumber
76
76
*/
77
77
public int getBlockNumber () {
78
- return blockNumber ;
78
+ return blockNumber ;
79
79
}
80
80
81
81
/**
82
82
* @param blockNumber the blockNumber to set
83
83
*/
84
84
public void setBlockNumber (int blockNumber ) {
85
- this .blockNumber = blockNumber ;
85
+ this .blockNumber = blockNumber ;
86
86
}
87
87
88
88
/**
89
89
* Increments the block number
90
90
*/
91
91
public void incrementBlockNumber () {
92
- // Ensure that lifetime is always at least blockNumber
93
- if (this .lifetime < this .blockNumber ) {
94
- this .lifetime = this .blockNumber ;
95
- }
96
- this .blockNumber ++;
97
- this .lifetime ++;
92
+ // Ensure that lifetime is always at least blockNumber
93
+ if (this .lifetime < this .blockNumber ) {
94
+ this .lifetime = this .blockNumber ;
95
+ }
96
+ this .blockNumber ++;
97
+ this .lifetime ++;
98
98
}
99
99
100
100
/**
101
101
* @return the hologram Line
102
102
*/
103
103
@ NonNull
104
104
public String getHologram () {
105
- return hologram == null ? "" : hologram ;
105
+ return hologram == null ? "" : hologram ;
106
106
}
107
107
108
108
/**
109
109
* @param hologramLine Hologram line
110
110
*/
111
111
public void setHologram (String hologramLine ) {
112
- this .hologram = hologramLine ;
112
+ this .hologram = hologramLine ;
113
113
}
114
114
115
115
/*
@@ -119,7 +119,7 @@ public void setHologram(String hologramLine) {
119
119
*/
120
120
@ Override
121
121
public String getUniqueId () {
122
- return uniqueId ;
122
+ return uniqueId ;
123
123
}
124
124
125
125
/*
@@ -131,16 +131,16 @@ public String getUniqueId() {
131
131
*/
132
132
@ Override
133
133
public void setUniqueId (String uniqueId ) {
134
- this .uniqueId = uniqueId ;
134
+ this .uniqueId = uniqueId ;
135
135
}
136
136
137
137
/**
138
138
* @return the queue
139
139
*/
140
140
public Queue <OneBlockObject > getQueue () {
141
- if (queue == null )
142
- queue = new LinkedList <>();
143
- return queue ;
141
+ if (queue == null )
142
+ queue = new LinkedList <>();
143
+ return queue ;
144
144
}
145
145
146
146
/**
@@ -150,16 +150,16 @@ public Queue<OneBlockObject> getQueue() {
150
150
* @return list of upcoming mobs
151
151
*/
152
152
public List <EntityType > getNearestMob (int i ) {
153
- return getQueue ().stream ().limit (i ).filter (obo ->
154
- // Include OneBlockObjects that are Entity, or custom block of type
155
- // MobCustomBlock
156
- obo .isEntity () || (obo .isCustomBlock () && obo .getCustomBlock () instanceof MobCustomBlock )).map (obo -> {
157
- if (obo .isCustomBlock () && obo .getCustomBlock () instanceof MobCustomBlock mb ) {
158
- return mb .getMob ();
159
- }
153
+ return getQueue ().stream ().limit (i ).filter (obo ->
154
+ // Include OneBlockObjects that are Entity, or custom block of type
155
+ // MobCustomBlock
156
+ obo .isEntity () || (obo .isCustomBlock () && obo .getCustomBlock () instanceof MobCustomBlock )).map (obo -> {
157
+ if (obo .isCustomBlock () && obo .getCustomBlock () instanceof MobCustomBlock mb ) {
158
+ return mb .getMob ();
159
+ }
160
160
161
- return obo .getEntityType ();
162
- }).toList ();
161
+ return obo .getEntityType ();
162
+ }).toList ();
163
163
}
164
164
165
165
/**
@@ -168,7 +168,7 @@ public List<EntityType> getNearestMob(int i) {
168
168
* @param nextBlock the OneBlockObject to be added
169
169
*/
170
170
public void add (OneBlockObject nextBlock ) {
171
- getQueue ().add (nextBlock );
171
+ getQueue ().add (nextBlock );
172
172
}
173
173
174
174
/**
@@ -182,49 +182,49 @@ public void add(OneBlockObject nextBlock) {
182
182
* empty.
183
183
*/
184
184
public OneBlockObject pollAndAdd (OneBlockObject toAdd ) {
185
- getQueue ();
186
- OneBlockObject b = queue .poll ();
187
- queue .add (toAdd );
188
- return b ;
185
+ getQueue ();
186
+ OneBlockObject b = queue .poll ();
187
+ queue .add (toAdd );
188
+ return b ;
189
189
}
190
190
191
191
/**
192
192
* Clear the look ahead queue
193
193
*/
194
194
public void clearQueue () {
195
- getQueue ().clear ();
195
+ getQueue ().clear ();
196
196
}
197
197
198
198
/**
199
199
* @return the lifetime number of blocks broken not including the current block
200
200
* count
201
201
*/
202
202
public long getLifetime () {
203
- // Ensure that lifetime is always at least blockNumber
204
- if (this .lifetime < this .blockNumber ) {
205
- this .lifetime = this .blockNumber ;
206
- }
207
- return lifetime ;
203
+ // Ensure that lifetime is always at least blockNumber
204
+ if (this .lifetime < this .blockNumber ) {
205
+ this .lifetime = this .blockNumber ;
206
+ }
207
+ return lifetime ;
208
208
}
209
209
210
210
/**
211
211
* @param lifetime lifetime number of blocks broken to set
212
212
*/
213
213
public void setLifetime (long lifetime ) {
214
- this .lifetime = lifetime ;
214
+ this .lifetime = lifetime ;
215
215
}
216
216
217
217
/**
218
218
* @return Timestamp of last phase change
219
219
*/
220
220
public long getLastPhaseChangeTime () {
221
- return this .lastPhaseChangeTime ;
221
+ return this .lastPhaseChangeTime ;
222
222
}
223
223
224
224
/**
225
225
* @param lastPhaseChangeTime Timestamp of last phase change
226
226
*/
227
227
public void setLastPhaseChangeTime (long lastPhaseChangeTime ) {
228
- this .lastPhaseChangeTime = lastPhaseChangeTime ;
228
+ this .lastPhaseChangeTime = lastPhaseChangeTime ;
229
229
}
230
230
}
0 commit comments