Skip to content

Commit

Permalink
Lots of work for making it run
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmeow committed Sep 27, 2021
1 parent dbc3bf8 commit a4d9db3
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 30 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// BEFORE SYNCING, YOU MUST GO TO Settings -> Build, Execution, Deployment -> Build Tools -> Gradle and change "Gradle JVM" to Java 11 or higher
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "0.10.0-SNAPSHOT" apply false
Expand All @@ -15,7 +16,6 @@ subprojects {
dependencies {
minecraft "com.mojang:minecraft:${rootProject.mc_version}"
mappings loom.officialMojangMappings()

}
}

Expand All @@ -28,7 +28,7 @@ allprojects {
group = rootProject.maven_group
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
def targetVersion = 11
def targetVersion = 8
if (JavaVersion.current().isJava9Compatible()) {
options.release = targetVersion
}
Expand Down
3 changes: 0 additions & 3 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ configurations {
artifacts {
dev(jar)
}
loom {
mixinConfig "mixin.imdlib.json"
}
repositories {
flatDir {
dirs 'libs'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static boolean isDev(Player player) {
public static final CreativeModeTab TAB = getPlatformTab();

@ExpectPlatform
private static CreativeModeTab getPlatformTab() {
public static CreativeModeTab getPlatformTab() {
throw new PlatformExpectedError("getPlatformTab(): Expected Platform");
}

Expand Down
12 changes: 8 additions & 4 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,13 @@ architectury {

repositories {
flatDir {
dirs 'libs'
dirs 'libs', '../common/libs'
}
}
dependencies {
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
modApi "me.shedaniel:architectury-fabric:${rootProject.architectury_version}"
modImplementation("dev.itsmeow.imdlib:imdlib:1.16.5-dev:fabric") {
transitive = false
}

implementation(project(path: ":common", configuration: "dev")) {
transitive = false
Expand All @@ -33,6 +30,13 @@ dependencies {
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) {
transitive = false
}

modImplementation("dev.itsmeow.imdlib:imdlib:1.16.5-dev") {
transitive = false
}
modImplementation("dev.itsmeow.imdlib:imdlib:1.16.5-dev:dev") {
transitive = false
}
}

processResources {
Expand Down
Binary file added fabric/libs/imdlib-1.16.5-dev-dev.jar
Binary file not shown.
Binary file removed fabric/libs/imdlib-1.16.5-dev-fabric.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.util.stream.Collectors;

public class BetterAnimalsPlusModImpl {
private static CreativeModeTab getPlatformTab() {
public static CreativeModeTab getPlatformTab() {
return FabricItemGroupBuilder.create(new ResourceLocation(Ref.MOD_ID, "main"))
.icon(() -> new ItemStack(ModItems.ANTLER.get()))
.appendItems(list -> list.addAll(ModEntities.getEntities().values().stream().map(cont -> new ItemStack((ItemLike) cont.getEggItem().get())).collect(Collectors.toList())))
Expand Down
5 changes: 1 addition & 4 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"homepage": "https://betteranimalsplus.com/",
"sources": "https://github.com/itsmeow/betteranimalsplus"
},
"license": "Insert License Here",
"license": "CC BY-NC-SA 4.0 https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode",
"icon": "icon.png",
"environment": "*",
"entrypoints": {
Expand All @@ -27,8 +27,5 @@
"depends": {
"minecraft": "1.16.5",
"architectury": ">=1.1.55"
},
"suggests": {
"flamingo": "*"
}
}
20 changes: 8 additions & 12 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,15 @@ architectury {
forge()
}

loom {
useFabricMixin = true
}

repositories {
flatDir {
dirs 'libs'
dirs 'libs', '../common/libs'
}
}
dependencies {
forge "net.minecraftforge:forge:${rootProject.mc_version}-${rootProject.forge_version}"
modApi "me.shedaniel:architectury-forge:${rootProject.architectury_version}"

modImplementation("dev.itsmeow.imdlib:imdlib:1.16.5-dev:forge") {
transitive = false
}

implementation(project(path: ":common", configuration: "dev")) {
transitive = false
}
Expand All @@ -37,6 +29,13 @@ dependencies {
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) {
transitive = false
}

modImplementation("dev.itsmeow.imdlib:imdlib:1.16.5-dev") {
transitive = false
}
modImplementation("dev.itsmeow.imdlib:imdlib:1.16.5-dev:dev") {
transitive = false
}
}

processResources {
Expand Down Expand Up @@ -129,7 +128,4 @@ publishing {
}
}
}
}
loom {
mixinConfig "mixin.imdlib.json"
}
Binary file added forge/libs/imdlib-1.16.5-dev-dev.jar
Binary file not shown.
Binary file removed forge/libs/imdlib-1.16.5-dev-forge.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import net.minecraft.world.item.ItemStack;

public class BetterAnimalsPlusModImpl {
private static CreativeModeTab getPlatformTab() {
public static CreativeModeTab getPlatformTab() {
return new CreativeModeTab(Ref.MOD_ID + ".main") {
@Override
public ItemStack makeIcon() {
Expand Down
2 changes: 1 addition & 1 deletion forge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors="cybercat5555, itsmeowdev, Batpixxler" #optional
license="CC BY-NC-SA 4.0 https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode"
[[mods]] #mandatory
modId="betteranimalsplus" #mandatory
version="${file.jarVersion}" #mandatory
version="${version}" #mandatory
displayName="Better Animals Plus" #mandatory
# The description text for the mod (multi line!) (#mandatory)
description='''
Expand Down
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.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit a4d9db3

Please sign in to comment.