mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-12-08 15:08:06 +00:00
Update ErrorProne
This commit is contained in:
@@ -27,7 +27,7 @@ class GameRendererMixin {
|
||||
private Map<String, ShaderInstance> shaders;
|
||||
|
||||
@Inject(method = "reloadShaders", at = @At(value = "TAIL"))
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
@SuppressWarnings("unused")
|
||||
private void onReloadShaders(ResourceProvider resourceManager, CallbackInfo ci) {
|
||||
try {
|
||||
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),
|
||||
cancellable = true
|
||||
)
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
@SuppressWarnings("unused")
|
||||
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)) {
|
||||
ci.cancel();
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
@Mixin(ItemInHandRenderer.class)
|
||||
class ItemInHandRendererMixin {
|
||||
@Inject(method = "renderArmWithItem", at = @At("HEAD"), cancellable = true)
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
@SuppressWarnings("unused")
|
||||
private void onRenderItem(
|
||||
AbstractClientPlayer player, float partialTicks, float pitch, InteractionHand hand, float swingProgress, ItemStack stack,
|
||||
float equippedProgress, PoseStack transform, MultiBufferSource buffer, int combinedLight, CallbackInfo ci
|
||||
|
||||
@@ -25,13 +25,13 @@ class MinecraftMixin {
|
||||
private ReloadableResourceManager resourceManager;
|
||||
|
||||
@Inject(method = "clearLevel(Lnet/minecraft/client/gui/screens/Screen;)V", at = @At("HEAD"))
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
@SuppressWarnings("unused")
|
||||
private void clearLevel(Screen screen, CallbackInfo ci) {
|
||||
ClientHooks.onWorldUnload();
|
||||
}
|
||||
|
||||
@Inject(method = "setLevel", at = @At("HEAD"))
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
@SuppressWarnings("unused")
|
||||
private void setLevel(ClientLevel screen, CallbackInfo ci) {
|
||||
ClientHooks.onWorldUnload();
|
||||
}
|
||||
@@ -44,6 +44,7 @@ class MinecraftMixin {
|
||||
ordinal = 0
|
||||
)
|
||||
)
|
||||
@SuppressWarnings("unused")
|
||||
public void beforeInitialResourceReload(GameConfig gameConfig, CallbackInfo ci) {
|
||||
ClientRegistry.registerReloadListeners(resourceManager::registerReloadListener, (Minecraft) (Object) this);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class MultiPlayerGameModeMixin {
|
||||
cancellable = true,
|
||||
locals = LocalCapture.CAPTURE_FAILHARD
|
||||
)
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
@SuppressWarnings("unused")
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -26,13 +26,13 @@ class SoundEngineMixin {
|
||||
private static SoundEngine self;
|
||||
|
||||
@Inject(method = "play", at = @At(value = "HEAD"))
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
@SuppressWarnings("unused")
|
||||
private void playSound(SoundInstance sound, CallbackInfo ci) {
|
||||
self = (SoundEngine) (Object) this;
|
||||
}
|
||||
|
||||
@Inject(at = @At("TAIL"), method = "method_19755")
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
@SuppressWarnings("unused")
|
||||
private static void onStream(AudioStream stream, Channel channel, CallbackInfo ci) {
|
||||
SpeakerManager.onPlayStreaming(assertNonNull(self), channel, stream);
|
||||
}
|
||||
|
||||
@@ -29,13 +29,13 @@ class ChunkMapMixin {
|
||||
ServerLevel level;
|
||||
|
||||
@Inject(method = "playerLoadedChunk", at = @At("TAIL"))
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
@SuppressWarnings("unused")
|
||||
private void onPlayerLoadedChunk(ServerPlayer player, MutableObject<ClientboundLevelChunkWithLightPacket> packetCache, LevelChunk chunk, CallbackInfo callback) {
|
||||
CommonHooks.onChunkWatch(chunk, player);
|
||||
}
|
||||
|
||||
@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) {
|
||||
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"),
|
||||
cancellable = true
|
||||
)
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
@SuppressWarnings("unused")
|
||||
private void spawnAtLocation(ItemStack stack, float yOffset, CallbackInfoReturnable<ItemEntity> cb) {
|
||||
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)
|
||||
abstract class ItemEntityMixin {
|
||||
@Inject(method = "tick", at = @At("HEAD"))
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
@SuppressWarnings("unused")
|
||||
private void onTick(CallbackInfo ci) {
|
||||
var stack = getItem();
|
||||
if (stack.getItem() instanceof PocketComputerItem pocket) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.function.Predicate;
|
||||
@Mixin(TagsProvider.class)
|
||||
class TagsProviderMixin {
|
||||
@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) {
|
||||
var element = ((TagEntryAccessor) tag).computercraft$elementOrTag();
|
||||
if (element.tag() && element.id().getNamespace().equals("minecraft")) cir.setReturnValue(false);
|
||||
|
||||
Reference in New Issue
Block a user