Skip to content

Commit 021580f

Browse files
authored
Merge pull request #2 from gbuimc/FG_2.3
Add merged tweaker
2 parents 36d36cf + 63c7a4f commit 021580f

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* A Gradle plugin for the creation of Minecraft mods and MinecraftForge plugins.
3+
* Copyright (C) 2013-2018 Minecraft Forge
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU Lesser General Public
7+
* License as published by the Free Software Foundation; either
8+
* version 2.1 of the License, or (at your option) any later version.
9+
*
10+
* This library is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General Public
16+
* License along with this library; if not, write to the Free Software
17+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
18+
* USA
19+
*/
20+
package net.minecraftforge.gradle.user.tweakers;
21+
22+
import static net.minecraftforge.gradle.common.Constants.JAR_MERGED;
23+
import static net.minecraftforge.gradle.common.Constants.MCP_INJECT;
24+
import static net.minecraftforge.gradle.common.Constants.MCP_PATCHES_MERGED;
25+
import static net.minecraftforge.gradle.common.Constants.TASK_MERGE_JARS;
26+
27+
public class MergedTweaker extends TweakerPlugin
28+
{
29+
@Override
30+
protected String getJarName()
31+
{
32+
return "minecraft_merged";
33+
}
34+
35+
@Override
36+
protected void createDecompTasks(String globalPattern, String localPattern)
37+
{
38+
super.makeDecompTasks(globalPattern, localPattern, delayedFile(JAR_MERGED), TASK_MERGE_JARS, delayedFile(MCP_PATCHES_MERGED), delayedFile(MCP_INJECT));
39+
}
40+
41+
@Override
42+
protected boolean hasServerRun()
43+
{
44+
return true;
45+
}
46+
47+
@Override
48+
protected boolean hasClientRun()
49+
{
50+
return true;
51+
}
52+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
implementation-class=net.minecraftforge.gradle.user.tweakers.MergedTweaker

0 commit comments

Comments
 (0)