Skip to content

Commit

Permalink
add old constructors back temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
Treetrain1 committed Nov 21, 2023
1 parent cc3e214 commit 5782833
Showing 1 changed file with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,56 @@ public class JsonConfig<T> extends Config<T> {

private final JsonType type;

@Deprecated(forRemoval = true)
public JsonConfig(String modId, Class<T> config) {
this(modId, config, true, null, null);
this(modId, config, (@Nullable DataFixer) null, null);
}

public JsonConfig(String modId, Class<T> config, @Nullable DataFixer dataFixer, @Nullable Integer version) {
this(modId, config, true, dataFixer, version);
}

@Deprecated(forRemoval = true)
public JsonConfig(String modId, Class<T> config, JsonType type) {
this(modId, config, type, null, null);
}

public JsonConfig(String modId, Class<T> config, JsonType type, @Nullable DataFixer dataFixer, @Nullable Integer version) {
this(modId, config, type, true, dataFixer, version);
}

@Deprecated(forRemoval = true)
public JsonConfig(String modId, Class<T> config, Path path, JsonType type) {
this(modId, config, path, type, null, null);
}

public JsonConfig(String modId, Class<T> config, Path path, JsonType type, @Nullable DataFixer dataFixer, @Nullable Integer version) {
this(modId, config, path, type, true, dataFixer, version);
}

@Deprecated(forRemoval = true)
public JsonConfig(String modId, Class<T> config, boolean supportsModification) {
this(modId, config, supportsModification, null, null);
}

public JsonConfig(String modId, Class<T> config, boolean supportsModification, @Nullable DataFixer dataFixer, @Nullable Integer version) {
this(modId, config, JsonType.JSON, supportsModification, dataFixer, version);
}

@Deprecated(forRemoval = true)
public JsonConfig(String modId, Class<T> config, JsonType type, boolean supportsModification) {
this(modId, config, type, supportsModification, null, null);
}

public JsonConfig(String modId, Class<T> config, JsonType type, boolean supportsModification, @Nullable DataFixer dataFixer, @Nullable Integer version) {
this(modId, config, makePath(modId, type.getSerializedName()), type, supportsModification, dataFixer, version);
}

@Deprecated(forRemoval = true)
public JsonConfig(String modId, Class<T> config, Path path, JsonType type, boolean supportsModification) {
this(modId, config, path, type, supportsModification, null, null);
}

public JsonConfig(String modId, Class<T> config, Path path, JsonType type, boolean supportsModification, @Nullable DataFixer dataFixer, @Nullable Integer version) {
super(modId, config, path, supportsModification, dataFixer, version);
var janksonBuilder = Jankson.builder().withFixer(dataFixer).version(version);
Expand Down

0 comments on commit 5782833

Please sign in to comment.