Files

30 lines
785 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# MercanElArosWorldFade.js — sendFog() (satır 139)
[← MercanElArosWorldFade.js](index.md) · [← Master](../../wiki.md)
```javascript
function sendFog(player, active)
{
var channel = getFogChannel();
if (channel == null)
{
return false;
}
var buffer = new PacketBuffer(Unpooled.buffer());
buffer.writeByte(0);
buffer.writeFloat(FOG_R);
buffer.writeFloat(FOG_G);
buffer.writeFloat(FOG_B);
buffer.writeBoolean(Boolean(active));
channel.attr(FMLOutboundHandler.FML_MESSAGETARGET).set(OutboundTarget.PLAYER);
channel.attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(getMinecraftPlayer(player));
channel.writeAndFlush(new FMLProxyPacket(buffer, FOG_CHANNEL));
return true;
}
```