Skip to content

Commit

Permalink
fix loading StringRepresentable too early
Browse files Browse the repository at this point in the history
  • Loading branch information
UpcraftLP committed Oct 14, 2024
1 parent 22e4438 commit 07d74a7
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package dev.upcraft.sparkweave.api.platform;

import com.mojang.serialization.Codec;
import net.minecraft.util.Mth;
import net.minecraft.util.StringRepresentable;

import java.util.Arrays;

public enum RuntimeEnvironmentType implements StringRepresentable {
public enum RuntimeEnvironmentType {
CLIENT("client"),
SERVER("server");

Expand All @@ -20,11 +18,6 @@ public String getName() {
return name;
}

@Override
public String getSerializedName() {
return name;
}

@Override
public String toString() {
return getName();
Expand All @@ -46,6 +39,4 @@ public void orElseThrow() {
throw ex;
}
}

public static final Codec<RuntimeEnvironmentType> CODEC = StringRepresentable.fromEnum(RuntimeEnvironmentType::values);
}

0 comments on commit 07d74a7

Please sign in to comment.