Java 类net.minecraft.network.play.server.SPacketUpdateBossInfo 实例源码

项目:Backmemed    文件:BossInfoLerping.java   
@SuppressWarnings("incomplete-switch")
public void updateFromPacket(SPacketUpdateBossInfo packetIn)
{
    switch (packetIn.getOperation())
    {
        case UPDATE_NAME:
            this.setName(packetIn.getName());
            break;

        case UPDATE_PCT:
            this.setPercent(packetIn.getPercent());
            break;

        case UPDATE_STYLE:
            this.setColor(packetIn.getColor());
            this.setOverlay(packetIn.getOverlay());
            break;

        case UPDATE_PROPERTIES:
            this.setDarkenSky(packetIn.shouldDarkenSky());
            this.setPlayEndBossMusic(packetIn.shouldPlayEndBossMusic());
    }
}
项目:CustomWorldGen    文件:BossInfoLerping.java   
@SuppressWarnings("incomplete-switch")
public void updateFromPacket(SPacketUpdateBossInfo packetIn)
{
    switch (packetIn.getOperation())
    {
        case UPDATE_NAME:
            this.setName(packetIn.getName());
            break;
        case UPDATE_PCT:
            this.setPercent(packetIn.getPercent());
            break;
        case UPDATE_STYLE:
            this.setColor(packetIn.getColor());
            this.setOverlay(packetIn.getOverlay());
            break;
        case UPDATE_PROPERTIES:
            this.setDarkenSky(packetIn.shouldDarkenSky());
            this.setPlayEndBossMusic(packetIn.shouldPlayEndBossMusic());
    }
}
项目:Backmemed    文件:BossInfoLerping.java   
public BossInfoLerping(SPacketUpdateBossInfo packetIn)
{
    super(packetIn.getUniqueId(), packetIn.getName(), packetIn.getColor(), packetIn.getOverlay());
    this.rawPercent = packetIn.getPercent();
    this.percent = packetIn.getPercent();
    this.percentSetTime = Minecraft.getSystemTime();
    this.setDarkenSky(packetIn.shouldDarkenSky());
    this.setPlayEndBossMusic(packetIn.shouldPlayEndBossMusic());
    this.setCreateFog(packetIn.shouldCreateFog());
}
项目:Backmemed    文件:BossInfoServer.java   
public void setPercent(float percentIn)
{
    if (percentIn != this.percent)
    {
        super.setPercent(percentIn);
        this.sendUpdate(SPacketUpdateBossInfo.Operation.UPDATE_PCT);
    }
}
项目:Backmemed    文件:BossInfoServer.java   
public void setColor(BossInfo.Color colorIn)
{
    if (colorIn != this.color)
    {
        super.setColor(colorIn);
        this.sendUpdate(SPacketUpdateBossInfo.Operation.UPDATE_STYLE);
    }
}
项目:Backmemed    文件:BossInfoServer.java   
public void setOverlay(BossInfo.Overlay overlayIn)
{
    if (overlayIn != this.overlay)
    {
        super.setOverlay(overlayIn);
        this.sendUpdate(SPacketUpdateBossInfo.Operation.UPDATE_STYLE);
    }
}
项目:Backmemed    文件:BossInfoServer.java   
public BossInfo setDarkenSky(boolean darkenSkyIn)
{
    if (darkenSkyIn != this.darkenSky)
    {
        super.setDarkenSky(darkenSkyIn);
        this.sendUpdate(SPacketUpdateBossInfo.Operation.UPDATE_PROPERTIES);
    }

    return this;
}
项目:Backmemed    文件:BossInfoServer.java   
public BossInfo setPlayEndBossMusic(boolean playEndBossMusicIn)
{
    if (playEndBossMusicIn != this.playEndBossMusic)
    {
        super.setPlayEndBossMusic(playEndBossMusicIn);
        this.sendUpdate(SPacketUpdateBossInfo.Operation.UPDATE_PROPERTIES);
    }

    return this;
}
项目:Backmemed    文件:BossInfoServer.java   
public BossInfo setCreateFog(boolean createFogIn)
{
    if (createFogIn != this.createFog)
    {
        super.setCreateFog(createFogIn);
        this.sendUpdate(SPacketUpdateBossInfo.Operation.UPDATE_PROPERTIES);
    }

    return this;
}
项目:Backmemed    文件:BossInfoServer.java   
public void setName(ITextComponent nameIn)
{
    if (!Objects.equal(nameIn, this.name))
    {
        super.setName(nameIn);
        this.sendUpdate(SPacketUpdateBossInfo.Operation.UPDATE_NAME);
    }
}
项目:Backmemed    文件:BossInfoServer.java   
private void sendUpdate(SPacketUpdateBossInfo.Operation operationIn)
{
    if (this.visible)
    {
        SPacketUpdateBossInfo spacketupdatebossinfo = new SPacketUpdateBossInfo(operationIn, this);

        for (EntityPlayerMP entityplayermp : this.players)
        {
            entityplayermp.connection.sendPacket(spacketupdatebossinfo);
        }
    }
}
项目:Backmemed    文件:BossInfoServer.java   
/**
 * Makes the boss visible to the given player.
 */
public void addPlayer(EntityPlayerMP player)
{
    if (this.players.add(player) && this.visible)
    {
        player.connection.sendPacket(new SPacketUpdateBossInfo(SPacketUpdateBossInfo.Operation.ADD, this));
    }
}
项目:Backmemed    文件:BossInfoServer.java   
/**
 * Makes the boss non-visible to the given player.
 */
public void removePlayer(EntityPlayerMP player)
{
    if (this.players.remove(player) && this.visible)
    {
        player.connection.sendPacket(new SPacketUpdateBossInfo(SPacketUpdateBossInfo.Operation.REMOVE, this));
    }
}
项目:Backmemed    文件:BossInfoServer.java   
public void setVisible(boolean visibleIn)
{
    if (visibleIn != this.visible)
    {
        this.visible = visibleIn;

        for (EntityPlayerMP entityplayermp : this.players)
        {
            entityplayermp.connection.sendPacket(new SPacketUpdateBossInfo(visibleIn ? SPacketUpdateBossInfo.Operation.ADD : SPacketUpdateBossInfo.Operation.REMOVE, this));
        }
    }
}
项目:Backmemed    文件:GuiBossOverlay.java   
public void read(SPacketUpdateBossInfo packetIn)
{
    if (packetIn.getOperation() == SPacketUpdateBossInfo.Operation.ADD)
    {
        this.mapBossInfos.put(packetIn.getUniqueId(), new BossInfoLerping(packetIn));
    }
    else if (packetIn.getOperation() == SPacketUpdateBossInfo.Operation.REMOVE)
    {
        this.mapBossInfos.remove(packetIn.getUniqueId());
    }
    else
    {
        ((BossInfoLerping)this.mapBossInfos.get(packetIn.getUniqueId())).updateFromPacket(packetIn);
    }
}
项目:CustomWorldGen    文件:BossInfoLerping.java   
public BossInfoLerping(SPacketUpdateBossInfo packetIn)
{
    super(packetIn.getUniqueId(), packetIn.getName(), packetIn.getColor(), packetIn.getOverlay());
    this.rawPercent = packetIn.getPercent();
    this.percent = packetIn.getPercent();
    this.percentSetTime = Minecraft.getSystemTime();
    this.setDarkenSky(packetIn.shouldDarkenSky());
    this.setPlayEndBossMusic(packetIn.shouldPlayEndBossMusic());
    this.setCreateFog(packetIn.shouldCreateFog());
}
项目:CustomWorldGen    文件:BossInfoServer.java   
public void setPercent(float percentIn)
{
    if (percentIn != this.percent)
    {
        super.setPercent(percentIn);
        this.sendUpdate(SPacketUpdateBossInfo.Operation.UPDATE_PCT);
    }
}
项目:CustomWorldGen    文件:BossInfoServer.java   
public void setColor(BossInfo.Color colorIn)
{
    if (colorIn != this.color)
    {
        super.setColor(colorIn);
        this.sendUpdate(SPacketUpdateBossInfo.Operation.UPDATE_STYLE);
    }
}
项目:CustomWorldGen    文件:BossInfoServer.java   
public void setOverlay(BossInfo.Overlay overlayIn)
{
    if (overlayIn != this.overlay)
    {
        super.setOverlay(overlayIn);
        this.sendUpdate(SPacketUpdateBossInfo.Operation.UPDATE_STYLE);
    }
}
项目:CustomWorldGen    文件:BossInfoServer.java   
public BossInfo setDarkenSky(boolean darkenSkyIn)
{
    if (darkenSkyIn != this.darkenSky)
    {
        super.setDarkenSky(darkenSkyIn);
        this.sendUpdate(SPacketUpdateBossInfo.Operation.UPDATE_PROPERTIES);
    }

    return this;
}
项目:CustomWorldGen    文件:BossInfoServer.java   
public BossInfo setPlayEndBossMusic(boolean playEndBossMusicIn)
{
    if (playEndBossMusicIn != this.playEndBossMusic)
    {
        super.setPlayEndBossMusic(playEndBossMusicIn);
        this.sendUpdate(SPacketUpdateBossInfo.Operation.UPDATE_PROPERTIES);
    }

    return this;
}
项目:CustomWorldGen    文件:BossInfoServer.java   
public BossInfo setCreateFog(boolean createFogIn)
{
    if (createFogIn != this.createFog)
    {
        super.setCreateFog(createFogIn);
        this.sendUpdate(SPacketUpdateBossInfo.Operation.UPDATE_PROPERTIES);
    }

    return this;
}
项目:CustomWorldGen    文件:BossInfoServer.java   
public void setName(ITextComponent nameIn)
{
    if (!Objects.equal(nameIn, this.name))
    {
        super.setName(nameIn);
        this.sendUpdate(SPacketUpdateBossInfo.Operation.UPDATE_NAME);
    }
}
项目:CustomWorldGen    文件:BossInfoServer.java   
private void sendUpdate(SPacketUpdateBossInfo.Operation operationIn)
{
    if (this.visible)
    {
        SPacketUpdateBossInfo spacketupdatebossinfo = new SPacketUpdateBossInfo(operationIn, this);

        for (EntityPlayerMP entityplayermp : this.players)
        {
            entityplayermp.connection.sendPacket(spacketupdatebossinfo);
        }
    }
}
项目:CustomWorldGen    文件:BossInfoServer.java   
/**
 * Makes the boss visible to the given player.
 */
public void addPlayer(EntityPlayerMP player)
{
    if (this.players.add(player) && this.visible)
    {
        player.connection.sendPacket(new SPacketUpdateBossInfo(SPacketUpdateBossInfo.Operation.ADD, this));
    }
}
项目:CustomWorldGen    文件:BossInfoServer.java   
/**
 * Makes the boss non-visible to the given player.
 */
public void removePlayer(EntityPlayerMP player)
{
    if (this.players.remove(player) && this.visible)
    {
        player.connection.sendPacket(new SPacketUpdateBossInfo(SPacketUpdateBossInfo.Operation.REMOVE, this));
    }
}
项目:CustomWorldGen    文件:BossInfoServer.java   
public void setVisible(boolean visibleIn)
{
    if (visibleIn != this.visible)
    {
        this.visible = visibleIn;

        for (EntityPlayerMP entityplayermp : this.players)
        {
            entityplayermp.connection.sendPacket(new SPacketUpdateBossInfo(visibleIn ? SPacketUpdateBossInfo.Operation.ADD : SPacketUpdateBossInfo.Operation.REMOVE, this));
        }
    }
}
项目:CustomWorldGen    文件:GuiBossOverlay.java   
public void read(SPacketUpdateBossInfo packetIn)
{
    if (packetIn.getOperation() == SPacketUpdateBossInfo.Operation.ADD)
    {
        this.mapBossInfos.put(packetIn.getUniqueId(), new BossInfoLerping(packetIn));
    }
    else if (packetIn.getOperation() == SPacketUpdateBossInfo.Operation.REMOVE)
    {
        this.mapBossInfos.remove(packetIn.getUniqueId());
    }
    else
    {
        ((BossInfoLerping)this.mapBossInfos.get(packetIn.getUniqueId())).updateFromPacket(packetIn);
    }
}
项目:ExpandedRailsMod    文件:GuiBossOverlay.java   
public void read(SPacketUpdateBossInfo packetIn)
{
    if (packetIn.getOperation() == SPacketUpdateBossInfo.Operation.ADD)
    {
        this.mapBossInfos.put(packetIn.getUniqueId(), new BossInfoLerping(packetIn));
    }
    else if (packetIn.getOperation() == SPacketUpdateBossInfo.Operation.REMOVE)
    {
        this.mapBossInfos.remove(packetIn.getUniqueId());
    }
    else
    {
        ((BossInfoLerping)this.mapBossInfos.get(packetIn.getUniqueId())).updateFromPacket(packetIn);
    }
}
项目:Zombe-Modpack    文件:NetHandlerPlayClient.java   
public void handleUpdateEntityNBT(SPacketUpdateBossInfo packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    this.gameController.ingameGUI.getBossOverlay().read(packetIn);
}
项目:Backmemed    文件:NetHandlerPlayClient.java   
public void handleUpdateEntityNBT(SPacketUpdateBossInfo packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    this.gameController.ingameGUI.getBossOverlay().read(packetIn);
}
项目:CustomWorldGen    文件:NetHandlerPlayClient.java   
public void handleUpdateEntityNBT(SPacketUpdateBossInfo packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    this.gameController.ingameGUI.getBossOverlay().read(packetIn);
}
项目:ExpandedRailsMod    文件:NetHandlerPlayClient.java   
public void handleUpdateEntityNBT(SPacketUpdateBossInfo packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    this.gameController.ingameGUI.getBossOverlay().read(packetIn);
}
项目:Backmemed    文件:INetHandlerPlayClient.java   
void handleUpdateEntityNBT(SPacketUpdateBossInfo packetIn);
项目:CustomWorldGen    文件:INetHandlerPlayClient.java   
void handleUpdateEntityNBT(SPacketUpdateBossInfo packetIn);