Skip to content

Commit

Permalink
Switch decompiler to Vineflower (#21)
Browse files Browse the repository at this point in the history
* Remove unnecessary new patches from updating mcp_config

* Update to VineFlower

* Update workflow to Java 21
  • Loading branch information
kappa-maintainer authored Dec 24, 2023
1 parent eac8aa3 commit 95288c9
Show file tree
Hide file tree
Showing 1,195 changed files with 65,729 additions and 31,916 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/BuildAndRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/[email protected]
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'

- name: Fix Gradle Permission
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/BuildTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/[email protected]
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'

- name: Fix Gradle permission
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:6.99.+'
classpath 'net.minecraftforge.gradle:ForgeGradle:6.10.+'
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ new_forge_version = 15.24.0.3020
mapping_channel = stable
mapping_version = 39-1.12
minecraft_version = 1.12.2
mcp_version = 20231204.132927
mcp_version = 20231223.183713

# Related Tooling
special_source = net.md-5:SpecialSource:1.9.0
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,48 @@
--- before/net/minecraft/advancements/AdvancementManager.java
+++ after/net/minecraft/advancements/AdvancementManager.java
@@ -66,6 +66,7 @@
@@ -9,6 +9,7 @@
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import java.io.BufferedReader;
+import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.io.Reader;
@@ -41,23 +42,14 @@
public class AdvancementManager
{
private static final Logger field_192782_a = LogManager.getLogger();
- public static final Gson field_192783_b = new GsonBuilder()
- .registerTypeHierarchyAdapter(
- Advancement.Builder.class,
- new JsonDeserializer<Advancement.Builder>()
+ public static final Gson field_192783_b = (new GsonBuilder()).registerTypeHierarchyAdapter(Advancement.Builder.class, new JsonDeserializer<Advancement.Builder>()
{
public Advancement.Builder deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_) throws JsonParseException
{
JsonObject jsonobject = JsonUtils.func_151210_l(p_deserialize_1_, "advancement");
return Advancement.Builder.func_192059_a(jsonobject, p_deserialize_3_);
}
- }
- )
- .registerTypeAdapter(AdvancementRewards.class, new AdvancementRewards.Deserializer())
- .registerTypeHierarchyAdapter(ITextComponent.class, new ITextComponent.Serializer())
- .registerTypeHierarchyAdapter(Style.class, new Style.Serializer())
- .registerTypeAdapterFactory(new EnumTypeAdapterFactory())
- .create();
+ }).registerTypeAdapter(AdvancementRewards.class, new AdvancementRewards.Deserializer()).registerTypeHierarchyAdapter(ITextComponent.class, new ITextComponent.Serializer()).registerTypeHierarchyAdapter(Style.class, new Style.Serializer()).registerTypeAdapterFactory(new EnumTypeAdapterFactory()).create();
private static final AdvancementList field_192784_c = new AdvancementList();
private final File field_192785_d;
private boolean field_193768_e;
@@ -74,6 +66,7 @@
field_192784_c.func_192087_a();
Map<ResourceLocation, Advancement.Builder> map = this.func_192781_c();
this.func_192777_a(map);
+ this.field_193768_e |= net.minecraftforge.common.ForgeHooks.loadAdvancements(map);
field_192784_c.func_192083_a(map);

for (Advancement advancement : field_192784_c.func_192088_b())
@@ -86,11 +87,11 @@
@@ -94,11 +87,11 @@
{
if (this.field_192785_d == null)
{
Expand All @@ -22,16 +56,32 @@
this.field_192785_d.mkdirs();

for (File file1 : FileUtils.listFiles(this.field_192785_d, new String[] {"json"}, true))
@@ -104,7 +105,7 @@
@@ -112,9 +105,7 @@

try
{
- Advancement.Builder advancement$builder = JsonUtils.func_188178_a(field_192783_b, FileUtils.readFileToString(file1, StandardCharsets.UTF_8), Advancement.Builder.class);
- Advancement.Builder advancement$builder = JsonUtils.func_188178_a(
- field_192783_b, FileUtils.readFileToString(file1, StandardCharsets.UTF_8), Advancement.Builder.class
- );
+ Advancement.Builder advancement$builder = (Advancement.Builder)JsonUtils.func_188178_a(field_192783_b, FileUtils.readFileToString(file1, StandardCharsets.UTF_8), Advancement.Builder.class);

if (advancement$builder == null)
{
@@ -180,7 +181,7 @@
@@ -149,12 +140,7 @@
{
URL url = AdvancementManager.class.getResource("/assets/.mcassetsroot");

- if (url == null)
- {
- field_192782_a.error("Couldn't find .mcassetsroot");
- this.field_193768_e = true;
- }
- else
+ if (url != null)
{
URI uri = url.toURI();
Path path;
@@ -195,7 +181,7 @@
try
{
bufferedreader = Files.newBufferedReader(path1);
Expand All @@ -40,3 +90,27 @@
p_192777_1_.put(resourcelocation, advancement$builder);
}
catch (JsonParseException jsonparseexception)
@@ -215,16 +201,22 @@
}
}
}
+
+ return;
}
+
+ field_192782_a.error("Couldn't find .mcassetsroot");
+ this.field_193768_e = true;
}
catch (IOException | URISyntaxException urisyntaxexception)
{
field_192782_a.error("Couldn't get a list of all built-in advancement files", (Throwable)urisyntaxexception);
this.field_193768_e = true;
+ return;
}
finally
{
- IOUtils.closeQuietly(filesystem);
+ IOUtils.closeQuietly((Closeable)filesystem);
}
}

This file was deleted.

Loading

0 comments on commit 95288c9

Please sign in to comment.