Skip to content

Commit

Permalink
fixed possible build error
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Dec 13, 2024
1 parent 4830307 commit 59d8e45
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
23 changes: 21 additions & 2 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ loom {
}
}

sourceSets {
main {
resources {
srcDir generatedResources
}
}
}

dependencies{
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings loom.layered() {
Expand Down Expand Up @@ -88,10 +96,18 @@ dependencies{
//include("org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin.coreLibrariesVersion}")
}

// The AW file is needed in :fabric project resources when the game is run.
task copyAccessWidener(type: Copy) {
from accessWidenerFile
into generatedResources
}


processResources {
from project(":antimatter-common").sourceSets.main.resources
dependsOn copyAccessWidener
from(project(":antimatter-common").sourceSets.main.resources){
exclude("antimatter.accesswidener")
}
def toReplace = [
"version" : project.mod_version
]
Expand All @@ -106,7 +122,10 @@ tasks.named('compileJava', JavaCompile) {
}

sourcesJar {
from(project(':antimatter-common').sourceSets.main.allSource)
mustRunAfter copyAccessWidener
from(project(':antimatter-common').sourceSets.main.allSource){
exclude("antimatter.accesswidener")
}
}

tasks.create("platformJar", ExpectPlatformJar){
Expand Down
4 changes: 3 additions & 1 deletion fabric/src/generated/resources/antimatter.accesswidener
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ accessible method net/minecraft/world/item/crafting/ShapedRecipe patternFromJson
accessible method net/minecraft/world/item/crafting/ShapedRecipe keyFromJson (Lcom/google/gson/JsonObject;)Ljava/util/Map;
accessible method net/minecraft/world/item/crafting/ShapedRecipe matches (Lnet/minecraft/world/inventory/CraftingContainer;IIZ)Z
accessible method net/minecraft/world/item/context/UseOnContext <init> (Lnet/minecraft/world/level/Level;Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/InteractionHand;Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/phys/BlockHitResult;)V
accessible method net/minecraft/world/item/context/UseOnContext getHitResult ()Lnet/minecraft/world/phys/BlockHitResult;
accessible method net/minecraft/world/item/context/UseOnContext getHitResult ()Lnet/minecraft/world/phys/BlockHitResult;
accessible class net/minecraft/client/gui/screens/MenuScreens$ScreenConstructor
accessible class net/minecraft/world/level/block/entity/BlockEntityType$BlockEntitySupplier

0 comments on commit 59d8e45

Please sign in to comment.