Skip to content

Commit

Permalink
build: updated build toolchain for mixin refmap issue
Browse files Browse the repository at this point in the history
  • Loading branch information
desht committed Jun 11, 2024
1 parent 907a2b8 commit 10c87b1
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "0.12.0-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
id "com.matthewprenger.cursegradle" version "1.4.0" apply false
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package dev.ftb.mods.ftbquests.block.entity;

import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.NotNull;

import javax.annotation.Nonnull;
import java.util.Optional;
import java.util.UUID;

public interface ITaskScreen {
Optional<TaskScreenBlockEntity> getCoreScreen();

@Nonnull
@NotNull
UUID getTeamId();

boolean isInputOnly();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
import net.minecraft.world.level.block.state.BlockState;
import org.jetbrains.annotations.NotNull;

import javax.annotation.Nonnull;
import java.lang.ref.WeakReference;
import java.util.Optional;
import java.util.UUID;

public class TaskScreenAuxBlockEntity extends BlockEntity implements ITaskScreen, Nameable {
@Nonnull
@NotNull
private WeakReference<TaskScreenBlockEntity> coreScreen = new WeakReference<>(null);
private BlockPos corePosPending; // non-null after NBT load & before querying/resolving

Expand Down Expand Up @@ -46,7 +45,7 @@ public Optional<TaskScreenBlockEntity> getCoreScreen() {
return Optional.ofNullable(coreScreen.get());
}

public void setCoreScreen(@Nonnull TaskScreenBlockEntity coreScreen) {
public void setCoreScreen(@NotNull TaskScreenBlockEntity coreScreen) {
// this must ONLY be called from TaskScreenBlock#onPlacedBy() !
if (this.coreScreen.get() != null) throw new IllegalStateException("coreScreen is already set and can't be changed!");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.annotation.Nonnull;
import java.util.Optional;
import java.util.UUID;

Expand All @@ -40,7 +40,8 @@ public class TaskScreenBlockEntity extends BlockEntity implements ITaskScreen {
private boolean textShadow = false;
private ItemStack inputModeIcon = ItemStack.EMPTY;
private ItemStack skin = ItemStack.EMPTY;
@Nonnull private UUID teamId = Util.NIL_UUID;
@NotNull
private UUID teamId = Util.NIL_UUID;
public float[] fakeTextureUV = null; // null for unknown, 0-array for no texture, 4-array for a texture
private TeamData cachedTeamData = null;

Expand Down Expand Up @@ -109,13 +110,13 @@ public void setTextShadow(boolean textShadow) {
this.textShadow = textShadow;
}

public void setTeamId(@Nonnull UUID teamId) {
public void setTeamId(@NotNull UUID teamId) {
this.teamId = teamId;
cachedTeamData = null;
}

@Override
@Nonnull
@NotNull
public UUID getTeamId() {
return teamId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import net.minecraft.client.gui.components.Whence;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.Component;
import org.jetbrains.annotations.NotNull;

import javax.annotation.Nonnull;
import java.util.*;
import java.util.regex.Pattern;

Expand Down Expand Up @@ -233,7 +233,7 @@ private void resetFormatting() {
}
}

private static String stripFormatting(@Nonnull String selectedText) {
private static String stripFormatting(@NotNull String selectedText) {
return STRIP_FORMATTING_PATTERN.matcher(selectedText).replaceAll("");
}

Expand Down Expand Up @@ -462,6 +462,6 @@ public ToolbarButton withTooltip(Component... lines) {
}
}

private record HistoryElement(@Nonnull String text, int cursorPos) {
private record HistoryElement(@NotNull String text, int cursorPos) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import org.apache.commons.lang3.mutable.MutableInt;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.annotation.Nonnull;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
Expand Down Expand Up @@ -254,7 +254,7 @@ public Chapter getChapter(long id) {
return object instanceof Chapter ? (Chapter) object : null;
}

@Nonnull
@NotNull
public Chapter getChapterOrThrow(long id) {
if (getBase(id) instanceof Chapter c) return c;
throw new IllegalArgumentException("Unknown chapter ID: c");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.material.Fluid;
import net.minecraft.world.level.material.Fluids;
import org.jetbrains.annotations.Nullable;

import javax.annotation.Nullable;
import java.util.Optional;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import net.minecraft.nbt.StringTag;
import net.minecraft.nbt.Tag;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.Nullable;

import javax.annotation.Nullable;
import java.util.Set;
import java.util.stream.IntStream;

Expand Down
6 changes: 3 additions & 3 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ processResources {

shadowJar {
configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
setArchiveClassifier "dev-shadow"
}

remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
archiveBaseName.set "${rootProject.archives_base_name}-${project.name}"
archiveClassifier.set null
setArchiveClassifier null
}

jar {
classifier "dev"
setArchiveClassifier "dev"
}

components.java {
Expand Down
6 changes: 3 additions & 3 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ shadowJar {
exclude "fabric.mod.json"

configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
setArchiveClassifier "dev-shadow"
}

remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
archiveBaseName.set "${rootProject.archives_base_name}-${project.name}"
archiveClassifier.set null
setArchiveClassifier null
}

jar {
Expand All @@ -88,7 +88,7 @@ jar {
])
}

classifier "dev"
setArchiveClassifier "dev"
}

components.java {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 10c87b1

Please sign in to comment.