Skip to content

Commit

Permalink
Hardcode 1.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
AltronMaxX authored Dec 21, 2023
1 parent 79b6c41 commit f446309
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ import java.util.function.Function
import java.util.stream.Collectors

enum MinecraftVersion {
MINECRAFT_1_7_2(4),
/*MINECRAFT_1_7_2(4),
MINECRAFT_1_7_6(5),
MINECRAFT_1_8(47),
MINECRAFT_1_9(107),
Expand Down Expand Up @@ -128,11 +128,11 @@ enum MinecraftVersion {
MINECRAFT_1_19_3(761),
MINECRAFT_1_19_4(762),
MINECRAFT_1_20(763),
MINECRAFT_1_20_2(764),
MINECRAFT_1_20_2(764),*/
MINECRAFT_1_20_4(765)

public static final List<MinecraftVersion> WORLD_VERSIONS = List.of(
MINECRAFT_1_13,
/*MINECRAFT_1_13,
MINECRAFT_1_13_2,
MINECRAFT_1_14,
MINECRAFT_1_15,
Expand All @@ -143,11 +143,11 @@ enum MinecraftVersion {
MINECRAFT_1_19_3,
MINECRAFT_1_19_4,
MINECRAFT_1_20,
MINECRAFT_1_20_2,
MINECRAFT_1_20_2,*/
MINECRAFT_1_20_4
)

public static final MinecraftVersion MINIMUM_VERSION = MINECRAFT_1_7_2
public static final MinecraftVersion MINIMUM_VERSION = MINECRAFT_1_20_4
public static final MinecraftVersion MAXIMUM_VERSION = values()[values().length - 1]

private static final Map<Integer, MinecraftVersion> PVN_MAP = new HashMap<>()
Expand Down Expand Up @@ -221,7 +221,7 @@ File downloadVersionManifest(String version) {
File getGeneratedCache(MinecraftVersion version) {
File generated = new File(dataDirectory, "${version.getVersionName()}/generated")
return new File(generated, "reports/blocks.json").exists()
&& new File(generated, "reports/${version >= MinecraftVersion.MINECRAFT_1_14 ? "registries" : "items"}.json").exists()
&& new File(generated, "reports/${"registries"}.json").exists()
&& new File(generated, "data/minecraft/tags").exists()
? generated : null
}
Expand Down Expand Up @@ -267,11 +267,11 @@ File generateData(MinecraftVersion version) {
}

String command
if (version >= MinecraftVersion.MINECRAFT_1_18) {
//if (version >= MinecraftVersion.MINECRAFT_1_18) {
command = "\"%s\" -DbundlerMainClass=net.minecraft.data.Main -jar \"${jarFile.getAbsolutePath()}\" --reports --server"
} else {
/*} else {
command = "\"%s\" -cp \"${jarFile.getAbsolutePath()}\" net.minecraft.data.Main --reports --server"
}
}*/

exec {
if (System.getProperty("os.name").toLowerCase().contains("win")) {
Expand Down Expand Up @@ -331,11 +331,11 @@ static int getBlockID(String block,
Map<MinecraftVersion, Map<String, String>> fallback,
MinecraftVersion version) {
Map<String, Map<String, String>> defaultProperties
if (version >= MinecraftVersion.MINECRAFT_1_13) {
//if (version >= MinecraftVersion.MINECRAFT_1_13) {
defaultProperties = properties[version]
} else {
/*} else {
defaultProperties = properties[MinecraftVersion.MINECRAFT_1_18_2]
}
}*/

String[] split = block.split("\\[")
String noArgBlock = split[0]
Expand Down Expand Up @@ -673,4 +673,4 @@ tasks.register("generateMappings") {
this.generateTags(targetDir, tags)
}

processResources.dependsOn(generateMappings)
processResources.dependsOn(generateMappings)

0 comments on commit f446309

Please sign in to comment.