Java Code Examples for com.mojang.realmsclient.gui.ChatFormatting#RESET

The following examples show how to use com.mojang.realmsclient.gui.ChatFormatting#RESET . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TutorialComponent.java    From seppuku with GNU General Public License v3.0 6 votes vote down vote up
public TutorialComponent() {
    super("Tutorial", "");

    final String tutorialData = "Hud Editor Tutorial\n\n" +
            ChatFormatting.BOLD + "Anchor Points\n" + ChatFormatting.RESET +
            "- Move hud components by clicking & dragging them.\n" +
            "- Anchor points are located at each corner of the screen, and also one centered at the top of the screen.\n" +
            "- Drag a component near an anchor point and release the mouse to lock it in place.\n\n" +
            ChatFormatting.BOLD + "Combine\n" + ChatFormatting.RESET +
            "- Combine components together by dragging one into another one, releasing the mouse will combine them together.\n" +
            "- Both top and bottom parts of a component are able to be glued to.";

    this.setTextData(tutorialData);

    this.setVisible(true);
    this.setSnappable(false);
    this.setW(200);
    this.setH(173);
    this.setX((Minecraft.getMinecraft().displayWidth / 2) - (this.getW() / 2));
    this.setY((Minecraft.getMinecraft().displayHeight / 2) - (this.getH() / 2));
}
 
Example 2
Source File: CoordsComponent.java    From seppuku with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void render(int mouseX, int mouseY, float partialTicks) {
    super.render(mouseX, mouseY, partialTicks);
    final DecimalFormat df = new DecimalFormat("#.#");

    final String coords = ChatFormatting.GRAY + "x " + ChatFormatting.RESET +
            df.format(Minecraft.getMinecraft().player.posX) + ChatFormatting.RESET + "," +
            ChatFormatting.GRAY + " y " + ChatFormatting.RESET + df.format(Minecraft.getMinecraft().player.posY) + ChatFormatting.RESET + "," +
            ChatFormatting.GRAY + " z " + ChatFormatting.RESET + df.format(Minecraft.getMinecraft().player.posZ) + ChatFormatting.RESET;

    this.setW(Minecraft.getMinecraft().fontRenderer.getStringWidth(coords));
    this.setH(Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT);

    //RenderUtil.drawRect(this.getX(), this.getY(), this.getX() + this.getW(), this.getY() + this.getH(), 0xAA202020);
    Minecraft.getMinecraft().fontRenderer.drawStringWithShadow(coords, this.getX(), this.getY(), -1);
}
 
Example 3
Source File: NetherCoordsComponent.java    From seppuku with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void render(int mouseX, int mouseY, float partialTicks) {
    super.render(mouseX, mouseY, partialTicks);
    final DecimalFormat df = new DecimalFormat("#.#");

    final String coords = ChatFormatting.GRAY + "x " + ChatFormatting.RED +
            df.format(Minecraft.getMinecraft().player.posX * 8) + ChatFormatting.RED + "," +
            ChatFormatting.GRAY + " y " + ChatFormatting.RED + df.format(Minecraft.getMinecraft().player.posY) + ChatFormatting.RED + "," +
            ChatFormatting.GRAY + " z " + ChatFormatting.RED + df.format(Minecraft.getMinecraft().player.posZ * 8) + ChatFormatting.RESET;

    final String nether = ChatFormatting.GRAY + "x " + ChatFormatting.RED +
            df.format(Minecraft.getMinecraft().player.posX / 8) + ChatFormatting.RED + "," +
            ChatFormatting.GRAY + " y " + ChatFormatting.RED + df.format(Minecraft.getMinecraft().player.posY) + ChatFormatting.RED + "," +
            ChatFormatting.GRAY + " z " + ChatFormatting.RED + df.format(Minecraft.getMinecraft().player.posZ / 8) + ChatFormatting.RESET;

    this.setW(Minecraft.getMinecraft().fontRenderer.getStringWidth(Minecraft.getMinecraft().player.dimension == -1 ? coords : nether));
    this.setH(Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT);

    //RenderUtil.drawRect(this.getX(), this.getY(), this.getX() + this.getW(), this.getY() + this.getH(), 0x90222222);
    Minecraft.getMinecraft().fontRenderer.drawStringWithShadow(Minecraft.getMinecraft().player.dimension == -1 ? coords : nether, this.getX(), this.getY(), -1);
}
 
Example 4
Source File: RadarHack.java    From ForgeWurst with GNU General Public License v3.0 6 votes vote down vote up
public RadarHack()
{
	super("Radar",
		"Shows the location of nearby entities.\n" + ChatFormatting.RED
			+ "red" + ChatFormatting.RESET + " - players\n"
			+ ChatFormatting.GOLD + "orange" + ChatFormatting.RESET
			+ " - monsters\n" + ChatFormatting.GREEN + "green"
			+ ChatFormatting.RESET + " - animals\n" + ChatFormatting.GRAY
			+ "gray" + ChatFormatting.RESET + " - others\n");
	setCategory(Category.RENDER);
	addSetting(radius);
	addSetting(rotate);
	addSetting(filterPlayers);
	addSetting(filterSleeping);
	addSetting(filterMonsters);
	addSetting(filterAnimals);
	addSetting(filterInvisible);
	
	window = new Window("Radar");
	window.setPinned(true);
	window.setInvisible(true);
	window.add(new Radar(this));
}
 
Example 5
Source File: TunnellerHack.java    From ForgeWurst with GNU General Public License v3.0 5 votes vote down vote up
public TunnellerHack()
{
	super("Tunneller",
		"Automatically digs a tunnel.\n\n" + ChatFormatting.RED
			+ ChatFormatting.BOLD + "WARNING:" + ChatFormatting.RESET
			+ " Although this bot will try to avoid\n"
			+ "lava and other dangers, there is no guarantee\n"
			+ "that it won't die. Only send it out with gear\n"
			+ "that you don't mind losing.");
	setCategory(Category.BLOCKS);
	addSetting(size);
	addSetting(limit);
	addSetting(torches);
}
 
Example 6
Source File: MobSpawnEspHack.java    From ForgeWurst with GNU General Public License v3.0 5 votes vote down vote up
public MobSpawnEspHack()
{
	super("MobSpawnESP",
		"Highlights areas where mobs can spawn.\n" + ChatFormatting.YELLOW
			+ "yellow" + ChatFormatting.RESET
			+ " - mobs can spawn at night\n" + ChatFormatting.RED + "red"
			+ ChatFormatting.RESET + " - mobs can always spawn");
	setCategory(Category.RENDER);
	addSetting(drawDistance);
	addSetting(loadingSpeed);
}
 
Example 7
Source File: EditBlockListScreen.java    From ForgeWurst with GNU General Public License v3.0 5 votes vote down vote up
private String renderIconAndGetName(ItemStack stack, int y)
{
	if(WItem.isNullOrEmpty(stack))
	{
		GL11.glPushMatrix();
		GL11.glTranslated(52, y, 0);
		GL11.glScaled(0.75, 0.75, 0.75);
		
		RenderHelper.enableGUIStandardItemLighting();
		mc.getRenderItem().renderItemAndEffectIntoGUI(
			new ItemStack(Blocks.GRASS), 0, 0);
		RenderHelper.disableStandardItemLighting();
		GL11.glPopMatrix();
		
		GL11.glDisable(GL11.GL_DEPTH_TEST);
		FontRenderer fr = WMinecraft.getFontRenderer();
		fr.drawString("?", 55, y + 2, 0xf0f0f0, true);
		GL11.glEnable(GL11.GL_DEPTH_TEST);
		
		return ChatFormatting.ITALIC + "unknown block"
			+ ChatFormatting.RESET;
		
	}else
	{
		GL11.glPushMatrix();
		GL11.glTranslated(52, y, 0);
		GL11.glScaled(0.75, 0.75, 0.75);
		
		RenderHelper.enableGUIStandardItemLighting();
		mc.getRenderItem().renderItemAndEffectIntoGUI(stack, 0, 0);
		RenderHelper.disableStandardItemLighting();
		
		GL11.glPopMatrix();
		
		return stack.getDisplayName();
	}
}