brady was right and I was wrong

This commit is contained in:
Leijurv 2018-09-09 10:27:47 -07:00
parent ef4de2b159
commit 4a13b54e50
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 27 additions and 26 deletions

View File

@ -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) {

View File

@ -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