Refactor some event related things
This commit is contained in:
parent
6900fb2ade
commit
273a00753d
@ -21,6 +21,7 @@ import baritone.bot.behavior.Behavior;
|
||||
import baritone.bot.behavior.impl.LookBehavior;
|
||||
import baritone.bot.behavior.impl.MemoryBehavior;
|
||||
import baritone.bot.behavior.impl.PathingBehavior;
|
||||
import baritone.bot.event.GameEventHandler;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
package baritone.bot.behavior;
|
||||
|
||||
import baritone.bot.event.AbstractGameEventListener;
|
||||
import baritone.bot.event.listener.AbstractGameEventListener;
|
||||
import baritone.bot.utils.Helper;
|
||||
|
||||
/**
|
||||
|
25
src/main/java/baritone/bot/GameEventHandler.java → src/main/java/baritone/bot/event/GameEventHandler.java
Executable file → Normal file
25
src/main/java/baritone/bot/GameEventHandler.java → src/main/java/baritone/bot/event/GameEventHandler.java
Executable file → Normal file
@ -15,13 +15,32 @@
|
||||
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package baritone.bot;
|
||||
/*
|
||||
* This file is part of Baritone.
|
||||
*
|
||||
* Baritone is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Baritone is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package baritone.bot.event;
|
||||
|
||||
import baritone.bot.Baritone;
|
||||
import baritone.bot.InputOverrideHandler;
|
||||
import baritone.bot.behavior.Behavior;
|
||||
import baritone.bot.chunk.CachedWorld;
|
||||
import baritone.bot.chunk.CachedWorldProvider;
|
||||
import baritone.bot.chunk.ChunkPacker;
|
||||
import baritone.bot.event.IGameEventListener;
|
||||
import baritone.bot.event.listener.IGameEventListener;
|
||||
import baritone.bot.event.events.*;
|
||||
import baritone.bot.event.events.type.EventState;
|
||||
import baritone.bot.utils.Helper;
|
||||
@ -40,8 +59,6 @@ import java.util.function.Consumer;
|
||||
*/
|
||||
public final class GameEventHandler implements IGameEventListener, Helper {
|
||||
|
||||
GameEventHandler() {}
|
||||
|
||||
@Override
|
||||
public final void onTick(TickEvent event) {
|
||||
dispatch(behavior -> behavior.onTick(event));
|
@ -15,7 +15,24 @@
|
||||
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package baritone.bot.event;
|
||||
/*
|
||||
* This file is part of Baritone.
|
||||
*
|
||||
* Baritone is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Baritone is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package baritone.bot.event.listener;
|
||||
|
||||
import baritone.bot.event.events.*;
|
||||
|
19
src/main/java/baritone/bot/event/IGameEventListener.java → src/main/java/baritone/bot/event/listener/IGameEventListener.java
Executable file → Normal file
19
src/main/java/baritone/bot/event/IGameEventListener.java → src/main/java/baritone/bot/event/listener/IGameEventListener.java
Executable file → Normal file
@ -15,7 +15,24 @@
|
||||
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package baritone.bot.event;
|
||||
/*
|
||||
* This file is part of Baritone.
|
||||
*
|
||||
* Baritone is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Baritone is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package baritone.bot.event.listener;
|
||||
|
||||
import baritone.bot.event.events.*;
|
||||
import io.netty.util.concurrent.GenericFutureListener;
|
Loading…
Reference in New Issue
Block a user