Skip to content

Commit

Permalink
Fix compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
coehlrich committed Oct 12, 2023
1 parent 479179b commit 0ae0d6e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/com/mojang/realmsclient/RealmsMainScreen.java
+++ b/com/mojang/realmsclient/RealmsMainScreen.java
@@ -549,8 +549,7 @@

@Nullable
private RealmsServer getSelectedServer() {
- AbstractSelectionList.Entry abstractselectionlist$entry = this.realmSelectionList.getSelected();
- return abstractselectionlist$entry instanceof RealmsMainScreen.ServerEntry realmsmainscreen$serverentry ? realmsmainscreen$serverentry.getServer() : null;
+ return this.realmSelectionList.getSelected() instanceof RealmsMainScreen.ServerEntry realmsmainscreen$serverentry ? realmsmainscreen$serverentry.getServer() : null;
}

private void leaveServer(boolean p_193494_, final RealmsServer p_193495_) {
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/com/mojang/realmsclient/RealmsMainScreen.java
+++ b/com/mojang/realmsclient/RealmsMainScreen.java
@@ -552,8 +552,7 @@

@Nullable
private RealmsServer getSelectedServer() {
- AbstractSelectionList.Entry abstractselectionlist$entry = this.realmSelectionList.getSelected();
- return abstractselectionlist$entry instanceof RealmsMainScreen.ServerEntry realmsmainscreen$serverentry ? realmsmainscreen$serverentry.getServer() : null;
+ return this.realmSelectionList.getSelected() instanceof RealmsMainScreen.ServerEntry realmsmainscreen$serverentry ? realmsmainscreen$serverentry.getServer() : null;
}

private void leaveServer(boolean p_193494_, final RealmsServer p_193495_) {
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/commands/Commands.java
+++ b/net/minecraft/commands/Commands.java
@@ -326,7 +326,7 @@
@@ -336,7 +336,7 @@
) {
for(CommandNode<CommandSourceStack> commandnode : p_82113_.getChildren()) {
if (commandnode.canUse(p_82115_)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/net/minecraft/server/commands/ReturnCommand.java
+++ b/net/minecraft/server/commands/ReturnCommand.java
@@ -15,7 +15,7 @@
public class ReturnCommand {
public static <T extends ExecutionCommandSource<T>> void register(CommandDispatcher<T> p_282091_) {
p_282091_.register(
- LiteralArgumentBuilder.<ExecutionCommandSource>literal("return")
+ LiteralArgumentBuilder.<T>literal("return")
.requires(p_305728_ -> p_305728_.hasPermission(2))
.then(
RequiredArgumentBuilder.<T, Integer>argument("value", IntegerArgumentType.integer()).executes(new ReturnCommand.ReturnValueCustomExecutor<>())

0 comments on commit 0ae0d6e

Please sign in to comment.