Java Code Examples for net.minecraft.world.BossInfoServer

The following examples show how to use net.minecraft.world.BossInfoServer. These examples are extracted from open source projects. 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
private static void removeDragonBossBarHack(EntityPlayerMP player, WorldProviderEnd provider)
{
    // Somewhat ugly way to clear the Boss Info stuff when teleporting FROM The End
    DragonFightManager manager = provider.getDragonFightManager();

    if (manager != null)
    {
        try
        {
            BossInfoServer bossInfo = ObfuscationReflectionHelper.getPrivateValue(DragonFightManager.class, manager, "field_186109_c");

            if (bossInfo != null)
            {
                bossInfo.removePlayer(player);
            }
        }
        catch (Exception e)
        {
            EnderUtilities.logger.warn("TP: Failed to get DragonFightManager#bossInfo");
        }
    }
}
 
Example 2
Source Project: Kettle   Source File: CraftBossBar.java    License: GNU General Public License v3.0 5 votes vote down vote up
public CraftBossBar(String title, BarColor color, BarStyle style, BarFlag... flags) {
    this.flags = flags.length > 0 ? EnumSet.of(flags[0], flags) : EnumSet.noneOf(BarFlag.class);
    this.color = color;
    this.style = style;

    handle = new BossInfoServer(
            CraftChatMessage.fromString(title, true)[0],
            convertColor(color),
            convertStyle(style)
    );

    updateFlags();
}
 
Example 3
Source Project: TofuCraftReload   Source File: EntityTofuGandlem.java    License: MIT License 4 votes vote down vote up
public BossInfoServer getBossInfo() {
	return bossInfo;
}