Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,17 @@ tasks.register("spotbugs", SpotBugsTask) { task ->
task.classDirs.from(task.classDirs.files, it.output)
task.auxClassPaths.from(task.auxClassPaths.files, it.compileClasspath)
}
excludeFilter = file("spotbugs.xml")
excludeFilter = rootProject.file("spotbugs.xml")
ignoreFailures = true
reports {
if (local) {
html {
required = true
outputLocation = file("$buildDir/reports/spotbugs/main/spotbugs.html")
stylesheet = 'fancy-hist.xsl'
}
} else {
sarif {
required = true
outputLocation = file("$buildDir/reports/spotbugs/main/spotbugs.sarif")
}
html {
required = true
outputLocation = rootProject.file("${rootProject.buildDir}/reports/spotbugs/main/spotbugs.html")
stylesheet = 'fancy-hist.xsl'
}
sarif {
required = true
outputLocation = rootProject.file("${rootProject.buildDir}/reports/spotbugs/main/spotbugs.sarif")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/versions.html
minecraft_version=[VERSIONED]
fabric_loader=0.16.10
fabric_loader=0.16.13
yarn_mappings=[VERSIONED]
fabric_api=[VERSIONED]
midnightlib_version =[VERSIONED]
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ pluginManagement {
}

plugins {
id "dev.kikugie.stonecutter" version "0.6"
id "dev.kikugie.stonecutter" version "0.7.6"
}

stonecutter {
create(rootProject) {
versions "1.21.1", "1.21.4", "1.21.5"
versions "1.21.1", "1.21.4", "1.21.5", "1.21.6", "1.21.7", "1.21.8"
vcsVersion = "1.21.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyArg;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
//? if >=1.21.6 {
/*import net.minecraft.storage.ReadView;
import net.minecraft.storage.WriteView;
*///?}
//? if =1.21.1 {
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
Expand Down Expand Up @@ -162,6 +166,7 @@ void onPushAway(Entity entity, CallbackInfo ci) {
if (!CollisionUtils.shouldCollide(this, entity)) ci.cancel();
}

//? if <1.21.6 {
@Inject(at = @At("RETURN"), method = "writeCustomDataToNbt")
private void linkart$write(NbtCompound nbt, CallbackInfo ci) {
if (linkart$followingUUID != null) nbt./*? if >=1.21.5 {*//*put*//*?} else {*/putUuid/*?}*/("LK-Following"/*? if >=1.21.5 {*//*, Uuids.INT_STREAM_CODEC*//*?}*/, linkart$followingUUID);
Expand All @@ -181,6 +186,24 @@ void onPushAway(Entity entity, CallbackInfo ci) {
if (nbt.contains("LK-ItemStack")) linkart$itemStack = ItemStack.fromNbtOrEmpty(this.getRegistryManager(), nbt.getCompound("LK-ItemStack"));
/*?}*/
}
//?} else {
/*@Inject(at = @At("RETURN"), method = "writeCustomData")
private void linkart$write(WriteView view, CallbackInfo ci) {
view.putNullable("LK-Following", Uuids.INT_STREAM_CODEC, linkart$followingUUID);
view.putNullable("LK-Follower", Uuids.INT_STREAM_CODEC, linkart$followerUUID);

if(!linkart$itemStack.isEmpty()) {
view.put("LK-ItemStack", ItemStack.CODEC, linkart$itemStack);
}
}

@Inject(at = @At("RETURN"), method = "readCustomData")
private void linkart$read(ReadView view, CallbackInfo ci) {
view.read("LK-Following", Uuids.INT_STREAM_CODEC).ifPresent(uuid -> linkart$followingUUID = uuid);
view.read("LK-Follower", Uuids.INT_STREAM_CODEC).ifPresent(uuid -> linkart$followerUUID = uuid);
linkart$itemStack = view.read("Item", ItemStack.CODEC).orElse(ItemStack.EMPTY);
}
*///?}

@Override
public AbstractMinecartEntity linkart$getFollowing() {
Expand Down
5 changes: 0 additions & 5 deletions stonecutter.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
plugins.apply "dev.kikugie.stonecutter"
stonecutter.active "1.21.1" /* [SC] DO NOT EDIT */

stonecutter.registerChiseled tasks.register("chiseledBuild", stonecutter.chiseled) {
setGroup "project"
ofTask "build"
}
3 changes: 3 additions & 0 deletions versions/1.21.6/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
yarn_mappings=1.21.6+build.1
fabric_api=0.127.1+1.21.6
midnightlib_version=1.7.5+1.21.6-fabric
3 changes: 3 additions & 0 deletions versions/1.21.7/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
yarn_mappings=1.21.7+build.8
fabric_api=0.129.0+1.21.7
midnightlib_version=1.7.5+1.21.6-fabric
3 changes: 3 additions & 0 deletions versions/1.21.8/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
yarn_mappings=1.21.8+build.1
fabric_api=0.130.0+1.21.8
midnightlib_version=1.7.5+1.21.6-fabric
Loading