本文整理匯總了Java中net.minecraft.util.EnumChatFormatting.GREEN屬性的典型用法代碼示例。如果您正苦於以下問題:Java EnumChatFormatting.GREEN屬性的具體用法?Java EnumChatFormatting.GREEN怎麽用?Java EnumChatFormatting.GREEN使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類net.minecraft.util.EnumChatFormatting
的用法示例。
在下文中一共展示了EnumChatFormatting.GREEN屬性的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setMissionControlPort
/** Set the actual port used for mission control - not persisted, could be different each time the Mod is run.
* @param port the port currently in use for mission control.
*/
static public void setMissionControlPort(int port)
{
if (port != AddressHelper.missionControlPort)
{
AddressHelper.missionControlPort = port;
// Also update our metadata, for displaying to the user:
ModMetadata md = Loader.instance().activeModContainer().getMetadata();
if (port != -1)
md.description = "Talk to this Mod using port " + EnumChatFormatting.GREEN + port;
else
md.description = EnumChatFormatting.RED + "ERROR: No mission control port - check configuration";
// See if changing the port should lead to changing the login details:
//AuthenticationHelper.update(MalmoMod.instance.getModPermanentConfigFile());
}
}
示例2: onReceiveMissionInit
protected void onReceiveMissionInit(MissionInit missionInit)
{
System.out.println("Mission received: " + missionInit.getMission().getAbout().getSummary());
ChatComponentText txtMission = new ChatComponentText("Received mission: " + EnumChatFormatting.BLUE + missionInit.getMission().getAbout().getSummary());
ChatComponentText txtSource = new ChatComponentText("Source: " + EnumChatFormatting.GREEN + missionInit.getClientAgentConnection().getAgentIPAddress());
MinecraftServer.getServer().getConfigurationManager().sendChatMsg(txtMission);
MinecraftServer.getServer().getConfigurationManager().sendChatMsg(txtSource);
ServerStateMachine.this.currentMissionInit = missionInit;
// Create the Mission Handlers
try
{
this.ssmachine.initialiseHandlers(missionInit);
}
catch (Exception e)
{
// TODO: What?
}
// Move on to next state:
episodeHasCompleted(ServerState.BUILDING_WORLD);
}
示例3: getDoubleKeyBindingColor
@Redirect(method = "drawEntry", at = @At(value = "FIELD",
target = "Lnet/minecraft/util/EnumChatFormatting;RED:Lnet/minecraft/util/EnumChatFormatting;"))
private EnumChatFormatting getDoubleKeyBindingColor() {
return EnumChatFormatting.GREEN;
}
示例4: drawSlot
protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int mouseXIn, int mouseYIn)
{
IngestServer ingestserver = this.mc.getTwitchStream().func_152925_v()[entryID];
String s = ingestserver.serverUrl.replaceAll("\\{stream_key\\}", "");
String s1 = (int)ingestserver.bitrateKbps + " kbps";
String s2 = null;
IngestServerTester ingestservertester = this.mc.getTwitchStream().func_152932_y();
if (ingestservertester != null)
{
if (ingestserver == ingestservertester.func_153040_c())
{
s = EnumChatFormatting.GREEN + s;
s1 = (int)(ingestservertester.func_153030_h() * 100.0F) + "%";
}
else if (entryID < ingestservertester.func_153028_p())
{
if (ingestserver.bitrateKbps == 0.0F)
{
s1 = EnumChatFormatting.RED + "Down!";
}
}
else
{
s1 = EnumChatFormatting.OBFUSCATED + "1234" + EnumChatFormatting.RESET + " kbps";
}
}
else if (ingestserver.bitrateKbps == 0.0F)
{
s1 = EnumChatFormatting.RED + "Down!";
}
p_180791_2_ = p_180791_2_ - 15;
if (this.isSelected(entryID))
{
s2 = EnumChatFormatting.BLUE + "(Preferred)";
}
else if (ingestserver.defaultServer)
{
s2 = EnumChatFormatting.GREEN + "(Default)";
}
GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, ingestserver.serverName, p_180791_2_ + 2, p_180791_3_ + 5, 16777215);
GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s, p_180791_2_ + 2, p_180791_3_ + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT + 5 + 3, 3158064);
GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s1, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s1), p_180791_3_ + 5, 8421504);
if (s2 != null)
{
GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s2, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s2), p_180791_3_ + 5 + 3 + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT, 8421504);
}
}
示例5: getDebugInfoRight
protected List<String> getDebugInfoRight()
{
long i = Runtime.getRuntime().maxMemory();
long j = Runtime.getRuntime().totalMemory();
long k = Runtime.getRuntime().freeMemory();
long l = j - k;
List<String> list = Lists.newArrayList(new String[] {String.format("Java: %s %dbit", new Object[]{System.getProperty("java.version"), Integer.valueOf(this.mc.isJava64bit() ? 64 : 32)}), String.format("Mem: % 2d%% %03d/%03dMB", new Object[]{Long.valueOf(l * 100L / i), Long.valueOf(bytesToMb(l)), Long.valueOf(bytesToMb(i))}), String.format("Allocated: % 2d%% %03dMB", new Object[]{Long.valueOf(j * 100L / i), Long.valueOf(bytesToMb(j))}), "", String.format("CPU: %s", new Object[]{OpenGlHelper.func_183029_j()}), "", String.format("Display: %dx%d (%s)", new Object[]{Integer.valueOf(Display.getWidth()), Integer.valueOf(Display.getHeight()), GL11.glGetString(GL11.GL_VENDOR)}), GL11.glGetString(GL11.GL_RENDERER), GL11.glGetString(GL11.GL_VERSION)});
if (this.isReducedDebug())
{
return list;
}
else
{
if (this.mc.objectMouseOver != null && this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && this.mc.objectMouseOver.getBlockPos() != null)
{
BlockPos blockpos = this.mc.objectMouseOver.getBlockPos();
IBlockState iblockstate = this.mc.theWorld.getBlockState(blockpos);
if (this.mc.theWorld.getWorldType() != WorldType.DEBUG_WORLD)
{
iblockstate = iblockstate.getBlock().getActualState(iblockstate, this.mc.theWorld, blockpos);
}
list.add("");
list.add(String.valueOf(Block.blockRegistry.getNameForObject(iblockstate.getBlock())));
for (Entry<IProperty, Comparable> entry : iblockstate.getProperties().entrySet())
{
String s = ((Comparable)entry.getValue()).toString();
if (entry.getValue() == Boolean.TRUE)
{
s = EnumChatFormatting.GREEN + s;
}
else if (entry.getValue() == Boolean.FALSE)
{
s = EnumChatFormatting.RED + s;
}
list.add(((IProperty)entry.getKey()).getName() + ": " + s);
}
}
return list;
}
}
示例6: getWailaBody
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
IWailaConfigHandler config) {
Block block = accessor.getBlock();
if(block == ModBlocks.WoodenPressWet) {
// NBTTagCompound tagCompound = accessor.getNBTData();
// int md = tagCompound.getInteger("metadata");
String tip = (accessor.getMetadata() == 0 ? (EnumChatFormatting.RED + "Wait until dry")
: (EnumChatFormatting.GREEN + "Break to obtain paper"));
currenttip.add(tip);
}
return currenttip;
}