Skip to content

Commit 3938367

Browse files
committed
Update for 1.18.2
1 parent 35c97fc commit 3938367

File tree

10 files changed

+37
-41
lines changed

10 files changed

+37
-41
lines changed

common/src/main/java/grondag/facility/Facility.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import dev.architectury.event.events.common.TickEvent;
2727
import dev.architectury.hooks.block.BlockEntityHooks;
2828
import dev.architectury.hooks.block.BlockEntityHooks.Constructor;
29-
import dev.architectury.hooks.tags.TagHooks;
3029
import dev.architectury.networking.NetworkManager;
3130
import dev.architectury.registry.CreativeTabRegistry;
3231
import dev.architectury.registry.registries.DeferredRegister;
@@ -35,7 +34,7 @@
3534

3635
import net.minecraft.core.Registry;
3736
import net.minecraft.resources.ResourceLocation;
38-
import net.minecraft.tags.Tag;
37+
import net.minecraft.tags.TagKey;
3938
import net.minecraft.world.inventory.AbstractContainerMenu;
4039
import net.minecraft.world.inventory.MenuType;
4140
import net.minecraft.world.item.BlockItem;
@@ -79,8 +78,8 @@ private Facility() { }
7978
private static final DeferredRegister<MenuType<?>> MENU_TYPES = DeferredRegister.create(MODID, Registry.MENU_REGISTRY);
8079

8180
public static final Material CRATE_MATERIAL = (new Material.Builder(MaterialColor.WOOD)).build();
82-
public static Tag<Item> STORAGE_BLACKLIST_WITH_CONTENT = TagHooks.optionalItem(id("storage_blacklist_with_content"));
83-
public static Tag<Item> STORAGE_BLACKLIST_ALWAYS = TagHooks.optionalItem(id("storage_blacklist_always"));
81+
public static TagKey<Item> STORAGE_BLACKLIST_WITH_CONTENT = TagKey.create(Registry.ITEM_REGISTRY, id("storage_blacklist_with_content"));
82+
public static TagKey<Item> STORAGE_BLACKLIST_ALWAYS = TagKey.create(Registry.ITEM_REGISTRY, id("storage_blacklist_always"));
8483

8584
public static void initialize() {
8685
itemGroup = CreativeTabRegistry.create(id("group"), () -> new ItemStack(Registry.ITEM.get(id("hyper_crate"))));

common/src/main/java/grondag/facility/init/CrateBlocks.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ private CrateBlocks() { }
6161

6262
final Item item = d.toItem();
6363

64-
if (d.hasTag() && Facility.STORAGE_BLACKLIST_WITH_CONTENT.contains(item)) return false;
64+
if (d.hasTag() && item.builtInRegistryHolder().is(Facility.STORAGE_BLACKLIST_WITH_CONTENT)) return false;
6565

66-
if (Facility.STORAGE_BLACKLIST_ALWAYS.contains(item)) return false;
66+
if (item.builtInRegistryHolder().is(Facility.STORAGE_BLACKLIST_ALWAYS)) return false;
6767

6868
return true;
6969
};

common/src/main/java/grondag/facility/storage/item/CreativeCrateBlockEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void tick() {
5858
}
5959

6060
final Random random = ThreadLocalRandom.current();
61-
final Item item = Registry.ITEM.getRandom(random);
61+
final Item item = Registry.ITEM.getRandom(random).get().value();
6262
ItemStack stack = new ItemStack(item);
6363
stack.setCount(item.getMaxStackSize());
6464

fabric/build.gradle

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ buildscript {
88
}
99

1010
plugins {
11-
id 'fabric-loom' version '0.10.63'
11+
id 'fabric-loom' version '0.12.42'
1212
id 'maven-publish'
1313
id 'org.cadixdev.licenser' version '0.6.1'
1414
id 'org.ajoberstar.grgit' version '4.1.1'
1515
id 'com.matthewprenger.cursegradle' version '1.4.0'
1616
id 'checkstyle'
17-
id 'com.modrinth.minotaur' version '1.2.1'
17+
id 'com.modrinth.minotaur' version '2.2.0'
1818
}
1919

2020
ext.platform_name = 'fabric'
21-
ext.loader_version = '0.12.11'
22-
ext.fabric_version = '0.44.0+1.18'
21+
ext.loader_version = '0.14.6'
22+
ext.fabric_version = '0.53.4+1.18.2'
2323

2424
apply from: '../project_common.gradle'
2525
apply from: 'project.gradle'
@@ -58,7 +58,6 @@ if (project.build_fat_jar) {
5858
input = jar.archiveFile
5959
archiveFileName = "${archivesBaseName}-${project.version}-slim.jar"
6060
addNestedDependencies = false
61-
remapAccessWidener = true
6261
}
6362

6463
build.dependsOn remapMavenJar
@@ -144,7 +143,7 @@ task github(dependsOn: build) {
144143

145144
import com.modrinth.minotaur.TaskModrinthUpload
146145

147-
task publishModrinth (type: TaskModrinthUpload){ // Make sure it runs after build!
146+
modrinth {
148147
if (project.hasProperty("modrinth_token") && project.hasProperty("modrinth_id")) {
149148
token = project.modrinth_token
150149
projectId = project.modrinth_id
@@ -153,7 +152,7 @@ task publishModrinth (type: TaskModrinthUpload){ // Make sure it runs after buil
153152
versionType = project.release_type
154153
// On fabric, use 'remapJar' instead of 'jar'
155154
uploadFile = remapJar // This is the java jar task. If it can't find the jar, try 'jar.outputs.getFiles().asPath' in place of 'jar'
156-
addGameVersion(project.minecraft_version) // Call this multiple times to add multiple game versions. There are tools that can help you generate the list of versions
157-
addLoader(project.platform_name)
155+
gameVersions = ["${project.minecraft_version}"]
156+
loaders = ["${project.platform_name}"] // Must also be an array - no need to specify this if you're using Loom
158157
}
159158
}

fabric/project.gradle

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ configurations {
77

88
dependencies {
99
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
10-
modApi "dev.architectury:architectury-fabric:3.2.60"
10+
modApi "dev.architectury:architectury-fabric:4.4.56"
1111

12-
modIncludeImplementation("grondag:exotic-matter-fabric-mc118:3.0.431:fat")
13-
modIncludeImplementation("io.vram:dtklib:1.0.3")
14-
modIncludeImplementation("io.vram:modkeys-fabric-mc118:1.0.8")
15-
modIncludeImplementation("io.vram:fluidity-fabric-mc118:2.0.229")
12+
modIncludeImplementation("grondag:exotic-matter-fabric-mc118:3.0.435:fat")
13+
modIncludeImplementation("io.vram:dtklib:1.0.6")
14+
modIncludeImplementation("io.vram:modkeys-fabric-mc118:1.0.9")
15+
modIncludeImplementation("io.vram:fluidity-fabric-mc118:2.0.231")
16+
modIncludeImplementation ("me.shedaniel.cloth:cloth-config-fabric:6.2.62")
1617

17-
modApi "dev.architectury:architectury-fabric:3.2.60"
18-
modCompileOnly "me.shedaniel:RoughlyEnoughItems-fabric:7.1.357"
19-
modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:7.1.357"
20-
modCompileOnly "com.terraformersmc:modmenu:3.0.1"
21-
modRuntimeOnly "com.terraformersmc:modmenu:3.0.1"
18+
modCompileOnly "me.shedaniel:RoughlyEnoughItems-fabric:8.2.463"
19+
modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:8.2.463"
20+
modCompileOnly "com.terraformersmc:modmenu:3.2.2"
21+
modRuntimeOnly "com.terraformersmc:modmenu:3.2.2"
2222
}
2323

2424
sourceSets {

fabric/src/main/resources/fabric.mod.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@
2828
}
2929
],
3030
"depends": {
31-
"fabricloader": ">=0.12.11",
32-
"minecraft": "1.18.1",
33-
"java": ">=16",
34-
"fabric": "*",
35-
"fluidity": "*",
36-
"exotic-matter": "*"
31+
"fabricloader": ">=0.14.6",
32+
"minecraft": ">=1.18.2",
33+
"java": ">=17",
34+
"architectury": ">=4.4.56"
3735
},
3836
"accessWidener": "facility.accesswidener"
3937
}

forge/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ buildscript {
88
}
99

1010
plugins {
11-
id 'dev.architectury.loom' version '0.10.0-SNAPSHOT'
11+
id 'dev.architectury.loom' version '0.12.0-SNAPSHOT'
1212
id 'maven-publish'
1313
id 'org.cadixdev.licenser' version '0.6.1'
1414
id 'org.ajoberstar.grgit' version '4.1.1'
1515
id 'com.matthewprenger.cursegradle' version '1.4.0'
1616
id 'checkstyle'
17-
id 'com.modrinth.minotaur' version '1.2.1'
17+
id 'com.modrinth.minotaur' version '2.2.0'
1818
id "com.github.johnrengelman.shadow" version "7.0.0" apply false
1919
}
2020

2121
ext.platform_name = 'forge'
22-
ext.forge_version = '39.0.8'
22+
ext.forge_version = '40.1.14'
2323

2424
configurations {
2525
bundle { transitive = false }
@@ -140,7 +140,7 @@ task github(dependsOn: build) {
140140

141141
import com.modrinth.minotaur.TaskModrinthUpload
142142

143-
task publishModrinth (type: TaskModrinthUpload){ // Make sure it runs after build!
143+
modrinth {
144144
if (project.hasProperty("modrinth_token") && project.hasProperty("modrinth_id")) {
145145
token = project.modrinth_token
146146
projectId = project.modrinth_id
@@ -149,7 +149,7 @@ task publishModrinth (type: TaskModrinthUpload){ // Make sure it runs after buil
149149
versionType = project.release_type
150150
// On fabric, use 'remapJar' instead of 'jar'
151151
uploadFile = remapJar // This is the java jar task. If it can't find the jar, try 'jar.outputs.getFiles().asPath' in place of 'jar'
152-
addGameVersion(project.minecraft_version) // Call this multiple times to add multiple game versions. There are tools that can help you generate the list of versions
153-
addLoader(project.platform_name)
152+
gameVersions = ["${project.minecraft_version}"]
153+
loaders = ["${project.platform_name}"] // Must also be an array - no need to specify this if you're using Loom
154154
}
155155
}

gruntle_common.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ext.mc_tag = 'mc118'
2-
ext.minecraft_version = '1.18.1'
3-
ext.release_version = '1.18.1'
2+
ext.minecraft_version = '1.18.2'
3+
ext.release_version = '1.18.2'
44

55
project.archivesBaseName = project.mod_name + "-" + project.platform_name + "-" + project.mc_tag
66

upload.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
if output=$(git status --porcelain) && [ -z "$output" ]; then
22
echo "Uploading to mod distribution sites"
33
cd fabric
4-
../gradlew curseforge publishModrinth
4+
../gradlew curseforge modrinth --rerun-tasks
55
cd ..
66

77
cd forge
8-
../gradlew curseforge publishModrinth
8+
../gradlew curseforge modrinth --rerun-tasks
99
cd ..
1010
else
1111
echo "Git has uncommitted changes - upload to mod distribution sites cancelled."

0 commit comments

Comments
 (0)