Advertisement
John233323423

Untitled

Jan 28th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. final Coordinate gateEntrance = new Coordinate(2924, 9803, 0);
  2. final Coordinate gateExit = new Coordinate(2923, 9803, 0);
  3. final ObjectVertex gateVertex = new ObjectVertex(gateEntrance, gateRequirement) {
  4.  
  5. @Override
  6. public GameObject getObject() {
  7. return GameObjects.getLoaded("Gate").nearest();
  8. }
  9.  
  10. @Override
  11. public boolean step() {
  12. System.out.println("Event fired");
  13. boolean success = this.getObject().interact("Open");
  14. Execution.delayUntil(() -> dragonArea.contains(player.getPosition()), 3000);
  15. return success;
  16. }
  17.  
  18. };
  19. gateVertex.addBidirectionalEdge(tempWeb.getVertexNearestTo(gateEntrance));
  20. gateVertex.addBidirectionalEdge(tempWeb.getVertexNearestTo(gateExit));
  21. tempWeb.getVertexNearestTo(gateEntrance).addBidirectionalEdge(gateVertex);
  22. tempWeb.getVertexNearestTo(gateExit).addBidirectionalEdge(gateVertex);
  23. Traversal.getDefaultWeb().addVertices(gateVertex);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement