mirror of
https://github.com/cabaletta/baritone
synced 2024-12-29 10:32:31 +00:00
brady was right and I was wrong
This commit is contained in:
parent
ef4de2b159
commit
4a13b54e50
@ -60,20 +60,20 @@ public final class GameEventHandler implements IGameEventListener, Helper {
|
||||
|
||||
@Override
|
||||
public final void onTick(TickEvent event) {
|
||||
for (IGameEventListener l : listeners) {
|
||||
listeners.forEach(l -> {
|
||||
if (canDispatch(l)) {
|
||||
l.onTick(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onPlayerUpdate(PlayerUpdateEvent event) {
|
||||
for (IGameEventListener l : listeners) {
|
||||
listeners.forEach(l -> {
|
||||
if (canDispatch(l)) {
|
||||
l.onPlayerUpdate(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -93,20 +93,20 @@ public final class GameEventHandler implements IGameEventListener, Helper {
|
||||
}
|
||||
}
|
||||
|
||||
for (IGameEventListener l : listeners) {
|
||||
listeners.forEach(l -> {
|
||||
if (canDispatch(l)) {
|
||||
l.onProcessKeyBinds();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onSendChatMessage(ChatEvent event) {
|
||||
for (IGameEventListener l : listeners) {
|
||||
listeners.forEach(l -> {
|
||||
if (canDispatch(l)) {
|
||||
l.onSendChatMessage(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -132,20 +132,20 @@ public final class GameEventHandler implements IGameEventListener, Helper {
|
||||
}
|
||||
|
||||
|
||||
for (IGameEventListener l : listeners) {
|
||||
listeners.forEach(l -> {
|
||||
if (canDispatch(l)) {
|
||||
l.onChunkEvent(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onRenderPass(RenderEvent event) {
|
||||
for (IGameEventListener l : listeners) {
|
||||
listeners.forEach(l -> {
|
||||
if (canDispatch(l)) {
|
||||
l.onRenderPass(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -165,65 +165,65 @@ public final class GameEventHandler implements IGameEventListener, Helper {
|
||||
break;
|
||||
}
|
||||
|
||||
for (IGameEventListener l : listeners) {
|
||||
listeners.forEach(l -> {
|
||||
if (canDispatch(l)) {
|
||||
l.onWorldEvent(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onSendPacket(PacketEvent event) {
|
||||
for (IGameEventListener l : listeners) {
|
||||
listeners.forEach(l -> {
|
||||
if (canDispatch(l)) {
|
||||
l.onSendPacket(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onReceivePacket(PacketEvent event) {
|
||||
for (IGameEventListener l : listeners) {
|
||||
listeners.forEach(l -> {
|
||||
if (canDispatch(l)) {
|
||||
l.onReceivePacket(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerRelativeMove(RelativeMoveEvent event) {
|
||||
for (IGameEventListener l : listeners) {
|
||||
listeners.forEach(l -> {
|
||||
if (canDispatch(l)) {
|
||||
l.onPlayerRelativeMove(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockInteract(BlockInteractEvent event) {
|
||||
for (IGameEventListener l : listeners) {
|
||||
listeners.forEach(l -> {
|
||||
if (canDispatch(l)) {
|
||||
l.onBlockInteract(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerDeath() {
|
||||
for (IGameEventListener l : listeners) {
|
||||
listeners.forEach(l -> {
|
||||
if (canDispatch(l)) {
|
||||
l.onPlayerDeath();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPathEvent(PathEvent event) {
|
||||
for (IGameEventListener l : listeners) {
|
||||
listeners.forEach(l -> {
|
||||
if (canDispatch(l)) {
|
||||
l.onPathEvent(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public final void registerEventListener(IGameEventListener listener) {
|
||||
|
@ -419,6 +419,7 @@ public interface MovementHelper extends ActionCosts, Helper {
|
||||
|
||||
//this doesn't guarantee descend is possible, it just guarantees fall is impossible
|
||||
return new MovementDescend(pos, dest.down()); // standard move out by 1 and descend by 1
|
||||
// we can't cost shortcut descend because !canWalkThrough doesn't mean canWalkOn
|
||||
}
|
||||
|
||||
// we're clear for a fall 2
|
||||
|
Loading…
Reference in New Issue
Block a user