View Javadoc

1   package cz.cuni.amis.pogamut.ut2004.bot.command;
2   
3   import java.util.logging.Logger;
4   
5   import javax.vecmath.Vector3d;
6   
7   import cz.cuni.amis.pogamut.base.communication.worldview.IWorldView;
8   import cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObjectEventListener;
9   import cz.cuni.amis.pogamut.base.communication.worldview.object.event.WorldObjectUpdatedEvent;
10  import cz.cuni.amis.pogamut.base3d.worldview.object.ILocated;
11  import cz.cuni.amis.pogamut.base3d.worldview.object.Location;
12  import cz.cuni.amis.pogamut.base3d.worldview.object.Rotation;
13  import cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot;
14  import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;
15  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.Configuration;
16  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.ContinuousMove;
17  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.Dodge;
18  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.Jump;
19  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.Move;
20  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.TurnTo;
21  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Item;
22  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player;
23  import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Self;
24  
25  /**
26   * Class providing Pogamut2 UT2004 advanced locomotion commands for the bot -
27   * strafing, advanced turning, dodging...
28   * 
29   * @author Michal 'Knight' Bida
30   */
31  public class AdvancedLocomotion extends SimpleLocomotion {
32  
33  	/** 
34  	 * Self object holding information about our agent. 
35  	 **/
36  	Self self = null;
37  
38  	/**
39  	 * {@link Self} listener.
40  	 * this is needed because self can be updated during the simulation
41  	 * and in multiPogamut we are stuck with the old version
42  	 */
43  	private class SelfListener implements IWorldObjectEventListener<Self, WorldObjectUpdatedEvent<Self>>
44  	{
45  		private IWorldView worldView;
46  
47  		/**
48  		 * Constructor. Registers itself on the given WorldView object.
49  		 * @param worldView WorldView object to listent to.
50  		 */
51  		public SelfListener(IWorldView worldView)
52  		{
53  			this.worldView = worldView;
54  			worldView.addObjectListener(Self.class, WorldObjectUpdatedEvent.class, this);
55  		}
56  
57  		@Override
58  		public void notify(WorldObjectUpdatedEvent<Self> event) {
59  			self = event.getObject();			
60  		}
61  	}
62  
63  	/** {@link Self} listener */
64  	private SelfListener selfListener = null;
65  	
66  	/**
67  	 * Used to set focus when strafing left and right, holds the distance of
68  	 * focus location.
69  	 */
70  	private static final double FOCUS_DISTANCE = 3000;
71  
72  	/**
73  	 * Makes the bot to move through first location to second location (may be
74  	 * specified directly or some ILocated object may be supplied - carefull
75  	 * with objects traversability). Usage is when you want to have your bot to
76  	 * move really smooth. Where is the problem? If you would want to achive the
77  	 * same thing with 2 moveTo functions (first move to location1, when there
78  	 * move to location2), there may be a little lag - you have to check if you
79  	 * are already at first location and etc. This function can solve this
80  	 * problem as the check is done in UnrealScript.
81  	 * 
82  	 * (issues GB MOVE command)
83  	 * 
84  	 * @param firstLocation
85  	 *            First location we will go through.
86  	 * @param secondLocation
87  	 *            Second location we will go to (after reaching first).
88  	 * 
89  	 * @see moveContinuous()
90  	 */
91  	public void moveAlong(ILocated firstLocation, ILocated secondLocation) {
92  		Move moveAlong = new Move();
93  
94  		moveAlong.setFirstLocation(firstLocation.getLocation());
95  		moveAlong.setSecondLocation(secondLocation.getLocation());
96  
97  		agent.getAct().act(moveAlong);
98  	}
99  
100 	/**
101 	 * This makes the bot to run straight ahead continuously. Will stop when
102 	 * other move command is issued - stopMovement, strafeTo, moveTo, moveAlong
103 	 * even turn commands will interrupt this.
104 	 * 
105 	 * (issues GB CMOVE command)
106 	 * 
107 	 * @see moveAlong(ILocated, ILocated)
108 	 * 
109 	 */
110 	public void moveContinuos() {
111 		agent.getAct().act(new ContinuousMove());
112 	}
113 
114 	/**
115 	 * Bot strafes right. The length of the strafe is specified by distance
116 	 * attribute (in UT units, 1 UT unit equals roughly 1 cm). The bot will be
117 	 * looking to object specified by the attribute focusId.
118 	 * 
119 	 * @param distance
120 	 *            - how far the bot strafes (in UT units, 1 UT unit equals
121 	 *            roughly 1 cm).
122 	 * @param focusId
123 	 *            - UnrealId of the object that should be the bot focus.
124 	 * @see strafeLeft(double,ILocated)
125 	 */
126 	public void strafeRight(double distance, UnrealId focusId) {
127 		if (self == null) {
128 			self = agent.getWorldView().getSingle(Self.class);
129 		}
130 		if (self != null) {
131 			Location startLoc = self.getLocation();
132 			Location directionVector = self.getRotation().toLocation();
133 			Location targetVec = directionVector.cross(new Location(0, 0, 1))
134 					.getNormalized().scale(-distance);
135 
136 			agent.getAct().act(
137 					new Move().setFirstLocation(startLoc.add(targetVec))
138 							.setFocusTarget(focusId));
139 		}
140 	}
141 
142 	/**
143 	 * Bot strafes right. The length of the strafe is specified by distance
144 	 * attribute (in UT units, 1 UT unit equals roughly 1 cm). The bot will be
145 	 * looking to location specified by the attribute focusLocation.
146 	 * 
147 	 * @param distance
148 	 *            - how far the bot strafes (in UT units, 1 UT unit equals
149 	 *            roughly 1 cm).
150 	 * @param focusLocation
151 	 *            - location where the bot should look
152 	 * @see strafeLeft(double,ILocated)
153 	 */
154 	public void strafeRight(double distance, ILocated focusLocation) {
155 		if (self == null) {
156 			self = agent.getWorldView().getSingle(Self.class);
157 		}
158 		if (self != null) {
159 			Location startLoc = self.getLocation();
160 			Location directionVector = self.getRotation().toLocation();
161 			Location targetVec = directionVector.cross(new Location(0, 0, 1))
162 					.getNormalized().scale(-distance);
163 
164 			agent.getAct().act(
165 					new Move().setFirstLocation(startLoc.add(targetVec))
166 							.setFocusLocation(focusLocation.getLocation()));
167 		}
168 	}
169 
170 	/**
171 	 * Bot strafes right. The length of the strafe is specified by distance
172 	 * attribute (in UT units, 1 UT unit equals roughly 1 cm). Note that this
173 	 * will reset the bot focus. The bot will be looking straight ahead (however
174 	 * if the strafe is really long - more than 500 UT units - it will be
175 	 * visible the bot is turning slightly performing the strafe).
176 	 * 
177 	 * @param distance
178 	 *            - how far the bot strafes (in UT units, 1 UT unit equals
179 	 *            roughly 1 cm).
180 	 * @see strafeLeft(double)
181 	 */
182 	public void strafeRight(double distance) {
183 		if (self == null) {
184 			self = agent.getWorldView().getSingle(Self.class);
185 		}
186 		if (self != null) {
187 			Location startLoc = self.getLocation();
188 			Location directionVector = self.getRotation().toLocation();
189 			Location targetVec = directionVector.cross(new Location(0, 0, 1))
190 					.getNormalized().scale(-distance);
191 
192 			agent.getAct().act(
193 					new Move().setFirstLocation(startLoc.add(targetVec))
194 							.setFocusLocation(
195 									startLoc.add(directionVector
196 											.getNormalized().scale(
197 													FOCUS_DISTANCE))));
198 		}
199 	}
200 
201 	/**
202 	 * Bot strafes left. The length of the strafe is specified by distance
203 	 * attribute (in UT units, 1 UT unit equals roughly 1 cm). The bot will be
204 	 * looking to object specified by the attribute focusId.
205 	 * 
206 	 * @param distance
207 	 *            - how far the bot strafes (in UT units, 1 UT unit equals
208 	 *            roughly 1 cm).
209 	 * @param focusId
210 	 *            - UnrealId of the object that should be the bot focus.
211 	 * @see strafeRight(double,ILocated)
212 	 */
213 	public void strafeLeft(double distance, UnrealId focusId) {
214 		if (self == null) {
215 			self = agent.getWorldView().getSingle(Self.class);
216 		}
217 		if (self != null) {
218 			Location startLoc = self.getLocation();
219 			Location directionVector = self.getRotation().toLocation();
220 			Location targetVec = directionVector.cross(new Location(0, 0, 1))
221 					.getNormalized().scale(distance);
222 
223 			agent.getAct().act(
224 					new Move().setFirstLocation(startLoc.add(targetVec))
225 							.setFocusTarget(focusId));
226 		}
227 	}
228 
229 	/**
230 	 * Bot strafes left. The length of the strafe is specified by distance
231 	 * attribute (in UT units, 1 UT unit equals roughly 1 cm). The bot will be
232 	 * looking to location specified by the attribute focusLocation.
233 	 * 
234 	 * @param distance
235 	 *            - how far the bot strafes (in UT units, 1 UT unit equals
236 	 *            roughly 1 cm).
237 	 * @param focusLocation
238 	 *            - location where the bot should look
239 	 * @see strafeRight(double,ILocated)
240 	 */
241 	public void strafeLeft(double distance, ILocated focusLocation) {
242 		if (self == null) {
243 			self = agent.getWorldView().getSingle(Self.class);
244 		}
245 		if (self != null) {
246 			Location startLoc = self.getLocation();
247 			Location directionVector = self.getRotation().toLocation();
248 			Location targetVec = directionVector.cross(new Location(0, 0, 1))
249 					.getNormalized().scale(distance);
250 
251 			agent.getAct().act(
252 					new Move().setFirstLocation(startLoc.add(targetVec))
253 							.setFocusLocation(focusLocation.getLocation()));
254 		}
255 	}
256 
257 	/**
258 	 * Bot strafes left. The length of the strafe is specified by distance
259 	 * attribute (in UT units, 1 UT unit equals roughly 1 cm). Note that this
260 	 * will reset the bot focus. The bot will be looking straight ahead (however
261 	 * if the strafe is really long - more than 500 UT units - it will be
262 	 * visible the bot is turning slightly performing the strafe).
263 	 * 
264 	 * @param distance
265 	 *            - how far the bot strafes (in UT units, 1 UT unit equals
266 	 *            roughly 1 cm).
267 	 * @see strafeRight(double)
268 	 */
269 	public void strafeLeft(double distance) {
270 		if (self == null) {
271 			self = agent.getWorldView().getSingle(Self.class);
272 		}
273 		if (self != null) {
274 			Location startLoc = self.getLocation();
275 			Location directionVector = self.getRotation().toLocation();
276 			Location targetVec = directionVector.cross(new Location(0, 0, 1))
277 					.getNormalized().scale(distance);
278 
279 			agent.getAct().act(
280 					new Move().setFirstLocation(startLoc.add(targetVec))
281 							.setFocusLocation(
282 									startLoc.add(directionVector
283 											.getNormalized().scale(
284 													FOCUS_DISTANCE))));
285 		}
286 	}
287 
288 	/**
289 	 * Makes the bot to move to location while looking at focusLocation. (issues
290 	 * GB STRAFE command)
291 	 * 
292 	 * @param location
293 	 *            Location we will strafe to.
294 	 * @param focusLocation
295 	 *            Location we will look at while strafing.
296 	 * 
297 	 * @see strafeTo(ILocated, UnrealId)
298 	 */
299 	public void strafeTo(ILocated location, ILocated focusLocation) {
300 		Move move = new Move().setFirstLocation(location.getLocation())
301 				.setFocusLocation(focusLocation.getLocation());
302 		agent.getAct().act(move);
303 	}
304 
305 	/**
306 	 * Makes the bot to move at location, while looking at focus object. Note
307 	 * that when you support focus object, the bot will update his focus (place
308 	 * he is looking at) according to focus object location (this will be
309 	 * provided by GB UnrealScript code). Usefull when you want to track some
310 	 * player position while moving somewhere else. (issues GB STRAFE command)
311 	 * 
312 	 * @param location
313 	 *            Location we will strafe to.
314 	 * @param focus
315 	 *            Object with UrealId. We will look at this location while
316 	 *            strafing. We will update our focus location according to the
317 	 *            current position of this obejct in UT.
318 	 * 
319 	 * @see strafeTo(ILocated, ILocated)
320 	 * 
321 	 * @todo To check if supported object is also ILocated? see below
322 	 */
323 	public void strafeTo(ILocated location, UnrealId focus) {
324 		Move move = new Move().setFirstLocation(location.getLocation())
325 				.setFocusTarget(focus);
326 		// TODO: To check if this object is also ILocated?
327 		// How this could be done? We need to check if supported IWorldObject
328 		// implements interface ILocated
329 		/*
330 		 * ILocated tmpILocatedCheck; if (tmpILocatedCheck.getClass() ==
331 		 * focus.getClass().getInterfaces()[0]) {
332 		 * 
333 		 * }
334 		 */
335 		agent.getAct().act(move);
336 	}
337 
338 	/**
339 	 * Makes the bot to double jump instantly (issues GB JUMP command) with default settings.
340 	 * 
341 	 * @todo How to convince javadoc see to link to method in super class
342 	 * @see jump()
343 	 * @see dodge(Vector3d)
344 	 */
345 	public void doubleJump() {
346 		Jump jump = new Jump();
347 		jump.setDoubleJump(true);
348 		
349 		// TODO: [Michal Bida] remove when GB is fixed
350 		jump.setForce((double)680);
351 		
352 		agent.getAct().act(jump);
353 	}
354 	
355 	/**
356 	 * Makes the bot to jump instantly (issues GB JUMP command) with custom settings.
357 	 * <p><p>
358 	 * See also {@link SimpleLocomotion#jump()}.
359 	 * 
360 	 * @param doubleJump whether the bot should double jump
361 	 * @param secondJumpDelay If doubleJump, than after time specified here, the bot performs second jump of a double jump (if DoubleJump is true). Time is in seconds. GB2004 default is 0.5s.
362 	 * @param jumpZ than this is a force vector specifying how big the jump should be. Can't be set more than 2 * JumpZ = 680 for double jump.
363 	 * 
364 	 * @see jump()
365 	 * @see dodge(Vector3d)
366 	 */
367 	public void generalJump(boolean doubleJump, double secondJumpDelay, double jumpZ) {
368 		Jump jump = new Jump();
369 		jump.setDoubleJump(doubleJump);
370 		if (doubleJump) {
371 			jump.setDelay(secondJumpDelay);			
372 		}
373 		jump.setForce(jumpZ);
374 		agent.getAct().act(jump);
375 	}
376 	
377 	/**
378 	 * Makes the bot to double jump instantly (issues GB JUMP command) with custom settings.
379 	 * <p><p>
380 	 * See also {@link SimpleLocomotion#jump()}.
381 	 * 
382 	 * @param secondJumpDelay After time specified here, the bot performs second jump of a double jump (if DoubleJump is true). Time is in seconds. GB2004 default is 0.5s.
383 	 * @param jumpZ Force vector specifying how big the jump should be. Can't be set more than 2 * JumpZ = 680 for double jump.
384 	 * 
385 	 * @see jump()
386 	 * @see dodge(Vector3d)
387 	 */
388 	public void doubleJump(double secondJumpDelay, double jumpZ) {
389 		Jump jump = new Jump();
390 		jump.setDoubleJump(true);
391 		jump.setDelay(secondJumpDelay);
392 		jump.setForce(jumpZ);
393 		agent.getAct().act(jump);
394 	}
395 
396 	/**
397 	 * Makes the bot to dodge in the selected direction (this is in fact single
398 	 * jump that is executed to selected direction). (issues GB DODGE command)
399 	 * 
400 	 * @param direction
401 	 *            Vector (that will be normalized) that specifies direction of
402 	 *            the jump.
403 	 * @param bDouble
404          *            Wheter we want to perform double dodge.
405 	 * @see jump()
406 	 * @see doubleJump()
407 	 */
408 	public void dodge(Location direction, boolean bDouble) {
409 		agent.getAct().act(new Dodge().setDirection(direction).setDouble(bDouble));
410 	}
411 	
412 	/**
413 	 * Dodges to the right... direction is taken as vector(botPosition, inFrontOfTheBot).
414 	 * @param botPosition current bot position
415 	 * @param inFrontOfTheBot usually the enemy of the bot
416 	 */
417 	public void dodgeRight(ILocated botPosition, ILocated inFrontOfTheBot) {
418 		if (botPosition == null || inFrontOfTheBot == null) return;
419 		Location inFront = inFrontOfTheBot.getLocation();
420 		ILocated bot = botPosition;
421 		Location direction = new Location(inFront.getLocation().x - bot.getLocation().x, inFront.getLocation().y - bot.getLocation().y, 0);
422 		direction = direction.getNormalized();
423                 
424 		double x = direction.getX();
425 		double y = direction.getY();
426 		
427 		direction.x = y;
428 		direction.y = -x;
429 		direction.z = 0;
430 				
431 		direction = direction.scale(100);
432 		
433 		dodge(direction, false);
434 	}
435 	
436 	/**
437 	 * Dodges to the right... direction is taken as vector(botPosition, inFrontOfTheBot).
438 	 * @param botPosition current bot position
439 	 * @param inFrontOfTheBot usually the enemy of the bot
440 	 * @param z allows you to dodge to the air, usual const is 50-100
441 	 */
442 	public void dodgeRight(ILocated botPosition, ILocated inFrontOfTheBot, boolean bDouble) {
443 		if (botPosition == null || inFrontOfTheBot == null) return;
444 		Location inFront = inFrontOfTheBot.getLocation();
445 		ILocated bot = botPosition;
446 		Location direction = new Location(inFront.getLocation().x - bot.getLocation().x, inFront.getLocation().y - bot.getLocation().y, 0);
447 		direction = direction.getNormalized();
448                 
449 		double x = direction.getX();
450 		double y = direction.getY();
451 		
452 		direction.x = y;
453 		direction.y = -x;
454 		direction.z = 0;
455 				
456 		direction = direction.scale(100);
457 		
458 		dodge(direction, bDouble);
459 	}
460 
461 	/**
462 	 * Dodges to the left... direction is taken as vector(botPosition, inFrontOfTheBot).
463 	 * @param botPosition current bot position
464 	 * @param inFrontOfTheBot usually the enemy of the bot
465 	 */
466 	public void dodgeLeft(ILocated botPosition, ILocated inFrontOfTheBot) {
467 		if (botPosition == null || inFrontOfTheBot == null) return;
468 		Location inFront = inFrontOfTheBot.getLocation();
469 		ILocated bot = botPosition;
470 		Location direction = new Location(inFront.getLocation().x - bot.getLocation().x, inFront.getLocation().y - bot.getLocation().y, 0);
471 		direction = direction.getNormalized();
472 
473 		double x = direction.getX();
474 		double y = direction.getY();
475 
476 		direction.x = -y;
477 		direction.y = -x;
478 		direction.z = 0;
479 
480 		direction = direction.scale(100);
481 
482 		dodge(direction, false);
483 	}
484 	
485 	/**
486 	 * Dodges to the left... direction is taken as vector(botPosition, inFrontOfTheBot).
487 	 * @param botPosition current bot position
488 	 * @param inFrontOfTheBot usually the enemy of the bot
489 	 * @param z allows you to dodge to the air, usual const is 50-100
490 	 */
491 	public void dodgeLeft(ILocated botPosition, ILocated inFrontOfTheBot, boolean bDouble) {
492 		if (botPosition == null || inFrontOfTheBot == null) return;
493 		Location inFront = inFrontOfTheBot.getLocation();
494 		ILocated bot = botPosition;
495 		Location direction = new Location(inFront.getLocation().x - bot.getLocation().x, inFront.getLocation().y - bot.getLocation().y, 0);
496 		direction = direction.getNormalized();
497 
498 		double x = direction.getX();
499 		double y = direction.getY();
500 
501 		direction.x = -y;
502 		direction.y = -x;
503 		direction.z = 0;
504 
505 		direction = direction.scale(100);
506 
507 		dodge(direction, bDouble);
508 	}
509 	
510 	/**
511 	 * Dodges to the back... direction is taken as vector(botPosition, inFrontOfTheBot).
512 	 * @param botPosition current bot position
513 	 * @param inFrontOfTheBot usually the enemy of the bot
514 	 */
515 	public void dodgeBack(ILocated botPosition, ILocated inFrontOfTheBot) {
516 		if (botPosition == null || inFrontOfTheBot == null) return;
517 		Location inFront = inFrontOfTheBot.getLocation();
518 		ILocated bot = botPosition;
519 		Location direction = inFront.sub(bot.getLocation());
520 		direction.z = 0;
521 		direction = direction.getNormalized();
522 
523 		double x = direction.getX();
524 		double y = direction.getY();
525 
526 		direction.x = -x;
527 		direction.y = -y;
528 		direction.z = 0;
529 		
530 		direction = direction.scale(100);
531 		
532 		dodge(direction, false);
533 	}
534 	
535 	/**
536 	 * Dodges to the back... direction is taken as vector(botPosition, inFrontOfTheBot).
537 	 * @param botPosition current bot position
538 	 * @param inFrontOfTheBot usually the enemy of the bot
539 	 * @param z allows you to dodge to the air, usual const is 50-100
540 	 */
541 	public void dodgeBack(ILocated botPosition, ILocated inFrontOfTheBot, boolean bDouble) {
542 		if (botPosition == null || inFrontOfTheBot == null) return;
543 		Location inFront = inFrontOfTheBot.getLocation();
544 		ILocated bot = botPosition;
545 		Location direction = inFront.sub(bot.getLocation());
546 		direction.z = 0;
547 		direction = direction.getNormalized();
548 
549 		double x = direction.getX();
550 		double y = direction.getY();
551 
552 		direction.x = -x;
553 		direction.y = -y;
554 		direction.z = 0;
555 		
556 		direction = direction.scale(100);
557 		
558 		dodge(direction, bDouble);
559 	}
560 
561 	/**
562 	 * Sets the speed multiplier for the bot. By this number the bots default
563 	 * speed will be multiplied by. (issues GB CONF command)
564 	 * 
565 	 * @param speedMultiplier
566 	 *            Ranges from 0.1 to 2 (max may be set in ini in [RemoteBot]
567 	 *            MaxSpeed)
568 	 * 
569 	 * @see setRotationSpeed(Rotation)
570 	 */
571 	public void setSpeed(double speedMultiplier) {
572 		Configuration configure = new Configuration();
573 		configure.setSpeedMultiplier(speedMultiplier);
574 		agent.getAct().act(configure);
575 	}
576 
577 	/**
578 	 * Sets the rotation speed (rotation rate) for the bot. Default rotation
579 	 * rate can be set in GameBots INI file in UT2004/System directory ( look
580 	 * for DefaultRotationRate attribute). Default rotation rate is now
581 	 * Pitch=3072, Yaw=60000, Roll=2048 (pitch = up/down, yaw = left/right, roll
582 	 * = equivalent of doing a cartwheel).
583 	 * 
584 	 * (issues GB CONF command)
585 	 * 
586 	 * @param newRotationRate
587 	 *            Default is Pitch=3072, Yaw=60000, Roll=2048. To achieve best
588 	 *            results we suggest to multiply the default setting.
589 	 * 
590 	 * @see setSpeed(double)
591 	 */
592 	public void setRotationSpeed(Rotation newRotationRate) {
593 		Configuration configure = new Configuration();
594 		configure.setRotationRate(newRotationRate);
595 		agent.getAct().act(configure);
596 	}
597 
598 	/**
599 	 * Constructor. Setups the command module based on given agent and logger.
600 	 * 
601 	 * @param agent
602 	 *            AbstractUT2004Bot we will send commands for
603 	 * @param log
604 	 *            Logger to be used for logging runtime/debug info.
605 	 */
606 	public AdvancedLocomotion(UT2004Bot agent, Logger log) {
607 		super(agent, log);
608 		this.selfListener = new SelfListener( agent.getWorldView() ); //register self listener
609 	}
610 
611 	@Override
612 	public void jump() {
613 		super.jump();
614 	}
615 	
616 	/**
617 	 * Makes the bot to jump instantly (issues GB JUMP command) with custom settings.
618 	 * <p><p>
619 	 * See also {@link SimpleLocomotion#jump()}.
620 	 * 
621 	 * @param jumpZ Force vector specifying how big the jump should be. Can't be set more than JumpZ = 340 for single jump.
622 	 * 
623 	 * @see jump()
624 	 * @see dodge(Vector3d)
625 	 */
626 	public void jump(double jumpZ) {
627 		Jump jump = new Jump();
628 		jump.setForce(jumpZ);
629 		agent.getAct().act(jump);
630 	}
631 	
632 	/**
633 	 * Makes the bot to jump (or double jump) instantly (issues GB JUMP command) with custom settings.
634 	 * <p><p>
635 	 * See also {@link SimpleLocomotion#jump()}.
636 	 * 
637 	 * @param doubleJump whether to perform double jump
638 	 * @param secondJumpDelay After time specified here, the bot performs second jump of a double jump (if DoubleJump is true). Time is in seconds. GB2004 default is 0.5s.
639 	 * @param jumpZ Force vector specifying how big the jump should be. Can't be set more than 2 * JumpZ = 680 for double jump.
640 	 * 
641 	 * @see jump()
642 	 * @see dodge(Vector3d)
643 	 */
644 	public void jump(boolean doubleJump, double secondJumpDelay, double jumpZ) {
645 		Jump jump = new Jump();
646 		jump.setDoubleJump(doubleJump);
647 		jump.setDelay(secondJumpDelay);
648 		jump.setForce(jumpZ);
649 		agent.getAct().act(jump);
650 	}
651 
652 	@Override
653 	public void moveTo(ILocated location) {
654 		super.moveTo(location);
655 	}
656 
657 	@Override
658 	public void setRun() {
659 		super.setRun();
660 	}
661 
662 	@Override
663 	public void setWalk() {
664 		super.setWalk();
665 	}
666 
667 	@Override
668 	public void stopMovement() {
669 		super.stopMovement();
670 	}
671 
672 	@Override
673 	public void turnHorizontal(int amount) {
674 		super.turnHorizontal(amount);
675 	}
676 
677 	@Override
678 	public void turnTo(ILocated location) {
679 		super.turnTo(location);
680 	}
681 
682 	@Override
683 	public void turnTo(Player player) {
684 		super.turnTo(player);
685 	}
686 
687 	@Override
688 	public void turnTo(Item item) {
689 		super.turnTo(item);
690 	}
691 
692 	@Override
693 	public void turnVertical(int amount) {
694 		super.turnVertical(amount);
695 	}
696 
697 }