Skip to content

Commit

Permalink
bump to newest available major dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Lothrazar committed Apr 8, 2024
1 parent dcab0ae commit dbd3cfa
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 68 deletions.
19 changes: 8 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

version = "${mc_version}-${mod_version}"
group = mod_group_id
group = "com.lothrazar.cyclic"

base {
archivesName = "Cyclic"
Expand Down Expand Up @@ -142,16 +142,16 @@ dependencies {
// The "userdev" classifier will be requested and setup by ForgeGradle.
// If the group id is "net.minecraft" and the artifact id is one of ["client", "server", "joined"],
// then special handling is done to allow a setup of a vanilla dependency without the use of an external repository.
minecraft "net.neoforged:forge:${minecraft_version}-${forge_version}"
minecraft "net.neoforged:forge:${mc_version}-${forge_version}"

// Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings
// The JEI API is declared for compile time use, while the full JEI artifact is used at runtime
compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}")
compileOnly fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}")
runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}")

runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:${curios_version}")
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:${curios_version}:api")
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:${curios_version}+${mc_version}")
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:${curios_version}+${mc_version}:api")


implementation fg.deobf("com.blamejared.crafttweaker:CraftTweaker-forge-${mc_version}:${crafttweaker_version}")
Expand Down Expand Up @@ -181,11 +181,8 @@ dependencies {
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
tasks.named('processResources', ProcessResources).configure {
var replaceProperties = [
minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range,
forge_version: forge_version, forge_version_range: forge_version_range,
loader_version_range: loader_version_range,
mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
mod_authors: mod_authors, mod_description: mod_description,
forge_version: forge_version, mc_version: mc_version,
mod_id: mod_id, mod_version: mod_version,
]
inputs.properties replaceProperties

Expand All @@ -199,11 +196,11 @@ tasks.named('jar', Jar).configure {
manifest {
attributes([
'Specification-Title' : mod_id,
'Specification-Vendor' : mod_authors,
'Specification-Vendor' : 'Lothrazar',
'Specification-Version' : '1', // We are version 1 of ourselves
'Implementation-Title' : project.name,
'Implementation-Version' : project.jar.archiveVersion,
'Implementation-Vendor' : mod_authors,
'Implementation-Vendor' : 'Lothrazar',
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
Expand Down
46 changes: 7 additions & 39 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,23 @@
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
# org.gradle.java.home=C:\Program Files\AdoptOpenJDK\jdk-16.0.1.9-hotspot
# as needed run/server.properties : online-mode=false

mod_id=cyclic
curse_id=239286
mod_version=1.12.8


# NEO FORGED
forge_version=47.1.65


mod_name=Cyclic
mod_group_id=com.lothrazar.cyclic


mod_license=SeeGithub
mod_authors=Lothrazar
mod_description=mod
minecraft_version_range=[1.20.1,)
forge_version_range=[47,)
loader_version_range=[47,)
mapping_channel=official
minecraft_version=1.20.1
mapping_version=1.20.1
forge_version=47.1.104
mc_version=1.20.1





mapping_version=1.20.1
mapping_channel=official

flib_version=0.0.11
flib_file=4718037
patchouli_version=81
jei_version=15.0.0.12
curios_version=5.2.0-beta.3+1.20.1
crafttweaker_version=14.0.12



flib_file=4724762
patchouli_version=84
jei_version=15.3.0.4
curios_version=5.7.2
botania_version=443
crafttweaker_version=14.0.38
# https://www.curseforge.com/minecraft/mc-mods/crafttweaker/files/5210437
#https://www.curseforge.com/minecraft/mc-mods/botania/files/4557912

# for eclipse.ini if needed
#-vm
#C:\Program Files\AdoptOpenJDK\jdk-16.0.1.9-hotspot\bin\javaw.exe
#-vmargs

# fix unbound classpath going from java 16 to java 17 https://stackoverflow.com/a/5958520
1 change: 1 addition & 0 deletions src/main/java/com/lothrazar/cyclic/ModCyclic.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class ModCyclic {
public ModCyclic() {
FMLJavaModLoadingContext.get().getModEventBus().addListener(EventRegistry::setup);
FMLJavaModLoadingContext.get().getModEventBus().addListener(ClientRegistryCyclic::setupClient);
//TODO: before port fix warnings
DistExecutor.safeRunForDist(() -> ClientRegistryCyclic::new, () -> EventRegistry::new);
ConfigRegistry cfg = new ConfigRegistry();
cfg.setupMain();
Expand Down
10 changes: 1 addition & 9 deletions src/main/java/com/lothrazar/cyclic/util/CharmUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ private static Triple<String, Integer, ItemStack> isCurioOrInventory(Player play
if (ModList.get().isLoaded(CompatConstants.CURIOS)) {
//check curios slots IF mod is loaded
try {
// final ImmutableTriple<String, Integer, ItemStack> equipped = CuriosApi.getCuriosHelper().findEquippedCurio(match, player).orElse(null);
SlotResult first = CuriosApi.getCuriosHelper().findFirstCurio(player, match).orElse(null);
if (first != null && isMatching(first.stack(), match)) {
ItemStack found = first.stack();
Expand All @@ -70,14 +69,7 @@ private static Triple<String, Integer, ItemStack> isCurioOrInventory(Player play
// if API not installed or fails
}
}
//is "baubles" in 1.16?
//not curios, check others
// for (int i = 0; i < player.getInventoryEnderChest().getSizeInventory(); i++) {
// ItemStack temp = player.getInventoryEnderChest().getStackInSlot(i);
// if (isRemote(temp, remote)) {
// return Triple.of("ender", i, temp);
// }
// }
// TODO: does the "baubles" mod still exist
for (int i = 0; i < player.getInventory().getContainerSize(); i++) {
ItemStack temp = player.getInventory().getItem(i);
if (isMatching(temp, match)) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ credits="Thanks for this example mod goes to Java" #optional
authors="Lothrazar" #optional
# The description text for the mod (multi line!) (#mandatory)
description='''
#{mod_id} A small mod by Lothrazar
${mod_id} A small mod by Lothrazar
'''
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
[[dependencies.cyclic]] #optional
Expand All @@ -51,7 +51,7 @@ description='''
[[dependencies.cyclic]]
modId="minecraft"
mandatory=true
versionRange="[1.20.1,)"
versionRange="[${mc_version},)"
ordering="NONE"
side="BOTH"
[[dependencies.cyclic]]
Expand Down
13 changes: 6 additions & 7 deletions update.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
"homepage": "https://www.curseforge.com/minecraft/mc-mods/cyclic",

"promos": {
"1.16.5-latest": "1.5.22",
"1.18.2-latest": "1.7.17",
"1.19.2-latest":"1.8.2",
"1.19.3-latest":"1.9.0",
"1.19.4-latest":"1.10.3",
"1.20-latest":"1.12.1"
"1.16.5-latest": "1.5.23",
"1.18.2-latest": "1.7.18",
"1.19.2-latest":"1.8.3",
"1.19.4-latest":"1.10.4",
"1.20.1-latest":"1.12.8"

},
"1.16.5": {
Expand Down Expand Up @@ -181,7 +180,7 @@
,"1.20.5":"Merge pull request #2334 from TelepathicGrunt/trunk/1.20 Optimize anti beacon to not deadlock worldgen or lag entities"
,"1.20.6":"#2332 Patch doorbell crash. Patch InvocationTargetException: null errors coming from IHasClickToggle"
,"1.20.7":"Change curio render_toggle. #2356. Wooden Hopper is mineable with axes. Fixed Block Breaker attempting to break liquid source blocks. "
,"1.20.8":"Re-added botania-api Solegnolia support. Growth enchantment now uses the same logic as Sprinkler & Terra Soil (only minecraft:crops or minecraft::saplings can grow, respect IGrowable::canUseBonemeal). New gloom ignored config Gloom enchant (cyclic:curse) to ignore and not use these effects #2217 #2325. New config 'Fix Soundproofing block not muting Mekanism sounds #2389 (for example Precision Sawmill and others - you may need four or more soundproofing blocks for the desired effect). New config [cyclic.blocks.soundproofing] radius = 6 to control the area. New config under [cyclic.blocks] wireless_transfer_dimensional = true allowing transfer nodes to connect across dimensions #1913. Balance changes made for Excavate enchant it will no longer trigger if the tool is not 'mineable' effective for example axe on dirt. New feature for Excavate enchant #2116 it will not trigger on anything matching the block data-tag 'cyclic:ignored/excavate'. backported some recipe changes to match mc1.20.1+ (port of 1.16.5-1.5.23) "
,"1.20.8":"Re-added botania-api Solegnolia support. Growth enchantment now uses the same logic as Sprinkler & Terra Soil (only minecraft:crops or minecraft::saplings can grow, respect IGrowable::canUseBonemeal). New gloom ignored config Gloom enchant (cyclic:curse) to ignore and not use these effects #2217 #2325. Fix Soundproofing block not muting Mekanism sounds #2389 (for example Precision Sawmill and others - you may need four or more soundproofing blocks for the desired effect). New config [cyclic.blocks.soundproofing] radius = 6 to control the area. New config under [cyclic.blocks] wireless_transfer_dimensional = true allowing transfer nodes to connect across dimensions #1913. Balance changes made for Excavate enchant it will no longer trigger if the tool is not 'mineable' effective for example axe on dirt. New feature for Excavate enchant #2116 it will not trigger on anything matching the block data-tag 'cyclic:ignored/excavate'. "

}
}

0 comments on commit dbd3cfa

Please sign in to comment.