mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 06:11:24 +00:00
add remapShadedJar task to Fabric
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import com.dfsek.terra.configureCommon
|
import com.dfsek.terra.configureCommon
|
||||||
import net.fabricmc.loom.LoomGradleExtension
|
import net.fabricmc.loom.LoomGradleExtension
|
||||||
|
import net.fabricmc.loom.task.RemapJarTask
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
@@ -29,6 +30,12 @@ configure<LoomGradleExtension> {
|
|||||||
accessWidener("src/main/resources/terra.accesswidener")
|
accessWidener("src/main/resources/terra.accesswidener")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.register<RemapJarTask>("remapShadedJar") {
|
||||||
|
setProperty("input", file("build/libs/fabric-${version}-shaded.jar"))
|
||||||
|
setProperty("addNestedDependencies", false)
|
||||||
|
setProperty("remapAccessWidener", true)
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common"))
|
"shadedApi"(project(":common"))
|
||||||
"shadedImplementation"("org.yaml:snakeyaml:1.27")
|
"shadedImplementation"("org.yaml:snakeyaml:1.27")
|
||||||
|
|||||||
@@ -92,7 +92,17 @@ public class TerraFabricPlugin implements TerraPlugin, ModInitializer {
|
|||||||
.add("LARGE_SPRUCE", ConfiguredFeatures.PINE)
|
.add("LARGE_SPRUCE", ConfiguredFeatures.PINE)
|
||||||
.add("SMALL_JUNGLE", ConfiguredFeatures.JUNGLE_TREE)
|
.add("SMALL_JUNGLE", ConfiguredFeatures.JUNGLE_TREE)
|
||||||
.add("SWAMP_OAK", ConfiguredFeatures.SWAMP_TREE)
|
.add("SWAMP_OAK", ConfiguredFeatures.SWAMP_TREE)
|
||||||
.add("TALL_BIRCH", ConfiguredFeatures.BIRCH_TALL)).build();
|
.add("TALL_BIRCH", ConfiguredFeatures.BIRCH_TALL)
|
||||||
|
.add("ACACIA", ConfiguredFeatures.ACACIA)
|
||||||
|
.add("BIRCH", ConfiguredFeatures.BIRCH)
|
||||||
|
.add("DARK_OAK", ConfiguredFeatures.DARK_OAK)
|
||||||
|
.add("OAK", ConfiguredFeatures.OAK)
|
||||||
|
.add("CHORUS_PLANT", ConfiguredFeatures.CHORUS_PLANT)
|
||||||
|
.add("SPRUCE", ConfiguredFeatures.SPRUCE)
|
||||||
|
.add("JUNGLE_BUSH", ConfiguredFeatures.JUNGLE_BUSH)
|
||||||
|
.add("MEGA_SPRUCE", ConfiguredFeatures.MEGA_SPRUCE)
|
||||||
|
.add("CRIMSON_FUNGUS", ConfiguredFeatures.CRIMSON_FUNGI)
|
||||||
|
.add("WARPED_FUNGUS", ConfiguredFeatures.WARPED_FUNGI)).build();
|
||||||
private final PluginConfig plugin = new PluginConfig();
|
private final PluginConfig plugin = new PluginConfig();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -160,7 +170,8 @@ public class TerraFabricPlugin implements TerraPlugin, ModInitializer {
|
|||||||
@Override
|
@Override
|
||||||
public void saveDefaultConfig() {
|
public void saveDefaultConfig() {
|
||||||
try(InputStream stream = getClass().getResourceAsStream("/config.yml")) {
|
try(InputStream stream = getClass().getResourceAsStream("/config.yml")) {
|
||||||
FileUtils.copyInputStreamToFile(stream, new File(getDataFolder(), "config.yml"));
|
File configFile = new File(getDataFolder(), "config.yml");
|
||||||
|
if(!configFile.exists()) FileUtils.copyInputStreamToFile(stream, configFile);
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
accessWidener v1 named
|
accessWidener v1 named
|
||||||
|
|
||||||
extendable method net/minecraft/client/world/GeneratorType <init> (Ljava/lang/String;)V
|
extendable method net/minecraft/client/world/GeneratorType <init> (Ljava/lang/String;)V
|
||||||
|
|
||||||
accessible field net/minecraft/server/world/ServerWorld worldProperties Lnet/minecraft/world/level/ServerWorldProperties;
|
accessible field net/minecraft/server/world/ServerWorld worldProperties Lnet/minecraft/world/level/ServerWorldProperties;
|
||||||
mutable field net/minecraft/server/world/ServerWorld worldProperties Lnet/minecraft/world/level/ServerWorldProperties;
|
mutable field net/minecraft/server/world/ServerWorld worldProperties Lnet/minecraft/world/level/ServerWorldProperties;
|
||||||
Reference in New Issue
Block a user