Skip to content

Commit

Permalink
Fix visibility for compatability with EC
Browse files Browse the repository at this point in the history
  • Loading branch information
senseiwells committed Apr 28, 2024
1 parent 7e2f859 commit cb862d2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private void handleGameRuleSet(ServerPlayNetworkHandler handler, SetGameRulePayl
((IRule) rule).essentialaddons$ruleChanged(player);
}

private record GameRuleHelloPayload(String brand, int version) implements CustomPayload {
public record GameRuleHelloPayload(String brand, int version) implements CustomPayload {
public static final Id<GameRuleHelloPayload> ID = CustomPayload.id("essential:game_rule_hello");
public static final PacketCodec<PacketByteBuf, GameRuleHelloPayload> CODEC = PacketCodec.of(
(payload, buf) -> buf.writeString(payload.brand).writeInt(payload.version),
Expand All @@ -142,7 +142,7 @@ public Id<? extends CustomPayload> getId() {
}
}

private record SetGameRulePayload(String name, String value) implements CustomPayload {
public record SetGameRulePayload(String name, String value) implements CustomPayload {
public static final Id<SetGameRulePayload> ID = CustomPayload.id("essential:set_game_rule");
public static final PacketCodec<PacketByteBuf, SetGameRulePayload> CODEC = PacketCodec.of(
(payload, buf) -> buf.writeString(payload.name).writeString(payload.value),
Expand All @@ -155,7 +155,7 @@ public Id<? extends CustomPayload> getId() {
}
}

private record GameRulesChangedPayload(NbtCompound compound) implements CustomPayload {
public record GameRulesChangedPayload(NbtCompound compound) implements CustomPayload {
public static final Id<GameRulesChangedPayload> ID = CustomPayload.id("essential:game_rules_changed");
public static final PacketCodec<PacketByteBuf, GameRulesChangedPayload> CODEC = PacketCodec.of(
(payload, buf) -> buf.writeNbt(payload.compound),
Expand All @@ -168,7 +168,7 @@ public Id<? extends CustomPayload> getId() {
}
}

private record GameRulePermissionsPayload(boolean canUpdateGamerules) implements CustomPayload {
public record GameRulePermissionsPayload(boolean canUpdateGamerules) implements CustomPayload {
public static final Id<GameRulePermissionsPayload> ID = CustomPayload.id("essential:game_rule_permissions");
public static final PacketCodec<PacketByteBuf, GameRulePermissionsPayload> CODEC = PacketCodec.of(
(payload, buf) -> buf.writeBoolean(payload.canUpdateGamerules),
Expand Down

0 comments on commit cb862d2

Please sign in to comment.