Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void filling() {
- if(getInventory().interact("Jug", "Use")) {
- currentState = "filling jugs";
- GameObject source = getGameObjects().closest(waterObject);
- if(source != null) {
- fillingJugs = true;
- sleepUntil(() -> fillingJugs, 5000);
- currentState = "pump not null";
- String[] possibleActions = source.getActions();
- int i = possibleActions.length;
- for(int j = 0; j < i; j++) {
- log(possibleActions[j]);
- }
- if(source.interact("Use")) {
- currentState = "startedFilling";
- jugsFilled += 28;
- sleepUntil(() -> !getInventory().contains("Jug"), 8000);
- }
- } else {
- currentState = "pump is null";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement