Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: setup jdk
uses: actions/setup-java@v4
with:
java-version: '21'
java-version: '25'
distribution: 'microsoft'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
Expand Down
41 changes: 13 additions & 28 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
plugins {
id 'net.fabricmc.fabric-loom-remap' version "${loom_version}"
id 'net.fabricmc.fabric-loom' version "${loom_version}"
id 'maven-publish'
}

version = project.mod_version
group = project.maven_group

base {
archivesName = project.archives_base_name
}

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
Expand All @@ -27,36 +20,28 @@ loom {
sourceSet sourceSets.client
}
}

}

fabricApi {
configureDataGeneration {
client = true
}
}

dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings loom.officialMojangMappings()
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
implementation "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_api_version}"

implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
}

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

filesMatching("fabric.mod.json") {
expand "version": inputs.properties.version
expand "version": version
}
}

tasks.withType(JavaCompile).configureEach {
it.options.release = 21
it.options.release = 25
}

java {
Expand All @@ -65,23 +50,23 @@ java {
// If you remove this line, sources will not be generated.
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
}

jar {
inputs.property "archivesName", project.base.archivesName
def projectName = project.name
inputs.property "projectName", projectName

from("LICENSE") {
rename { "${it}_${inputs.properties.archivesName}"}
rename { "${it}_$projectName"}
}
}

// configure the maven publication
publishing {
publications {
create("mavenJava", MavenPublication) {
artifactId = project.archives_base_name
from components.java
}
}
Expand All @@ -93,4 +78,4 @@ publishing {
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
}
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ org.gradle.configuration-cache=false

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21.10
loader_version=0.18.4
loom_version=1.14-SNAPSHOT
minecraft_version=26.2
loader_version=0.19.3
loom_version=1.17-SNAPSHOT

# Mod Properties
mod_version=1.0.0
mod_version=1.0.3
maven_group=llevc.ballistics
archives_base_name=ballistics

# Dependencies
fabric_api_version=0.138.4+1.21.10
fabric_api_version=0.158.0+26.2
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#Mon Aug 24 18:01:23 PDT 2026
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 10 additions & 21 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ pluginManagement {
mavenCentral()
gradlePluginPortal()
}
}
}

// Should match your modid
rootProject.name = 'ballistics'
17 changes: 9 additions & 8 deletions src/main/java/llevc/ballistics/Ballistics.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.Identifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -26,14 +27,14 @@ public void onInitialize() {
ModSounds.initialize();
ModDamageTypes.initialize();

Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, FlaskRecipeSerializer.ID, FlaskRecipeSerializer.INSTANCE);
Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, DrinkMixerRecipeSerializer.ID, DrinkMixerRecipeSerializer.INSTANCE);
Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, MixedDrinkRecipeSerializer.ID, MixedDrinkRecipeSerializer.INSTANCE);
Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, SnortableRecipeSerializer.ID, SnortableRecipeSerializer.INSTANCE);
Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, PickRecipeSerializer.ID, PickRecipeSerializer.INSTANCE);
Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, CartridgeRecipeSerializer.ID, CartridgeRecipeSerializer.INSTANCE);
Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, GeekedRecipeSerializer.ID, GeekedRecipeSerializer.INSTANCE);
Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, FlintlockLoadRecipeSerializer.ID, FlintlockLoadRecipeSerializer.INSTANCE);
Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, Identifier.fromNamespaceAndPath("ballistics","crafting_special_flask"), FlaskRecipe.SERIALIZER);
Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, Identifier.fromNamespaceAndPath("ballistics","crafting_special_drink_mixer"), DrinkMixerRecipe.SERIALIZER);
Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, Identifier.fromNamespaceAndPath("ballistics","crafting_special_mixed_drink"), MixedDrinkRecipe.SERIALIZER);
Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, Identifier.fromNamespaceAndPath("ballistics","crafting_special_snortable"), SnortableRecipe.SERIALIZER);
Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, Identifier.fromNamespaceAndPath("ballistics","crafting_special_pick"), PickRecipe.SERIALIZER);
Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, Identifier.fromNamespaceAndPath("ballistics","crafting_special_cartridge_fill"), CartridgeRecipe.SERIALIZER);
Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, Identifier.fromNamespaceAndPath("ballistics","crafting_special_geeked"), GeekedRecipe.SERIALIZER);
Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, Identifier.fromNamespaceAndPath("ballistics","crafting_special_flintlock_load"), FlintlockLoadRecipe.SERIALIZER);

LOGGER.info("if you read this you're prolly gonna be touched within the next 16 hours");
}
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/llevc/ballistics/FlintlockProjectile.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.projectile.AbstractHurtingProjectile;
import net.minecraft.world.entity.projectile.SmallFireball;
import net.minecraft.world.entity.projectile.hurtingprojectile.SmallFireball;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.component.BlocksAttacks;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/llevc/ballistics/ModDamageTypes.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package llevc.ballistics;

import net.minecraft.core.registries.Registries;
import net.minecraft.resources.Identifier;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.damagesource.DamageType;
import net.minecraft.world.damagesource.DamageTypes;

import java.rmi.registry.Registry;

public class ModDamageTypes {

public static ResourceKey<DamageType> lungCancer = ResourceKey.create(Registries.DAMAGE_TYPE, ResourceLocation.fromNamespaceAndPath("ballistics","lungs"));
public static ResourceKey<DamageType> lungCancer = ResourceKey.create(Registries.DAMAGE_TYPE, Identifier.fromNamespaceAndPath("ballistics","lungs"));

public static void initialize() {
}
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/llevc/ballistics/ModEntities.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package llevc.ballistics;

import com.nimbusds.oauth2.sdk.id.Identifier;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.Identifier;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.MobCategory;
Expand All @@ -16,8 +15,8 @@ public class ModEntities implements ModInitializer {

public static final EntityType<FlintlockProjectile> flintlockProjectile = Registry.register(
BuiltInRegistries.ENTITY_TYPE,
ResourceLocation.fromNamespaceAndPath("ballistics","flintlock_projectile"),
EntityType.Builder.<FlintlockProjectile>of(FlintlockProjectile::new, MobCategory.MISC).sized(0.5f,0.5f).build(ResourceKey.create(Registries.ENTITY_TYPE,ResourceLocation.fromNamespaceAndPath("ballistics","flintlock_projectile")))
Identifier.fromNamespaceAndPath("ballistics","flintlock_projectile"),
EntityType.Builder.<FlintlockProjectile>of(FlintlockProjectile::new, MobCategory.MISC).sized(0.5f,0.5f).build(ResourceKey.create(Registries.ENTITY_TYPE,Identifier.fromNamespaceAndPath("ballistics","flintlock_projectile")))
);

@Override
Expand Down
Loading
Loading