net.minecraft.world.BossInfoServer Java Examples

The following examples show how to use net.minecraft.world.BossInfoServer. 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: TeleportEntity.java    From enderutilities with GNU Lesser General Public License v3.0 6 votes vote down vote up
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 File: CraftBossBar.java    From Kettle with 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 File: EntityTofuGandlem.java    From TofuCraftReload with MIT License 4 votes vote down vote up
public BossInfoServer getBossInfo() {
	return bossInfo;
}