Skip to content

Commit

Permalink
Feat: Fix Omen of Caro Invictus failing to play boss music
Browse files Browse the repository at this point in the history
Feat: Building indev now attaches the first 8 digits of the HEAD commit id.
  • Loading branch information
kd8lvt committed Oct 29, 2024
1 parent 69b3b9e commit 664da50
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 35 deletions.
52 changes: 20 additions & 32 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,35 @@
plugins {
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'maven-publish'
id 'org.ajoberstar.grgit' version '5.3.0'
}
apply from:"https://kd8lvt.com/gradle/minecraft/versioning.gradle"

version = project.mod_version
group = project.maven_group
//git commit file name when built in-dev
version = VERConsts.getVersionName()

base {
archivesName = project.archives_base_name-project.minecraft_version
tasks.register("prod") {
project.version = VERConsts.getVersionName(true)
}

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.

mavenCentral()
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

modImplementation "com.ptsmods:devlogin:3.5"
}

base {
archivesName = project.archives_base_name-project.minecraft_version
}


loom {
splitEnvironmentSourceSets()
Expand All @@ -45,32 +56,9 @@ loom {

runDir "build/datagen"
}

clientAsKd {
inherit client
programArg "--mimicPlayer"
programArg "kd8lvt"
}
}
}

dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

modImplementation "com.ptsmods:devlogin:3.5"

// Uncomment the following line to enable the deprecated Fabric API modules.
// These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time.

// modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
}

processResources {
inputs.property "version", project.version

Expand Down
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ org.gradle.parallel=true
# check these on https://fabricmc.net/develop
minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
loader_version=0.16.4
loader_version=0.16.7

# Fabric API
fabric_version=0.103.0+1.21.1

# Mod Properties
mod_version=1.0.6+1.21.0+1.21.1
mod_version=1.0.6
game_version=1.21.0+1.21.1
maven_group=com.kd8lvt.exclusionzone
archives_base_name=exclusionzone
modid=exclusionzone
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public ActionResult useOnBlock(ItemUsageContext context) {
if (!Objects.requireNonNull(context.getPlayer()).isSneaking()) return super.useOnBlock(context);
if (((BeaconBlockEntity) Objects.requireNonNull(w.getBlockEntity(context.getBlockPos()))).getBeamSegments().isEmpty()) return super.useOnBlock(context);

w.playSoundAtBlockCenter(context.getBlockPos().up(), ModSounds.get("caro_invictus_music"), SoundCategory.MASTER,1.0f,1.0f,true);
w.playSoundAtBlockCenter(context.getBlockPos().up(), ModSounds.get("mob.caro_invictus.music"), SoundCategory.MASTER,1.0f,1.0f,true);

if (w.isClient) return super.useOnBlock(context);
ServerWorld world = (ServerWorld)w;
Expand Down

0 comments on commit 664da50

Please sign in to comment.