net.minecraft.util.EnumChatFormatting Java Examples
The following examples show how to use
net.minecraft.util.EnumChatFormatting.
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: NEIServerUtils.java From NotEnoughItems with MIT License | 6 votes |
public static void givePlayerItem(EntityPlayerMP player, ItemStack stack, boolean infinite, boolean doGive) { if (stack.getItem() == null) { player.addChatComponentMessage(setColour(new ChatComponentTranslation("nei.chat.give.noitem"), EnumChatFormatting.WHITE)); return; } int given = stack.stackSize; if(doGive) { if (infinite) player.inventory.addItemStackToInventory(stack); else given -= InventoryUtils.insertItem(player.inventory, stack, false); } sendNotice(player, new ChatComponentTranslation("commands.give.success", stack.getChatComponent(), infinite ? "\u221E" : Integer.toString(given), player.getCommandSenderName()), "notify-item"); player.openContainer.detectAndSendChanges(); }
Example #2
Source File: PluginGT5IEVeinStat.java From GTNEIOrePlugin with MIT License | 6 votes |
@Override public void drawExtras(int recipe) { CachedIEVeinStatRecipe crecipe = (CachedIEVeinStatRecipe) this.arecipes.get(recipe); OreLayerWrapper oreLayer = GT5OreLayerHelper.mapOreLayerWrapper.get(crecipe.veinName); int stringLength1 = GuiDraw.getStringWidth(I18n.format("gtnop.gui.nei.weightedChance") + ": "); int stringLength2 = GuiDraw.getStringWidth("40%"); int beginXCoord = (stringLength1+stringLength2)/2; GuiDraw.drawString(I18n.format("gtnop.gui.nei.veinName") + ": " + getLocalizedVeinName(oreLayer.veinName), 2, 18, 0x404040, false); GuiDraw.drawString(I18n.format("gtnop.gui.nei.ieVeinComponent") + ": ", 2, 31, 0x404040, false); GuiDraw.drawStringR("40.00%", beginXCoord+5, 44, 0x404040, false); GuiDraw.drawString(GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.primaryMeta)), 2+stringLength1, 44, 0x404040, false); GuiDraw.drawStringR("40.00%", beginXCoord+5, 57, 0x404040, false); GuiDraw.drawString(GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.secondaryMeta)), 2+stringLength1, 57, 0x404040, false); GuiDraw.drawStringR("15.00%", beginXCoord+5, 70, 0x404040, false); GuiDraw.drawString(GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.betweenMeta)), 2+stringLength1, 70, 0x404040, false); GuiDraw.drawStringR("5.00%", beginXCoord+5, 83, 0x404040, false); GuiDraw.drawString(GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.sporadicMeta)), 2+stringLength1, 83, 0x404040, false); GuiDraw.drawString(I18n.format("gtnop.gui.nei.weightedChance") + ": " + oreLayer.weightedIEChance, 2, 96, 0x404040, false); GuiDraw.drawString(I18n.format("gtnop.gui.nei.fromMod") + ": " + "Immersive Engineering", 2, 109, 0x404040, false); GuiDraw.drawStringR(EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"), getGuiWidth()-3, 5, 0x404040, false); }
Example #3
Source File: CommandManager.java From ehacks-pro with GNU General Public License v3.0 | 6 votes |
public void processString(String message) { message = message.trim(); if (message.startsWith("/")) { message = message.substring(1); } String[] temp = message.split(" "); String[] args = new String[temp.length - 1]; String commandName = temp[0]; System.arraycopy(temp, 1, args, 0, args.length); try { processCommand(getCommand(commandName), args); } catch (Exception e) { EHacksGui.clickGui.consoleGui.printChatMessage(format(EnumChatFormatting.RED, "commands.generic.exception")); } }
Example #4
Source File: ModuleLogistics.java From PneumaticCraft with GNU General Public License v3.0 | 6 votes |
@Override public void addInfo(List<String> curInfo){ super.addInfo(curInfo); String status; if(ticksSinceAction >= 0) { status = "waila.logisticsModule.transporting"; } else if(ticksSinceNotEnoughAir >= 0) { status = "waila.logisticsModule.notEnoughAir"; } else if(hasPower()) { status = "waila.logisticsModule.powered"; } else { status = "waila.logisticsModule.noPower"; } curInfo.add(StatCollector.translateToLocal("hud.msg.state") + ": " + StatCollector.translateToLocal(status)); curInfo.add(StatCollector.translateToLocal("waila.logisticsModule.channel") + " " + EnumChatFormatting.YELLOW + StatCollector.translateToLocal("item.fireworksCharge." + ItemDye.field_150923_a[colorChannel])); }
Example #5
Source File: WidgetTank.java From PneumaticCraft with GNU General Public License v3.0 | 6 votes |
@Override public void addTooltip(int mouseX, int mouseY, List<String> curTip, boolean shift){ Fluid fluid = null; int amt = 0; int capacity = 0; if(tank.getFluid() != null) { fluid = tank.getFluid().getFluid(); amt = tank.getFluidAmount(); } capacity = tank.getCapacity(); if(fluid == null || amt == 0 || capacity == 0) { curTip.add(amt + "/" + capacity + " mb"); curTip.add(EnumChatFormatting.GRAY + I18n.format("gui.liquid.empty")); } else { curTip.add(amt + "/" + capacity + " mb"); curTip.add(EnumChatFormatting.GRAY + fluid.getLocalizedName(new FluidStack(fluid, amt))); } }
Example #6
Source File: ItemCoordinateCache.java From ModdingTutorials with GNU General Public License v2.0 | 6 votes |
@Override public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) { if(!playerIn.isSneaking()) { if(stack.getTagCompound() == null) { stack.setTagCompound(new NBTTagCompound()); } NBTTagCompound nbt = new NBTTagCompound(); nbt.setInteger("dim", playerIn.dimension); nbt.setInteger("posX", pos.getX()); nbt.setInteger("posY", pos.getY()); nbt.setInteger("posZ", pos.getZ()); stack.getTagCompound().setTag("coords", nbt); stack.setStackDisplayName(EnumChatFormatting.DARK_PURPLE + "Coordinate Cache"); } return false; }
Example #7
Source File: DisplayTable.java From Hyperium with GNU Lesser General Public License v3.0 | 6 votes |
@Override public void draw(int x, int y) { boolean first = true; GlStateManager.pushMatrix(); GlStateManager.translate(x, y, 0); for (String[] row : rows) { FontRenderer fontRendererObj = Minecraft.getMinecraft().fontRendererObj; GlStateManager.pushMatrix(); for (int i = 0; i < row.length; i++) { String tmp = row[i]; fontRendererObj.drawString((first ? EnumChatFormatting.BOLD : "") + tmp, 0, 0, Color.WHITE.getRGB()); GlStateManager.translate(rowSpacing[i], 0, 0); } GlStateManager.popMatrix(); GlStateManager.translate(0, 11, 0); first = false; } GlStateManager.popMatrix(); }
Example #8
Source File: WailaRedstoneControl.java From PneumaticCraft with GNU General Public License v3.0 | 6 votes |
public static void addTipToMachine(List<String> currenttip, IWailaDataAccessor accessor){ NBTTagCompound tag = accessor.getNBTData(); //This is used so that we can split values later easier and have them all in the same layout. Map<String, String> values = new HashMap<String, String>(); if(tag.hasKey("redstoneMode")) { int mode = tag.getInteger("redstoneMode"); GuiPneumaticContainerBase gui = (GuiPneumaticContainerBase)PneumaticCraft.proxy.getClientGuiElement(((BlockPneumaticCraft)accessor.getBlock()).getGuiID().ordinal(), accessor.getPlayer(), accessor.getWorld(), accessor.getPosition().blockX, accessor.getPosition().blockY, accessor.getPosition().blockZ); if(gui != null) { values.put(gui.getRedstoneString(), gui.getRedstoneButtonText(mode)); } } //Get all the values from the map and put them in the list. for(Map.Entry<String, String> entry : values.entrySet()) { currenttip.add(EnumChatFormatting.RED + I18n.format(entry.getKey()) + ": " + /*SpecialChars.ALIGNRIGHT +*/I18n.format(entry.getValue())); } }
Example #9
Source File: ItemUsedSoilKit.java From GardenCollection with MIT License | 6 votes |
@SideOnly(Side.CLIENT) @Override public void addInformation (ItemStack itemStack, EntityPlayer player, List list, boolean par4) { float temperature = (itemStack.getItemDamage() & 127) / 127f; float humidity = ((itemStack.getItemDamage() >> 7) & 127) / 127f; EnumChatFormatting tempColor = EnumChatFormatting.BLUE; if (temperature >= .2) tempColor = EnumChatFormatting.DARK_GREEN; if (temperature >= 1) tempColor = EnumChatFormatting.DARK_RED; EnumChatFormatting humidColor = EnumChatFormatting.DARK_RED; if (humidity >= .3) humidColor = EnumChatFormatting.GOLD; if (humidity >= .6) humidColor = EnumChatFormatting.DARK_GREEN; String temperatureStr = StatCollector.translateToLocal("gardencore.soilkit.temperature") + ": " + tempColor + String.format("%.2f", temperature) ; String humidityStr = StatCollector.translateToLocal("gardencore.soilkit.rainfall") + ": " + humidColor + String.format("%.2f", humidity); list.add(temperatureStr); list.add(humidityStr); }
Example #10
Source File: PacketTCNotificationText.java From Gadomancy with GNU Lesser General Public License v3.0 | 6 votes |
@Override public IMessage onMessage(PacketTCNotificationText message, MessageContext ctx) { if(message.text == null) return null; String translated = StatCollector.translateToLocal(message.text); ResourceLocation image = null; int color = message.color; Aspect a = Aspect.getAspect(message.additionalInfo); if(a != null) { image = a.getImage(); color = a.getColor(); } if(message.text.equals("gadomancy.aura.research.unlock")) { if(a != null) { translated = EnumChatFormatting.GREEN + String.format(translated, a.getName()); } else { translated = EnumChatFormatting.GREEN + String.format(translated, message.additionalInfo); } } color &= 0xFFFFFF; PlayerNotifications.addNotification(translated, image, color); return null; }
Example #11
Source File: WailaCamoHandler.java From AdvancedMod with GNU General Public License v3.0 | 6 votes |
@Override public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config){ NBTTagCompound tag = accessor.getNBTData(); String target = tag.getString("target"); if(!target.equals("")) { currenttip.add(I18n.format("advancedMod.waila.camoMine.target") + " " + EnumChatFormatting.GREEN + target); } int timer = tag.getInteger("timer"); if(timer == 0) { currenttip.add(I18n.format("advancedMod.waila.camoMine.primed")); } else if(timer == -1) { currenttip.add(I18n.format("advancedMod.waila.camoMine.notPrimed")); } else { currenttip.add(I18n.format("advancedMod.waila.camoMine.primingIn") + " " + timer); } return currenttip; }
Example #12
Source File: EventHandlerWorld.java From Gadomancy with GNU Lesser General Public License v3.0 | 6 votes |
@SubscribeEvent public void onBreak(BlockEvent.BreakEvent event) { if (!event.world.isRemote) { if (event.block == RegisteredBlocks.blockNodeManipulator) { TileEntity te = event.world.getTileEntity(event.x, event.y, event.z); if (te != null && te instanceof TileNodeManipulator) { if (((TileNodeManipulator) te).isInMultiblock()) ((TileNodeManipulator) te).breakMultiblock(); } } if (event.block == RegisteredBlocks.blockStoneMachine && event.blockMetadata == 5) { TileAIShutdown.removeTrackedEntities(event.world, event.x, event.y, event.z); } if (event.world.provider.dimensionId == ModConfig.dimOuterId) { if(event.block == ConfigBlocks.blockEldritchNothing) { if(event.getPlayer().capabilities.isCreativeMode && MiscUtils.isANotApprovedOrMisunderstoodPersonFromMoreDoor(event.getPlayer())) return; event.setCanceled(true); event.getPlayer().addChatMessage(new ChatComponentText(EnumChatFormatting.ITALIC + "" + EnumChatFormatting.GRAY + StatCollector.translateToLocal("gadomancy.eldritch.nobreakPortalNothing"))); } } } }
Example #13
Source File: NEIModContainer.java From NotEnoughItems with MIT License | 6 votes |
@Override public ModMetadata getMetadata() { String s_plugins = ""; if (plugins.size() == 0) { s_plugins += EnumChatFormatting.RED+"No installed plugins."; } else { s_plugins += EnumChatFormatting.GREEN+"Installed plugins: "; for (int i = 0; i < plugins.size(); i++) { if (i > 0) s_plugins += ", "; IConfigureNEI plugin = plugins.get(i); s_plugins += plugin.getName() + " " + plugin.getVersion(); } s_plugins += "."; } ModMetadata meta = super.getMetadata(); meta.description = description.replace("<plugins>", s_plugins); return meta; }
Example #14
Source File: EventHandlerWorld.java From Gadomancy with GNU Lesser General Public License v3.0 | 6 votes |
@SubscribeEvent(priority = EventPriority.NORMAL) public void on(ItemTooltipEvent e) { if (e.toolTip.size() > 0 && e.itemStack.hasTagCompound()) { if (e.itemStack.stackTagCompound.getBoolean("isStickyJar")) { e.toolTip.add(1, "\u00a7a" + StatCollector.translateToLocal("gadomancy.lore.stickyjar")); } } if(e.toolTip.size() > 0 && NBTHelper.hasPersistentData(e.itemStack)) { NBTTagCompound compound = NBTHelper.getPersistentData(e.itemStack); if(compound.hasKey("disguise")) { NBTBase base = compound.getTag("disguise"); String lore; if(base instanceof NBTTagCompound) { ItemStack stack = ItemStack.loadItemStackFromNBT((NBTTagCompound) base); lore = String.format(StatCollector.translateToLocal("gadomancy.lore.disguise.item"), EnumChatFormatting.getTextWithoutFormattingCodes(stack.getDisplayName())); } else { lore = StatCollector.translateToLocal("gadomancy.lore.disguise.none"); } e.toolTip.add("\u00a7a" + lore); } } }
Example #15
Source File: GuiSecurityStationInventory.java From PneumaticCraft with GNU General Public License v3.0 | 6 votes |
private List<String> getStatusText(){ List<String> text = new ArrayList<String>(); text.add(EnumChatFormatting.GRAY + "Protection"); if(te.getRebootTime() > 0) { text.add(EnumChatFormatting.DARK_RED + "No protection because of rebooting!"); } else if(te.isHacked()) { text.add(EnumChatFormatting.DARK_RED + "Hacked by:"); for(GameProfile hacker : te.hackedUsers) { text.add(EnumChatFormatting.DARK_RED + "-" + hacker.getName()); } } else { text.add(EnumChatFormatting.BLACK + "System secure"); } text.add(EnumChatFormatting.GRAY + "Security Level"); text.add(EnumChatFormatting.BLACK + "Level " + te.getSecurityLevel()); text.add(EnumChatFormatting.GRAY + "Intruder Detection Chance"); text.add(EnumChatFormatting.BLACK.toString() + te.getDetectionChance() + "%%"); text.add(EnumChatFormatting.GRAY + "Security Range"); text.add(EnumChatFormatting.BLACK.toString() + te.getSecurityRange() + "m (square)"); return text; }
Example #16
Source File: ComponentFoodie.java From Artifacts with MIT License | 5 votes |
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, String trigger, boolean advTooltip) { String amount = "effect.fills hunger when half empty"; if(trigger == "when inflicting damage." || trigger == "when used.") { amount = "effect.fills 1 drumstick"; } par3List.add(EnumChatFormatting.AQUA + StatCollector.translateToLocal("effect.Food Saturation")); par3List.add(" " + EnumChatFormatting.AQUA + StatCollector.translateToLocal("tool."+trigger) + " (" + StatCollector.translateToLocal(amount) + ")"); }
Example #17
Source File: ComponentVision.java From Artifacts with MIT License | 5 votes |
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, String trigger, boolean advTooltip) { if(trigger == "passively.") { par3List.add(EnumChatFormatting.AQUA + StatCollector.translateToLocal("effect.Night Vision")); } else { int time = 0; if(trigger == "when used.") { time = 2; } par3List.add(EnumChatFormatting.AQUA + StatCollector.translateToLocal("effect.Night Vision")); par3List.add(" " + EnumChatFormatting.AQUA + StatCollector.translateToLocal("tool."+trigger) + " (" + time + " " + StatCollector.translateToLocal("time.minutes")+ ")"); } }
Example #18
Source File: WorldTicktimeSensor.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
@Override public List<String> getDescription(){ List<String> text = new ArrayList<String>(); text.add(EnumChatFormatting.BLACK + "Emits a redstone level dependant on the time used by the server to update the world this Universal Sensor is in. This time is calculated in the same way as Forge's /tps command. With the textbox you can select a resolution as follows:"); text.add(EnumChatFormatting.RED + "Strength = Ticktime(mS) * TextboxValue"); text.add(EnumChatFormatting.GREEN + "Example: Ticktime = 20mS ; Textbox text = '0.5'"); text.add(EnumChatFormatting.GREEN + "Strength = 20 * 0.5 = 10"); return text; }
Example #19
Source File: ItemAuraCore.java From Gadomancy with GNU Lesser General Public License v3.0 | 5 votes |
@Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean flag) { AuraCoreType type = getCoreType(stack); if(type != null) { list.add(EnumChatFormatting.GRAY + type.getLocalizedName()); } }
Example #20
Source File: ForgePlayer.java From FastAsyncWorldedit with GNU General Public License v3.0 | 5 votes |
@Override public void sendMessage(String msg) { for (String part : msg.split("\n")) { part = BBC.color(part); ChatComponentText component = new ChatComponentText(part); component.getChatStyle().setColor(EnumChatFormatting.LIGHT_PURPLE); this.parent.addChatMessage(component); } }
Example #21
Source File: FamiliarUndoRecipe.java From Gadomancy with GNU Lesser General Public License v3.0 | 5 votes |
public FamiliarUndoRecipe() { super(new ItemStack(RegisteredItems.itemPackage, 1, 2).setStackDisplayName(EnumChatFormatting.GOLD + "Used Familiar Items"), new ArrayList() { { add(new ItemStack(RegisteredItems.itemFamiliar_old)); } }); }
Example #22
Source File: WorldPlayersInServerSensor.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
@Override public List<String> getDescription(){ List<String> text = new ArrayList<String>(); text.add(EnumChatFormatting.BLACK + "Emits a redstone level for every player logged into the server."); text.add(EnumChatFormatting.BLACK + "When you fill in a specific player name, the Universal Sensor will emit a redstone signal of 15 if the player is online and 0 otherwise."); return text; }
Example #23
Source File: ItemFamiliar_Old.java From Gadomancy with GNU Lesser General Public License v3.0 | 5 votes |
@Override public void addInformation(ItemStack stack, EntityPlayer player, List lore, boolean flag) { lore.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("gadomancy.lore.deprecation.back")); if(stack.hasTagCompound()) { if(hasAspect(stack)) { lore.add(getAspect(stack).getName()); } if(Keyboard.isKeyDown(42) || Keyboard.isKeyDown(54)) { if(hasUpgrade(stack, FamiliarUpgrade.ATTACK_1) || hasUpgrade(stack, FamiliarUpgrade.ATTACK_2) || hasUpgrade(stack, FamiliarUpgrade.ATTACK_3)) { String strength = EnumChatFormatting.DARK_RED + "Strength "; if(hasUpgrade(stack, FamiliarUpgrade.ATTACK_1)) strength += "I"; if(hasUpgrade(stack, FamiliarUpgrade.ATTACK_2)) strength += "I"; if(hasUpgrade(stack, FamiliarUpgrade.ATTACK_3)) strength += "I"; lore.add(strength); } if(hasUpgrade(stack, FamiliarUpgrade.RANGE_1)) { lore.add(EnumChatFormatting.GOLD + "Reach I"); } if(hasUpgrade(stack, FamiliarUpgrade.COOLDOWN_1)) { lore.add(EnumChatFormatting.AQUA + "Swiftness I"); } } else { if(hasAnyUpgrade(stack)) { lore.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + StatCollector.translateToLocal("gadomancy.lore.hasAdditionalLore")); } } } super.addInformation(stack, player, lore, flag); }
Example #24
Source File: CommandShipInfo.java From archimedes-ships with MIT License | 5 votes |
@Override public void processCommand(ICommandSender icommandsender, String[] astring) { EntityShip ship = null; if (icommandsender instanceof Entity) { Entity player = (Entity) icommandsender; if (player.ridingEntity instanceof EntityShip) { ship = (EntityShip) player.ridingEntity; } else if (player.ridingEntity instanceof EntitySeat) { ship = ((EntitySeat) player.ridingEntity).getParentShip(); } } if (ship != null) { icommandsender.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN.toString() + EnumChatFormatting.BOLD.toString() + "Ship information")); icommandsender.addChatMessage(new ChatComponentText(String.format(Locale.ENGLISH, "Airship: %b", ship.getCapabilities().canFly()))); icommandsender.addChatMessage(new ChatComponentText(String.format(Locale.ENGLISH, "Position: %.2f, %.2f, %.2f", ship.posX, ship.posY, ship.posZ))); icommandsender.addChatMessage(new ChatComponentText(String.format(Locale.ENGLISH, "Speed: %.2f km/h", ship.getHorizontalVelocity() * 20 * 3.6F))); float f = 100F * ship.getCapabilities().getBalloonCount() / ship.getCapabilities().getBlockCount(); icommandsender.addChatMessage(new ChatComponentText(String.format(Locale.ENGLISH, "Block count: %d", ship.getCapabilities().getBlockCount()))); icommandsender.addChatMessage(new ChatComponentText(String.format(Locale.ENGLISH, "Balloon count: %d", ship.getCapabilities().getBalloonCount()))); icommandsender.addChatMessage(new ChatComponentText(String.format(Locale.ENGLISH, "Balloon percentage: %.0f%%", f))); icommandsender.addChatMessage(new ChatComponentText("")); return; } icommandsender.addChatMessage(new ChatComponentText("Not steering a ship")); }
Example #25
Source File: RecipeHandlerGrinder.java From NEI-Integration with MIT License | 5 votes |
@Override public List<String> provideTooltip(GuiRecipe guiRecipe, List<String> currenttip, CachedBaseRecipe crecipe, Point relMouse) { super.provideTooltip(guiRecipe, currenttip, crecipe, relMouse); if (new Rectangle(44, 24, 16, 16).contains(relMouse)) { currenttip.add(Utils.translate("handler.grinder.mobs")); currenttip.add(EnumChatFormatting.GRAY + Utils.translate("handler.grinder.mobs.1")); currenttip.add(EnumChatFormatting.GRAY + Utils.translate("handler.grinder.mobs.2")); } else if (new Rectangle(129, 2, 8, 60).contains(relMouse)) { currenttip.add(energyPerOperation + " RF"); } return currenttip; }
Example #26
Source File: ClientEventHandler.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
@SubscribeEvent public void onPlayerJoin(TickEvent.PlayerTickEvent event){ if(Config.shouldDisplayChangeNotification && firstTick && event.player.worldObj.isRemote && event.player == FMLClientHandler.instance().getClientPlayerEntity()) { event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.GREEN + "[PneumaticCraft] Disabled world generation of plants and plant mob drops in your config automatically, oil is turned on as replacement. This is only done once, you can change it as you wish now.")); firstTick = false; } }
Example #27
Source File: ConfigurationCommands.java From mobycraft with Apache License 2.0 | 5 votes |
public void getHostAndPath() { // if (configProperties.getDockerHostProperty() == null || configProperties.getCertPathProperty() == null) { // refreshHostAndPath(); // } sendMessage(EnumChatFormatting.BLUE + "" + EnumChatFormatting.BOLD + "Docker host: " + EnumChatFormatting.RESET + getConfigProperties().getDockerHostProperty().getString()); sendMessage(EnumChatFormatting.GOLD + "" + EnumChatFormatting.BOLD + "Docker cert path: " + EnumChatFormatting.RESET + getConfigProperties().getCertPathProperty().getString()); }
Example #28
Source File: ModuleFlowDetector.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
@Override public void addItemDescription(List<String> curInfo){ curInfo.add(EnumChatFormatting.BLUE + "Formula: Redstone = 0.2 x flow(mL/tick)"); curInfo.add("This module emits a redstone signal of which"); curInfo.add("the strength is dependant on how much air"); curInfo.add("is travelling through the tube."); }
Example #29
Source File: CommandWorld.java From TickDynamic with MIT License | 5 votes |
private void writeFooter(StringBuilder builder) { if(maxPages == 0) builder.append(EnumChatFormatting.GRAY + "+" + StringUtils.repeat("=", borderWidth) + "+\n"); else { String pagesStr = EnumChatFormatting.GREEN + "Page " + currentPage + "/" + maxPages; int pagesLength = getVisibleLength(pagesStr); int otherLength = borderWidth - pagesLength; builder.append(EnumChatFormatting.GRAY + "+" + StringUtils.repeat("=", otherLength/2)); builder.append(pagesStr); builder.append(EnumChatFormatting.GRAY + StringUtils.repeat("=", otherLength/2) + "+\n"); } }
Example #30
Source File: RecipeHandlerSlaughterhouse.java From NEI-Integration with MIT License | 5 votes |
@Override public List<String> provideTooltip(GuiRecipe guiRecipe, List<String> currenttip, CachedBaseRecipe crecipe, Point relMouse) { super.provideTooltip(guiRecipe, currenttip, crecipe, relMouse); if (new Rectangle(28, 24, 16, 16).contains(relMouse)) { currenttip.add(Utils.translate("handler.slaughterhouse.animals")); currenttip.add(EnumChatFormatting.GRAY + Utils.translate("handler.slaughterhouse.animals.1")); } else if (new Rectangle(129, 2, 8, 60).contains(relMouse)) { currenttip.add(energyPerOperation + " RF"); } return currenttip; }