Skip to content

Commit

Permalink
refactor: misc changes to GalaxyRegistry
Browse files Browse the repository at this point in the history
  • Loading branch information
ROMVoid95 committed Feb 11, 2023
1 parent cd8f50a commit e3c11f7
Show file tree
Hide file tree
Showing 12 changed files with 385 additions and 167 deletions.
71 changes: 50 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ plugins {
id 'java'
id 'eclipse'
id 'org.cadixdev.licenser' version '0.6.1'
id 'net.galacticraft.changelog' version '1.0.1'
id 'net.galacticraft.tokenizer' version '1.0.0'
id 'net.galacticraft.publish' version '1.0.0'
id 'com.diffplug.spotless' version '6.13.0'
id 'net.minecraftforge.gradle' version '5.1.+'
id 'net.galacticraft.internal.legacy' version '1.0.0'
id 'net.galacticraft.internal.maven' version '1.0.1'
}

java.toolchain.languageVersion = JavaLanguageVersion.of(8)

group = "dev.galacticraft"
archivesBaseName = "Galacticraft"
version = "${mod_version}${version_suffix}"

java.toolchain.languageVersion = JavaLanguageVersion.of(8)

repositories {
mavenCentral()
maven {
Expand All @@ -22,16 +22,12 @@ repositories {
}
}

configurations {
compileOnly.extendsFrom compileRequire
}

dependencies {
minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"

compileRequire fg.deobf('mod.dependency:mekanism:9.8.3.390')
compileRequire fg.deobf('mod.dependency:industrialcraft-2:2.8.222-ex112')
compileRequire fg.deobf('mod.dependency:buildcraft-api:7.99.24.8')
compileRequired fg.deobf('mod.dependency:mekanism:9.8.3.390')
compileRequired fg.deobf('mod.dependency:industrialcraft-2:2.8.222-ex112')
compileRequired fg.deobf('mod.dependency:buildcraft-api:7.99.24.8')
compileOnly fg.deobf('mod.dependency:biomes-o-plenty:7.0.1.2445')
compileOnly fg.deobf('mod.dependency:appliedenergistics2:rv6-stable-7')
compileOnly fg.deobf('mod.dependency:redstoneflux:2.1.1.1')
Expand All @@ -48,8 +44,15 @@ dependencies {
testAnnotationProcessor 'org.projectlombok:lombok:1.18.24'
}

tasks.withType(Copy).all {
duplicatesStrategy 'EXCLUDE'
spotless {
enforceCheck false
java {
target 'src/*/java/micdoodle8/mods/**/*.java'
endWithNewline()
trimTrailingWhitespace()
removeUnusedImports()
indentWithSpaces()
}
}

license {
Expand All @@ -75,14 +78,21 @@ clean {
}

tokens {
replaceIn("micdoodle8/mods/galacticraft/core/Constants.java")
withTokens([ gcVersion: version ])
withToken('version', version)
classes("Constants.java")
resources("mcmod.info")
}

changelog {
fromTag('4.0.4')
}

maven {
excludeDependencies('forge', 'jei')
artifacts(mavenJar, deobfJar, sourcesJar)
}


modpublishing {

changelogPath(changelog.changelogFile)
Expand All @@ -91,11 +101,22 @@ modpublishing {
if (System.getenv().CI)
apiKey = 'none'
relations {
optional('mekanism', 'jei', 'journeymap', 'playerapi',
'actually-additions', 'redstone-flux',
'applied-energistics-2', 'biomes-o-plenty',
'buildcraft', 'industrial-craft')
incompatible('betterportals' , 'vics-modern-warfare-mod')
optional(
'mekanism',
'jei',
'journeymap',
'playerapi',
'actually-additions',
'redstone-flux',
'applied-energistics-2',
'biomes-o-plenty',
'buildcraft',
'industrial-craft'
)
incompatible(
'betterportals' ,
'vics-modern-warfare-mod'
)
}
}

Expand All @@ -110,3 +131,11 @@ modpublishing {
}
}
}

tasks.withType(GenerateModuleMetadata).configureEach {
enabled = false
}

build {
mustRunAfter(clean)
}
Binary file added diagrams/entity-hierarchy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.function.Predicate;

import net.minecraft.block.Block;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.WorldProvider;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.Biome.SpawnListEntry;

import micdoodle8.mods.galacticraft.annotations.ForRemoval;
import micdoodle8.mods.galacticraft.annotations.ReplaceWith;
import micdoodle8.mods.galacticraft.api.prefab.world.gen.BiomeAdaptive;
Expand All @@ -20,11 +28,7 @@
import micdoodle8.mods.galacticraft.api.world.EnumAtmosphericGas;
import micdoodle8.mods.galacticraft.api.world.IGalacticraftWorldProvider;
import micdoodle8.mods.galacticraft.api.world.IMobSpawnBiome;
import net.minecraft.block.Block;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.WorldProvider;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.Biome.SpawnListEntry;

import org.apache.commons.lang3.builder.EqualsBuilder;

public abstract class CelestialBody extends CelestialObject implements Comparable<CelestialBody>
Expand Down Expand Up @@ -322,6 +326,19 @@ public ScalableDistance(float distance)
}
}

public static Predicate<CelestialBody> filterReachable()
{
return new Predicate<CelestialBody>()
{

@Override
public boolean test(CelestialBody celestialObject)
{
return celestialObject.isReachable();
}
};
}

public void setUnreachable()
{
this.isReachable = false;
Expand Down
Loading

0 comments on commit e3c11f7

Please sign in to comment.