Move to Quilt Mappings

This commit is contained in:
tibs 2022-03-15 20:50:02 -04:00
parent 5e49440291
commit ac4e748820
Signed by untrusted user who does not match committer: tibs
GPG key ID: 047833989F50F88F
5 changed files with 15 additions and 6 deletions

View file

@ -1,6 +1,7 @@
plugins { plugins {
id 'fabric-loom' version '0.11.+' id 'fabric-loom' version '0.11.+'
id 'io.github.juuxel.loom-quiltflower' version '1.6.0' id 'io.github.juuxel.loom-quiltflower' version '1.6.0'
id 'org.quiltmc.quilt-mappings-on-loom' version '4.0.0'
id 'org.ajoberstar.grgit' version '5.0.0' id 'org.ajoberstar.grgit' version '5.0.0'
} }
@ -31,7 +32,10 @@ var apiModules = [
dependencies { dependencies {
// To change the versions see the gradle.properties file // To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}" minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" mappings loom.layered {
it.mappings("net.fabricmc:yarn:${project.minecraft_version}+build.${project.yarn_mappings}:v2")
it.addLayer(quiltMappings.mappings("org.quiltmc:quilt-mappings:${project.minecraft_version}+build.${project.quilt_mappings}:v2"))
}
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
// Fabric API // Fabric API

View file

@ -4,7 +4,8 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/develop/ # check these on https://fabricmc.net/develop/
minecraft_version=1.18.2 minecraft_version=1.18.2
yarn_mappings=1.18.2+build.2 quilt_mappings=17
yarn_mappings=2
loader_version=0.13.3 loader_version=0.13.3
fabric_version=0.48.0+1.18.2 fabric_version=0.48.0+1.18.2

View file

@ -1,5 +1,9 @@
pluginManagement { pluginManagement {
repositories { repositories {
maven {
name 'Quilt'
url 'https://maven.quiltmc.org/repository/release'
}
maven { maven {
name = 'Fabric' name = 'Fabric'
url = 'https://maven.fabricmc.net/' url = 'https://maven.fabricmc.net/'

View file

@ -79,13 +79,13 @@ public class WaterCauldronBlockEntity extends BlockEntity {
@Override @Override
public NbtCompound toInitialChunkDataNbt() { public NbtCompound toInitialChunkDataNbt() {
return createNbt(); return toNbt();
} }
@Nullable @Nullable
@Override @Override
public Packet<ClientPlayPacketListener> toUpdatePacket() { public Packet<ClientPlayPacketListener> toUpdatePacket() {
return BlockEntityUpdateS2CPacket.create(this); return BlockEntityUpdateS2CPacket.of(this);
} }
@Override @Override

View file

@ -25,7 +25,7 @@ import java.util.Map;
@Mixin(CauldronBehavior.class) @Mixin(CauldronBehavior.class)
public interface CauldronBehaviorMixin { public interface CauldronBehaviorMixin {
@Inject(method = "method_32209", at = @At("HEAD"), cancellable = true) @Inject(method = "m_ducbhfos", at = @At("HEAD"), cancellable = true)
private static void injectCleanDyeableItem(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, ItemStack stack, CallbackInfoReturnable<ActionResult> cir) { private static void injectCleanDyeableItem(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, ItemStack stack, CallbackInfoReturnable<ActionResult> cir) {
var blockEntity = world.getBlockEntity(pos); var blockEntity = world.getBlockEntity(pos);
var item = stack.getItem(); var item = stack.getItem();
@ -41,7 +41,7 @@ public interface CauldronBehaviorMixin {
} }
} }
@Inject(method = "method_32217", at = @At(value = "TAIL")) @Inject(method = "m_xrdlazrh", at = @At(value = "TAIL"))
private static void injectFillWithWater(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, ItemStack stack, CallbackInfoReturnable<ActionResult> cir) { private static void injectFillWithWater(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, ItemStack stack, CallbackInfoReturnable<ActionResult> cir) {
var blockEntity = world.getBlockEntity(pos); var blockEntity = world.getBlockEntity(pos);
if (blockEntity instanceof WaterCauldronBlockEntity waterCauldron) { if (blockEntity instanceof WaterCauldronBlockEntity waterCauldron) {