From 8dd287d9e7811d95f2c7b7a52da4f1b533904f31 Mon Sep 17 00:00:00 2001 From: AViewFromTheTop Date: Fri, 17 Jan 2025 05:41:42 +0000 Subject: [PATCH 1/2] Apply automatic changes --- .../lib/core/client/api/PanoramaCommand.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/java/net/frozenblock/lib/core/client/api/PanoramaCommand.java b/src/main/java/net/frozenblock/lib/core/client/api/PanoramaCommand.java index ffde205a..d9e8491a 100644 --- a/src/main/java/net/frozenblock/lib/core/client/api/PanoramaCommand.java +++ b/src/main/java/net/frozenblock/lib/core/client/api/PanoramaCommand.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2025 FrozenBlock + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package net.frozenblock.lib.core.client.api; import com.mojang.brigadier.CommandDispatcher; From 71fd2f358e24ba5cf7a7982ffb6d404947a07e44 Mon Sep 17 00:00:00 2001 From: AViewFromTheTop <87103914+AViewFromTheTop@users.noreply.github.com> Date: Mon, 20 Jan 2025 19:03:20 -0500 Subject: [PATCH 2/2] remove unnecessary mixin --- .../mixin/BuiltInRegistriesMixin.java | 49 ------------------- .../frozenlib_quiltmc_registry.mixins.json | 1 - 2 files changed, 50 deletions(-) delete mode 100644 src/main/java/org/quiltmc/qsl/frozenblock/core/registry/mixin/BuiltInRegistriesMixin.java diff --git a/src/main/java/org/quiltmc/qsl/frozenblock/core/registry/mixin/BuiltInRegistriesMixin.java b/src/main/java/org/quiltmc/qsl/frozenblock/core/registry/mixin/BuiltInRegistriesMixin.java deleted file mode 100644 index 0121c72d..00000000 --- a/src/main/java/org/quiltmc/qsl/frozenblock/core/registry/mixin/BuiltInRegistriesMixin.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2024-2025 The Quilt Project - * Copyright 2024-2025 FrozenBlock - * Modified to work on Fabric - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.quiltmc.qsl.frozenblock.core.registry.mixin; - -import java.util.List; -import net.fabricmc.fabric.mixin.registry.sync.DebugChunkGeneratorAccessor; -import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.util.Mth; -import net.minecraft.world.level.block.state.BlockState; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(BuiltInRegistries.class) -public class BuiltInRegistriesMixin { - - @Inject(method = "freeze", at = @At("RETURN")) - private static void onFreezeBuiltins(CallbackInfo ci) { - //region Fix MC-197259 - final List states = BuiltInRegistries.BLOCK.stream() - .flatMap(block -> block.getStateDefinition().getPossibleStates().stream()) - .toList(); - - final int xLength = Mth.ceil(Mth.sqrt(states.size())); - final int zLength = Mth.ceil(states.size() / (float) xLength); - - DebugChunkGeneratorAccessor.setBLOCK_STATES(states); - DebugChunkGeneratorAccessor.setX_SIDE_LENGTH(xLength); - DebugChunkGeneratorAccessor.setZ_SIDE_LENGTH(zLength); - //endregion - } -} diff --git a/src/main/resources/mixin/frozenlib_quiltmc_registry.mixins.json b/src/main/resources/mixin/frozenlib_quiltmc_registry.mixins.json index bb284d42..aa91163d 100644 --- a/src/main/resources/mixin/frozenlib_quiltmc_registry.mixins.json +++ b/src/main/resources/mixin/frozenlib_quiltmc_registry.mixins.json @@ -4,7 +4,6 @@ "package": "org.quiltmc.qsl.frozenblock.core.registry.mixin", "compatibilityLevel": "JAVA_21", "mixins": [ - "BuiltInRegistriesMixin", "ConnectionMixin", "MappedRegistryMixin", "RegistryDataLoaderMixin",