Skip to content

Commit

Permalink
Why do you like the optimization of paper so much? Have you really co…
Browse files Browse the repository at this point in the history
…nsidered it suitable for forge mod?

不听老人言,吃亏在前
  • Loading branch information
Mgazul committed Jul 12, 2021
1 parent c38696a commit ebeabb2
Show file tree
Hide file tree
Showing 196 changed files with 11,027 additions and 47,256 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
--- a/net/minecraft/advancements/AdvancementList.java
+++ b/net/minecraft/advancements/AdvancementList.java
@@ -3,6 +_,7 @@
import com.google.common.base.Functions;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
+import com.mohistmc.util.i18n.i18n;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
@@ -29,7 +_,7 @@
this.func_192090_a(advancement);
}

- field_192091_a.info("Forgot about advancement {}", (Object)p_192090_1_.func_192067_g());
+ field_192091_a.info(com.mohistmc.util.i18n.i18n.get("advancementlist.1", (Object)p_192090_1_.func_192067_g()));
+ field_192091_a.info(i18n.get("advancementlist.1", (Object)p_192090_1_.func_192067_g()));
this.field_192092_b.remove(p_192090_1_.func_192067_g());
if (p_192090_1_.func_192070_b() == null) {
this.field_192093_c.remove(p_192090_1_);
Expand All @@ -14,7 +22,7 @@
Advancement advancement = this.field_192092_b.get(resourcelocation);
if (advancement == null) {
- field_192091_a.warn("Told to remove advancement {} but I don't know what that is", (Object)resourcelocation);
+ field_192091_a.warn(com.mohistmc.util.i18n.i18n.get("advancementlist.2", (Object)resourcelocation));
+ field_192091_a.warn(i18n.get("advancementlist.2", (Object)resourcelocation));
} else {
this.func_192090_a(advancement);
}
Expand All @@ -23,15 +31,15 @@
if (!flag) {
for(Entry<ResourceLocation, Advancement.Builder> entry1 : p_192083_1_.entrySet()) {
- field_192091_a.error("Couldn't load advancement {}: {}", entry1.getKey(), entry1.getValue());
+ field_192091_a.error(com.mohistmc.util.i18n.i18n.get("advancementlist.3", entry1.getKey(), entry1.getValue()));
+ field_192091_a.error(i18n.get("advancementlist.3", entry1.getKey(), entry1.getValue()));
}
break;
}
}

- field_192091_a.info("Loaded {} advancements", (int)this.field_192092_b.size());
+ net.minecraftforge.common.AdvancementLoadFix.buildSortedTrees(this.field_192093_c);
+ field_192091_a.info(com.mohistmc.util.i18n.i18n.get("recipemanager.4", (int)this.field_192092_b.size()));
+ field_192091_a.info(i18n.get("recipemanager.4", (int)this.field_192092_b.size()));
}

@OnlyIn(Dist.CLIENT)
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
--- a/net/minecraft/advancements/AdvancementManager.java
+++ b/net/minecraft/advancements/AdvancementManager.java
@@ -6,6 +_,7 @@
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
+import com.mohistmc.util.i18n.i18n;
import java.util.Collection;
import java.util.Map;
import javax.annotation.Nullable;
@@ -21,8 +_,8 @@

public class AdvancementManager extends JsonReloadListener {
Expand All @@ -24,13 +32,13 @@
JsonObject jsonobject = JSONUtils.func_151210_l(p_240923_3_, "advancement");
Advancement.Builder advancement$builder = Advancement.Builder.func_241043_a_(jsonobject, new ConditionArrayParser(p_240923_2_, this.field_240922_d_));
+ if (advancement$builder == null) {
+ field_192782_a.debug(com.mohistmc.util.i18n.i18n.get("advancementmanager.1", p_240923_2_));
+ field_192782_a.debug(i18n.get("advancementmanager.1", p_240923_2_));
+ return;
+ }
map.put(p_240923_2_, advancement$builder);
} catch (IllegalArgumentException | JsonParseException jsonparseexception) {
- field_192782_a.error("Parsing error loading custom advancement {}: {}", p_240923_2_, jsonparseexception.getMessage());
+ field_192782_a.error(com.mohistmc.util.i18n.i18n.get("advancementmanager.2", p_240923_2_, jsonparseexception.getMessage()));
+ field_192782_a.error(i18n.get("advancementmanager.2", p_240923_2_, jsonparseexception.getMessage()));
}

});
Loading

1 comment on commit ebeabb2

@Romaindu35
Copy link
Member

@Romaindu35 Romaindu35 commented on ebeabb2 Jul 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But what are the problems?
If it is to fix #1547 ,the problem is just that I have tried to don't recreate new instance of playerEntity when player died
Else, why you have delete paper api patch?

Please sign in to comment.