Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public final class CombatModule extends ApolloModule {
* @since 1.0.4
*/
public static final SimpleOption<Boolean> DISABLE_MISS_PENALTY = Option.<Boolean>builder()
.comment("Set to 'true' to disable the hit delay on 1.8, otherwise 'false'.")
.comment("Set to 'true' to remove the miss penalty on all versions 1.8 and above, otherwise 'false'.")
.node("disable-miss-penalty").type(TypeToken.get(Boolean.class))
.defaultValue(false).notifyClient().build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,14 @@ private void onRegisterChannel(PlayerRegisterChannelEvent event) {
return;
}

this.onApolloRegister(event.getPlayer());
Player player = event.getPlayer();
JsonPacketUtil.enableModules(player);

// Sending the player's world name to the client is required for some modules
JsonPacketUtil.sendPacket(player, this.createUpdatePlayerWorldMessage(player));

this.playersRunningApollo.add(player.getUniqueId());
player.sendMessage("You are using LunarClient!");
}

@EventHandler
Expand All @@ -94,14 +101,4 @@ private boolean isPlayerRunningApollo(Player player) {
return this.playersRunningApollo.contains(player.getUniqueId());
}

private void onApolloRegister(Player player) {
JsonPacketUtil.enableModules(player);

// Sending the player's world name to the client is required for some modules
JsonPacketUtil.sendPacket(player, this.createUpdatePlayerWorldMessage(player));

this.playersRunningApollo.add(player.getUniqueId());
player.sendMessage("You are using LunarClient!");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,14 @@ private void onRegisterChannel(PlayerRegisterChannelEvent event) {
return;
}

this.onApolloRegister(event.getPlayer());
Player player = event.getPlayer();
ProtobufPacketUtil.enableModules(player);

// Sending the player's world name to the client is required for some modules
ProtobufPacketUtil.sendPacket(player, this.createUpdatePlayerWorldMessage(player));

this.playersRunningApollo.add(player.getUniqueId());
player.sendMessage("You are using LunarClient!");
}

@EventHandler
Expand All @@ -92,14 +99,4 @@ private boolean isPlayerRunningApollo(Player player) {
return this.playersRunningApollo.contains(player.getUniqueId());
}

private void onApolloRegister(Player player) {
ProtobufPacketUtil.enableModules(player);

// Sending the player's world name to the client is required for some modules
ProtobufPacketUtil.sendPacket(player, this.createUpdatePlayerWorldMessage(player));

this.playersRunningApollo.add(player.getUniqueId());
player.sendMessage("You are using LunarClient!");
}

}
1 change: 1 addition & 0 deletions docs/developers/lightweight/json/player-detection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class ApolloPlayerJsonListener implements Listener {
return;
}

Player player = event.getPlayer();
JsonPacketUtil.enableModules(player);

// Sending the player's world name to the client is required for some modules
Expand Down
1 change: 1 addition & 0 deletions docs/developers/lightweight/protobuf/player-detection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class ApolloPlayerProtoListener implements Listener {
return;
}

Player player = event.getPlayer();
ProtobufPacketUtil.enableModules(player);

// Sending the player's world name to the client is required for some modules
Expand Down
5 changes: 5 additions & 0 deletions docs/developers/modules/border.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Tab, Tabs } from 'nextra-theme-docs'
import { Callout } from 'nextra-theme-docs'

# Border Module

Expand All @@ -12,6 +13,10 @@ The border module not only enhances Minecraft's current world border system, but
- Custom border colors can be provided.
- Ability to generate and display multiple world borders at once.

<Callout type="info">
This module is only supported for 1.7 to 1.12 versions of Lunar Client.
</Callout>

## Integration

### Sample Code
Expand Down
8 changes: 1 addition & 7 deletions docs/developers/modules/combat.mdx
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
import { Callout } from 'nextra-theme-docs'

# Combat Module

## Overview

The combat module allows you to modify certain aspects of combat that are usually handled client-sided.

* Adds the ability to disable the 1.8 miss penalty, commonly known as 'hit-delay'.

<Callout type="info">
This is a bare bones module to add support for the legacy-API feature 'LEGACY_COMBAT'.
</Callout>
- Adds the ability to disable the miss penalty, on all versions 1.8 and above.

## Available options

Expand Down
5 changes: 5 additions & 0 deletions docs/developers/modules/glow.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Tab, Tabs } from 'nextra-theme-docs'
import { Callout } from 'nextra-theme-docs'

# Glow Module

Expand All @@ -10,6 +11,10 @@ The glow module allows you to take advantage of the vanilla Minecraft Glow Effec
- Adds improvements to glow effect for Lunar Client users.
- Customizable colors for the glow effect, different from the vanilla Minecraft colors.

<Callout type="Warning">
In Version 1.12, Optifine's 'Fast Render' setting alters player rendering. This is expected behavior for Optifine.
</Callout>

![Glow Module Example](https://i.imgur.com/Ra3r363.png#center)

<div style={{ textAlign: "center" }}>
Expand Down