Branding fixup.

This commit is contained in:
cpw 2018-09-29 20:47:47 -04:00
parent 0024d9d283
commit fe12687ec1
7 changed files with 15 additions and 29 deletions

View file

@ -0,0 +1,10 @@
--- a/net/minecraft/client/ClientBrandRetriever.java
+++ b/net/minecraft/client/ClientBrandRetriever.java
@@ -6,6 +6,6 @@
@OnlyIn(Dist.CLIENT)
public class ClientBrandRetriever {
public static String getClientModName() {
- return "vanilla";
+ return net.minecraftforge.fml.BrandingControl.getClientBranding();
}
}

View file

@ -182,7 +182,7 @@
public String getServerModName() {
- return "vanilla";
+ return net.minecraftforge.common.ForgeHooks.getServerModName();
+ return net.minecraftforge.fml.BrandingControl.getServerBranding();
}
public CrashReport func_71230_b(CrashReport p_71230_1_) {

View file

@ -1277,12 +1277,6 @@ public class ForgeHooks
return false;
}
public static String getServerModName()
{
//TODO: Branding Properties: snooperbranding
return "forge";
}
private static TriConsumer<Block, ToolType, Integer> blockToolSetter;
//Internal use only Modders, this is specifically hidden from you, as you shouldn't be editing other people's blocks.
public static void setBlockToolSetter(TriConsumer<Block, ToolType, Integer> setter)

View file

@ -51,7 +51,7 @@ public class BrandingControl
}
}
public static List<String> getBrandings(boolean includeMC, boolean reverse)
private static List<String> getBrandings(boolean includeMC, boolean reverse)
{
computeBranding();
if (includeMC) {
@ -65,13 +65,12 @@ public class BrandingControl
final List<String> brandings = getBrandings(includeMC, reverse);
IntStream.range(0, brandings.size()).boxed().forEachOrdered(idx -> lineConsumer.accept(idx, brandings.get(idx)));
}
private static final List<String> defaultClientBranding = Stream.of("fml", "forge").collect(Collectors.toList());
public static String getClientBranding() {
return String.join(",", defaultClientBranding);
return "forge";
}
public static final List<String> defaultServerBranding = Arrays.asList("fml", "forge");
public static String getServerBranding() {
return String.join(",", defaultServerBranding);
return "forge";
}
}

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View file

@ -1,17 +0,0 @@
[
{
"modid": "mcp",
"name": "Minecraft Coder Pack",
"description": "Modding toolkit to decompile and deobfuscate the Minecraft client and server files.",
"version": "9.42",
"mcversion": "1.12.2",
"logoFile": "/mcplogo.png",
"url": "http://www.modcoderpack.com/website/",
"updateUrl": "",
"authors": ["Searge", "ProfMobius", "IngisKahn", "Fesh0r", "ZeuX", "R4wk", "LexManos", "Bspkrs", "Others"],
"credits": "Made by the MCP team",
"parent": "",
"screenshots": [],
"dependencies": []
}
]