mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-11-04 07:32:59 +00:00 
			
		
		
		
	Update ErrorProne
This commit is contained in:
		@@ -94,9 +94,8 @@ sourceSets.all {
 | 
				
			|||||||
            check("InlineMeSuggester", CheckSeverity.OFF) // Minecraft uses @Deprecated liberally
 | 
					            check("InlineMeSuggester", CheckSeverity.OFF) // Minecraft uses @Deprecated liberally
 | 
				
			||||||
            // Too many false positives right now. Maybe we need an indirection for it later on.
 | 
					            // Too many false positives right now. Maybe we need an indirection for it later on.
 | 
				
			||||||
            check("ReferenceEquality", CheckSeverity.OFF)
 | 
					            check("ReferenceEquality", CheckSeverity.OFF)
 | 
				
			||||||
            check("UnusedVariable", CheckSeverity.OFF) // Too many false positives with records.
 | 
					            check("EnumOrdinal", CheckSeverity.OFF) // For now. We could replace most of these with EnumMap.
 | 
				
			||||||
            check("OperatorPrecedence", CheckSeverity.OFF) // For now.
 | 
					            check("OperatorPrecedence", CheckSeverity.OFF) // For now.
 | 
				
			||||||
            check("AlreadyChecked", CheckSeverity.OFF) // Seems to be broken?
 | 
					 | 
				
			||||||
            check("NonOverridingEquals", CheckSeverity.OFF) // Peripheral.equals makes this hard to avoid
 | 
					            check("NonOverridingEquals", CheckSeverity.OFF) // Peripheral.equals makes this hard to avoid
 | 
				
			||||||
            check("FutureReturnValueIgnored", CheckSeverity.OFF) // Too many false positives with Netty
 | 
					            check("FutureReturnValueIgnored", CheckSeverity.OFF) // Too many false positives with Netty
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -35,7 +35,6 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 | 
				
			|||||||
import java.io.File
 | 
					import java.io.File
 | 
				
			||||||
import java.io.IOException
 | 
					import java.io.IOException
 | 
				
			||||||
import java.net.URI
 | 
					import java.net.URI
 | 
				
			||||||
import java.net.URL
 | 
					 | 
				
			||||||
import java.util.regex.Pattern
 | 
					import java.util.regex.Pattern
 | 
				
			||||||
 | 
					
 | 
				
			||||||
abstract class CCTweakedExtension(
 | 
					abstract class CCTweakedExtension(
 | 
				
			||||||
@@ -226,12 +225,12 @@ abstract class CCTweakedExtension(
 | 
				
			|||||||
     * where possible.
 | 
					     * where possible.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    fun downloadFile(label: String, url: String): File {
 | 
					    fun downloadFile(label: String, url: String): File {
 | 
				
			||||||
        val url = URL(url)
 | 
					        val uri = URI(url)
 | 
				
			||||||
        val path = File(url.path)
 | 
					        val path = File(uri.path)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        project.repositories.ivy {
 | 
					        project.repositories.ivy {
 | 
				
			||||||
            name = label
 | 
					            name = label
 | 
				
			||||||
            setUrl(URI(url.protocol, url.userInfo, url.host, url.port, path.parent, null, null))
 | 
					            setUrl(URI(uri.scheme, uri.userInfo, uri.host, uri.port, path.parent, null, null))
 | 
				
			||||||
            patternLayout {
 | 
					            patternLayout {
 | 
				
			||||||
                artifact("[artifact].[ext]")
 | 
					                artifact("[artifact].[ext]")
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,7 +57,7 @@ jmh = "1.37"
 | 
				
			|||||||
cctJavadoc = "1.8.2"
 | 
					cctJavadoc = "1.8.2"
 | 
				
			||||||
checkstyle = "10.14.1"
 | 
					checkstyle = "10.14.1"
 | 
				
			||||||
curseForgeGradle = "1.0.14"
 | 
					curseForgeGradle = "1.0.14"
 | 
				
			||||||
errorProne-core = "2.23.0"
 | 
					errorProne-core = "2.27.0"
 | 
				
			||||||
errorProne-plugin = "3.1.0"
 | 
					errorProne-plugin = "3.1.0"
 | 
				
			||||||
fabric-loom = "1.6.7"
 | 
					fabric-loom = "1.6.7"
 | 
				
			||||||
forgeGradle = "6.0.21"
 | 
					forgeGradle = "6.0.21"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,8 +13,6 @@ import net.minecraft.core.BlockPos;
 | 
				
			|||||||
import net.minecraft.core.Direction;
 | 
					import net.minecraft.core.Direction;
 | 
				
			||||||
import net.minecraft.server.level.ServerLevel;
 | 
					import net.minecraft.server.level.ServerLevel;
 | 
				
			||||||
import net.minecraft.world.level.block.entity.BlockEntity;
 | 
					import net.minecraft.world.level.block.entity.BlockEntity;
 | 
				
			||||||
import org.slf4j.Logger;
 | 
					 | 
				
			||||||
import org.slf4j.LoggerFactory;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
import javax.annotation.Nullable;
 | 
					import javax.annotation.Nullable;
 | 
				
			||||||
import java.util.ArrayList;
 | 
					import java.util.ArrayList;
 | 
				
			||||||
@@ -29,8 +27,6 @@ import java.util.Objects;
 | 
				
			|||||||
 * @param <C> A platform-specific type, used for the invalidation callback.
 | 
					 * @param <C> A platform-specific type, used for the invalidation callback.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
public final class GenericPeripheralProvider<C extends Runnable> {
 | 
					public final class GenericPeripheralProvider<C extends Runnable> {
 | 
				
			||||||
    private static final Logger LOG = LoggerFactory.getLogger(GenericPeripheralProvider.class);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private final List<ComponentLookup<? super C>> lookups = new ArrayList<>();
 | 
					    private final List<ComponentLookup<? super C>> lookups = new ArrayList<>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -33,7 +33,6 @@ public final class IDAssigner {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    private final Path idFile;
 | 
					    private final Path idFile;
 | 
				
			||||||
    private final Path newIdFile;
 | 
					    private final Path newIdFile;
 | 
				
			||||||
    private boolean atomicMove = true;
 | 
					 | 
				
			||||||
    private @Nullable Map<String, Integer> ids;
 | 
					    private @Nullable Map<String, Integer> ids;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public IDAssigner(Path path) {
 | 
					    public IDAssigner(Path path) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,6 +4,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
package dan200.computercraft.shared.util;
 | 
					package dan200.computercraft.shared.util;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.google.errorprone.annotations.Keep;
 | 
				
			||||||
import net.minecraft.core.BlockPos;
 | 
					import net.minecraft.core.BlockPos;
 | 
				
			||||||
import net.minecraft.resources.ResourceKey;
 | 
					import net.minecraft.resources.ResourceKey;
 | 
				
			||||||
import net.minecraft.server.level.ChunkLevel;
 | 
					import net.minecraft.server.level.ChunkLevel;
 | 
				
			||||||
@@ -132,6 +133,7 @@ public final class TickScheduler {
 | 
				
			|||||||
        /**
 | 
					        /**
 | 
				
			||||||
         * The current state of this token.
 | 
					         * The current state of this token.
 | 
				
			||||||
         */
 | 
					         */
 | 
				
			||||||
 | 
					        @Keep
 | 
				
			||||||
        private volatile State $state = State.IDLE;
 | 
					        private volatile State $state = State.IDLE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public Token(BlockEntity owner) {
 | 
					        public Token(BlockEntity owner) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,6 +42,7 @@ class GameTestSequenceMixin {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Shadow
 | 
					    @Shadow
 | 
				
			||||||
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    private void tick(long tick) {
 | 
					    private void tick(long tick) {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -38,7 +38,7 @@ class MinecraftMixin implements MinecraftExtensions {
 | 
				
			|||||||
    private final AtomicBoolean isStable = new AtomicBoolean(false);
 | 
					    private final AtomicBoolean isStable = new AtomicBoolean(false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Inject(method = "runTick", at = @At("TAIL"))
 | 
					    @Inject(method = "runTick", at = @At("TAIL"))
 | 
				
			||||||
    @SuppressWarnings("UnusedMethod")
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    private void updateStable(boolean render, CallbackInfo ci) {
 | 
					    private void updateStable(boolean render, CallbackInfo ci) {
 | 
				
			||||||
        isStable.set(
 | 
					        isStable.set(
 | 
				
			||||||
            level != null && player != null &&
 | 
					            level != null && player != null &&
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,7 +22,7 @@ public class WorldOpenFlowsMixin {
 | 
				
			|||||||
     * @reason Makes it easier to run tests. We can switch to an @Inject if this becomes a problem.
 | 
					     * @reason Makes it easier to run tests. We can switch to an @Inject if this becomes a problem.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @Overwrite
 | 
					    @Overwrite
 | 
				
			||||||
    @SuppressWarnings("UnusedMethod")
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    private void askForBackup(Screen screen, String level, boolean customised, Runnable action) {
 | 
					    private void askForBackup(Screen screen, String level, boolean customised, Runnable action) {
 | 
				
			||||||
        action.run();
 | 
					        action.run();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,7 +27,7 @@ class GameRendererMixin {
 | 
				
			|||||||
    private Map<String, ShaderInstance> shaders;
 | 
					    private Map<String, ShaderInstance> shaders;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Inject(method = "reloadShaders", at = @At(value = "TAIL"))
 | 
					    @Inject(method = "reloadShaders", at = @At(value = "TAIL"))
 | 
				
			||||||
    @SuppressWarnings("UnusedMethod")
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    private void onReloadShaders(ResourceProvider resourceManager, CallbackInfo ci) {
 | 
					    private void onReloadShaders(ResourceProvider resourceManager, CallbackInfo ci) {
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
            ClientRegistry.registerShaders(resourceManager, (shader, callback) -> {
 | 
					            ClientRegistry.registerShaders(resourceManager, (shader, callback) -> {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,7 +22,7 @@ class ItemFrameRendererMixin {
 | 
				
			|||||||
        at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/PoseStack;mulPose(Lorg/joml/Quaternionf;)V", ordinal = 2, shift = At.Shift.AFTER),
 | 
					        at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/PoseStack;mulPose(Lorg/joml/Quaternionf;)V", ordinal = 2, shift = At.Shift.AFTER),
 | 
				
			||||||
        cancellable = true
 | 
					        cancellable = true
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
    @SuppressWarnings("UnusedMethod")
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    private void render(ItemFrame entity, float yaw, float partialTicks, PoseStack pose, MultiBufferSource buffers, int light, CallbackInfo ci) {
 | 
					    private void render(ItemFrame entity, float yaw, float partialTicks, PoseStack pose, MultiBufferSource buffers, int light, CallbackInfo ci) {
 | 
				
			||||||
        if (ClientHooks.onRenderItemFrame(pose, buffers, entity, entity.getItem(), light)) {
 | 
					        if (ClientHooks.onRenderItemFrame(pose, buffers, entity, entity.getItem(), light)) {
 | 
				
			||||||
            ci.cancel();
 | 
					            ci.cancel();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,7 +19,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
 | 
				
			|||||||
@Mixin(ItemInHandRenderer.class)
 | 
					@Mixin(ItemInHandRenderer.class)
 | 
				
			||||||
class ItemInHandRendererMixin {
 | 
					class ItemInHandRendererMixin {
 | 
				
			||||||
    @Inject(method = "renderArmWithItem", at = @At("HEAD"), cancellable = true)
 | 
					    @Inject(method = "renderArmWithItem", at = @At("HEAD"), cancellable = true)
 | 
				
			||||||
    @SuppressWarnings("UnusedMethod")
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    private void onRenderItem(
 | 
					    private void onRenderItem(
 | 
				
			||||||
        AbstractClientPlayer player, float partialTicks, float pitch, InteractionHand hand, float swingProgress, ItemStack stack,
 | 
					        AbstractClientPlayer player, float partialTicks, float pitch, InteractionHand hand, float swingProgress, ItemStack stack,
 | 
				
			||||||
        float equippedProgress, PoseStack transform, MultiBufferSource buffer, int combinedLight, CallbackInfo ci
 | 
					        float equippedProgress, PoseStack transform, MultiBufferSource buffer, int combinedLight, CallbackInfo ci
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,13 +25,13 @@ class MinecraftMixin {
 | 
				
			|||||||
    private ReloadableResourceManager resourceManager;
 | 
					    private ReloadableResourceManager resourceManager;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Inject(method = "clearLevel(Lnet/minecraft/client/gui/screens/Screen;)V", at = @At("HEAD"))
 | 
					    @Inject(method = "clearLevel(Lnet/minecraft/client/gui/screens/Screen;)V", at = @At("HEAD"))
 | 
				
			||||||
    @SuppressWarnings("UnusedMethod")
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    private void clearLevel(Screen screen, CallbackInfo ci) {
 | 
					    private void clearLevel(Screen screen, CallbackInfo ci) {
 | 
				
			||||||
        ClientHooks.onWorldUnload();
 | 
					        ClientHooks.onWorldUnload();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Inject(method = "setLevel", at = @At("HEAD"))
 | 
					    @Inject(method = "setLevel", at = @At("HEAD"))
 | 
				
			||||||
    @SuppressWarnings("UnusedMethod")
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    private void setLevel(ClientLevel screen, CallbackInfo ci) {
 | 
					    private void setLevel(ClientLevel screen, CallbackInfo ci) {
 | 
				
			||||||
        ClientHooks.onWorldUnload();
 | 
					        ClientHooks.onWorldUnload();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -44,6 +44,7 @@ class MinecraftMixin {
 | 
				
			|||||||
            ordinal = 0
 | 
					            ordinal = 0
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    public void beforeInitialResourceReload(GameConfig gameConfig, CallbackInfo ci) {
 | 
					    public void beforeInitialResourceReload(GameConfig gameConfig, CallbackInfo ci) {
 | 
				
			||||||
        ClientRegistry.registerReloadListeners(resourceManager::registerReloadListener, (Minecraft) (Object) this);
 | 
					        ClientRegistry.registerReloadListeners(resourceManager::registerReloadListener, (Minecraft) (Object) this);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -31,7 +31,7 @@ class MultiPlayerGameModeMixin {
 | 
				
			|||||||
        cancellable = true,
 | 
					        cancellable = true,
 | 
				
			||||||
        locals = LocalCapture.CAPTURE_FAILHARD
 | 
					        locals = LocalCapture.CAPTURE_FAILHARD
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
    @SuppressWarnings("UnusedMethod")
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    private void onBlockBreak(BlockPos pos, CallbackInfoReturnable<Boolean> cir, Level level, BlockState state, Block block) {
 | 
					    private void onBlockBreak(BlockPos pos, CallbackInfoReturnable<Boolean> cir, Level level, BlockState state, Block block) {
 | 
				
			||||||
        if (!FabricCommonHooks.onBlockDestroy(level, minecraft.player, pos, state, null)) cir.setReturnValue(true);
 | 
					        if (!FabricCommonHooks.onBlockDestroy(level, minecraft.player, pos, state, null)) cir.setReturnValue(true);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -26,13 +26,13 @@ class SoundEngineMixin {
 | 
				
			|||||||
    private static SoundEngine self;
 | 
					    private static SoundEngine self;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Inject(method = "play", at = @At(value = "HEAD"))
 | 
					    @Inject(method = "play", at = @At(value = "HEAD"))
 | 
				
			||||||
    @SuppressWarnings("UnusedMethod")
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    private void playSound(SoundInstance sound, CallbackInfo ci) {
 | 
					    private void playSound(SoundInstance sound, CallbackInfo ci) {
 | 
				
			||||||
        self = (SoundEngine) (Object) this;
 | 
					        self = (SoundEngine) (Object) this;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Inject(at = @At("TAIL"), method = "method_19755")
 | 
					    @Inject(at = @At("TAIL"), method = "method_19755")
 | 
				
			||||||
    @SuppressWarnings("UnusedMethod")
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    private static void onStream(AudioStream stream, Channel channel, CallbackInfo ci) {
 | 
					    private static void onStream(AudioStream stream, Channel channel, CallbackInfo ci) {
 | 
				
			||||||
        SpeakerManager.onPlayStreaming(assertNonNull(self), channel, stream);
 | 
					        SpeakerManager.onPlayStreaming(assertNonNull(self), channel, stream);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,13 +29,13 @@ class ChunkMapMixin {
 | 
				
			|||||||
    ServerLevel level;
 | 
					    ServerLevel level;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Inject(method = "playerLoadedChunk", at = @At("TAIL"))
 | 
					    @Inject(method = "playerLoadedChunk", at = @At("TAIL"))
 | 
				
			||||||
    @SuppressWarnings("UnusedMethod")
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    private void onPlayerLoadedChunk(ServerPlayer player, MutableObject<ClientboundLevelChunkWithLightPacket> packetCache, LevelChunk chunk, CallbackInfo callback) {
 | 
					    private void onPlayerLoadedChunk(ServerPlayer player, MutableObject<ClientboundLevelChunkWithLightPacket> packetCache, LevelChunk chunk, CallbackInfo callback) {
 | 
				
			||||||
        CommonHooks.onChunkWatch(chunk, player);
 | 
					        CommonHooks.onChunkWatch(chunk, player);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Inject(method = "updateChunkScheduling", at = @At("HEAD"))
 | 
					    @Inject(method = "updateChunkScheduling", at = @At("HEAD"))
 | 
				
			||||||
    @SuppressWarnings("UnusedMethod")
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    private void onUpdateChunkScheduling(long chunkPos, int newLevel, @Nullable ChunkHolder holder, int oldLevel, CallbackInfoReturnable<ChunkHolder> callback) {
 | 
					    private void onUpdateChunkScheduling(long chunkPos, int newLevel, @Nullable ChunkHolder holder, int oldLevel, CallbackInfoReturnable<ChunkHolder> callback) {
 | 
				
			||||||
        CommonHooks.onChunkTicketLevelChanged(level, chunkPos, oldLevel, newLevel);
 | 
					        CommonHooks.onChunkTicketLevelChanged(level, chunkPos, oldLevel, newLevel);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,7 +20,7 @@ class EntityMixin {
 | 
				
			|||||||
        at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;addFreshEntity(Lnet/minecraft/world/entity/Entity;)Z"),
 | 
					        at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;addFreshEntity(Lnet/minecraft/world/entity/Entity;)Z"),
 | 
				
			||||||
        cancellable = true
 | 
					        cancellable = true
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
    @SuppressWarnings("UnusedMethod")
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    private void spawnAtLocation(ItemStack stack, float yOffset, CallbackInfoReturnable<ItemEntity> cb) {
 | 
					    private void spawnAtLocation(ItemStack stack, float yOffset, CallbackInfoReturnable<ItemEntity> cb) {
 | 
				
			||||||
        if (CommonHooks.onLivingDrop((Entity) (Object) this, stack)) cb.setReturnValue(null);
 | 
					        if (CommonHooks.onLivingDrop((Entity) (Object) this, stack)) cb.setReturnValue(null);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,7 +16,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
 | 
				
			|||||||
@Mixin(ItemEntity.class)
 | 
					@Mixin(ItemEntity.class)
 | 
				
			||||||
abstract class ItemEntityMixin {
 | 
					abstract class ItemEntityMixin {
 | 
				
			||||||
    @Inject(method = "tick", at = @At("HEAD"))
 | 
					    @Inject(method = "tick", at = @At("HEAD"))
 | 
				
			||||||
    @SuppressWarnings("UnusedMethod")
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    private void onTick(CallbackInfo ci) {
 | 
					    private void onTick(CallbackInfo ci) {
 | 
				
			||||||
        var stack = getItem();
 | 
					        var stack = getItem();
 | 
				
			||||||
        if (stack.getItem() instanceof PocketComputerItem pocket) {
 | 
					        if (stack.getItem() instanceof PocketComputerItem pocket) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,7 +21,7 @@ import java.util.function.Predicate;
 | 
				
			|||||||
@Mixin(TagsProvider.class)
 | 
					@Mixin(TagsProvider.class)
 | 
				
			||||||
class TagsProviderMixin {
 | 
					class TagsProviderMixin {
 | 
				
			||||||
    @Inject(at = @At("HEAD"), method = "method_49658", cancellable = true)
 | 
					    @Inject(at = @At("HEAD"), method = "method_49658", cancellable = true)
 | 
				
			||||||
    @SuppressWarnings("UnusedMethod")
 | 
					    @SuppressWarnings("unused")
 | 
				
			||||||
    private static void onVerifyPresent(Predicate<?> predicate1, Predicate<?> predicate2, TagEntry tag, CallbackInfoReturnable<Boolean> cir) {
 | 
					    private static void onVerifyPresent(Predicate<?> predicate1, Predicate<?> predicate2, TagEntry tag, CallbackInfoReturnable<Boolean> cir) {
 | 
				
			||||||
        var element = ((TagEntryAccessor) tag).computercraft$elementOrTag();
 | 
					        var element = ((TagEntryAccessor) tag).computercraft$elementOrTag();
 | 
				
			||||||
        if (element.tag() && element.id().getNamespace().equals("minecraft")) cir.setReturnValue(false);
 | 
					        if (element.tag() && element.id().getNamespace().equals("minecraft")) cir.setReturnValue(false);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user