From b55973447a1800d662f38e109374bd0f638e6232 Mon Sep 17 00:00:00 2001 From: modmuss Date: Wed, 29 May 2024 16:25:22 +0100 Subject: [PATCH] 1.21-pre1 port (#3811) * 1.21-pre1 port * Bump version --- deprecated/fabric-models-v0/build.gradle | 6 - .../client/model/BakedModelManagerHelper.java | 53 --------- .../api/client/model/ExtraModelProvider.java | 43 ------- .../api/client/model/ModelAppender.java | 33 ------ .../client/model/ModelLoadingRegistry.java | 60 ---------- .../client/model/ModelProviderContext.java | 40 ------- .../client/model/ModelProviderException.java | 33 ------ .../client/model/ModelResourceProvider.java | 58 --------- .../client/model/ModelVariantProvider.java | 55 --------- .../model/ModelLoadingRegistryImpl.java | 111 ------------------ .../assets/fabric-models-v0/icon.png | Bin 1579 -> 0 bytes .../src/client/resources/fabric.mod.json | 27 ----- .../entity/InspectablePigEntityRenderer.java | 2 +- .../content/registry/ContentRegistryTest.java | 2 +- .../attachment/ChunkSerializerMixin.java | 5 +- .../attachment/CommonAttachmentTests.java | 2 +- .../gametest/AttachmentCopyTests.java | 2 +- ...abric-data-generation-api-v1.accesswidener | 2 +- .../datagen/DataGeneratorTestEntrypoint.java | 4 +- .../client/item/v1/ItemTooltipCallback.java | 2 +- .../mixin/item/client/ItemStackMixin.java | 2 +- .../model/loading/BakedModelManagerMixin.java | 7 +- .../model/loading/ModelLoaderMixin.java | 9 +- .../model/loading/ModelTestModClient.java | 4 +- .../model/loading/NestedModelLoadingTest.java | 2 +- .../impl/networking/NetworkingImpl.java | 4 +- .../networking/ClientConnectionMixin.java | 2 +- .../client/HangingSignEditScreenMixin.java | 2 +- .../builder/v1/trade/TradeOfferHelper.java | 6 +- fabric-renderer-api-v1/build.gradle | 2 +- .../renderer/client/FrameUnbakedModel.java | 4 +- .../renderer/client/ModelResolverImpl.java | 11 +- .../client/OctagonalColumnUnbakedModel.java | 4 +- .../renderer/client/PillarUnbakedModel.java | 2 +- .../renderer/client/RendererClientTest.java | 8 +- .../client/RiverstoneUnbakedModel.java | 6 +- .../renderer/render/ChunkRenderInfo.java | 10 +- .../renderer/render/TerrainRenderContext.java | 4 +- ...askMixin.java => SectionBuilderMixin.java} | 18 +-- .../fabric-renderer-indigo.mixins.json | 2 +- .../fluid/v1/SimpleFluidRenderHandler.java | 10 +- .../v1/TooltipComponentCallback.java | 2 +- .../rendering/TooltipComponentMixin.java | 4 +- .../rendering/shader/ShaderProgramMixin.java | 4 +- .../rendering/TooltipComponentTestInit.java | 2 +- .../rendering/client/ArmorRenderingTests.java | 2 +- .../client/DimensionalRenderingTest.java | 6 +- .../rendering/client/HudAndShaderTest.java | 4 +- .../client/WorldRenderEventsTests.java | 4 +- ...eyedResourceReloadListenerClientMixin.java | 2 +- .../resource/ResourceReloadListenerKeys.java | 18 +-- .../KeyedResourceReloadListenerMixin.java | 2 +- .../fabric/test/screen/ScreenTests.java | 2 +- .../client/PositionedScreen.java | 2 +- .../fluid/FluidVariantRenderHandler.java | 2 +- .../client/fluid/FluidVariantRendering.java | 2 +- .../ingame/client/FluidVariantRenderTest.java | 4 +- gradle.properties | 63 +++++----- settings.gradle | 3 +- 59 files changed, 131 insertions(+), 656 deletions(-) delete mode 100644 deprecated/fabric-models-v0/build.gradle delete mode 100644 deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/BakedModelManagerHelper.java delete mode 100644 deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ExtraModelProvider.java delete mode 100644 deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelAppender.java delete mode 100644 deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelLoadingRegistry.java delete mode 100644 deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelProviderContext.java delete mode 100644 deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelProviderException.java delete mode 100644 deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelResourceProvider.java delete mode 100644 deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelVariantProvider.java delete mode 100644 deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/impl/client/model/ModelLoadingRegistryImpl.java delete mode 100644 deprecated/fabric-models-v0/src/client/resources/assets/fabric-models-v0/icon.png delete mode 100644 deprecated/fabric-models-v0/src/client/resources/fabric.mod.json rename fabric-renderer-indigo/src/client/java/net/fabricmc/fabric/mixin/client/indigo/renderer/{ChunkBuilderBuiltChunkRebuildTaskMixin.java => SectionBuilderMixin.java} (93%) diff --git a/deprecated/fabric-models-v0/build.gradle b/deprecated/fabric-models-v0/build.gradle deleted file mode 100644 index cfc8a41fd..000000000 --- a/deprecated/fabric-models-v0/build.gradle +++ /dev/null @@ -1,6 +0,0 @@ -version = getSubprojectVersion(project) - -moduleDependencies(project, [ - 'fabric-api-base', - 'fabric-model-loading-api-v1' -]) diff --git a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/BakedModelManagerHelper.java b/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/BakedModelManagerHelper.java deleted file mode 100644 index d13bec8c8..000000000 --- a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/BakedModelManagerHelper.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2016, 2017, 2018, 2019 FabricMC - * - * 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 net.fabricmc.fabric.api.client.model; - -import org.jetbrains.annotations.Nullable; - -import net.minecraft.client.render.model.BakedModel; -import net.minecraft.client.render.model.BakedModelManager; -import net.minecraft.client.util.ModelIdentifier; -import net.minecraft.util.Identifier; - -import net.fabricmc.fabric.api.client.model.loading.v1.FabricBakedModelManager; - -/** - * @deprecated Use {@link FabricBakedModelManager#getModel(Identifier)} instead. - */ -@Deprecated -public final class BakedModelManagerHelper { - /** - * An alternative to {@link BakedModelManager#getModel(ModelIdentifier)} that accepts an - * {@link Identifier} instead. Models loaded using {@link ExtraModelProvider} do not have a - * corresponding {@link ModelIdentifier}, so the vanilla method cannot be used to retrieve them. - * The Identifier that was used to load them can be used in this method to retrieve them. - * - *

This method, as well as its vanilla counterpart, should only be used after the - * {@link BakedModelManager} has completed reloading. Otherwise, the result will be - * null or an old model. - * - * @param manager the manager that holds models - * @param id the id of the model - * @return the model - */ - @Nullable - public static BakedModel getModel(BakedModelManager manager, Identifier id) { - return manager.getModel(id); - } - - private BakedModelManagerHelper() { } -} diff --git a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ExtraModelProvider.java b/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ExtraModelProvider.java deleted file mode 100644 index 1d455ac69..000000000 --- a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ExtraModelProvider.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2016, 2017, 2018, 2019 FabricMC - * - * 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 net.fabricmc.fabric.api.client.model; - -import java.util.function.Consumer; - -import net.minecraft.client.util.ModelIdentifier; -import net.minecraft.resource.ResourceManager; -import net.minecraft.util.Identifier; - -import net.fabricmc.fabric.api.client.model.loading.v1.ModelLoadingPlugin; - -/** - * @deprecated Use {@link ModelLoadingPlugin} and related classes instead. - */ -@Deprecated -@FunctionalInterface -public interface ExtraModelProvider { - /** - * Provides an opportunity inform the game that you would like it to load and bake a model, - * even if that model is not used by any blocks or items. - * @param out Accepts paths to be loaded. Arguments that are {@link ModelIdentifier} will be - * loaded through the blockstate JSON system or, if the variant is {@code inventory}, the item model folder. - * Otherwise, the argument is directly loaded as a JSON. - * For example,

Identifier.of("mymod", "foo/bar")
will request loading of the file - *
/assets/mymod/models/foo/bar.json
- */ - void provideExtraModels(ResourceManager manager, Consumer out); -} diff --git a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelAppender.java b/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelAppender.java deleted file mode 100644 index 5d3e4a833..000000000 --- a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelAppender.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2016, 2017, 2018, 2019 FabricMC - * - * 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 net.fabricmc.fabric.api.client.model; - -import java.util.function.Consumer; - -import net.minecraft.client.util.ModelIdentifier; -import net.minecraft.resource.ResourceManager; -import net.minecraft.util.Identifier; - -/** - * @deprecated use {@link ExtraModelProvider}, which supports loading of plain {@link Identifier}s - */ -@Deprecated -@FunctionalInterface -public interface ModelAppender { - @Deprecated - void appendAll(ResourceManager manager, Consumer out); -} diff --git a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelLoadingRegistry.java b/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelLoadingRegistry.java deleted file mode 100644 index 8f72a5d04..000000000 --- a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelLoadingRegistry.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2016, 2017, 2018, 2019 FabricMC - * - * 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 net.fabricmc.fabric.api.client.model; - -import java.util.function.Function; - -import net.minecraft.resource.ResourceManager; -import net.minecraft.util.Identifier; - -import net.fabricmc.fabric.api.client.model.loading.v1.ModelLoadingPlugin; -import net.fabricmc.fabric.impl.client.model.ModelLoadingRegistryImpl; - -/** - * @deprecated Register a {@link ModelLoadingPlugin} instead. - */ -@Deprecated -public interface ModelLoadingRegistry { - ModelLoadingRegistry INSTANCE = new ModelLoadingRegistryImpl(); - - /** - * Register a model provider, which can request loading additional models. - * @see ExtraModelProvider - */ - void registerModelProvider(ExtraModelProvider appender); - - /** - * Register a model appender, which can request loading additional models. - * @deprecated Use {@link #registerModelProvider(ExtraModelProvider)} instead, which supports loading of plain {@link Identifier}s - */ - @Deprecated - void registerAppender(ModelAppender appender); - - /** - * Register a ModelResourceProvider supplier. - * - * @param providerSupplier The ModelResourceProvider supplier, instantiated with every ModelLoader. - */ - void registerResourceProvider(Function providerSupplier); - - /** - * Register a ModelVariantProvider supplier. - * - * @param providerSupplier The ModelVariantProvider supplier, instantiated with every ModelLoader. - */ - void registerVariantProvider(Function providerSupplier); -} diff --git a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelProviderContext.java b/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelProviderContext.java deleted file mode 100644 index 96b097d28..000000000 --- a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelProviderContext.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2016, 2017, 2018, 2019 FabricMC - * - * 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 net.fabricmc.fabric.api.client.model; - -import net.minecraft.client.render.model.UnbakedModel; -import net.minecraft.client.util.ModelIdentifier; -import net.minecraft.util.Identifier; - -import net.fabricmc.fabric.api.client.model.loading.v1.ModelLoadingPlugin; - -/** - * The model loading context used during model providing. - * @deprecated Use {@link ModelLoadingPlugin} and related classes instead. - */ -@Deprecated -public interface ModelProviderContext { - /** - * Load a model using a {@link Identifier}, {@link ModelIdentifier}, ... - * - *

Please note that the game engine keeps track of circular model loading calls on its own. - * - * @param id The model identifier. - * @return The UnbakedModel. Can return a missing model if it's not present! - */ - UnbakedModel loadModel(Identifier id); -} diff --git a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelProviderException.java b/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelProviderException.java deleted file mode 100644 index 41805578c..000000000 --- a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelProviderException.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2016, 2017, 2018, 2019 FabricMC - * - * 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 net.fabricmc.fabric.api.client.model; - -import net.fabricmc.fabric.api.client.model.loading.v1.ModelLoadingPlugin; - -/** - * @deprecated Use {@link ModelLoadingPlugin} and related classes instead. - */ -@Deprecated -public class ModelProviderException extends Exception { - public ModelProviderException(String s) { - super(s); - } - - public ModelProviderException(String s, Throwable t) { - super(s, t); - } -} diff --git a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelResourceProvider.java b/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelResourceProvider.java deleted file mode 100644 index caf7b1a49..000000000 --- a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelResourceProvider.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2016, 2017, 2018, 2019 FabricMC - * - * 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 net.fabricmc.fabric.api.client.model; - -import org.jetbrains.annotations.Nullable; - -import net.minecraft.client.render.model.UnbakedModel; -import net.minecraft.util.Identifier; - -import net.fabricmc.fabric.api.client.model.loading.v1.ModelLoadingPlugin; - -/** - * Interface for model resource providers. - * - *

Model resource providers hook the loading of model *files* from the resource tree; - * that is, in vanilla, it handles going from "minecraft:block/stone" to a - * "assets/minecraft/models/block/stone.json" file. - * - *

This is where you want to add your own custom model formats. - * - *

As providers are instantiated with a new provider, it is safe - * (and recommended!) to cache information inside a loader. - * - *

Keep in mind that only *one* ModelResourceProvider may respond to a given model - * at any time. If you're writing, say, an OBJ loader, this means you could - * easily conflict with another OBJ loader unless you take some precautions, - * for example: - * - *

  • Only load files with a mod-suffixed name, such as .architect.obj, - *
  • Only load files from an explicit list of namespaces, registered elsewhere.
- * - * @deprecated Use {@link ModelLoadingPlugin} and related classes instead. - */ -@Deprecated -@FunctionalInterface -public interface ModelResourceProvider { - /** - * @param resourceId The resource identifier to be loaded. - * @return The loaded UnbakedModel, or null if this ModelResourceProvider doesn't handle a specific Identifier - * (or if there was no error!). - */ - @Nullable - UnbakedModel loadModelResource(Identifier resourceId, ModelProviderContext context) throws ModelProviderException; -} diff --git a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelVariantProvider.java b/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelVariantProvider.java deleted file mode 100644 index 1fdf970b2..000000000 --- a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/api/client/model/ModelVariantProvider.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2016, 2017, 2018, 2019 FabricMC - * - * 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 net.fabricmc.fabric.api.client.model; - -import org.jetbrains.annotations.Nullable; - -import net.minecraft.client.render.model.UnbakedModel; -import net.minecraft.client.util.ModelIdentifier; - -import net.fabricmc.fabric.api.client.model.loading.v1.ModelLoadingPlugin; - -/** - * Interface for model variant providers. - * - *

Model variant providers hook the resolution of ModelIdentifiers. In vanilla, this is - * the part where a "minecraft:stone#normal" identifier triggers the loading of a - * "minecraft:models/stone" model ({@link ModelResourceProvider} handles the later step). - * - *

The most common use of this is to cooperate with a {@link ModelAppender}, but it can - * also allow you to add your own block- or item-state formats. To trigger the loading - * of another model, use the passed {@link ModelProviderContext}. - * - *

As every model loading is instantiated with a new provider, it is safe - * (and recommended!) to cache information. - * - *

Keep in mind that only *one* ModelVariantProvider may respond to a given model - * at any time. - * - * @deprecated Use {@link ModelLoadingPlugin} and related classes instead. - */ -@Deprecated -@FunctionalInterface -public interface ModelVariantProvider { - /** - * @param modelId The model identifier, complete with variant. - * @return The loaded UnbakedModel, or null if this ModelVariantProvider doesn't handle a specific Identifier - * (or if there was no error!). - */ - @Nullable - UnbakedModel loadModelVariant(ModelIdentifier modelId, ModelProviderContext context) throws ModelProviderException; -} diff --git a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/impl/client/model/ModelLoadingRegistryImpl.java b/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/impl/client/model/ModelLoadingRegistryImpl.java deleted file mode 100644 index 6ab871a58..000000000 --- a/deprecated/fabric-models-v0/src/client/java/net/fabricmc/fabric/impl/client/model/ModelLoadingRegistryImpl.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2016, 2017, 2018, 2019 FabricMC - * - * 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 net.fabricmc.fabric.impl.client.model; - -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.function.Consumer; -import java.util.function.Function; - -import net.minecraft.client.util.ModelIdentifier; -import net.minecraft.resource.ResourceManager; -import net.minecraft.util.Identifier; - -import net.fabricmc.fabric.api.client.model.ExtraModelProvider; -import net.fabricmc.fabric.api.client.model.ModelAppender; -import net.fabricmc.fabric.api.client.model.ModelLoadingRegistry; -import net.fabricmc.fabric.api.client.model.ModelProviderContext; -import net.fabricmc.fabric.api.client.model.ModelProviderException; -import net.fabricmc.fabric.api.client.model.ModelResourceProvider; -import net.fabricmc.fabric.api.client.model.ModelVariantProvider; -import net.fabricmc.fabric.api.client.model.loading.v1.ModelLoadingPlugin; -import net.fabricmc.fabric.api.client.model.loading.v1.PreparableModelLoadingPlugin; -import net.fabricmc.fabric.impl.client.model.loading.ModelLoaderPluginContextImpl; - -public class ModelLoadingRegistryImpl implements ModelLoadingRegistry { - private final List modelProviders = new ArrayList<>(); - private final List modelAppenders = new ArrayList<>(); - private final List> resourceProviderSuppliers = new ArrayList<>(); - private final List> variantProviderSuppliers = new ArrayList<>(); - - { - // Grabs the resource manager to use it in the main model loading code. - // When using the v1 API, data should be loaded in parallel before model loading starts. - PreparableModelLoadingPlugin.register( - (resourceManager, executor) -> CompletableFuture.completedFuture(resourceManager), - this::onInitializeModelLoader); - } - - private void onInitializeModelLoader(ResourceManager resourceManager, ModelLoadingPlugin.Context pluginContext) { - Consumer extraModelConsumer = pluginContext::addModels; - Consumer extraModelConsumer2 = pluginContext::addModels; - // A bit hacky, but avoids the allocation of a new context wrapper every time. - ModelProviderContext resourceProviderContext = ((ModelLoaderPluginContextImpl) pluginContext).modelGetter::apply; - - for (ExtraModelProvider provider : modelProviders) { - provider.provideExtraModels(resourceManager, extraModelConsumer); - } - - for (ModelAppender appender : modelAppenders) { - appender.appendAll(resourceManager, extraModelConsumer2); - } - - for (Function supplier : resourceProviderSuppliers) { - ModelResourceProvider provider = supplier.apply(resourceManager); - - pluginContext.resolveModel().register(resolverContext -> { - try { - return provider.loadModelResource(resolverContext.id(), resourceProviderContext); - } catch (ModelProviderException e) { - throw new RuntimeException(e); - } - }); - } - - for (Function supplier : variantProviderSuppliers) { - ModelVariantProvider provider = supplier.apply(resourceManager); - ((ModelLoaderPluginContextImpl) pluginContext).legacyVariantProviders().register(modelId -> { - try { - return provider.loadModelVariant(modelId, resourceProviderContext); - } catch (ModelProviderException e) { - throw new RuntimeException(e); - } - }); - } - } - - @Override - public void registerModelProvider(ExtraModelProvider provider) { - modelProviders.add(provider); - } - - @Override - public void registerAppender(ModelAppender appender) { - modelAppenders.add(appender); - } - - @Override - public void registerResourceProvider(Function providerSupplier) { - resourceProviderSuppliers.add(providerSupplier); - } - - @Override - public void registerVariantProvider(Function providerSupplier) { - variantProviderSuppliers.add(providerSupplier); - } -} diff --git a/deprecated/fabric-models-v0/src/client/resources/assets/fabric-models-v0/icon.png b/deprecated/fabric-models-v0/src/client/resources/assets/fabric-models-v0/icon.png deleted file mode 100644 index 2931efbf610873c0084debb8690902b0103d27fe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1579 zcmbVMTWB0r7@iGm)TAXsYw<=rnU=;v=W=GRbL=!tc4Brl6GO7t2vVJ$IlDV#XU;e? z+r2ymsZdMQqAyaFLLUo;RumtE8Z@?uf_*4nP^4;o6fOFoSkN+o1$K?f2nE9_*b5G-l)AV)k5Qhb^- zU{V4ZnTKgnmXdpcB*Kg!W(1hvM2N&RO30x1u~eI9meGQGe@_?PDQq%q1CiV$8~M7 z?MQ_mOdqCh^a65Sv|ntwSXjV5se1;VK1|Kr8G7TQoQL&*ctt{L{fClG}xPK5k^yK3%T69N6J=>3jBqc zDNvZsrJ-yOXI^^mWf1cmY^XST)CVzIGjvEPENowmy}ax zvJ8_(Cf#+H-dBlH53`_u-~6BVAMz|(g?jCVdBWNZ(+A}(pFV7>S3QgPiQcMaflkIC z-3Ti|VT~{au*vq0ts9O&m$p&Gl=L6+q6_m$IcVq}o~+Pl{g>1esQp4%wp~|*zk1n` zZ7T6Toc4`y88s}riCP|ZXrJ?FLz@^KTcyqLjey zu95Yz%F&S{<0~f)Iomek?+hQ%MhCu%T^zsg>C_L`1`Br`xNY&))k9yTQb$JC>)w_f zpU(^tu^Q)y%W~lVz`jz;_ jF?g&s@Y=Qe&c#kW|JbvqK0Y=Rw)4XDoVqsk_>;c_`@;F@ diff --git a/deprecated/fabric-models-v0/src/client/resources/fabric.mod.json b/deprecated/fabric-models-v0/src/client/resources/fabric.mod.json deleted file mode 100644 index 37ef8f077..000000000 --- a/deprecated/fabric-models-v0/src/client/resources/fabric.mod.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "schemaVersion": 1, - "id": "fabric-models-v0", - "name": "Fabric Models (v0)", - "version": "${version}", - "environment": "client", - "license": "Apache-2.0", - "icon": "assets/fabric-models-v0/icon.png", - "contact": { - "homepage": "https://fabricmc.net", - "irc": "irc://irc.esper.net:6667/fabric", - "issues": "https://github.com/FabricMC/fabric/issues", - "sources": "https://github.com/FabricMC/fabric" - }, - "authors": [ - "FabricMC" - ], - "depends": { - "fabricloader": ">=0.15.11", - "fabric-api-base": "*", - "fabric-model-loading-api-v1": "*" - }, - "description": "Hooks for models and model loading.", - "custom": { - "fabric-api:module-lifecycle": "deprecated" - } -} diff --git a/fabric-api-lookup-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/lookup/client/entity/InspectablePigEntityRenderer.java b/fabric-api-lookup-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/lookup/client/entity/InspectablePigEntityRenderer.java index e8e092f49..d53a0ea4a 100644 --- a/fabric-api-lookup-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/lookup/client/entity/InspectablePigEntityRenderer.java +++ b/fabric-api-lookup-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/lookup/client/entity/InspectablePigEntityRenderer.java @@ -22,7 +22,7 @@ import net.minecraft.entity.passive.PigEntity; import net.minecraft.util.Identifier; public class InspectablePigEntityRenderer extends PigEntityRenderer { - private static final Identifier TEXTURE = Identifier.ofDefaultNamespace("missingno"); + private static final Identifier TEXTURE = Identifier.ofVanilla("missingno"); public InspectablePigEntityRenderer(EntityRendererFactory.Context context) { super(context); diff --git a/fabric-content-registries-v0/src/testmod/java/net/fabricmc/fabric/test/content/registry/ContentRegistryTest.java b/fabric-content-registries-v0/src/testmod/java/net/fabricmc/fabric/test/content/registry/ContentRegistryTest.java index fdaa28147..233fee54a 100644 --- a/fabric-content-registries-v0/src/testmod/java/net/fabricmc/fabric/test/content/registry/ContentRegistryTest.java +++ b/fabric-content-registries-v0/src/testmod/java/net/fabricmc/fabric/test/content/registry/ContentRegistryTest.java @@ -140,7 +140,7 @@ public final class ContentRegistryTest implements ModInitializer { VillagerInteractionRegistries.registerCollectable(Items.OAK_SAPLING); - VillagerInteractionRegistries.registerGiftLootTable(VillagerProfession.NITWIT, RegistryKey.of(RegistryKeys.LOOT_TABLE, Identifier.ofDefaultNamespace("fake_loot_table"))); + VillagerInteractionRegistries.registerGiftLootTable(VillagerProfession.NITWIT, RegistryKey.of(RegistryKeys.LOOT_TABLE, Identifier.ofVanilla("fake_loot_table"))); Registry.register(Registries.BLOCK, TEST_EVENT_ID, new TestEventBlock(AbstractBlock.Settings.copy(Blocks.STONE))); SculkSensorFrequencyRegistry.register(TEST_EVENT.registryKey(), 2); diff --git a/fabric-data-attachment-api-v1/src/main/java/net/fabricmc/fabric/mixin/attachment/ChunkSerializerMixin.java b/fabric-data-attachment-api-v1/src/main/java/net/fabricmc/fabric/mixin/attachment/ChunkSerializerMixin.java index 32d5d9a06..7915dc5c2 100644 --- a/fabric-data-attachment-api-v1/src/main/java/net/fabricmc/fabric/mixin/attachment/ChunkSerializerMixin.java +++ b/fabric-data-attachment-api-v1/src/main/java/net/fabricmc/fabric/mixin/attachment/ChunkSerializerMixin.java @@ -30,6 +30,7 @@ import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.ProtoChunk; import net.minecraft.world.chunk.WorldChunk; import net.minecraft.world.poi.PointOfInterestStorage; +import net.minecraft.world.storage.StorageKey; import net.fabricmc.fabric.impl.attachment.AttachmentTargetImpl; @@ -42,7 +43,7 @@ abstract class ChunkSerializerMixin { ), method = "deserialize" ) - private static WorldChunk readWorldChunkAttachments(WorldChunk chunk, ServerWorld world, PointOfInterestStorage poiStorage, ChunkPos chunkPos, NbtCompound nbt) { + private static WorldChunk readWorldChunkAttachments(WorldChunk chunk, ServerWorld world, PointOfInterestStorage poiStorage, StorageKey storageKey, ChunkPos chunkPos, NbtCompound nbt) { ((AttachmentTargetImpl) chunk).fabric_readAttachmentsFromNbt(nbt, world.getRegistryManager()); return chunk; } @@ -54,7 +55,7 @@ abstract class ChunkSerializerMixin { ), method = "deserialize" ) - private static ProtoChunk readProtoChunkAttachments(ProtoChunk chunk, ServerWorld world, PointOfInterestStorage poiStorage, ChunkPos chunkPos, NbtCompound nbt) { + private static ProtoChunk readProtoChunkAttachments(ProtoChunk chunk, ServerWorld world, PointOfInterestStorage poiStorage, StorageKey storageKey, ChunkPos chunkPos, NbtCompound nbt) { ((AttachmentTargetImpl) chunk).fabric_readAttachmentsFromNbt(nbt, world.getRegistryManager()); return chunk; } diff --git a/fabric-data-attachment-api-v1/src/test/java/net/fabricmc/fabric/test/attachment/CommonAttachmentTests.java b/fabric-data-attachment-api-v1/src/test/java/net/fabricmc/fabric/test/attachment/CommonAttachmentTests.java index 989e62b74..f67f614af 100644 --- a/fabric-data-attachment-api-v1/src/test/java/net/fabricmc/fabric/test/attachment/CommonAttachmentTests.java +++ b/fabric-data-attachment-api-v1/src/test/java/net/fabricmc/fabric/test/attachment/CommonAttachmentTests.java @@ -156,7 +156,7 @@ public class CommonAttachmentTests { var nbt = new NbtCompound(); assertNull(AttachmentSerializingImpl.deserializeAttachmentData(nbt, mockDRM())); - nbt.put(Identifier.ofDefaultNamespace("test").toString(), new NbtCompound()); + nbt.put(Identifier.ofVanilla("test").toString(), new NbtCompound()); assertNull(AttachmentSerializingImpl.deserializeAttachmentData(nbt, mockDRM())); } diff --git a/fabric-data-attachment-api-v1/src/testmod/java/net/fabricmc/fabric/test/attachment/gametest/AttachmentCopyTests.java b/fabric-data-attachment-api-v1/src/testmod/java/net/fabricmc/fabric/test/attachment/gametest/AttachmentCopyTests.java index 1a1811c25..d86b43234 100644 --- a/fabric-data-attachment-api-v1/src/testmod/java/net/fabricmc/fabric/test/attachment/gametest/AttachmentCopyTests.java +++ b/fabric-data-attachment-api-v1/src/testmod/java/net/fabricmc/fabric/test/attachment/gametest/AttachmentCopyTests.java @@ -57,7 +57,7 @@ public class AttachmentCopyTests implements FabricGameTest { entity.setAttached(DUMMY, () -> 10); entity.setAttached(COPY_ON_DEATH, () -> 10); - Entity moved = entity.teleportTo(new TeleportTarget(end)); + Entity moved = entity.teleportTo(new TeleportTarget(end, entity, TeleportTarget.field_52245)); if (moved == null) throw new GameTestException("Cross-world teleportation failed"); IntSupplier attached1 = moved.getAttached(DUMMY); diff --git a/fabric-data-generation-api-v1/src/main/resources/fabric-data-generation-api-v1.accesswidener b/fabric-data-generation-api-v1/src/main/resources/fabric-data-generation-api-v1.accesswidener index ab1355fe6..c8cf17b00 100644 --- a/fabric-data-generation-api-v1/src/main/resources/fabric-data-generation-api-v1.accesswidener +++ b/fabric-data-generation-api-v1/src/main/resources/fabric-data-generation-api-v1.accesswidener @@ -117,7 +117,7 @@ transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider off transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerReversibleCompactingRecipes (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerSmithingTemplateCopyingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/registry/tag/TagKey;)V transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerSmithingTemplateCopyingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V -transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider method_60922 (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/Ingredient;)V +transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerSmithingTemplateCopyingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/Ingredient;)V transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider generateCookingRecipes (Lnet/minecraft/data/server/recipe/RecipeExporter;Ljava/lang/String;Lnet/minecraft/recipe/RecipeSerializer;Lnet/minecraft/recipe/AbstractCookingRecipe$RecipeFactory;I)V transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerFoodCookingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Ljava/lang/String;Lnet/minecraft/recipe/RecipeSerializer;Lnet/minecraft/recipe/AbstractCookingRecipe$RecipeFactory;ILnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;F)V transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerWaxingRecipes (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/resource/featuretoggle/FeatureSet;)V diff --git a/fabric-data-generation-api-v1/src/testmod/java/net/fabricmc/fabric/test/datagen/DataGeneratorTestEntrypoint.java b/fabric-data-generation-api-v1/src/testmod/java/net/fabricmc/fabric/test/datagen/DataGeneratorTestEntrypoint.java index ad75362e0..d2851b556 100644 --- a/fabric-data-generation-api-v1/src/testmod/java/net/fabricmc/fabric/test/datagen/DataGeneratorTestEntrypoint.java +++ b/fabric-data-generation-api-v1/src/testmod/java/net/fabricmc/fabric/test/datagen/DataGeneratorTestEntrypoint.java @@ -373,7 +373,7 @@ public class DataGeneratorTestEntrypoint implements DataGeneratorEntrypoint { SIMPLE_BLOCK, Text.translatable("advancements.test.root.title"), Text.translatable("advancements.test.root.description"), - Identifier.ofDefaultNamespace("textures/gui/advancements/backgrounds/end.png"), + Identifier.ofVanilla("textures/gui/advancements/backgrounds/end.png"), AdvancementFrame.TASK, false, false, false) .criterion("killed_something", OnKilledCriterion.Conditions.createPlayerKilledEntity()) @@ -383,7 +383,7 @@ public class DataGeneratorTestEntrypoint implements DataGeneratorEntrypoint { SIMPLE_BLOCK, Text.translatable("advancements.test.root_not_loaded.title"), Text.translatable("advancements.test.root_not_loaded.description"), - Identifier.ofDefaultNamespace("textures/gui/advancements/backgrounds/end.png"), + Identifier.ofVanilla("textures/gui/advancements/backgrounds/end.png"), AdvancementFrame.TASK, false, false, false) .criterion("killed_something", OnKilledCriterion.Conditions.createPlayerKilledEntity()) diff --git a/fabric-item-api-v1/src/client/java/net/fabricmc/fabric/api/client/item/v1/ItemTooltipCallback.java b/fabric-item-api-v1/src/client/java/net/fabricmc/fabric/api/client/item/v1/ItemTooltipCallback.java index b5f6b41fc..8367bae40 100644 --- a/fabric-item-api-v1/src/client/java/net/fabricmc/fabric/api/client/item/v1/ItemTooltipCallback.java +++ b/fabric-item-api-v1/src/client/java/net/fabricmc/fabric/api/client/item/v1/ItemTooltipCallback.java @@ -18,9 +18,9 @@ package net.fabricmc.fabric.api.client.item.v1; import java.util.List; -import net.minecraft.client.item.TooltipType; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.item.tooltip.TooltipType; import net.minecraft.text.Text; import net.fabricmc.fabric.api.event.Event; diff --git a/fabric-item-api-v1/src/client/java/net/fabricmc/fabric/mixin/item/client/ItemStackMixin.java b/fabric-item-api-v1/src/client/java/net/fabricmc/fabric/mixin/item/client/ItemStackMixin.java index 0ff410cff..b3b001347 100644 --- a/fabric-item-api-v1/src/client/java/net/fabricmc/fabric/mixin/item/client/ItemStackMixin.java +++ b/fabric-item-api-v1/src/client/java/net/fabricmc/fabric/mixin/item/client/ItemStackMixin.java @@ -24,10 +24,10 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import net.minecraft.client.item.TooltipType; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.item.tooltip.TooltipType; import net.minecraft.text.Text; import net.fabricmc.fabric.api.client.item.v1.ItemTooltipCallback; diff --git a/fabric-model-loading-api-v1/src/client/java/net/fabricmc/fabric/mixin/client/model/loading/BakedModelManagerMixin.java b/fabric-model-loading-api-v1/src/client/java/net/fabricmc/fabric/mixin/client/model/loading/BakedModelManagerMixin.java index d627eb951..f5c9b6488 100644 --- a/fabric-model-loading-api-v1/src/client/java/net/fabricmc/fabric/mixin/client/model/loading/BakedModelManagerMixin.java +++ b/fabric-model-loading-api-v1/src/client/java/net/fabricmc/fabric/mixin/client/model/loading/BakedModelManagerMixin.java @@ -28,6 +28,7 @@ import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; +import net.minecraft.class_9824; import net.minecraft.client.render.model.BakedModel; import net.minecraft.client.render.model.BakedModelManager; import net.minecraft.client.render.model.ModelLoader; @@ -62,8 +63,8 @@ public class BakedModelManagerMixin implements FabricBakedModelManager { allow = 1) private CompletableFuture loadModelPluginData( CompletableFuture> self, - CompletionStage>> otherFuture, - BiFunction, Map>, ModelLoader> modelLoaderConstructor, + CompletionStage>> otherFuture, + BiFunction, Map>, ModelLoader> modelLoaderConstructor, Executor executor, // reload args ResourceReloader.Synchronizer synchronizer, @@ -73,7 +74,7 @@ public class BakedModelManagerMixin implements FabricBakedModelManager { Executor prepareExecutor, Executor applyExecutor) { CompletableFuture> pluginsFuture = ModelLoadingPluginManager.preparePlugins(manager, prepareExecutor); - CompletableFuture, Map>>> pairFuture = self.thenCombine(otherFuture, Pair::new); + CompletableFuture, Map>>> pairFuture = self.thenCombine(otherFuture, Pair::new); return pairFuture.thenCombineAsync(pluginsFuture, (pair, plugins) -> { ModelLoadingPluginManager.CURRENT_PLUGINS.set(plugins); return modelLoaderConstructor.apply(pair.getLeft(), pair.getRight()); diff --git a/fabric-model-loading-api-v1/src/client/java/net/fabricmc/fabric/mixin/client/model/loading/ModelLoaderMixin.java b/fabric-model-loading-api-v1/src/client/java/net/fabricmc/fabric/mixin/client/model/loading/ModelLoaderMixin.java index 33cf18a34..5c2231825 100644 --- a/fabric-model-loading-api-v1/src/client/java/net/fabricmc/fabric/mixin/client/model/loading/ModelLoaderMixin.java +++ b/fabric-model-loading-api-v1/src/client/java/net/fabricmc/fabric/mixin/client/model/loading/ModelLoaderMixin.java @@ -30,6 +30,7 @@ import org.spongepowered.asm.mixin.injection.ModifyVariable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; +import net.minecraft.class_9824; import net.minecraft.client.color.block.BlockColors; import net.minecraft.client.render.model.ModelLoader; import net.minecraft.client.render.model.UnbakedModel; @@ -77,14 +78,14 @@ public abstract class ModelLoaderMixin implements ModelLoaderHooks { } @Shadow - private void putModel(Identifier id, UnbakedModel unbakedModel) { + private void method_61076(ModelIdentifier id, UnbakedModel unbakedModel) { } @Shadow public abstract JsonUnbakedModel loadModelFromJson(Identifier id); @Inject(method = "", at = @At(value = "INVOKE", target = "net/minecraft/util/profiler/Profiler.swap(Ljava/lang/String;)V", ordinal = 0)) - private void afterMissingModelInit(BlockColors blockColors, Profiler profiler, Map jsonUnbakedModels, Map> blockStates, CallbackInfo info) { + private void afterMissingModelInit(BlockColors blockColors, Profiler profiler, Map jsonUnbakedModels, Map> blockStates, CallbackInfo info) { // Sanity check if (!unbakedModels.containsKey(MISSING_ID)) { throw new AssertionError("Missing model not initialized. This is likely a Fabric API porting bug."); @@ -133,8 +134,8 @@ public abstract class ModelLoaderMixin implements ModelLoaderHooks { } } - @ModifyVariable(method = "putModel", at = @At("HEAD"), argsOnly = true) - private UnbakedModel onPutModel(UnbakedModel model, Identifier id) { + @ModifyVariable(method = "method_61076", at = @At("HEAD"), argsOnly = true) + private UnbakedModel onPutModel(UnbakedModel model, ModelIdentifier id) { fabric_guardGetOrLoadModel++; try { diff --git a/fabric-model-loading-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/model/loading/ModelTestModClient.java b/fabric-model-loading-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/model/loading/ModelTestModClient.java index 4168c2e24..11687a9f7 100644 --- a/fabric-model-loading-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/model/loading/ModelTestModClient.java +++ b/fabric-model-loading-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/model/loading/ModelTestModClient.java @@ -99,7 +99,7 @@ public class ModelTestModClient implements ClientModInitializer { // All the block state models are top-level... // Use a delegating unbaked model to make sure the identical models only get baked a single time. - Identifier wheatStage0Id = Identifier.ofDefaultNamespace("block/wheat_stage0"); + Identifier wheatStage0Id = Identifier.ofVanilla("block/wheat_stage0"); UnbakedModel stage0Model = new DelegatingUnbakedModel(wheatStage0Id); @@ -107,7 +107,7 @@ public class ModelTestModClient implements ClientModInitializer { context.setModel(state.with(CropBlock.AGE, age), stage0Model); } - context.setModel(state.with(CropBlock.AGE, 7), context.getOrLoadModel(Identifier.ofDefaultNamespace("block/wheat_stage7"))); + context.setModel(state.with(CropBlock.AGE, 7), context.getOrLoadModel(Identifier.ofVanilla("block/wheat_stage7"))); }); }); diff --git a/fabric-model-loading-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/model/loading/NestedModelLoadingTest.java b/fabric-model-loading-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/model/loading/NestedModelLoadingTest.java index 8055fda2b..862a116aa 100644 --- a/fabric-model-loading-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/model/loading/NestedModelLoadingTest.java +++ b/fabric-model-loading-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/model/loading/NestedModelLoadingTest.java @@ -42,7 +42,7 @@ public class NestedModelLoadingTest implements ClientModInitializer { private static final Identifier NESTED_MODEL_3 = id("nested_3"); private static final Identifier NESTED_MODEL_4 = id("nested_4"); private static final Identifier NESTED_MODEL_5 = id("nested_5"); - private static final Identifier TARGET_MODEL = Identifier.ofDefaultNamespace("block/stone"); + private static final Identifier TARGET_MODEL = Identifier.ofVanilla("block/stone"); @Override public void onInitializeClient() { diff --git a/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/impl/networking/NetworkingImpl.java b/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/impl/networking/NetworkingImpl.java index 1a5e3b138..b6c67cbf2 100644 --- a/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/impl/networking/NetworkingImpl.java +++ b/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/impl/networking/NetworkingImpl.java @@ -30,12 +30,12 @@ public final class NetworkingImpl { /** * Id of packet used to register supported channels. */ - public static final Identifier REGISTER_CHANNEL = Identifier.ofDefaultNamespace("register"); + public static final Identifier REGISTER_CHANNEL = Identifier.ofVanilla("register"); /** * Id of packet used to unregister supported channels. */ - public static final Identifier UNREGISTER_CHANNEL = Identifier.ofDefaultNamespace("unregister"); + public static final Identifier UNREGISTER_CHANNEL = Identifier.ofVanilla("unregister"); public static boolean isReservedCommonChannel(Identifier channelName) { return channelName.equals(REGISTER_CHANNEL) || channelName.equals(UNREGISTER_CHANNEL); diff --git a/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/mixin/networking/ClientConnectionMixin.java b/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/mixin/networking/ClientConnectionMixin.java index def590df3..27ad5a6ff 100644 --- a/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/mixin/networking/ClientConnectionMixin.java +++ b/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/mixin/networking/ClientConnectionMixin.java @@ -76,7 +76,7 @@ abstract class ClientConnectionMixin implements ChannelInfoHolder { } } - @Inject(method = "handleDisconnection", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/listener/PacketListener;onDisconnected(Lnet/minecraft/class_9812;)V")) + @Inject(method = "handleDisconnection", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/listener/PacketListener;onDisconnected(Lnet/minecraft/network/DisconnectionInfo;)V")) private void disconnectAddon(CallbackInfo ci) { if (packetListener instanceof NetworkHandlerExtensions extension) { extension.getAddon().handleDisconnect(); diff --git a/fabric-object-builder-api-v1/src/client/java/net/fabricmc/fabric/mixin/object/builder/client/HangingSignEditScreenMixin.java b/fabric-object-builder-api-v1/src/client/java/net/fabricmc/fabric/mixin/object/builder/client/HangingSignEditScreenMixin.java index 5cbff8c05..78e6daa19 100644 --- a/fabric-object-builder-api-v1/src/client/java/net/fabricmc/fabric/mixin/object/builder/client/HangingSignEditScreenMixin.java +++ b/fabric-object-builder-api-v1/src/client/java/net/fabricmc/fabric/mixin/object/builder/client/HangingSignEditScreenMixin.java @@ -32,7 +32,7 @@ public abstract class HangingSignEditScreenMixin extends AbstractSignEditScreen super(blockEntity, filtered, bl); } - @WrapOperation(method = "", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Identifier;ofDefaultNamespace(Ljava/lang/String;)Lnet/minecraft/util/Identifier;")) + @WrapOperation(method = "", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Identifier;ofVanilla(Ljava/lang/String;)Lnet/minecraft/util/Identifier;")) private Identifier init(String id, Operation original) { if (signType.name().indexOf(Identifier.NAMESPACE_SEPARATOR) != -1) { Identifier identifier = Identifier.of(signType.name()); diff --git a/fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/api/object/builder/v1/trade/TradeOfferHelper.java b/fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/api/object/builder/v1/trade/TradeOfferHelper.java index 8daac0d5f..9fddf47ed 100644 --- a/fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/api/object/builder/v1/trade/TradeOfferHelper.java +++ b/fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/api/object/builder/v1/trade/TradeOfferHelper.java @@ -137,21 +137,21 @@ public final class TradeOfferHelper { *

In vanilla, this pool contains offers to buy water buckets, baked potatoes, etc. * for emeralds. */ - Identifier BUY_ITEMS_POOL = Identifier.ofDefaultNamespace("buy_items"); + Identifier BUY_ITEMS_POOL = Identifier.ofVanilla("buy_items"); /** * The pool ID for the "sell special items" pool. * Two trade offers are picked from this pool. * *

In vanilla, this pool contains offers to sell logs, enchanted iron pickaxes, etc. */ - Identifier SELL_SPECIAL_ITEMS_POOL = Identifier.ofDefaultNamespace("sell_special_items"); + Identifier SELL_SPECIAL_ITEMS_POOL = Identifier.ofVanilla("sell_special_items"); /** * The pool ID for the "sell common items" pool. * Five trade offers are picked from this pool. * *

In vanilla, this pool contains offers to sell flowers, saplings, etc. */ - Identifier SELL_COMMON_ITEMS_POOL = Identifier.ofDefaultNamespace("sell_common_items"); + Identifier SELL_COMMON_ITEMS_POOL = Identifier.ofVanilla("sell_common_items"); /** * Adds a new pool to the offer list. Exactly {@code count} offers are picked from diff --git a/fabric-renderer-api-v1/build.gradle b/fabric-renderer-api-v1/build.gradle index 4c5a4747f..9bc0edaa6 100644 --- a/fabric-renderer-api-v1/build.gradle +++ b/fabric-renderer-api-v1/build.gradle @@ -6,7 +6,7 @@ testDependencies(project, [ ':fabric-block-api-v1', ':fabric-block-view-api-v2', ':fabric-blockrenderlayer-v1', - ':fabric-model-loading-api-v1', +// ':fabric-model-loading-api-v1', TODO 1.21 ':fabric-object-builder-api-v1', ':fabric-renderer-indigo', ':fabric-resource-loader-v0' diff --git a/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/FrameUnbakedModel.java b/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/FrameUnbakedModel.java index 832ebca13..f371ac416 100644 --- a/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/FrameUnbakedModel.java +++ b/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/FrameUnbakedModel.java @@ -39,7 +39,7 @@ import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView; import net.fabricmc.fabric.api.renderer.v1.mesh.QuadEmitter; public class FrameUnbakedModel implements UnbakedModel { - private static final SpriteIdentifier OBSIDIAN_SPRITE_ID = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, Identifier.ofDefaultNamespace("block/obsidian")); + private static final SpriteIdentifier OBSIDIAN_SPRITE_ID = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, Identifier.ofVanilla("block/obsidian")); @Override public Collection getModelDependencies() { @@ -56,7 +56,7 @@ public class FrameUnbakedModel implements UnbakedModel { */ @Nullable @Override - public BakedModel bake(Baker baker, Function textureGetter, ModelBakeSettings rotationContainer, Identifier modelId) { + public BakedModel bake(Baker baker, Function textureGetter, ModelBakeSettings rotationContainer) { // The renderer API may not have an implementation, so we should check if it exists. if (!RendererAccess.INSTANCE.hasRenderer()) { // No renderer implementation is present. diff --git a/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/ModelResolverImpl.java b/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/ModelResolverImpl.java index 6cb8950f2..d04af7215 100644 --- a/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/ModelResolverImpl.java +++ b/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/ModelResolverImpl.java @@ -16,15 +16,7 @@ package net.fabricmc.fabric.test.renderer.client; -import java.util.Set; - -import org.jetbrains.annotations.Nullable; - -import net.minecraft.client.render.model.UnbakedModel; -import net.minecraft.util.Identifier; - -import net.fabricmc.fabric.api.client.model.loading.v1.ModelResolver; -import net.fabricmc.fabric.test.renderer.RendererTest; +/* TODO 1.21 public class ModelResolverImpl implements ModelResolver { private static final Set FRAME_MODEL_LOCATIONS = Set.of( @@ -73,3 +65,4 @@ public class ModelResolverImpl implements ModelResolver { return null; } } +*/ diff --git a/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/OctagonalColumnUnbakedModel.java b/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/OctagonalColumnUnbakedModel.java index 97e2a60bd..8cc487930 100644 --- a/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/OctagonalColumnUnbakedModel.java +++ b/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/OctagonalColumnUnbakedModel.java @@ -42,7 +42,7 @@ import net.fabricmc.fabric.api.renderer.v1.mesh.QuadEmitter; import net.fabricmc.fabric.api.util.TriState; public class OctagonalColumnUnbakedModel implements UnbakedModel { - private static final SpriteIdentifier WHITE_CONCRETE_SPRITE_ID = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, Identifier.ofDefaultNamespace("block/white_concrete")); + private static final SpriteIdentifier WHITE_CONCRETE_SPRITE_ID = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, Identifier.ofVanilla("block/white_concrete")); // (B - A) is the side length of a regular octagon that fits in a unit square. // The line from A to B is centered on the line from 0 to 1. @@ -60,7 +60,7 @@ public class OctagonalColumnUnbakedModel implements UnbakedModel { @Nullable @Override - public BakedModel bake(Baker baker, Function textureGetter, ModelBakeSettings rotationContainer, Identifier modelId) { + public BakedModel bake(Baker baker, Function textureGetter, ModelBakeSettings rotationContainer) { if (!RendererAccess.INSTANCE.hasRenderer()) { return null; } diff --git a/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/PillarUnbakedModel.java b/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/PillarUnbakedModel.java index b94fda0c5..97348590c 100644 --- a/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/PillarUnbakedModel.java +++ b/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/PillarUnbakedModel.java @@ -51,7 +51,7 @@ public class PillarUnbakedModel implements UnbakedModel { @Nullable @Override - public BakedModel bake(Baker baker, Function textureGetter, ModelBakeSettings rotationContainer, Identifier modelId) { + public BakedModel bake(Baker baker, Function textureGetter, ModelBakeSettings rotationContainer) { Sprite[] sprites = new Sprite[SPRITES.size()]; for (int i = 0; i < sprites.length; ++i) { diff --git a/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/RendererClientTest.java b/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/RendererClientTest.java index 79645dffe..8578427cb 100644 --- a/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/RendererClientTest.java +++ b/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/RendererClientTest.java @@ -20,16 +20,16 @@ import net.minecraft.client.render.RenderLayer; import net.fabricmc.api.ClientModInitializer; import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; -import net.fabricmc.fabric.api.client.model.loading.v1.ModelLoadingPlugin; import net.fabricmc.fabric.test.renderer.FrameBlock; import net.fabricmc.fabric.test.renderer.Registration; public final class RendererClientTest implements ClientModInitializer { @Override public void onInitializeClient() { - ModelLoadingPlugin.register(pluginContext -> { - pluginContext.resolveModel().register(new ModelResolverImpl()); - }); + // TODO 1.21 + // ModelLoadingPlugin.register(pluginContext -> { + // pluginContext.resolveModel().register(new ModelResolverImpl()); + // }); for (FrameBlock frameBlock : Registration.FRAME_BLOCKS) { // We don't specify a material for the frame mesh, diff --git a/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/RiverstoneUnbakedModel.java b/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/RiverstoneUnbakedModel.java index d0ae07468..26c0d9324 100644 --- a/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/RiverstoneUnbakedModel.java +++ b/fabric-renderer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/renderer/client/RiverstoneUnbakedModel.java @@ -31,8 +31,8 @@ import net.minecraft.client.util.SpriteIdentifier; import net.minecraft.util.Identifier; public class RiverstoneUnbakedModel implements UnbakedModel { - private static final Identifier STONE_MODEL_ID = Identifier.ofDefaultNamespace("block/stone"); - private static final Identifier GOLD_BLOCK_MODEL_ID = Identifier.ofDefaultNamespace("block/gold_block"); + private static final Identifier STONE_MODEL_ID = Identifier.ofVanilla("block/stone"); + private static final Identifier GOLD_BLOCK_MODEL_ID = Identifier.ofVanilla("block/gold_block"); @Override public Collection getModelDependencies() { @@ -45,7 +45,7 @@ public class RiverstoneUnbakedModel implements UnbakedModel { @Nullable @Override - public BakedModel bake(Baker baker, Function textureGetter, ModelBakeSettings rotationContainer, Identifier modelId) { + public BakedModel bake(Baker baker, Function textureGetter, ModelBakeSettings rotationContainer) { BakedModel stoneModel = baker.bake(STONE_MODEL_ID, rotationContainer); BakedModel goldBlockModel = baker.bake(GOLD_BLOCK_MODEL_ID, rotationContainer); return new RiverstoneBakedModel(stoneModel, goldBlockModel); diff --git a/fabric-renderer-indigo/src/client/java/net/fabricmc/fabric/impl/client/indigo/renderer/render/ChunkRenderInfo.java b/fabric-renderer-indigo/src/client/java/net/fabricmc/fabric/impl/client/indigo/renderer/render/ChunkRenderInfo.java index 35cbf06a0..69a83f398 100644 --- a/fabric-renderer-indigo/src/client/java/net/fabricmc/fabric/impl/client/indigo/renderer/render/ChunkRenderInfo.java +++ b/fabric-renderer-indigo/src/client/java/net/fabricmc/fabric/impl/client/indigo/renderer/render/ChunkRenderInfo.java @@ -22,14 +22,14 @@ import it.unimi.dsi.fastutil.longs.Long2FloatOpenHashMap; import it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap; import net.minecraft.block.BlockState; -import net.minecraft.class_9799; import net.minecraft.client.render.BufferBuilder; import net.minecraft.client.render.RenderLayer; import net.minecraft.client.render.VertexFormat; import net.minecraft.client.render.VertexFormats; import net.minecraft.client.render.WorldRenderer; -import net.minecraft.client.render.chunk.BlockBufferBuilderStorage; +import net.minecraft.client.render.chunk.BlockBufferAllocatorStorage; import net.minecraft.client.render.chunk.ChunkRendererRegion; +import net.minecraft.client.util.BufferAllocator; import net.minecraft.util.math.BlockPos; import net.minecraft.world.BlockRenderView; @@ -70,7 +70,7 @@ public class ChunkRenderInfo { private final Long2FloatOpenHashMap aoLevelCache; private final BlockPos.Mutable chunkOrigin = new BlockPos.Mutable(); - BlockBufferBuilderStorage builders; + BlockBufferAllocatorStorage builders; Map buffers; BlockRenderView blockView; @@ -81,7 +81,7 @@ public class ChunkRenderInfo { aoLevelCache.defaultReturnValue(Float.MAX_VALUE); } - void prepare(ChunkRendererRegion blockView, BlockPos chunkOrigin, BlockBufferBuilderStorage builders, Map buffers) { + void prepare(ChunkRendererRegion blockView, BlockPos chunkOrigin, BlockBufferAllocatorStorage builders, Map buffers) { this.blockView = blockView; this.chunkOrigin.set(chunkOrigin); this.builders = builders; @@ -99,7 +99,7 @@ public class ChunkRenderInfo { BufferBuilder builder = buffers.get(renderLayer); if (builder == null) { - class_9799 byteBuilder = builders.get(renderLayer); + BufferAllocator byteBuilder = builders.get(renderLayer); builder = new BufferBuilder(byteBuilder, VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_COLOR_TEXTURE_LIGHT_NORMAL); buffers.put(renderLayer, builder); diff --git a/fabric-renderer-indigo/src/client/java/net/fabricmc/fabric/impl/client/indigo/renderer/render/TerrainRenderContext.java b/fabric-renderer-indigo/src/client/java/net/fabricmc/fabric/impl/client/indigo/renderer/render/TerrainRenderContext.java index 0d8094875..4527f82e4 100644 --- a/fabric-renderer-indigo/src/client/java/net/fabricmc/fabric/impl/client/indigo/renderer/render/TerrainRenderContext.java +++ b/fabric-renderer-indigo/src/client/java/net/fabricmc/fabric/impl/client/indigo/renderer/render/TerrainRenderContext.java @@ -23,7 +23,7 @@ import net.minecraft.client.render.BufferBuilder; import net.minecraft.client.render.OverlayTexture; import net.minecraft.client.render.RenderLayer; import net.minecraft.client.render.VertexConsumer; -import net.minecraft.client.render.chunk.BlockBufferBuilderStorage; +import net.minecraft.client.render.chunk.BlockBufferAllocatorStorage; import net.minecraft.client.render.chunk.ChunkRendererRegion; import net.minecraft.client.render.model.BakedModel; import net.minecraft.client.util.math.MatrixStack; @@ -72,7 +72,7 @@ public class TerrainRenderContext extends AbstractBlockRenderContext { return chunkInfo.getInitializedBuffer(layer); } - public void prepare(ChunkRendererRegion blockView, BlockPos chunkOrigin, BlockBufferBuilderStorage builders, Map builderMap) { + public void prepare(ChunkRendererRegion blockView, BlockPos chunkOrigin, BlockBufferAllocatorStorage builders, Map builderMap) { blockInfo.prepareForWorld(blockView, true); chunkInfo.prepare(blockView, chunkOrigin, builders, builderMap); } diff --git a/fabric-renderer-indigo/src/client/java/net/fabricmc/fabric/mixin/client/indigo/renderer/ChunkBuilderBuiltChunkRebuildTaskMixin.java b/fabric-renderer-indigo/src/client/java/net/fabricmc/fabric/mixin/client/indigo/renderer/SectionBuilderMixin.java similarity index 93% rename from fabric-renderer-indigo/src/client/java/net/fabricmc/fabric/mixin/client/indigo/renderer/ChunkBuilderBuiltChunkRebuildTaskMixin.java rename to fabric-renderer-indigo/src/client/java/net/fabricmc/fabric/mixin/client/indigo/renderer/SectionBuilderMixin.java index 9441ef57c..72b488fc6 100644 --- a/fabric-renderer-indigo/src/client/java/net/fabricmc/fabric/mixin/client/indigo/renderer/ChunkBuilderBuiltChunkRebuildTaskMixin.java +++ b/fabric-renderer-indigo/src/client/java/net/fabricmc/fabric/mixin/client/indigo/renderer/SectionBuilderMixin.java @@ -31,13 +31,13 @@ import org.spongepowered.asm.mixin.injection.callback.LocalCapture; import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; -import net.minecraft.class_9810; import net.minecraft.client.render.BufferBuilder; import net.minecraft.client.render.RenderLayer; import net.minecraft.client.render.VertexConsumer; import net.minecraft.client.render.block.BlockRenderManager; -import net.minecraft.client.render.chunk.BlockBufferBuilderStorage; +import net.minecraft.client.render.chunk.BlockBufferAllocatorStorage; import net.minecraft.client.render.chunk.ChunkRendererRegion; +import net.minecraft.client.render.chunk.SectionBuilder; import net.minecraft.client.render.model.BakedModel; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.util.math.BlockPos; @@ -65,14 +65,14 @@ import net.fabricmc.fabric.impl.client.indigo.renderer.render.TerrainRenderConte * Renderer authors are responsible for creating the hooks they need. * (Though they can use these as an example if they wish.) */ -@Mixin(class_9810.class) -public abstract class ChunkBuilderBuiltChunkRebuildTaskMixin { - @Inject(method = "method_60904", +@Mixin(SectionBuilder.class) +public abstract class SectionBuilderMixin { + @Inject(method = "build", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/BlockPos;iterate(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Ljava/lang/Iterable;"), locals = LocalCapture.CAPTURE_FAILHARD) private void hookChunkBuild(ChunkSectionPos sectionPos, ChunkRendererRegion region, VertexSorter sorter, - BlockBufferBuilderStorage builder, - CallbackInfoReturnable ci, + BlockBufferAllocatorStorage builder, + CallbackInfoReturnable ci, @Local(ordinal = 0) Map builderMap) { // hook just before iterating over the render chunk's chunks blocks, captures the buffer builder map @@ -97,7 +97,7 @@ public abstract class ChunkBuilderBuiltChunkRebuildTaskMixin { * Normally this does nothing but will allow mods to create rendering hooks that are * driven off of render type. (Not recommended or encouraged, but also not prevented.) */ - @Redirect(method = "method_60904", require = 1, at = @At(value = "INVOKE", + @Redirect(method = "build", require = 1, at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/block/BlockRenderManager;renderBlock(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/BlockRenderView;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;ZLnet/minecraft/util/math/random/Random;)V")) private void hookChunkBuildTessellate(BlockRenderManager renderManager, BlockState blockState, BlockPos blockPos, BlockRenderView blockView, MatrixStack matrix, VertexConsumer bufferBuilder, boolean checkSides, Random random) { if (blockState.getRenderType() == BlockRenderType.MODEL) { @@ -115,7 +115,7 @@ public abstract class ChunkBuilderBuiltChunkRebuildTaskMixin { /** * Release all references. Probably not necessary but would be $#%! to debug if it is. */ - @Inject(method = "method_60904", + @Inject(method = "build", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/block/BlockModelRenderer;disableBrightnessCache()V")) private void hookRebuildChunkReturn(CallbackInfoReturnable> ci) { // hook after iterating over the render chunk's chunks blocks, must be called if and only if hookChunkBuild happened diff --git a/fabric-renderer-indigo/src/client/resources/fabric-renderer-indigo.mixins.json b/fabric-renderer-indigo/src/client/resources/fabric-renderer-indigo.mixins.json index 901ba7310..92b91c4d8 100644 --- a/fabric-renderer-indigo/src/client/resources/fabric-renderer-indigo.mixins.json +++ b/fabric-renderer-indigo/src/client/resources/fabric-renderer-indigo.mixins.json @@ -8,7 +8,7 @@ "client": [ "BakedModelMixin", "BlockModelRendererMixin", - "ChunkBuilderBuiltChunkRebuildTaskMixin", + "SectionBuilderMixin", "ChunkRendererRegionMixin", "ItemRendererMixin" ], diff --git a/fabric-rendering-fluids-v1/src/client/java/net/fabricmc/fabric/api/client/render/fluid/v1/SimpleFluidRenderHandler.java b/fabric-rendering-fluids-v1/src/client/java/net/fabricmc/fabric/api/client/render/fluid/v1/SimpleFluidRenderHandler.java index f74b1d21d..b1cc854b5 100644 --- a/fabric-rendering-fluids-v1/src/client/java/net/fabricmc/fabric/api/client/render/fluid/v1/SimpleFluidRenderHandler.java +++ b/fabric-rendering-fluids-v1/src/client/java/net/fabricmc/fabric/api/client/render/fluid/v1/SimpleFluidRenderHandler.java @@ -42,27 +42,27 @@ public class SimpleFluidRenderHandler implements FluidRenderHandler { /** * The vanilla still water texture identifier. */ - public static final Identifier WATER_STILL = Identifier.ofDefaultNamespace("block/water_still"); + public static final Identifier WATER_STILL = Identifier.ofVanilla("block/water_still"); /** * The vanilla flowing water texture identifier. */ - public static final Identifier WATER_FLOWING = Identifier.ofDefaultNamespace("block/water_flow"); + public static final Identifier WATER_FLOWING = Identifier.ofVanilla("block/water_flow"); /** * The vanilla water overlay texture identifier. */ - public static final Identifier WATER_OVERLAY = Identifier.ofDefaultNamespace("block/water_overlay"); + public static final Identifier WATER_OVERLAY = Identifier.ofVanilla("block/water_overlay"); /** * The vanilla still lava texture identifier. */ - public static final Identifier LAVA_STILL = Identifier.ofDefaultNamespace("block/lava_still"); + public static final Identifier LAVA_STILL = Identifier.ofVanilla("block/lava_still"); /** * The vanilla flowing lava texture identifier. */ - public static final Identifier LAVA_FLOWING = Identifier.ofDefaultNamespace("block/lava_flow"); + public static final Identifier LAVA_FLOWING = Identifier.ofVanilla("block/lava_flow"); protected final Identifier stillTexture; protected final Identifier flowingTexture; diff --git a/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/api/client/rendering/v1/TooltipComponentCallback.java b/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/api/client/rendering/v1/TooltipComponentCallback.java index f0a6b0c94..a38c14611 100644 --- a/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/api/client/rendering/v1/TooltipComponentCallback.java +++ b/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/api/client/rendering/v1/TooltipComponentCallback.java @@ -19,8 +19,8 @@ package net.fabricmc.fabric.api.client.rendering.v1; import org.jetbrains.annotations.Nullable; import net.minecraft.client.gui.tooltip.TooltipComponent; -import net.minecraft.client.item.TooltipData; import net.minecraft.item.Item; +import net.minecraft.item.tooltip.TooltipData; import net.fabricmc.fabric.api.event.Event; import net.fabricmc.fabric.api.event.EventFactory; diff --git a/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/TooltipComponentMixin.java b/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/TooltipComponentMixin.java index 7bcf9ab1d..d560c8b96 100644 --- a/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/TooltipComponentMixin.java +++ b/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/TooltipComponentMixin.java @@ -22,14 +22,14 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import net.minecraft.client.gui.tooltip.TooltipComponent; -import net.minecraft.client.item.TooltipData; +import net.minecraft.item.tooltip.TooltipData; import net.fabricmc.fabric.api.client.rendering.v1.TooltipComponentCallback; @Mixin(TooltipComponent.class) public interface TooltipComponentMixin { @Inject( - method = "of(Lnet/minecraft/client/item/TooltipData;)Lnet/minecraft/client/gui/tooltip/TooltipComponent;", + method = "of(Lnet/minecraft/item/tooltip/TooltipData;)Lnet/minecraft/client/gui/tooltip/TooltipComponent;", at = @At("HEAD"), cancellable = true ) diff --git a/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/shader/ShaderProgramMixin.java b/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/shader/ShaderProgramMixin.java index 9375dde65..5c9c457ef 100644 --- a/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/shader/ShaderProgramMixin.java +++ b/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/shader/ShaderProgramMixin.java @@ -38,7 +38,7 @@ abstract class ShaderProgramMixin { private String name; // Allow loading FabricShaderPrograms from arbitrary namespaces. - @WrapOperation(method = "", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Identifier;ofDefaultNamespace(Ljava/lang/String;)Lnet/minecraft/util/Identifier;"), allow = 1) + @WrapOperation(method = "", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Identifier;ofVanilla(Ljava/lang/String;)Lnet/minecraft/util/Identifier;"), allow = 1) private Identifier modifyId(String id, Operation original) { if ((Object) this instanceof FabricShaderProgram) { return FabricShaderProgram.rewriteAsId(id, name); @@ -57,7 +57,7 @@ abstract class ShaderProgramMixin { return id; } - @WrapOperation(method = "loadShader", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Identifier;ofDefaultNamespace(Ljava/lang/String;)Lnet/minecraft/util/Identifier;"), allow = 1) + @WrapOperation(method = "loadShader", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Identifier;ofVanilla(Ljava/lang/String;)Lnet/minecraft/util/Identifier;"), allow = 1) private static Identifier allowNoneMinecraftId(String id, Operation original) { if (id.contains(String.valueOf(Identifier.NAMESPACE_SEPARATOR))) { return Identifier.of(id); diff --git a/fabric-rendering-v1/src/testmod/java/net/fabricmc/fabric/test/rendering/TooltipComponentTestInit.java b/fabric-rendering-v1/src/testmod/java/net/fabricmc/fabric/test/rendering/TooltipComponentTestInit.java index 426dac9a6..4c8e99321 100644 --- a/fabric-rendering-v1/src/testmod/java/net/fabricmc/fabric/test/rendering/TooltipComponentTestInit.java +++ b/fabric-rendering-v1/src/testmod/java/net/fabricmc/fabric/test/rendering/TooltipComponentTestInit.java @@ -20,12 +20,12 @@ import java.util.EnumMap; import java.util.List; import java.util.Optional; -import net.minecraft.client.item.TooltipData; import net.minecraft.item.ArmorItem; import net.minecraft.item.ArmorMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; +import net.minecraft.item.tooltip.TooltipData; import net.minecraft.recipe.Ingredient; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; diff --git a/fabric-rendering-v1/src/testmodClient/java/net/fabricmc/fabric/test/rendering/client/ArmorRenderingTests.java b/fabric-rendering-v1/src/testmodClient/java/net/fabricmc/fabric/test/rendering/client/ArmorRenderingTests.java index b50fa1511..8789bf801 100644 --- a/fabric-rendering-v1/src/testmodClient/java/net/fabricmc/fabric/test/rendering/client/ArmorRenderingTests.java +++ b/fabric-rendering-v1/src/testmodClient/java/net/fabricmc/fabric/test/rendering/client/ArmorRenderingTests.java @@ -29,7 +29,7 @@ import net.fabricmc.fabric.api.client.rendering.v1.ArmorRenderer; public class ArmorRenderingTests implements ClientModInitializer { private BipedEntityModel armorModel; - private final Identifier texture = Identifier.ofDefaultNamespace("textures/block/dirt.png"); + private final Identifier texture = Identifier.ofVanilla("textures/block/dirt.png"); // Renders a biped model with dirt texture, replacing diamond helmet and diamond chest plate rendering @Override diff --git a/fabric-rendering-v1/src/testmodClient/java/net/fabricmc/fabric/test/rendering/client/DimensionalRenderingTest.java b/fabric-rendering-v1/src/testmodClient/java/net/fabricmc/fabric/test/rendering/client/DimensionalRenderingTest.java index 59a74df03..7d11b03d7 100644 --- a/fabric-rendering-v1/src/testmodClient/java/net/fabricmc/fabric/test/rendering/client/DimensionalRenderingTest.java +++ b/fabric-rendering-v1/src/testmodClient/java/net/fabricmc/fabric/test/rendering/client/DimensionalRenderingTest.java @@ -35,7 +35,7 @@ import net.fabricmc.fabric.api.client.rendering.v1.DimensionRenderingRegistry; import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext; public class DimensionalRenderingTest implements ClientModInitializer { - private static final Identifier END_SKY = Identifier.ofDefaultNamespace("textures/block/dirt.png"); + private static final Identifier END_SKY = Identifier.ofVanilla("textures/block/dirt.png"); private static void render(WorldRenderContext context) { RenderSystem.enableBlend(); @@ -44,7 +44,7 @@ public class DimensionalRenderingTest implements ClientModInitializer { RenderSystem.setShader(GameRenderer::getPositionTexColorProgram); RenderSystem.setShaderTexture(0, END_SKY); Tessellator tessellator = Tessellator.getInstance(); - BufferBuilder bufferBuilder = tessellator.method_60827(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE_COLOR); + BufferBuilder bufferBuilder = tessellator.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE_COLOR); Matrix4f matrix4f = context.positionMatrix(); bufferBuilder.vertex(matrix4f, -100.0f, -100.0f, -100.0f).texture(0.0F, 0.0F).color(255, 255, 255, 255); @@ -76,7 +76,7 @@ public class DimensionalRenderingTest implements ClientModInitializer { bufferBuilder.vertex(matrix4f, -100.0f, 100.0f, 100.0f).texture(0.0F, 1.0F).color(255, 255, 255, 255); bufferBuilder.vertex(matrix4f, -100.0f, -100.0f, 100.0f).texture(1.0F, 1.0F).color(255, 255, 255, 255); bufferBuilder.vertex(matrix4f, -100.0f, -100.0f, -100.0f).texture(1.0F, 0.0F).color(255, 255, 255, 255); - BufferRenderer.drawWithGlobalProgram(bufferBuilder.method_60800()); + BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); RenderSystem.depthMask(true); RenderSystem.disableBlend(); diff --git a/fabric-rendering-v1/src/testmodClient/java/net/fabricmc/fabric/test/rendering/client/HudAndShaderTest.java b/fabric-rendering-v1/src/testmodClient/java/net/fabricmc/fabric/test/rendering/client/HudAndShaderTest.java index 801d7998c..8aa2b8d0d 100644 --- a/fabric-rendering-v1/src/testmodClient/java/net/fabricmc/fabric/test/rendering/client/HudAndShaderTest.java +++ b/fabric-rendering-v1/src/testmodClient/java/net/fabricmc/fabric/test/rendering/client/HudAndShaderTest.java @@ -56,12 +56,12 @@ public class HudAndShaderTest implements ClientModInitializer { RenderSystem.setShader(() -> testShader); RenderSystem.setShaderColor(0f, 1f, 0f, 1f); Matrix4f positionMatrix = drawContext.getMatrices().peek().getPositionMatrix(); - BufferBuilder buffer = Tessellator.getInstance().method_60827(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + BufferBuilder buffer = Tessellator.getInstance().begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); buffer.vertex(positionMatrix, x, y, 50); buffer.vertex(positionMatrix, x, y + 10, 50); buffer.vertex(positionMatrix, x + 10, y + 10, 50); buffer.vertex(positionMatrix, x + 10, y, 50); - BufferRenderer.drawWithGlobalProgram(buffer.method_60800()); + BufferRenderer.drawWithGlobalProgram(buffer.end()); // Reset shader color RenderSystem.setShaderColor(1f, 1f, 1f, 1f); }); diff --git a/fabric-rendering-v1/src/testmodClient/java/net/fabricmc/fabric/test/rendering/client/WorldRenderEventsTests.java b/fabric-rendering-v1/src/testmodClient/java/net/fabricmc/fabric/test/rendering/client/WorldRenderEventsTests.java index fd1e2e982..30f2aff20 100644 --- a/fabric-rendering-v1/src/testmodClient/java/net/fabricmc/fabric/test/rendering/client/WorldRenderEventsTests.java +++ b/fabric-rendering-v1/src/testmodClient/java/net/fabricmc/fabric/test/rendering/client/WorldRenderEventsTests.java @@ -66,7 +66,7 @@ public class WorldRenderEventsTests implements ClientModInitializer { MatrixStack matrices = context.matrixStack(); Vec3d camera = context.camera().getPos(); Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder buffer = tessellator.method_60827(VertexFormat.DrawMode.TRIANGLE_STRIP, VertexFormats.POSITION_COLOR); + BufferBuilder buffer = tessellator.begin(VertexFormat.DrawMode.TRIANGLE_STRIP, VertexFormats.POSITION_COLOR); matrices.push(); matrices.translate(-camera.x, -camera.y, -camera.z); @@ -77,7 +77,7 @@ public class WorldRenderEventsTests implements ClientModInitializer { RenderSystem.defaultBlendFunc(); WorldRenderer.renderFilledBox(matrices, buffer, 0, 100, 0, 1, 101, 1, 0, 1, 0, 0.5f); - BufferRenderer.drawWithGlobalProgram(buffer.method_60800()); + BufferRenderer.drawWithGlobalProgram(buffer.end()); matrices.pop(); RenderSystem.disableBlend(); diff --git a/fabric-resource-loader-v0/src/client/java/net/fabricmc/fabric/mixin/resource/loader/client/KeyedResourceReloadListenerClientMixin.java b/fabric-resource-loader-v0/src/client/java/net/fabricmc/fabric/mixin/resource/loader/client/KeyedResourceReloadListenerClientMixin.java index a02b23b44..e05569017 100644 --- a/fabric-resource-loader-v0/src/client/java/net/fabricmc/fabric/mixin/resource/loader/client/KeyedResourceReloadListenerClientMixin.java +++ b/fabric-resource-loader-v0/src/client/java/net/fabricmc/fabric/mixin/resource/loader/client/KeyedResourceReloadListenerClientMixin.java @@ -58,7 +58,7 @@ public abstract class KeyedResourceReloadListenerClientMixin implements Identifi } else if (self instanceof TextureManager) { this.fabric$id = ResourceReloadListenerKeys.TEXTURES; } else { - this.fabric$id = Identifier.ofDefaultNamespace("private/" + self.getClass().getSimpleName().toLowerCase(Locale.ROOT)); + this.fabric$id = Identifier.ofVanilla("private/" + self.getClass().getSimpleName().toLowerCase(Locale.ROOT)); } } diff --git a/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/api/resource/ResourceReloadListenerKeys.java b/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/api/resource/ResourceReloadListenerKeys.java index 2b63e5eda..d46933d7a 100644 --- a/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/api/resource/ResourceReloadListenerKeys.java +++ b/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/api/resource/ResourceReloadListenerKeys.java @@ -25,17 +25,17 @@ import net.minecraft.util.Identifier; */ public final class ResourceReloadListenerKeys { // client - public static final Identifier SOUNDS = Identifier.ofDefaultNamespace("sounds"); - public static final Identifier FONTS = Identifier.ofDefaultNamespace("fonts"); - public static final Identifier MODELS = Identifier.ofDefaultNamespace("models"); - public static final Identifier LANGUAGES = Identifier.ofDefaultNamespace("languages"); - public static final Identifier TEXTURES = Identifier.ofDefaultNamespace("textures"); + public static final Identifier SOUNDS = Identifier.ofVanilla("sounds"); + public static final Identifier FONTS = Identifier.ofVanilla("fonts"); + public static final Identifier MODELS = Identifier.ofVanilla("models"); + public static final Identifier LANGUAGES = Identifier.ofVanilla("languages"); + public static final Identifier TEXTURES = Identifier.ofVanilla("textures"); // server - public static final Identifier TAGS = Identifier.ofDefaultNamespace("tags"); - public static final Identifier RECIPES = Identifier.ofDefaultNamespace("recipes"); - public static final Identifier ADVANCEMENTS = Identifier.ofDefaultNamespace("advancements"); - public static final Identifier FUNCTIONS = Identifier.ofDefaultNamespace("functions"); + public static final Identifier TAGS = Identifier.ofVanilla("tags"); + public static final Identifier RECIPES = Identifier.ofVanilla("recipes"); + public static final Identifier ADVANCEMENTS = Identifier.ofVanilla("advancements"); + public static final Identifier FUNCTIONS = Identifier.ofVanilla("functions"); private ResourceReloadListenerKeys() { } } diff --git a/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/mixin/resource/loader/KeyedResourceReloadListenerMixin.java b/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/mixin/resource/loader/KeyedResourceReloadListenerMixin.java index 4c1e56176..8fd07b8b5 100644 --- a/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/mixin/resource/loader/KeyedResourceReloadListenerMixin.java +++ b/fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/mixin/resource/loader/KeyedResourceReloadListenerMixin.java @@ -55,7 +55,7 @@ public abstract class KeyedResourceReloadListenerMixin implements IdentifiableRe } else if (self instanceof TagManagerLoader) { this.fabric$id = ResourceReloadListenerKeys.TAGS; } else { - this.fabric$id = Identifier.ofDefaultNamespace("private/" + self.getClass().getSimpleName().toLowerCase(Locale.ROOT)); + this.fabric$id = Identifier.ofVanilla("private/" + self.getClass().getSimpleName().toLowerCase(Locale.ROOT)); } } diff --git a/fabric-screen-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/screen/ScreenTests.java b/fabric-screen-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/screen/ScreenTests.java index 7abd78d61..d4b0ee1a3 100644 --- a/fabric-screen-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/screen/ScreenTests.java +++ b/fabric-screen-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/screen/ScreenTests.java @@ -33,7 +33,7 @@ import net.fabricmc.fabric.api.client.screen.v1.ScreenKeyboardEvents; import net.fabricmc.fabric.api.client.screen.v1.Screens; public final class ScreenTests implements ClientModInitializer { - public static final Identifier ARMOR_FULL_TEXTURE = Identifier.ofDefaultNamespace("hud/armor_full"); + public static final Identifier ARMOR_FULL_TEXTURE = Identifier.ofVanilla("hud/armor_full"); private static final Logger LOGGER = LoggerFactory.getLogger("FabricScreenApiTests"); @Override diff --git a/fabric-screen-handler-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/screenhandler/client/PositionedScreen.java b/fabric-screen-handler-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/screenhandler/client/PositionedScreen.java index 4d0472220..d8edd1999 100644 --- a/fabric-screen-handler-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/screenhandler/client/PositionedScreen.java +++ b/fabric-screen-handler-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/screenhandler/client/PositionedScreen.java @@ -31,7 +31,7 @@ import net.minecraft.util.math.BlockPos; import net.fabricmc.fabric.test.screenhandler.screen.PositionedScreenHandler; public class PositionedScreen extends HandledScreen { - private static final Identifier TEXTURE = Identifier.ofDefaultNamespace("textures/gui/container/dispenser.png"); + private static final Identifier TEXTURE = Identifier.ofVanilla("textures/gui/container/dispenser.png"); public PositionedScreen(ScreenHandler handler, PlayerInventory inventory, Text title) { super(handler, inventory, getPositionText(handler).orElse(title)); diff --git a/fabric-transfer-api-v1/src/client/java/net/fabricmc/fabric/api/transfer/v1/client/fluid/FluidVariantRenderHandler.java b/fabric-transfer-api-v1/src/client/java/net/fabricmc/fabric/api/transfer/v1/client/fluid/FluidVariantRenderHandler.java index 0690a9874..e04be5d83 100644 --- a/fabric-transfer-api-v1/src/client/java/net/fabricmc/fabric/api/transfer/v1/client/fluid/FluidVariantRenderHandler.java +++ b/fabric-transfer-api-v1/src/client/java/net/fabricmc/fabric/api/transfer/v1/client/fluid/FluidVariantRenderHandler.java @@ -20,8 +20,8 @@ import java.util.List; import org.jetbrains.annotations.Nullable; -import net.minecraft.client.item.TooltipType; import net.minecraft.client.texture.Sprite; +import net.minecraft.item.tooltip.TooltipType; import net.minecraft.text.Text; import net.minecraft.util.math.BlockPos; import net.minecraft.world.BlockRenderView; diff --git a/fabric-transfer-api-v1/src/client/java/net/fabricmc/fabric/api/transfer/v1/client/fluid/FluidVariantRendering.java b/fabric-transfer-api-v1/src/client/java/net/fabricmc/fabric/api/transfer/v1/client/fluid/FluidVariantRendering.java index 90ab41edd..1ffd1a1bb 100644 --- a/fabric-transfer-api-v1/src/client/java/net/fabricmc/fabric/api/transfer/v1/client/fluid/FluidVariantRendering.java +++ b/fabric-transfer-api-v1/src/client/java/net/fabricmc/fabric/api/transfer/v1/client/fluid/FluidVariantRendering.java @@ -23,9 +23,9 @@ import java.util.Objects; import org.jetbrains.annotations.Nullable; import net.minecraft.client.MinecraftClient; -import net.minecraft.client.item.TooltipType; import net.minecraft.client.texture.Sprite; import net.minecraft.fluid.Fluid; +import net.minecraft.item.tooltip.TooltipType; import net.minecraft.registry.Registries; import net.minecraft.text.Text; import net.minecraft.util.Formatting; diff --git a/fabric-transfer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/transfer/ingame/client/FluidVariantRenderTest.java b/fabric-transfer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/transfer/ingame/client/FluidVariantRenderTest.java index 65eb47418..f34eb115a 100644 --- a/fabric-transfer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/transfer/ingame/client/FluidVariantRenderTest.java +++ b/fabric-transfer-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/transfer/ingame/client/FluidVariantRenderTest.java @@ -94,7 +94,7 @@ public class FluidVariantRenderTest implements ClientModInitializer { RenderSystem.disableDepthTest(); RenderSystem.setShader(GameRenderer::getPositionTexColorProgram); - BufferBuilder bufferBuilder = Tessellator.getInstance().method_60827(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE_COLOR); + BufferBuilder bufferBuilder = Tessellator.getInstance().begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE_COLOR); float x0 = (float) i; float y0 = (float) j; float x1 = x0 + 16; @@ -109,7 +109,7 @@ public class FluidVariantRenderTest implements ClientModInitializer { bufferBuilder.vertex(model, x1, y1, z).color(r, g, b, 1).texture(u1, v1); bufferBuilder.vertex(model, x1, y0, z).color(r, g, b, 1).texture(u1, v0); bufferBuilder.vertex(model, x0, y0, z).color(r, g, b, 1).texture(u0, v0); - BufferRenderer.drawWithGlobalProgram(bufferBuilder.method_60800()); + BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); RenderSystem.enableDepthTest(); } diff --git a/gradle.properties b/gradle.properties index af9bb44b2..af6361715 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,9 +2,9 @@ org.gradle.jvmargs=-Xmx2560M org.gradle.parallel=true fabric.loom.multiProjectOptimisation=true -version=0.99.1 -minecraft_version=24w21b -yarn_version=+build.3 +version=0.99.2 +minecraft_version=1.21-pre1 +yarn_version=+build.2 loader_version=0.15.11 installer_version=1.0.1 @@ -13,50 +13,49 @@ curseforge_minecraft_version=1.21-Snapshot # Do not manually update, use the bumpversions task: fabric-api-base-version=0.4.42 -fabric-api-lookup-api-v1-version=1.6.63 -fabric-biome-api-v1-version=13.0.27 +fabric-api-lookup-api-v1-version=1.6.64 +fabric-biome-api-v1-version=13.0.28 fabric-block-api-v1-version=1.0.22 fabric-block-view-api-v2-version=1.0.10 fabric-blockrenderlayer-v1-version=1.1.52 -fabric-command-api-v1-version=1.2.47 -fabric-command-api-v2-version=2.2.26 -fabric-commands-v0-version=0.2.64 -fabric-content-registries-v0-version=8.0.9 +fabric-command-api-v1-version=1.2.48 +fabric-command-api-v2-version=2.2.27 +fabric-commands-v0-version=0.2.65 +fabric-content-registries-v0-version=8.0.10 fabric-crash-report-info-v1-version=0.2.29 -fabric-data-attachment-api-v1-version=1.1.20 -fabric-data-generation-api-v1-version=20.2.1 -fabric-dimensions-v1-version=3.0.1 -fabric-entity-events-v1-version=1.6.11 +fabric-data-attachment-api-v1-version=1.1.21 +fabric-data-generation-api-v1-version=20.2.2 +fabric-dimensions-v1-version=4.0.0 +fabric-entity-events-v1-version=1.6.12 fabric-events-interaction-v0-version=0.7.10 fabric-game-rule-api-v1-version=1.0.52 -fabric-gametest-api-v1-version=1.3.20 -fabric-item-api-v1-version=10.0.0 -fabric-item-group-api-v1-version=4.0.42 +fabric-gametest-api-v1-version=2.0.0 +fabric-item-api-v1-version=10.0.1 +fabric-item-group-api-v1-version=4.0.43 fabric-key-binding-api-v1-version=1.0.47 fabric-keybindings-v0-version=0.2.45 fabric-lifecycle-events-v1-version=2.3.8 -fabric-loot-api-v2-version=3.0.8 +fabric-loot-api-v2-version=3.0.9 fabric-message-api-v1-version=6.0.13 fabric-model-loading-api-v1-version=1.0.14 -fabric-models-v0-version=0.4.13 -fabric-networking-api-v1-version=4.0.11 -fabric-object-builder-api-v1-version=15.1.8 +fabric-networking-api-v1-version=4.0.12 +fabric-object-builder-api-v1-version=15.1.9 fabric-particles-v1-version=4.0.2 -fabric-recipe-api-v1-version=5.0.6 -fabric-registry-sync-v0-version=5.0.19 -fabric-renderer-api-v1-version=3.2.14 -fabric-renderer-indigo-version=1.6.0 -fabric-renderer-registries-v1-version=3.2.64 +fabric-recipe-api-v1-version=5.0.7 +fabric-registry-sync-v0-version=5.0.20 +fabric-renderer-api-v1-version=3.2.15 +fabric-renderer-indigo-version=1.6.1 +fabric-renderer-registries-v1-version=3.2.65 fabric-rendering-data-attachment-v1-version=0.3.48 -fabric-rendering-fluids-v1-version=3.1.5 -fabric-rendering-v0-version=1.1.67 -fabric-rendering-v1-version=5.0.1 +fabric-rendering-fluids-v1-version=3.1.6 +fabric-rendering-v0-version=1.1.68 +fabric-rendering-v1-version=5.0.2 fabric-resource-conditions-api-v1-version=4.2.1 -fabric-resource-loader-v0-version=1.1.2 -fabric-screen-api-v1-version=2.0.23 -fabric-screen-handler-api-v1-version=1.3.76 +fabric-resource-loader-v0-version=1.1.3 +fabric-screen-api-v1-version=2.0.24 +fabric-screen-handler-api-v1-version=1.3.77 fabric-sound-api-v1-version=1.0.23 -fabric-transfer-api-v1-version=5.1.10 +fabric-transfer-api-v1-version=5.1.11 fabric-transitive-access-wideners-v1-version=6.0.12 fabric-convention-tags-v1-version=2.0.8 fabric-convention-tags-v2-version=2.1.3 diff --git a/settings.gradle b/settings.gradle index 1b56283ec..f31c6d62b 100644 --- a/settings.gradle +++ b/settings.gradle @@ -39,7 +39,7 @@ include 'fabric-key-binding-api-v1' include 'fabric-lifecycle-events-v1' include 'fabric-loot-api-v2' include 'fabric-message-api-v1' -include 'fabric-model-loading-api-v1' +//include 'fabric-model-loading-api-v1' TODO 1.21 include 'fabric-networking-api-v1' include 'fabric-object-builder-api-v1' include 'fabric-particles-v1' @@ -62,7 +62,6 @@ include 'deprecated:fabric-command-api-v1' include 'deprecated:fabric-commands-v0' include 'deprecated:fabric-convention-tags-v1' include 'deprecated:fabric-keybindings-v0' -include 'deprecated:fabric-models-v0' include 'deprecated:fabric-renderer-registries-v1' include 'deprecated:fabric-rendering-data-attachment-v1' include 'deprecated:fabric-rendering-v0'