Skip to content

Commit

Permalink
update to 1.21-pre3
Browse files Browse the repository at this point in the history
  • Loading branch information
UpcraftLP committed Jun 7, 2024
1 parent 58f4441 commit dcf90c2
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 35 deletions.
4 changes: 2 additions & 2 deletions Common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ dependencies {

implementation libs.appdirs

implementation libs.resourcefulconfig
compileOnly "${libs.emi.asProvider().get()}:api"
// implementation libs.resourcefulconfig
// compileOnly "${libs.emi.asProvider().get()}:api"

testmodImplementation sourceSets.main.output
}
Expand Down
4 changes: 2 additions & 2 deletions Common/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[versions]
minecraft = "1.20.6"
minecraft = "1.21-pre3"

# The latest versions are available at https://parchmentmc.org/docs/getting-started
parchment = "2024.06.02"

mixin = "0.14.0+mixin.0.8.6"
mixin_extras = "0.3.6"
mixin_extras = "0.4.0-beta.2"
asm = "9.6"
jetbrains_annotations = "24.1.0"
vanilla_gradle = "0.2.1-SNAPSHOT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public record LineRenderable(float startX, float startY, float startZ, float end
@Override
public void render(PoseStack poseStack, VertexConsumer vertexConsumer) {
var pose = poseStack.last();
vertexConsumer.vertex(pose, startX(), startY(), startZ()).color(red(), green(), blue(), alpha()).normal(pose, 0, 1, 0).endVertex();
vertexConsumer.vertex(pose, endX(), endY(), endZ()).color(red(), green(), blue(), alpha()).normal(pose, 0, 1, 0).endVertex();
vertexConsumer.addVertex(pose, startX(), startY(), startZ()).setColor(red(), green(), blue(), alpha()).setNormal(pose, 0, 1, 0);
vertexConsumer.addVertex(pose, endX(), endY(), endZ()).setColor(red(), green(), blue(), alpha()).setNormal(pose, 0, 1, 0);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import net.minecraft.network.chat.ClickEvent;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.HoverEvent;
import net.minecraft.world.Container;
import net.minecraft.world.item.crafting.Recipe;
import net.minecraft.world.item.crafting.RecipeInput;
import net.minecraft.world.item.crafting.RecipeType;

import java.io.IOException;
Expand Down Expand Up @@ -98,7 +98,7 @@ private static void saveRecipes(CommandContext<CommandSourceStack> ctx, Holder.R
}

//noinspection unchecked
var recipes = ctx.getSource().getServer().getRecipeManager().getAllRecipesFor((RecipeType<Recipe<Container>>) holder.value());
var recipes = ctx.getSource().getServer().getRecipeManager().getAllRecipesFor((RecipeType<Recipe<RecipeInput>>) holder.value());
var outputFile = dir.resolve(holder.key().location().getNamespace()).resolve(holder.key().location().getPath() + ".csv");
var serializers = ctx.getSource().registryAccess().registryOrThrow(Registries.RECIPE_SERIALIZER);
try {
Expand Down
20 changes: 10 additions & 10 deletions Fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

project.configurations.runtimeClasspath {
exclude(group: "loom_mappings_1_20_6_layered_hash_1765695326_v2.net.fabricmc", module: "fabric-loader")
exclude(group: "loom_mappings_1_21_pre3_layered_hash_1765695326_v2.net.fabricmc", module: "fabric-loader")
}

dependencies {
Expand All @@ -23,19 +23,19 @@ dependencies {
testmodImplementation sourceSets.main.output
testmodCompileOnly project(path: ":Common", configuration: "testmod")

modImplementation (libs.resourcefulconfig.fabric) {
transitive = false
}
// modImplementation (libs.resourcefulconfig.fabric) {
// transitive = false
// }

implementation libs.appdirs
include libs.appdirs

modCompileOnly ("${libs.emi.fabric.get()}:api") {
transitive = false
}
modLocalRuntime (libs.emi.fabric) {
transitive = false
}
// modCompileOnly ("${libs.emi.fabric.get()}:api") {
// transitive = false
// }
// modLocalRuntime (libs.emi.fabric) {
// transitive = false
// }

modCompileOnly (fabric.modmenu) {
transitive = false
Expand Down
4 changes: 2 additions & 2 deletions Fabric/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# The latest versions are available at https://fabricmc.net/develop

fabric_loader = "0.15.11"
fabric_api = "0.99.4+1.20.6"
fabric_api = "0.99.5+1.21"

modmenu = "10.0.0-beta.1"
modmenu = "11.0.0-beta.1"

[libraries]
fabric_loader = { module = "net.fabricmc:fabric-loader", version.ref = "fabric_loader" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ public static void register(CommandDispatcher<FabricClientCommandSource> dispatc

private static int openConsentScreen(CommandContext<FabricClientCommandSource> ctx) {
List<ResourceLocation> permissions = List.of(
new ResourceLocation("sparkweave", "test1"),
new ResourceLocation("sparkweave", "test2"),
new ResourceLocation("sparkweave", "test3"),
new ResourceLocation("sparkweave", "test4"),
new ResourceLocation("sparkweave", "test5")
ResourceLocation.fromNamespaceAndPath("sparkweave", "test1"),
ResourceLocation.fromNamespaceAndPath("sparkweave", "test2"),
ResourceLocation.fromNamespaceAndPath("sparkweave", "test3"),
ResourceLocation.fromNamespaceAndPath("sparkweave", "test4"),
ResourceLocation.fromNamespaceAndPath("sparkweave", "test5")
);
System.out.println("opening screen");
ctx.getSource().getClient().setScreen(new ConsentScreen(permissions, true));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ public void onInitializeClient() {
});

ResourceManagerHelper.get(PackType.CLIENT_RESOURCES).registerReloadListener(new SimpleSynchronousResourceReloadListener() {
private final ResourceLocation ID = new ResourceLocation(SparkweaveMod.MODID, "translation_checker");
private final ResourceLocation ID = ResourceLocation.fromNamespaceAndPath(SparkweaveMod.MODID, "translation_checker");

@Override
public ResourceLocation getFabricId() {
return ID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static <T> FabricRegistryHandler<T> create(ResourceKey<Registry<T>> regis

@Override
public <S extends T> QuiltRegistrySupplier<S> register(String name, Supplier<S> factory) {
var id = new ResourceLocation(namespace, name);
var id = ResourceLocation.fromNamespaceAndPath(namespace, name);
var supplier = new QuiltRegistrySupplier<>(ResourceKey.create(registryKey, id), factory);

// immediately register entry
Expand Down
8 changes: 3 additions & 5 deletions Fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,16 @@
],
"depends": {
"fabricloader": ">=${fabric_loader_version}",
"minecraft": "=${minecraft_version}",
"minecraft": ">=1.21-",
"java": ">=${java_version}",
"fabric-api": "*",
"resourcefulconfig": "*"
"fabric-api": "*"
},
"custom": {
"mc-publish": {
"curseforge": "911456",
"modrinth": "nf68xfAw",
"dependencies": [
"fabric-api(required)#{curseforge:306612}{modrinth:P7dR8mSH}",
"resourcefulconfig(required)#{curseforge:714059}{modrinth:M1953qlQ}"
"fabric-api(required)#{curseforge:306612}{modrinth:P7dR8mSH}"
]
}
}
Expand Down
4 changes: 2 additions & 2 deletions NeoForge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies {
testmodImplementation sourceSets.main.output
testmodCompileOnly project(path: ":Common", configuration: "testmod")

implementation libs.resourcefulconfig.neoforge
// implementation libs.resourcefulconfig.neoforge

implementation libs.appdirs
jarJar(libs.appdirs) {
Expand Down Expand Up @@ -40,7 +40,7 @@ if (file('src/main/resources/META-INF/accesstransformer.cfg').exists()) {

subsystems {
parchment {
minecraftVersion = libs.versions.minecraft.get()
minecraftVersion = "1.20.6" // //TODO fix when parchment releases for 1.21
mappingsVersion = libs.versions.parchment.get()
}
}
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ buildCache {

rootProject.name = 'Sparkweave'

include 'Common', 'Fabric', 'NeoForge'/*, 'Quilt'*/
include 'Common', 'Fabric'/*, 'NeoForge', 'Quilt'*/

0 comments on commit dcf90c2

Please sign in to comment.