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 {
id 'fabric-loom' version '0.11.+'
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'
}
@ -31,7 +32,10 @@ var apiModules = [
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"
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}"
// Fabric API

View file

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

View file

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

View file

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

View file

@ -25,7 +25,7 @@ import java.util.Map;
@Mixin(CauldronBehavior.class)
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) {
var blockEntity = world.getBlockEntity(pos);
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) {
var blockEntity = world.getBlockEntity(pos);
if (blockEntity instanceof WaterCauldronBlockEntity waterCauldron) {