Add render pass game event
This commit is contained in:
parent
89a64a375e
commit
9bda792a3e
@ -23,6 +23,11 @@ public final class GameEventHandler implements IGameEventListener {
|
||||
dispatch(Behavior::onTick);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRenderPass() {
|
||||
dispatch(Behavior::onRenderPass);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProcessKeyBinds() {
|
||||
InputOverrideHandler inputHandler = Baritone.INSTANCE.getInputOverrideHandler();
|
||||
|
@ -1,4 +0,0 @@
|
||||
package baritone.bot;
|
||||
|
||||
public class RenderPassHandler {
|
||||
}
|
@ -29,4 +29,7 @@ public interface AbstractGameEventListener extends IGameEventListener {
|
||||
|
||||
@Override
|
||||
default void onChunkEvent(ChunkEvent event) {}
|
||||
|
||||
@Override
|
||||
default void onRenderPass() {}
|
||||
}
|
||||
|
@ -40,4 +40,9 @@ public interface IGameEventListener {
|
||||
* @see WorldClient#doPreChunk(int, int, boolean)
|
||||
*/
|
||||
void onChunkEvent(ChunkEvent event);
|
||||
|
||||
/**
|
||||
* Runs once each frame
|
||||
*/
|
||||
void onRenderPass();
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package baritone.launch.mixins;
|
||||
|
||||
import baritone.bot.Baritone;
|
||||
import net.minecraft.client.renderer.EntityRenderer;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
@ -17,7 +18,7 @@ public class MixinEntityRenderer {
|
||||
)
|
||||
)
|
||||
private void renderWorldPass(CallbackInfo ci) {
|
||||
|
||||
Baritone.INSTANCE.getGameEventHandler().onRenderPass();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user