Skip to content

Commit

Permalink
Updated to 1.21, fix #1, removed unused MixinxExtras pre-launch
Browse files Browse the repository at this point in the history
  • Loading branch information
Emafire003 committed Jul 12, 2024
1 parent 3270578 commit bd6f621
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 106 deletions.
124 changes: 56 additions & 68 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,102 +1,90 @@
plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_16
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_16

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

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.
maven { url 'https://jitpack.io' }
// Needed to retrieve Cloth Config Lite for Omega Config in development environments.
/*maven {
name = "Shedaniel's Maven"
url = "https://maven.shedaniel.me/"
}
// Optional dependency for Mod Menu - recommended for viewing your screen in development
maven {
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/releases/"
}*/
// 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.
maven { url 'https://jitpack.io' }
// Needed to retrieve Cloth Config Lite for Omega Config in development environments.
/*maven {
name = "Shedaniel's Maven"
url = "https://maven.shedaniel.me/"
}
// Optional dependency for Mod Menu - recommended for viewing your screen in development
maven {
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/releases/"
}*/
}

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}"
// 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}"

//Mixin Extras, but I could use the continue thing
implementation("com.github.LlamaLad7:MixinExtras:0.0.12")
annotationProcessor("com.github.LlamaLad7:MixinExtras:0.0.12")
include ("com.github.LlamaLad7:MixinExtras:0.0.12")
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

//Config library
/*include("com.github.Luligabi1.omega-config:omega-config-base:${project.omega_config_version}")
modImplementation("com.github.Luligabi1.omega-config:omega-config-base:${project.omega_config_version}")
//Mixin Extras, but I could use the continue thing
implementation("com.github.LlamaLad7:MixinExtras:0.0.12")
annotationProcessor("com.github.LlamaLad7:MixinExtras:0.0.12")//technically I don't need this anymore
include ("com.github.LlamaLad7:MixinExtras:0.0.12")

include("com.github.Luligabi1.omega-config:omega-config-gui:${project.omega_config_version}")
modImplementation("com.github.Luligabi1.omega-config:omega-config-gui:${project.omega_config_version}")
modRuntimeOnly ("com.terraformersmc:modmenu:${project.modmenu_version}") // 3.0.1 for 1.18.1
*/
// 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
inputs.property "version", project.version

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

tasks.withType(JavaCompile).configureEach {
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 16
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 16
}

java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}

jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
publications {
mavenJava(MavenPublication) {
from components.java
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// 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 @@ -3,16 +3,16 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.14.22
minecraft_version=1.21
yarn_mappings=1.21+build.9
loader_version=0.15.11


# Mod Properties
mod_version = 1.3.0
mod_version = 1.4.0
maven_group = me.emafire003.dev
archives_base_name = beampass

# Dependencies
fabric_version=0.88.1+1.20.1
fabric_version=0.100.6+1.21

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
10 changes: 5 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
Expand Down
10 changes: 4 additions & 6 deletions src/main/java/me/emafire003/dev/beampass/BeamPass.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,15 @@ public static List<String> convertFromBlockList(List<Block> typelist){
}

/**
* Used to convert String values to EntityType (those in a list)
* Used to convert String values to Blocks
* */
public static List<Block> convertToBlockList(List<String> typelist){
List<Block> list = new ArrayList<>();
for(String type : typelist){
Block block = Registries.BLOCK.get(new Identifier(type));
if(block != null){
list.add(block);
}
Block block = Registries.BLOCK.get(Identifier.of(type));
list.add(block);

}
}
return list;
}

Expand Down
17 changes: 0 additions & 17 deletions src/main/java/me/emafire003/dev/beampass/BeamPassPreLaunch.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
Expand All @@ -15,6 +16,7 @@
@Mixin(BeaconBlockEntity.class)
public class BeaconMixin {

@Unique
private static BlockState bstate;

@ModifyExpressionValue(
Expand Down
5 changes: 1 addition & 4 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
"entrypoints": {
"main": [
"me.emafire003.dev.beampass.BeamPass"
],
"preLaunch": [
"me.emafire003.dev.beampass.BeamPassPreLaunch"
]
},
"mixins": [
Expand All @@ -32,7 +29,7 @@

"depends": {
"fabricloader": ">=0.14.8",
"minecraft": ">=1.17-",
"minecraft": ">=1.20-",
"java": ">=16"
},
"suggests": {
Expand Down

0 comments on commit bd6f621

Please sign in to comment.