Fix server startup, jar building and after-merge fixes.
This commit is contained in:
@@ -22,12 +22,12 @@ jobs:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
||||
- name: Clean gradle
|
||||
run: ./gradlew clean --no-daemon --max-workers 1
|
||||
run: ./gradlew clean
|
||||
- name: Validate no assets
|
||||
run: test ! -d ./src/generated
|
||||
- name: Generate assets
|
||||
run: ./gradlew runData --no-daemon --max-workers 1
|
||||
run: ./gradlew runData
|
||||
- name: Validate assets
|
||||
run: test -d ./src/generated -a -f ./src/generated/resources/.cache/cache
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build --no-daemon --max-workers 1
|
||||
run: ./gradlew build
|
||||
|
||||
+10
-22
@@ -75,13 +75,6 @@ sourceSets {
|
||||
compileClasspath += sourceSets.main.output
|
||||
runtimeClasspath += sourceSets.main.output
|
||||
}
|
||||
unported {
|
||||
compileClasspath += sourceSets.api.output
|
||||
runtimeClasspath += sourceSets.api.output
|
||||
|
||||
compileClasspath += sourceSets.main.output
|
||||
runtimeClasspath += sourceSets.main.output
|
||||
}
|
||||
test {
|
||||
compileClasspath += sourceSets.api.output
|
||||
runtimeClasspath += sourceSets.api.output
|
||||
@@ -91,7 +84,6 @@ sourceSets {
|
||||
configurations {
|
||||
apiCompile.extendsFrom(compileClasspath)
|
||||
datagenCompile.extendsFrom(compileClasspath)
|
||||
unportedCompile.extendsFrom(compileClasspath)
|
||||
}
|
||||
|
||||
apply from: 'gradle/scripts/spotless.gradle'
|
||||
@@ -110,7 +102,13 @@ dependencies {
|
||||
|
||||
modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}"
|
||||
|
||||
modImplementation "alexiil.mc.lib:libblockattributes-all:0.7.1-pre.4"
|
||||
modImplementation "alexiil.mc.lib:libblockattributes-core:${libblockattributes_version}"
|
||||
modImplementation "alexiil.mc.lib:libblockattributes-items:${libblockattributes_version}"
|
||||
modImplementation "alexiil.mc.lib:libblockattributes-fluids:${libblockattributes_version}"
|
||||
include "alexiil.mc.lib:libblockattributes-core:${libblockattributes_version}"
|
||||
include "alexiil.mc.lib:libblockattributes-items:${libblockattributes_version}"
|
||||
include "alexiil.mc.lib:libblockattributes-fluids:${libblockattributes_version}"
|
||||
|
||||
modImplementation "me.shedaniel:RoughlyEnoughItems:4.6.6"
|
||||
modImplementation "mcp.mobius.waila:Hwyla:1.16.1-1.9.22-75"
|
||||
|
||||
@@ -136,24 +134,14 @@ processResources {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
// if it is present.
|
||||
// If you remove this task, sources will not be generated.
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = "sources"
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
jar {
|
||||
from "LICENSE"
|
||||
}
|
||||
|
||||
apply from: 'gradle/scripts/artifacts.gradle'
|
||||
apply from: 'gradle/scripts/curseforge.gradle'
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifactId = 'appliedenergistics2-fabric'
|
||||
|
||||
// add all the jars that should be included when publishing to maven
|
||||
artifact(remapJar) {
|
||||
builtBy remapJar
|
||||
|
||||
@@ -27,6 +27,8 @@ archives_base_name = fabric-example-mod
|
||||
kotlin_version=1.3.61
|
||||
fabric_kotlin_version=1.3.61+build.1
|
||||
|
||||
libblockattributes_version=0.7.1-pre.4
|
||||
|
||||
#########################################################
|
||||
# Deployment #
|
||||
#########################################################
|
||||
|
||||
@@ -21,8 +21,7 @@ processResources {
|
||||
}
|
||||
|
||||
jar {
|
||||
finalizedBy 'reobfJar'
|
||||
finalizedBy 'signJar'
|
||||
finalizedBy 'remapJar'
|
||||
|
||||
from sourceSets.main.output.classesDirs
|
||||
from sourceSets.api.output.classesDirs
|
||||
@@ -57,25 +56,23 @@ task javadocJar(type: Jar, dependsOn: javadocs) {
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
// if it is present.
|
||||
// If you remove this task, sources will not be generated.
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = "sources"
|
||||
from sourceSets.main.allJava
|
||||
from sourceSets.api.allJava
|
||||
from sourceSets.main.allSource
|
||||
from sourceSets.api.allSource
|
||||
}
|
||||
|
||||
task apiJar(type: Jar) {
|
||||
classifier = "api"
|
||||
from sourceSets.api.output
|
||||
include "appeng/api/**"
|
||||
|
||||
// TODO: when FG bug is fixed, remove allJava from the api jar.
|
||||
// https://github.com/MinecraftForge/ForgeGradle/issues/369
|
||||
// Gradle should be able to pull them from the -sources jar.
|
||||
from sourceSets.api.allJava
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives javadocJar
|
||||
archives sourcesJar
|
||||
archives apiJar
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ public final class AppEngClient extends AppEngBase {
|
||||
// On the client, we'll register for server startup/shutdown to properly setup
|
||||
// WorldData
|
||||
// each time the integrated server starts&stops
|
||||
ServerLifecycleEvents.SERVER_STARTED.register(WorldData::onServerStarting);
|
||||
ServerLifecycleEvents.SERVER_STARTING.register(WorldData::onServerStarting);
|
||||
ServerLifecycleEvents.SERVER_STOPPING.register(server -> WorldData.instance().onServerStopping());
|
||||
ServerLifecycleEvents.SERVER_STOPPED.register(server -> WorldData.instance().onServerStoppped());
|
||||
|
||||
|
||||
@@ -68,12 +68,6 @@ public class FacadeBlockAccess implements BlockRenderView {
|
||||
return world.getFluidState(pos);
|
||||
}
|
||||
|
||||
// This is for diffuse lighting
|
||||
@Override
|
||||
public float func_230487_a_(Direction p_230487_1_, boolean p_230487_2_) {
|
||||
return world.func_230487_a_(p_230487_1_, p_230487_2_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LightingProvider getLightingProvider() {
|
||||
return world.getLightingProvider();
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
package appeng.mixins;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Mutable;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import net.minecraft.world.gen.feature.structure.Structure;
|
||||
import net.minecraft.world.gen.settings.DimensionStructuresSettings;
|
||||
import net.minecraft.world.gen.settings.StructureSeparationSettings;
|
||||
|
||||
import appeng.worldgen.meteorite.MeteoriteStructure;
|
||||
|
||||
/**
|
||||
* This Mixin will add the structure placement configuration for the meteorite
|
||||
* structure to the static final immutable map that contains them. There is
|
||||
* currently no Forge hook for this, and registering them during the registry
|
||||
* event is already too late.
|
||||
* <p>
|
||||
* If this is not done, Meteorites spawn every chunk, since that is the default
|
||||
* for missing entries.
|
||||
*/
|
||||
@Mixin(DimensionStructuresSettings.class)
|
||||
public class DimensionStructuresSettingsMixin {
|
||||
|
||||
@Shadow
|
||||
@Mutable
|
||||
private static ImmutableMap<Structure<?>, StructureSeparationSettings> field_236191_b_;
|
||||
|
||||
@Inject(method = "<clinit>", at = @At("TAIL"))
|
||||
private static void addMeteoriteSpreadConfig(CallbackInfo ci) {
|
||||
field_236191_b_ = ImmutableMap.<Structure<?>, StructureSeparationSettings>builder().putAll(field_236191_b_)
|
||||
.put(MeteoriteStructure.INSTANCE, new StructureSeparationSettings(32, 8, 124895654)).build();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package appeng.mixins;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Invoker;
|
||||
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
import net.minecraft.world.gen.feature.structure.Structure;
|
||||
|
||||
@Mixin(Structure.class)
|
||||
public interface StructureAccessor {
|
||||
|
||||
@Invoker("func_236394_a_")
|
||||
static <F extends Structure<?>> F register(String id, F feature, GenerationStage.Decoration defaultStage) {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -24,8 +24,10 @@
|
||||
"depends": {
|
||||
"fabricloader": ">=0.7.1",
|
||||
"fabric": "*",
|
||||
"fabric-language-kotlin": "*",
|
||||
"minecraft": "1.16.x"
|
||||
"minecraft": "1.16.x",
|
||||
"libblockattributes_core": ">=0.7.1-pre.4",
|
||||
"libblockattributes_items": ">=0.7.1-pre.4",
|
||||
"libblockattributes_fluids": ">=0.7.1-pre.4"
|
||||
},
|
||||
"suggests": {
|
||||
"flamingo": "*"
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* This file is part of Applied Energistics 2.
|
||||
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||
*
|
||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
package appeng.core.worlddata;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Tests for {@link MeteorDataNameEncoder}
|
||||
*
|
||||
* @author thatsIch
|
||||
* @version rv3 - 06.06.2015
|
||||
* @since rv3 06.06.2015
|
||||
*/
|
||||
public class MeteorDataNameEncoderTest {
|
||||
private static final int WITHOUT_CHUNK_X = 0;
|
||||
private static final int WITHOUT_CHUNK_Z = 13;
|
||||
private static final String WITHOUT_EXPECTED = "-5_0_13.dat";
|
||||
|
||||
private static final int WITH_CHUNK_X = 32;
|
||||
private static final int WITH_CHUNK_Z = -64;
|
||||
private static final String WITH_EXPECTED = "3_2_-4.dat";
|
||||
|
||||
private final MeteorDataNameEncoder encoderWithZeroShifting = new MeteorDataNameEncoder(0);
|
||||
private final MeteorDataNameEncoder encoderWithFourShifting = new MeteorDataNameEncoder(4);
|
||||
|
||||
@Test
|
||||
public void testEncoderWithoutShifting() {
|
||||
final String expected = WITHOUT_EXPECTED;
|
||||
final String actual = this.encoderWithZeroShifting.encode(WITHOUT_CHUNK_X, WITHOUT_CHUNK_Z);
|
||||
|
||||
Assert.assertEquals(expected, actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEncoderWithShifting() {
|
||||
final String expected = WITH_EXPECTED;
|
||||
final String actual = this.encoderWithFourShifting.encode(WITH_CHUNK_X, WITH_CHUNK_Z);
|
||||
|
||||
Assert.assertEquals(expected, actual);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user