use of net.minecraft.client.network.AbstractClientPlayerEntity in project BleachHack by BleachDrinker420.
the class CmdInvPeek method onCommand.
@Override
public void onCommand(String alias, String[] args) throws Exception {
if (args.length == 0) {
throw new CmdSyntaxException();
}
for (AbstractClientPlayerEntity e : mc.world.getPlayers()) {
if (e.getDisplayName().getString().equalsIgnoreCase(args[0])) {
BleachQueue.add(() -> {
BleachLogger.info("Opened inventory for " + e.getDisplayName().getString());
mc.setScreen(new InventoryScreen(e) {
public boolean mouseClicked(double mouseX, double mouseY, int button) {
return false;
}
protected void drawBackground(MatrixStack matrices, float delta, int mouseX, int mouseY) {
RenderSystem.setShader(GameRenderer::getPositionTexShader);
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.setShaderTexture(0, BACKGROUND_TEXTURE);
this.drawTexture(matrices, x, y, 0, 0, this.backgroundWidth, this.backgroundHeight);
drawEntity(x + 51, y + 75, 30, (float) (x + 51) - mouseX, (float) (y + 75 - 50) - mouseY, this.client.player);
}
});
});
return;
}
}
BleachLogger.error("Player " + args[0] + " not found!");
}
Aggregations