From b494ebebbb7ad6f39ddaff1ba06994fd27575597 Mon Sep 17 00:00:00 2001 From: svipthedrunk Date: Tue, 25 Jun 2019 22:49:23 +0200 Subject: [PATCH 1/4] Fixed most of the javadoc comments and removed unused imports Mostly replaced instances of > with its correct html representation ">" Changed or removed some bad @link entries, mostly stuff due to overseen code changes Could not find the referenced class VertexEditor at all, removed these references out of the docs Some errors still exists due to referenced objects not in the classpath at the time the javadoc is build Proposal do some gradle magic --- .../fabricmc/fabric/api/event/EventFactory.java | 2 +- .../MixinCommandManagerIntegrated.java | 3 --- .../api/client/screen/ScreenProviderRegistry.java | 6 +++--- .../fabric/api/container/ContainerFactory.java | 2 +- .../api/container/ContainerProviderRegistry.java | 2 +- .../fabric/api/registry/LootEntryTypeRegistry.java | 2 +- .../fabric/api/loot/v1/LootJsonParser.java | 13 ------------- .../fabric/mixin/loot/MixinLootManager.java | 1 - .../MixinClientPlayNetworkHandler.java | 1 - .../api/event/network/C2SPacketTypeCallback.java | 2 +- .../api/event/network/S2CPacketTypeCallback.java | 2 +- .../api/network/ClientSidePacketRegistry.java | 4 ++-- .../api/network/ServerSidePacketRegistry.java | 4 ++-- .../impl/network/ClientSidePacketRegistryImpl.java | 1 - .../impl/network/ServerSidePacketRegistryImpl.java | 2 -- .../network/MixinClientPlayNetworkHandler.java | 1 - .../fabric/mixin/network/MixinMinecraftClient.java | 2 -- .../fabric/mixin/network/MixinPlayerManager.java | 1 - .../network/MixinServerPlayNetworkHandler.java | 2 -- .../fabric/api/entity/EntityTrackingRegistry.java | 2 +- .../fabric/api/entity/FabricEntityTypeBuilder.java | 2 +- .../fabric/impl/registry/RegistrySyncManager.java | 1 - .../fabric/impl/registry/RemappableRegistry.java | 2 +- .../fabric/mixin/registry/MixinBootstrap.java | 2 -- .../fabric/mixin/registry/MixinIdList.java | 2 -- .../fabric/mixin/registry/MixinPlayerManager.java | 2 -- .../api/renderer/v1/material/MaterialFinder.java | 2 +- .../api/renderer/v1/material/RenderMaterial.java | 2 +- .../fabricmc/fabric/api/renderer/v1/mesh/Mesh.java | 2 +- .../api/renderer/v1/mesh/MutableQuadView.java | 12 ++++++------ .../fabric/api/renderer/v1/mesh/QuadEmitter.java | 2 +- .../fabric/api/renderer/v1/mesh/QuadView.java | 14 ++++++-------- .../api/renderer/v1/model/FabricBakedModel.java | 14 +++++++------- .../fabric/api/renderer/v1/model/ModelHelper.java | 2 +- .../api/renderer/v1/render/RenderContext.java | 2 +- .../helper/BufferBuilderTransformHelper.java | 4 ---- .../indigo/renderer/helper/ColorHelper.java | 4 ++-- .../indigo/renderer/mesh/EncodingFormat.java | 2 +- .../indigo/renderer/mesh/MeshBuilderImpl.java | 2 +- .../indigo/renderer/mixin/MixinBufferBuilder.java | 1 - .../renderer/render/TerrainRenderContext.java | 1 - .../rendering/data/v1/RenderAttachedBlockView.java | 7 ++++--- .../fabricmc/fabric/mixin/tag/MixinTagBuilder.java | 3 --- .../event/client/ClientSpriteRegistryCallback.java | 1 - .../texture/SpriteRegistryCallbackHolder.java | 1 - .../client/texture/MixinSpriteAtlasTexture.java | 4 ---- 46 files changed, 49 insertions(+), 99 deletions(-) diff --git a/fabric-api-base/src/main/java/net/fabricmc/fabric/api/event/EventFactory.java b/fabric-api-base/src/main/java/net/fabricmc/fabric/api/event/EventFactory.java index 9213360a5..ebd067a2a 100644 --- a/fabric-api-base/src/main/java/net/fabricmc/fabric/api/event/EventFactory.java +++ b/fabric-api-base/src/main/java/net/fabricmc/fabric/api/event/EventFactory.java @@ -62,7 +62,7 @@ public final class EventFactory { /** * Create an "array-backed" Event instance with a custom empty invoker. *

- * Having a custom empty invoker (of type (...) -> {}) increases performance + * Having a custom empty invoker (of type (...) -> {}) increases performance * relative to iterating over an empty array; however, it only really matters * if the event is executed thousands of times a second. * diff --git a/fabric-commands-v0/src/main/java/net/fabricmc/fabric/mixin/registrycommands/MixinCommandManagerIntegrated.java b/fabric-commands-v0/src/main/java/net/fabricmc/fabric/mixin/registrycommands/MixinCommandManagerIntegrated.java index 889c07c69..1aaab1767 100644 --- a/fabric-commands-v0/src/main/java/net/fabricmc/fabric/mixin/registrycommands/MixinCommandManagerIntegrated.java +++ b/fabric-commands-v0/src/main/java/net/fabricmc/fabric/mixin/registrycommands/MixinCommandManagerIntegrated.java @@ -20,11 +20,8 @@ import com.mojang.brigadier.CommandDispatcher; import net.fabricmc.fabric.impl.registry.CommandRegistryImpl; import net.minecraft.server.command.CommandManager; import net.minecraft.server.command.ServerCommandSource; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; diff --git a/fabric-containers-v0/src/main/java/net/fabricmc/fabric/api/client/screen/ScreenProviderRegistry.java b/fabric-containers-v0/src/main/java/net/fabricmc/fabric/api/client/screen/ScreenProviderRegistry.java index e2bd83eb8..14799a37e 100644 --- a/fabric-containers-v0/src/main/java/net/fabricmc/fabric/api/client/screen/ScreenProviderRegistry.java +++ b/fabric-containers-v0/src/main/java/net/fabricmc/fabric/api/client/screen/ScreenProviderRegistry.java @@ -28,7 +28,7 @@ public interface ScreenProviderRegistry { ScreenProviderRegistry INSTANCE = ScreenProviderRegistryImpl.INSTANCE; /** - * Register a "Container -> ContainerScreen" factory. This is used only on the client side. + * Register a "Container -> ContainerScreen" factory. This is used only on the client side. * * @param identifier a shared identifier, this identifier should also be used to register a container using {@link ContainerProviderRegistry} * @param containerScreenFactory the supplier that should be used to create the new gui @@ -36,8 +36,8 @@ public interface ScreenProviderRegistry { void registerFactory(Identifier identifier, ContainerScreenFactory containerScreenFactory); /** - * Register a "packet -> ContainerScreen" factory. This is used only on the client side, and allows you - * to override the default behaviour of re-using the existing "packet -> Container" logic. + * Register a "packet -> ContainerScreen" factory. This is used only on the client side, and allows you + * to override the default behaviour of re-using the existing "packet -> Container" logic. * * @param identifier a shared identifier, this identifier should also be used to register a container using {@link ContainerProviderRegistry} * @param factory the gui factory, this should return a new {@link AbstractContainerScreen} diff --git a/fabric-containers-v0/src/main/java/net/fabricmc/fabric/api/container/ContainerFactory.java b/fabric-containers-v0/src/main/java/net/fabricmc/fabric/api/container/ContainerFactory.java index 61562d3a0..df1a059d7 100644 --- a/fabric-containers-v0/src/main/java/net/fabricmc/fabric/api/container/ContainerFactory.java +++ b/fabric-containers-v0/src/main/java/net/fabricmc/fabric/api/container/ContainerFactory.java @@ -29,7 +29,7 @@ public interface ContainerFactory { * @param syncId The container synchronization ID. * @param identifier the Identifier is the name that was used when registering the factory * @param player the player that is opening the gui/container - * @param buf the buffer contains the same data that was provided with {@Link ContainerProviderRegistry.openContainer} + * @param buf the buffer contains the same data that was provided with {@link net.fabricmc.fabric.api.container.ContainerProviderRegistry#openContainer} * @return the new gui or container */ T create(int syncId, Identifier identifier, PlayerEntity player, PacketByteBuf buf); diff --git a/fabric-containers-v0/src/main/java/net/fabricmc/fabric/api/container/ContainerProviderRegistry.java b/fabric-containers-v0/src/main/java/net/fabricmc/fabric/api/container/ContainerProviderRegistry.java index ae6d05b8b..32e29b675 100644 --- a/fabric-containers-v0/src/main/java/net/fabricmc/fabric/api/container/ContainerProviderRegistry.java +++ b/fabric-containers-v0/src/main/java/net/fabricmc/fabric/api/container/ContainerProviderRegistry.java @@ -31,7 +31,7 @@ public interface ContainerProviderRegistry { ContainerProviderRegistry INSTANCE = ContainerProviderImpl.INSTANCE; /** - * Register a "packet buffer -> container" factory. This is used both on the client and server side. + * Register a "packet buffer -> container" factory. This is used both on the client and server side. * * @param identifier a shared identifier, this identifier should also be used to register a container using {@link ScreenProviderRegistry} * @param factory the ContainerFactory that should return a new {@link Container} diff --git a/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/LootEntryTypeRegistry.java b/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/LootEntryTypeRegistry.java index 197579113..162a75208 100644 --- a/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/LootEntryTypeRegistry.java +++ b/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/LootEntryTypeRegistry.java @@ -17,8 +17,8 @@ package net.fabricmc.fabric.api.registry; import net.fabricmc.fabric.impl.registry.LootEntryTypeRegistryImpl; -import net.minecraft.world.loot.entry.LootEntry; +import net.minecraft.world.loot.entry.LootEntry; /** * @deprecated Use {@link net.fabricmc.fabric.api.loot.v1.LootEntryTypeRegistry} */ diff --git a/fabric-loot-tables-v1/src/main/java/net/fabricmc/fabric/api/loot/v1/LootJsonParser.java b/fabric-loot-tables-v1/src/main/java/net/fabricmc/fabric/api/loot/v1/LootJsonParser.java index 306c2fb48..2048e9d2d 100644 --- a/fabric-loot-tables-v1/src/main/java/net/fabricmc/fabric/api/loot/v1/LootJsonParser.java +++ b/fabric-loot-tables-v1/src/main/java/net/fabricmc/fabric/api/loot/v1/LootJsonParser.java @@ -17,24 +17,11 @@ package net.fabricmc.fabric.api.loot.v1; import com.google.gson.Gson; -import net.minecraft.resource.Resource; -import net.minecraft.resource.ResourceManager; -import net.minecraft.util.Identifier; import net.minecraft.util.JsonHelper; import net.minecraft.util.Lazy; import net.minecraft.world.loot.*; -import net.minecraft.world.loot.condition.LootCondition; -import net.minecraft.world.loot.entry.LootEntry; -import net.minecraft.world.loot.function.LootFunction; -import org.apache.commons.io.IOUtils; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; import java.io.Reader; import java.lang.reflect.Field; -import java.nio.charset.StandardCharsets; -import java.util.Optional; import java.util.stream.Stream; public final class LootJsonParser { diff --git a/fabric-loot-tables-v1/src/main/java/net/fabricmc/fabric/mixin/loot/MixinLootManager.java b/fabric-loot-tables-v1/src/main/java/net/fabricmc/fabric/mixin/loot/MixinLootManager.java index fffc6fdf8..c619fdbe3 100644 --- a/fabric-loot-tables-v1/src/main/java/net/fabricmc/fabric/mixin/loot/MixinLootManager.java +++ b/fabric-loot-tables-v1/src/main/java/net/fabricmc/fabric/mixin/loot/MixinLootManager.java @@ -25,7 +25,6 @@ import net.minecraft.util.Identifier; import net.minecraft.util.profiler.Profiler; import net.minecraft.world.loot.LootManager; import net.minecraft.world.loot.LootSupplier; -import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; diff --git a/fabric-networking-blockentity-v0/src/main/java/net/fabricmc/fabric/mixin/networkingblockentity/MixinClientPlayNetworkHandler.java b/fabric-networking-blockentity-v0/src/main/java/net/fabricmc/fabric/mixin/networkingblockentity/MixinClientPlayNetworkHandler.java index 36f3fa977..6ca35c46a 100644 --- a/fabric-networking-blockentity-v0/src/main/java/net/fabricmc/fabric/mixin/networkingblockentity/MixinClientPlayNetworkHandler.java +++ b/fabric-networking-blockentity-v0/src/main/java/net/fabricmc/fabric/mixin/networkingblockentity/MixinClientPlayNetworkHandler.java @@ -26,7 +26,6 @@ import net.minecraft.util.Identifier; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; diff --git a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/api/event/network/C2SPacketTypeCallback.java b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/api/event/network/C2SPacketTypeCallback.java index c730c528f..138060f5c 100644 --- a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/api/event/network/C2SPacketTypeCallback.java +++ b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/api/event/network/C2SPacketTypeCallback.java @@ -26,7 +26,7 @@ import java.util.Collection; /** * Event for listening to packet type registrations and unregistrations * (also known as "minecraft:register" and "minecraft:unregister") - * in the client -> server direction. + * in the client -> server direction. */ public interface C2SPacketTypeCallback { static final Event REGISTERED = EventFactory.createArrayBacked( diff --git a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/api/event/network/S2CPacketTypeCallback.java b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/api/event/network/S2CPacketTypeCallback.java index 44f8911c6..13b10c952 100644 --- a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/api/event/network/S2CPacketTypeCallback.java +++ b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/api/event/network/S2CPacketTypeCallback.java @@ -25,7 +25,7 @@ import java.util.Collection; /** * Event for listening to packet type registrations and unregistrations * (also known as "minecraft:register" and "minecraft:unregister") - * in the server -> client direction. + * in the server -> client direction. */ public interface S2CPacketTypeCallback { static final Event REGISTERED = EventFactory.createArrayBacked( diff --git a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/api/network/ClientSidePacketRegistry.java b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/api/network/ClientSidePacketRegistry.java index 902430d58..b2ee5c1e5 100644 --- a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/api/network/ClientSidePacketRegistry.java +++ b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/api/network/ClientSidePacketRegistry.java @@ -28,8 +28,8 @@ import net.minecraft.util.PacketByteBuf; *

* It is used for: *

- * - registering client-side packet receivers (server -> client packets) - * - sending packets to the server (client -> server packets). + * - registering client-side packet receivers (server -> client packets) + * - sending packets to the server (client -> server packets). */ public interface ClientSidePacketRegistry extends PacketRegistry { static final ClientSidePacketRegistry INSTANCE = new ClientSidePacketRegistryImpl(); diff --git a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/api/network/ServerSidePacketRegistry.java b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/api/network/ServerSidePacketRegistry.java index ce347477b..b26dd2614 100644 --- a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/api/network/ServerSidePacketRegistry.java +++ b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/api/network/ServerSidePacketRegistry.java @@ -30,8 +30,8 @@ import net.minecraft.util.PacketByteBuf; *

* It is used for: *

- * - registering server-side packet receivers (client -> server packets) - * - sending packets to clients (server -> client packets). + * - registering server-side packet receivers (client -> server packets) + * - sending packets to clients (server -> client packets). *

* For iterating over clients in a server, see {@link PlayerStream}. */ diff --git a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/impl/network/ClientSidePacketRegistryImpl.java b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/impl/network/ClientSidePacketRegistryImpl.java index 7c15d389b..140625e5a 100644 --- a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/impl/network/ClientSidePacketRegistryImpl.java +++ b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/impl/network/ClientSidePacketRegistryImpl.java @@ -23,7 +23,6 @@ import net.fabricmc.fabric.api.network.ClientSidePacketRegistry; import net.fabricmc.fabric.api.network.PacketContext; import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientPlayNetworkHandler; -import net.minecraft.client.network.packet.CustomPayloadS2CPacket; import net.minecraft.network.Packet; import net.minecraft.server.network.packet.CustomPayloadC2SPacket; import net.minecraft.util.Identifier; diff --git a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/impl/network/ServerSidePacketRegistryImpl.java b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/impl/network/ServerSidePacketRegistryImpl.java index ac59846c9..5492cb1f6 100644 --- a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/impl/network/ServerSidePacketRegistryImpl.java +++ b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/impl/network/ServerSidePacketRegistryImpl.java @@ -24,10 +24,8 @@ import net.fabricmc.fabric.api.network.ServerSidePacketRegistry; import net.minecraft.client.network.packet.CustomPayloadS2CPacket; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.network.Packet; -import net.minecraft.server.MinecraftServer; import net.minecraft.server.network.ServerPlayNetworkHandler; import net.minecraft.server.network.ServerPlayerEntity; -import net.minecraft.server.network.packet.CustomPayloadC2SPacket; import net.minecraft.server.network.packet.LoginQueryResponseC2SPacket; import net.minecraft.util.Identifier; import net.minecraft.util.PacketByteBuf; diff --git a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/mixin/network/MixinClientPlayNetworkHandler.java b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/mixin/network/MixinClientPlayNetworkHandler.java index ecb71a72a..00c72c2b8 100644 --- a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/mixin/network/MixinClientPlayNetworkHandler.java +++ b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/mixin/network/MixinClientPlayNetworkHandler.java @@ -20,7 +20,6 @@ import net.fabricmc.api.EnvType; import net.fabricmc.fabric.api.network.ClientSidePacketRegistry; import net.fabricmc.fabric.api.network.PacketContext; import net.fabricmc.fabric.impl.network.ClientSidePacketRegistryImpl; -import net.fabricmc.fabric.impl.network.PacketDebugOptions; import net.fabricmc.fabric.impl.network.PacketRegistryImpl; import net.fabricmc.fabric.impl.network.PacketTypes; import net.minecraft.client.MinecraftClient; diff --git a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/mixin/network/MixinMinecraftClient.java b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/mixin/network/MixinMinecraftClient.java index 3abbc8ea4..9edd9a867 100644 --- a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/mixin/network/MixinMinecraftClient.java +++ b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/mixin/network/MixinMinecraftClient.java @@ -19,9 +19,7 @@ package net.fabricmc.fabric.mixin.network; import net.fabricmc.fabric.impl.network.ClientSidePacketRegistryImpl; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.Screen; -import org.apache.logging.log4j.Logger; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; diff --git a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/mixin/network/MixinPlayerManager.java b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/mixin/network/MixinPlayerManager.java index 60c36e635..417db1a39 100644 --- a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/mixin/network/MixinPlayerManager.java +++ b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/mixin/network/MixinPlayerManager.java @@ -16,7 +16,6 @@ package net.fabricmc.fabric.mixin.network; -import net.fabricmc.fabric.api.network.PacketRegistry; import net.fabricmc.fabric.api.network.ServerSidePacketRegistry; import net.fabricmc.fabric.impl.network.PacketRegistryImpl; import net.fabricmc.fabric.impl.network.ServerSidePacketRegistryImpl; diff --git a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/mixin/network/MixinServerPlayNetworkHandler.java b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/mixin/network/MixinServerPlayNetworkHandler.java index 255036499..3286badfe 100644 --- a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/mixin/network/MixinServerPlayNetworkHandler.java +++ b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/mixin/network/MixinServerPlayNetworkHandler.java @@ -20,7 +20,6 @@ import net.fabricmc.api.EnvType; import net.fabricmc.fabric.api.network.PacketContext; import net.fabricmc.fabric.api.network.ServerSidePacketRegistry; import net.fabricmc.fabric.impl.network.CustomPayloadC2SPacketAccessor; -import net.fabricmc.fabric.impl.network.PacketDebugOptions; import net.fabricmc.fabric.impl.network.ServerSidePacketRegistryImpl; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.server.MinecraftServer; @@ -28,7 +27,6 @@ import net.minecraft.server.network.ServerPlayNetworkHandler; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.network.packet.CustomPayloadC2SPacket; import net.minecraft.util.Identifier; -import net.minecraft.util.PacketByteBuf; import net.minecraft.util.ThreadExecutor; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; diff --git a/fabric-object-builders-v0/src/main/java/net/fabricmc/fabric/api/entity/EntityTrackingRegistry.java b/fabric-object-builders-v0/src/main/java/net/fabricmc/fabric/api/entity/EntityTrackingRegistry.java index 77cebdeca..4a4c6a167 100644 --- a/fabric-object-builders-v0/src/main/java/net/fabricmc/fabric/api/entity/EntityTrackingRegistry.java +++ b/fabric-object-builders-v0/src/main/java/net/fabricmc/fabric/api/entity/EntityTrackingRegistry.java @@ -25,7 +25,7 @@ import java.util.HashMap; import java.util.Map; /** - * Registry for server->client entity tracking values. + * Registry for server->client entity tracking values. * * @deprecated Use FabricEntityTypeBuilder methods */ diff --git a/fabric-object-builders-v0/src/main/java/net/fabricmc/fabric/api/entity/FabricEntityTypeBuilder.java b/fabric-object-builders-v0/src/main/java/net/fabricmc/fabric/api/entity/FabricEntityTypeBuilder.java index 26d4daa81..9cce3e5a8 100644 --- a/fabric-object-builders-v0/src/main/java/net/fabricmc/fabric/api/entity/FabricEntityTypeBuilder.java +++ b/fabric-object-builders-v0/src/main/java/net/fabricmc/fabric/api/entity/FabricEntityTypeBuilder.java @@ -29,7 +29,7 @@ import java.util.function.Function; /** * Extended version of {@link EntityType.Builder} with added registration for - * server->client entity tracking values. + * server->client entity tracking values. * * @param Entity class. */ diff --git a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/RegistrySyncManager.java b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/RegistrySyncManager.java index f5740365a..ab27fac98 100644 --- a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/RegistrySyncManager.java +++ b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/RegistrySyncManager.java @@ -32,7 +32,6 @@ import net.minecraft.util.Identifier; import net.minecraft.util.PacketByteBuf; import net.minecraft.util.registry.MutableRegistry; import net.minecraft.util.registry.Registry; -import net.minecraft.util.registry.SimpleRegistry; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/RemappableRegistry.java b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/RemappableRegistry.java index 196761336..18448e9e7 100644 --- a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/RemappableRegistry.java +++ b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/RemappableRegistry.java @@ -25,7 +25,7 @@ public interface RemappableRegistry { */ enum RemapMode { /** - * Any differences (local->remote, remote->local) are allowed. This should + * Any differences (local->remote, remote->local) are allowed. This should * be used when a side is authoritative (f.e. loading a world on the server). */ AUTHORITATIVE, diff --git a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/MixinBootstrap.java b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/MixinBootstrap.java index c51f4ddeb..5cad09f6c 100644 --- a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/MixinBootstrap.java +++ b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/MixinBootstrap.java @@ -16,14 +16,12 @@ package net.fabricmc.fabric.mixin.registry; -import net.fabricmc.fabric.impl.registry.ListenableRegistry; import net.fabricmc.fabric.impl.registry.trackers.*; import net.fabricmc.fabric.impl.registry.trackers.vanilla.BiomeParentTracker; import net.fabricmc.fabric.impl.registry.trackers.vanilla.BlockInitTracker; import net.fabricmc.fabric.impl.registry.trackers.vanilla.BlockItemTracker; import net.minecraft.Bootstrap; import net.minecraft.block.Block; -import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.fluid.Fluid; import net.minecraft.fluid.Fluids; diff --git a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/MixinIdList.java b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/MixinIdList.java index f52b57c26..1ef43a18c 100644 --- a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/MixinIdList.java +++ b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/MixinIdList.java @@ -25,10 +25,8 @@ import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Unique; import java.util.ArrayList; -import java.util.HashSet; import java.util.IdentityHashMap; import java.util.List; -import java.util.Set; @Mixin(IdList.class) public class MixinIdList implements RemovableIdList { diff --git a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/MixinPlayerManager.java b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/MixinPlayerManager.java index 7583431ff..5d6a1e6b1 100644 --- a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/MixinPlayerManager.java +++ b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/MixinPlayerManager.java @@ -16,8 +16,6 @@ package net.fabricmc.fabric.mixin.registry; -import net.fabricmc.fabric.api.network.ServerSidePacketRegistry; -import net.fabricmc.fabric.impl.network.PacketRegistryImpl; import net.fabricmc.fabric.impl.registry.RegistrySyncManager; import net.minecraft.network.ClientConnection; import net.minecraft.server.PlayerManager; diff --git a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/material/MaterialFinder.java b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/material/MaterialFinder.java index ad8355111..dbfd36d13 100644 --- a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/material/MaterialFinder.java +++ b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/material/MaterialFinder.java @@ -48,7 +48,7 @@ public interface MaterialFinder { /** * - * Reserved for future use. Behavior for values > 1 is currently undefined. + * Reserved for future use. Behavior for values > 1 is currently undefined. */ MaterialFinder spriteDepth(int depth); diff --git a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/material/RenderMaterial.java b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/material/RenderMaterial.java index 5c690b358..5748a4a4a 100644 --- a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/material/RenderMaterial.java +++ b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/material/RenderMaterial.java @@ -75,7 +75,7 @@ public interface RenderMaterial { /** * How many sprite color/uv coordinates are in the material. - * Behavior for values > 1 is currently undefined. + * Behavior for values > 1 is currently undefined. * See {@link MaterialFinder#spriteDepth(int)} */ int spriteDepth(); diff --git a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/Mesh.java b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/Mesh.java index c598bf4ac..33fa9bfba 100644 --- a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/Mesh.java +++ b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/Mesh.java @@ -24,7 +24,7 @@ import net.fabricmc.fabric.api.renderer.v1.Renderer; * A bundle of one or more {@link QuadView} instances encoded by the renderer, * typically via {@link Renderer#meshBuilder()}.

* - * Similar in purpose to the List instances returned by BakedModel, but + * Similar in purpose to the {@code List} instances returned by BakedModel, but * affords the renderer the ability to optimize the format for performance * and memory allocation.

* diff --git a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/MutableQuadView.java b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/MutableQuadView.java index 4447fe18e..ab8d4faf0 100644 --- a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/MutableQuadView.java +++ b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/MutableQuadView.java @@ -162,7 +162,7 @@ public interface MutableQuadView extends QuadView { MutableQuadView pos(int vertexIndex, float x, float y, float z); /** - * Same as {@link #pos(float, float, float)} but accepts vector type. + * Same as {@link #pos(int, float, float, float)} but accepts vector type. */ default MutableQuadView pos(int vertexIndex, Vector3f vec) { return pos(vertexIndex, vec.x(), vec.y(), vec.z()); @@ -180,7 +180,7 @@ public interface MutableQuadView extends QuadView { MutableQuadView normal(int vertexIndex, float x, float y, float z); /** - * Same as {@link #normal(float, float, float, extra)} but accepts vector type. + * Same as {@link #normal(int, float, float, float)} but accepts vector type. */ default MutableQuadView normal(int vertexIndex, Vector3f vec) { return normal(vertexIndex, vec.x(), vec.y(), vec.z()); @@ -210,12 +210,12 @@ public interface MutableQuadView extends QuadView { } /** - * Set sprite color. Behavior for spriteIndex values > 0 is currently undefined. + * Set sprite color. Behavior for {@code spriteIndex > 0} is currently undefined. */ MutableQuadView spriteColor(int vertexIndex, int spriteIndex, int color); /** - * Convenience: set sprite color for all vertices at once. Behavior for spriteIndex values > 0 is currently undefined. + * Convenience: set sprite color for all vertices at once. Behavior for {@code spriteIndex > 0} is currently undefined. */ default MutableQuadView spriteColor(int spriteIndex, int c0, int c1, int c2, int c3) { spriteColor(0, spriteIndex, c0); @@ -226,7 +226,7 @@ public interface MutableQuadView extends QuadView { } /** - * Set sprite atlas coordinates. Behavior for spriteIndex values > 0 is currently undefined. + * Set sprite atlas coordinates. Behavior for {@code spriteIndex > 0} is currently undefined. */ MutableQuadView sprite(int vertexIndex, int spriteIndex, float u, float v); @@ -234,7 +234,7 @@ public interface MutableQuadView extends QuadView { * Assigns sprite atlas u,v coordinates to this quad for the given sprite. * Can handle UV locking, rotation, interpolation, etc. Control this behavior * by passing additive combinations of the BAKE_ flags defined in this interface. - * Behavior for spriteIndex values > 0 is currently undefined. + * Behavior for {@code spriteIndex > 0} is currently undefined. */ MutableQuadView spriteBake(int spriteIndex, Sprite sprite, int bakeFlags); } diff --git a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadEmitter.java b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadEmitter.java index b9a79af42..eb822eae5 100644 --- a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadEmitter.java +++ b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadEmitter.java @@ -26,7 +26,7 @@ import net.minecraft.util.math.Direction; * Specialized {@link MutableQuadView} obtained via {@link MeshBuilder#getEmitter()} * to append quads during mesh building.

* - * Also obtained from {@link RenderContext#getEmitter(RenderMaterial)} to submit + * Also obtained from {@link RenderContext#getEmitter()} to submit * dynamic quads one-by-one at render time.

* * Instances of {@link QuadEmitter} will practically always be diff --git a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadView.java b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadView.java index 903895e43..2d0c2869e 100644 --- a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadView.java +++ b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadView.java @@ -35,7 +35,7 @@ public interface QuadView { * vertex data in the given array and location.

* * @param spriteIndex The sprite to be used for the quad. - * Behavior for values > 0 is currently undefined. + * Behavior for values > 0 is currently undefined. * * @param target Target array for the baked quad data. * @@ -49,9 +49,9 @@ public interface QuadView { /** * Extracts all quad properties except material to the given {@link MutableQuadView} instance. - * Must be used before calling {@link MutableQuadView#emit()} on the target instance. + * Must be used before calling {link QuadEmitter#emit()} on the target instance. * Meant for re-texturing, analysis and static transformation use cases. - */ + */ void copyTo(MutableQuadView target); /** @@ -98,12 +98,12 @@ public interface QuadView { * Generates a new BakedQuad instance with texture * coordinates and colors from the given sprite.

* - * @param source Data previously packed by {@link MeshBuilder}. + * param source Data previously packed by {@link MeshBuilder}. * - * @param sourceIndex Index where packed data starts. + * param sourceIndex Index where packed data starts. * * @param spriteIndex The sprite to be used for the quad. - * Behavior for values > 0 is currently undefined. + * Behavior for {@code spriteIndex > 0} is currently undefined. * * @param sprite {@link MutableQuadView} does not serialize sprites * so the sprite must be provided by the caller. @@ -130,7 +130,6 @@ public interface QuadView { /** * Pass a non-null target to avoid allocation - will be returned with values. * Otherwise returns a new instance. - * See {@link VertexEditor#pos(float, float, float)} */ Vector3f copyPos(int vertexIndex, Vector3f target); @@ -157,7 +156,6 @@ public interface QuadView { /** * If false, no vertex normal was provided. * Lighting should use face normal in that case. - * See {@link VertexEditor#normal(float, float, float, float)} */ boolean hasNormal(int vertexIndex); diff --git a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/model/FabricBakedModel.java b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/model/FabricBakedModel.java index 042f7bfbb..3186b05e1 100644 --- a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/model/FabricBakedModel.java +++ b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/model/FabricBakedModel.java @@ -45,7 +45,7 @@ public interface FabricBakedModel { * Fabric overrides to true for vanilla baked models. * Enhanced models that use this API should return false, - * otherwise the API will not recognize the model.

+ * otherwise the API will not recognize the model.

*/ boolean isVanillaAdapter(); @@ -79,12 +79,12 @@ public interface FabricBakedModel { * parameter is normally initialized with the same seed prior to each face layer. * Model authors should note this method is called only once per block, and call the provided * Random supplier multiple times if re-seeding is necessary. For wrapped vanilla baked models, - * it will probably be easier to use {@link RenderContext#fallbackModelConsumer()} which handles + * it will probably be easier to use {@link RenderContext#fallbackConsumer} which handles * re-seeding per face automatically.

* - * @param Access to world state. Using {@link TerrainBlockView#getCachedRenderData(BlockPos)} to + * @param blockView Access to world state. Using {@link net.fabricmc.fabric.api.rendering.data.v1.RenderAttachedBlockView#getBlockEntityRenderAttachment(BlockPos)} to * retrieve block entity state unless thread safety can be guaranteed. - * @param safeBlockEntityAccessor Thread-safe access to block entity data + * param safeBlockEntityAccessor Thread-safe access to block entity data * @param state Block state for model being rendered. * @param pos Position of block for model being rendered. * @param randomSupplier Random object seeded per vanilla conventions. Call multiple times to re-seed. @@ -92,7 +92,7 @@ public interface FabricBakedModel { * @param context Accepts model output. */ void emitBlockQuads(ExtendedBlockView blockView, BlockState state, BlockPos pos, Supplier randomSupplier, RenderContext context); - + /** * This method will be called during item rendering to generate both the static and * dynamic portions of an item model when the model implements this interface and @@ -111,13 +111,13 @@ public interface FabricBakedModel { * * Implementing this method does NOT mitigate the need to implement a functional * {@link BakedModel#getItemPropertyOverrides()} method, because this method will be called - * on the result of {@link #getItemPropertyOverrides()}. However, that + * on the result of {@link BakedModel#getItemPropertyOverrides}. However, that * method can simply return the base model because the output from this method will * be used for rendering.

* * Renderer implementations should also use this method to obtain the quads used * for item enchantment glint rendering. This means models can put geometric variation - * logic here, instead of returning every possible shape from {@link #getItemPropertyOverrides()} + * logic here, instead of returning every possible shape from {@link BakedModel#getItemPropertyOverrides} * as vanilla baked models. */ void emitItemQuads(ItemStack stack, Supplier randomSupplier, RenderContext context); diff --git a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/model/ModelHelper.java b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/model/ModelHelper.java index 3434b57dc..cc768db85 100644 --- a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/model/ModelHelper.java +++ b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/model/ModelHelper.java @@ -51,7 +51,7 @@ public abstract class ModelHelper { * Use to decode a result from {@link #toFaceIndex(Direction)}. * Return value will be null if encoded value was null. * Can also be used for no-allocation iteration of {@link Direction#values()}, - * optionally including the null face. (Use < or <= {@link #NULL_FACE_ID} + * optionally including the null face. (Use < or <= {@link #NULL_FACE_ID} * to exclude or include the null value, respectively.) */ public static Direction faceFromIndex(int faceIndex) { diff --git a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/render/RenderContext.java b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/render/RenderContext.java index 9824d7907..9df463560 100644 --- a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/render/RenderContext.java +++ b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/render/RenderContext.java @@ -75,7 +75,7 @@ public interface RenderContext { void pushTransform(QuadTransform transform); /** - * Removes the transformation added by the last call to {@link #pushTransform(Consumer)}. + * Removes the transformation added by the last call to {@link #pushTransform(QuadTransform)}. * MUST be called before exiting from {@link FabricBakedModel} .emit... methods. */ void popTransform(); diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/BufferBuilderTransformHelper.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/BufferBuilderTransformHelper.java index 8102a77c4..7aff07785 100644 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/BufferBuilderTransformHelper.java +++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/BufferBuilderTransformHelper.java @@ -17,15 +17,11 @@ package net.fabricmc.indigo.renderer.helper; import com.google.common.collect.Sets; -import it.unimi.dsi.fastutil.objects.Object2IntMap; -import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; import net.minecraft.client.render.VertexFormat; -import net.minecraft.client.render.VertexFormatElement; import net.minecraft.client.render.VertexFormats; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/ColorHelper.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/ColorHelper.java index 5024a1b1d..e43228bd5 100644 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/ColorHelper.java +++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/ColorHelper.java @@ -82,7 +82,7 @@ public abstract class ColorHelper { } /** - * Same results as {@link BakedQuadFactory#method_3456()} + * Same results as {@link BakedQuadFactory#method_3456(Direction)} */ public static float diffuseShade(Direction direction) { return FACE_SHADE_FACTORS[direction.getId()]; @@ -110,7 +110,7 @@ public abstract class ColorHelper { /** * Returns {@link #diffuseShade(Direction)} if quad is aligned to light face, - * otherwise uses face normal and {@link #normalShade()} + * otherwise uses face normal and {@link #normalShade} */ public static float faceShade(ShadeableQuad quad) { return quad.isFaceAligned() ? diffuseShade(quad.lightFace()) : normalShade(quad.faceNormal()); diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mesh/EncodingFormat.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mesh/EncodingFormat.java index 3cbbf2c40..ab5365a4b 100644 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mesh/EncodingFormat.java +++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mesh/EncodingFormat.java @@ -42,7 +42,7 @@ public abstract class EncodingFormat { public static final int NORMALS_OFFSET_VANILLA = VANILLA_STRIDE; // normals are followed by 0-2 sets of color/uv coordinates static final int TEXTURE_STRIDE = 12; - /** is one tex stride less than the actual base, because when used tex index is >= 1 */ + /** is one tex stride less than the actual base, because when used tex index is >= 1 */ static final int TEXTURE_OFFSET_MINUS = NORMALS_OFFSET + NORMALS_STRIDE - TEXTURE_STRIDE; static final int SECOND_TEXTURE_OFFSET = NORMALS_OFFSET + NORMALS_STRIDE; static final int THIRD_TEXTURE_OFFSET = SECOND_TEXTURE_OFFSET + TEXTURE_STRIDE; diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mesh/MeshBuilderImpl.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mesh/MeshBuilderImpl.java index a3f8c82e4..12e926442 100644 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mesh/MeshBuilderImpl.java +++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mesh/MeshBuilderImpl.java @@ -25,7 +25,7 @@ import net.fabricmc.indigo.renderer.helper.GeometryHelper; /** * Our implementation of {@link MeshBuilder}, used for static mesh creation and baking. * Not much to it - mainly it just needs to grow the int[] array as quads are appended - * and maintain/provide a properly-configured {@link MutableQuadView} instance. + * and maintain/provide a properly-configured {@link net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView} instance. * All the encoding and other work is handled in the quad base classes. * The one interesting bit is in {@link Maker#emit()}. */ diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mixin/MixinBufferBuilder.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mixin/MixinBufferBuilder.java index cc25fd06d..464489c4d 100644 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mixin/MixinBufferBuilder.java +++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mixin/MixinBufferBuilder.java @@ -18,7 +18,6 @@ package net.fabricmc.indigo.renderer.mixin; import java.nio.IntBuffer; -import net.fabricmc.indigo.Indigo; import net.fabricmc.indigo.renderer.helper.BufferBuilderTransformHelper; import net.fabricmc.indigo.renderer.mesh.EncodingFormat; import net.minecraft.client.render.VertexFormat; diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/render/TerrainRenderContext.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/render/TerrainRenderContext.java index a71f3df3f..cac7789aa 100644 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/render/TerrainRenderContext.java +++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/render/TerrainRenderContext.java @@ -34,7 +34,6 @@ import net.minecraft.util.crash.CrashException; import net.minecraft.util.crash.CrashReport; import net.minecraft.util.crash.CrashReportSection; import net.minecraft.util.math.BlockPos; -import net.minecraft.world.ExtendedBlockView; /** * Implementation of {@link RenderContext} used during terrain rendering. diff --git a/fabric-rendering-data-attachment-v1/src/main/java/net/fabricmc/fabric/api/rendering/data/v1/RenderAttachedBlockView.java b/fabric-rendering-data-attachment-v1/src/main/java/net/fabricmc/fabric/api/rendering/data/v1/RenderAttachedBlockView.java index 70782da24..8aded15e9 100644 --- a/fabric-rendering-data-attachment-v1/src/main/java/net/fabricmc/fabric/api/rendering/data/v1/RenderAttachedBlockView.java +++ b/fabric-rendering-data-attachment-v1/src/main/java/net/fabricmc/fabric/api/rendering/data/v1/RenderAttachedBlockView.java @@ -21,7 +21,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.ExtendedBlockView; /** - * BlockView-extending interface to be used by {@link FabricBakedModel} for dynamic model + * BlockView-extending interface to be used by {@link net.fabricmc.fabric.api.renderer.v1.model.FabricBakedModel} for dynamic model * customization. It ensures thread safety and exploits data cached in render * chunks for performance and data consistency.

* @@ -29,7 +29,7 @@ import net.minecraft.world.ExtendedBlockView; * * BlockEntity implementations that provide data for model customization should implement * {@link RenderAttachmentBlockEntity} which will be queried on the main thread when a render - * chunk is enqueued for rebuild. The model should retrieve the results via {@link #getCachedRenderData()}. + * chunk is enqueued for rebuild. The model should retrieve the results via {@link #getBlockEntityRenderAttachment(BlockPos)}. * While {@link #getBlockEntity(net.minecraft.util.math.BlockPos)} is not disabled, it * is not thread-safe for use on render threads. Models that violate this guidance are * responsible for any necessary synchronization or collision detection.

@@ -37,7 +37,7 @@ import net.minecraft.world.ExtendedBlockView; * {@link #getBlockState(net.minecraft.util.math.BlockPos)} and {@link #getFluidState(net.minecraft.util.math.BlockPos)} * will always reflect the state cached with the render chunk. Block and fluid states * can thus be different from main-thread world state due to lag between block update - * application from network packets and render chunk rebuilds. Use of {@link #getCachedRenderData()} + * application from network packets and render chunk rebuilds. Use of {link #getCachedRenderData()} * will ensure consistency of model state with the rest of the chunk being rendered.

* * Models should avoid using {@link ExtendedBlockView#getBlockEntity(BlockPos)} @@ -48,6 +48,7 @@ import net.minecraft.world.ExtendedBlockView; * * This interface is only guaranteed to be present in the client environment. */ +// XXX can not link net.fabricmc.fabric.api.renderer.v1.model.FabricBakedModel public interface RenderAttachedBlockView extends ExtendedBlockView { /** * For models associated with Block Entities that implement {@link RenderAttachmentBlockEntity} diff --git a/fabric-tag-extensions-v0/src/main/java/net/fabricmc/fabric/mixin/tag/MixinTagBuilder.java b/fabric-tag-extensions-v0/src/main/java/net/fabricmc/fabric/mixin/tag/MixinTagBuilder.java index c59cce075..fdf528bc9 100644 --- a/fabric-tag-extensions-v0/src/main/java/net/fabricmc/fabric/mixin/tag/MixinTagBuilder.java +++ b/fabric-tag-extensions-v0/src/main/java/net/fabricmc/fabric/mixin/tag/MixinTagBuilder.java @@ -16,7 +16,6 @@ package net.fabricmc.fabric.mixin.tag; -import com.google.common.collect.Sets; import com.google.gson.JsonObject; import net.fabricmc.fabric.api.tag.FabricTagBuilder; import net.fabricmc.fabric.impl.tag.FabricTagHooks; @@ -27,12 +26,10 @@ import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import java.util.Set; import java.util.function.Function; -import java.util.function.Predicate; @Mixin(Tag.Builder.class) public class MixinTagBuilder implements FabricTagBuilder { diff --git a/fabric-textures-v0/src/main/java/net/fabricmc/fabric/api/event/client/ClientSpriteRegistryCallback.java b/fabric-textures-v0/src/main/java/net/fabricmc/fabric/api/event/client/ClientSpriteRegistryCallback.java index 20aff8932..dec7cf460 100644 --- a/fabric-textures-v0/src/main/java/net/fabricmc/fabric/api/event/client/ClientSpriteRegistryCallback.java +++ b/fabric-textures-v0/src/main/java/net/fabricmc/fabric/api/event/client/ClientSpriteRegistryCallback.java @@ -22,7 +22,6 @@ import net.minecraft.client.texture.Sprite; import net.minecraft.client.texture.SpriteAtlasTexture; import net.minecraft.util.Identifier; -import java.util.List; import java.util.Map; import java.util.function.Consumer; diff --git a/fabric-textures-v0/src/main/java/net/fabricmc/fabric/impl/client/texture/SpriteRegistryCallbackHolder.java b/fabric-textures-v0/src/main/java/net/fabricmc/fabric/impl/client/texture/SpriteRegistryCallbackHolder.java index e974f7e8b..b55e11187 100644 --- a/fabric-textures-v0/src/main/java/net/fabricmc/fabric/impl/client/texture/SpriteRegistryCallbackHolder.java +++ b/fabric-textures-v0/src/main/java/net/fabricmc/fabric/impl/client/texture/SpriteRegistryCallbackHolder.java @@ -21,7 +21,6 @@ import net.fabricmc.fabric.api.event.EventFactory; import net.fabricmc.fabric.api.event.client.ClientSpriteRegistryCallback; import net.minecraft.util.Identifier; -import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.locks.Lock; diff --git a/fabric-textures-v0/src/main/java/net/fabricmc/fabric/mixin/client/texture/MixinSpriteAtlasTexture.java b/fabric-textures-v0/src/main/java/net/fabricmc/fabric/mixin/client/texture/MixinSpriteAtlasTexture.java index 12e673b7b..684fb24e9 100644 --- a/fabric-textures-v0/src/main/java/net/fabricmc/fabric/mixin/client/texture/MixinSpriteAtlasTexture.java +++ b/fabric-textures-v0/src/main/java/net/fabricmc/fabric/mixin/client/texture/MixinSpriteAtlasTexture.java @@ -19,13 +19,10 @@ package net.fabricmc.fabric.mixin.client.texture; import com.google.common.base.Joiner; import net.fabricmc.fabric.api.client.texture.*; import net.fabricmc.fabric.api.event.client.ClientSpriteRegistryCallback; -import net.fabricmc.fabric.impl.client.texture.FabricSprite; import net.fabricmc.fabric.impl.client.texture.SpriteAtlasTextureHooks; import net.fabricmc.fabric.impl.client.texture.SpriteRegistryCallbackHolder; -import net.minecraft.client.resource.metadata.AnimationResourceMetadata; import net.minecraft.client.texture.Sprite; import net.minecraft.client.texture.SpriteAtlasTexture; -import net.minecraft.client.util.PngFile; import net.minecraft.resource.ResourceManager; import net.minecraft.util.Identifier; import net.minecraft.util.crash.CrashException; @@ -39,7 +36,6 @@ import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.ModifyVariable; -import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import java.io.IOException; From a1fec501f461eaa2da782f05408ecdc49b14174f Mon Sep 17 00:00:00 2001 From: svipthedrunk Date: Thu, 27 Jun 2019 18:22:48 +0200 Subject: [PATCH 2/4] Updated build.gradle for the javadocs + fixed some oversights of the last commit --- build.gradle | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build.gradle b/build.gradle index 396d316ed..ab201f524 100644 --- a/build.gradle +++ b/build.gradle @@ -37,6 +37,8 @@ allprojects { group = "net.fabricmc.fabric-api" + + dependencies { minecraft "com.mojang:minecraft:$mcVersion" mappings "net.fabricmc:yarn:${mcVersion}${yarnVersion}" @@ -79,6 +81,14 @@ allprojects { classifier = 'sources' from sourceSets.main.allSource } + +} +javadoc{ + options.memberLevel = "PACKAGE" + allprojects.each{ + source( it.sourceSets.main.allJava.srcDirs) + } + classpath = sourceSets.main.compileClasspath } subprojects { @@ -115,6 +125,7 @@ subprojects { } } + javadoc.enabled = false } task remapMavenJar(type: net.fabricmc.loom.task.RemapJarTask, dependsOn: jar) { From b10eadb3bde1b3958a2751544ffe9423288f41ec Mon Sep 17 00:00:00 2001 From: grondag Date: Sat, 27 Jul 2019 21:34:23 -0700 Subject: [PATCH 3/4] Delete BufferBuilderTransformHelper.java File was deleted from master branch --- .../helper/BufferBuilderTransformHelper.java | 116 ------------------ 1 file changed, 116 deletions(-) delete mode 100644 fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/BufferBuilderTransformHelper.java diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/BufferBuilderTransformHelper.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/BufferBuilderTransformHelper.java deleted file mode 100644 index 7aff07785..000000000 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/BufferBuilderTransformHelper.java +++ /dev/null @@ -1,116 +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.indigo.renderer.helper; - -import com.google.common.collect.Sets; -import net.minecraft.client.render.VertexFormat; -import net.minecraft.client.render.VertexFormats; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; - -public class BufferBuilderTransformHelper { - /** - * Fast copying mode; used only if the vanilla format is an exact match. - */ - public static final int MODE_COPY_FAST = 0; - - /** - * Padded copying mode; used when the vanilla format is an exact match, - * but includes additional data at the end. Will emit a warning. - */ - public static final int MODE_COPY_PADDED = 1; - - /** - * ShadersMod compatibility mode; as MODE_COPY_PADDED, but populates in - * the correct normal values as provided by the mod. - * - * Assumes a format of [vertex, color, texture, lmap, normal], all in - * their respective vanilla formats, plus any amount of additional data - * afterwards. - */ - public static final int MODE_COPY_PADDED_SHADERSMOD = 2; - - /** - * Unsupported mode; an error will be emitted and no quads will be - * pushed to the buffer builder. - */ - public static final int MODE_UNSUPPORTED = 3; - - private static final Map vertexFormatCache = new ConcurrentHashMap<>(); - private static final Set errorEmittedFormats = Sets.newConcurrentHashSet(); - private static final Logger logger = LogManager.getLogger(); - - public static void emitUnsupportedError(VertexFormat format) { - // This can be slow, as it's only called on unsupported formats - which is already an error condition. - if (errorEmittedFormats.add(format)) { - logger.error("[Indigo] Unsupported vertex format! " + format); - } - } - - private static int computeProcessingMode(VertexFormat f) { - if ( - f.getElementCount() >= 4 && f.getVertexSizeInteger() >= 7 - && f.getElement(0).equals(VertexFormats.POSITION_ELEMENT) - && f.getElement(1).equals(VertexFormats.COLOR_ELEMENT) - && f.getElement(2).equals(VertexFormats.UV_ELEMENT) - ) { - if ( - f.getElement(3).equals(VertexFormats.LMAP_ELEMENT) - || f.getElement(3).equals(VertexFormats.NORMAL_ELEMENT) - ) { - if ( - f.getElementCount() >= 5 - && f.getElement(3).equals(VertexFormats.LMAP_ELEMENT) - && f.getElement(4).equals(VertexFormats.NORMAL_ELEMENT) - ) { - logger.debug("[Indigo] Classified format as ShadersMod-compatible: " + f); - return MODE_COPY_PADDED_SHADERSMOD; - } else if (f.getElementCount() == 4) { - logger.debug("[Indigo] Classified format as vanilla-like: " + f); - return MODE_COPY_FAST; - } else { - logger.debug("[Indigo] Unsupported but likely vanilla-compliant vertex format. " + f); - return MODE_COPY_PADDED; - } - } - } - - return MODE_UNSUPPORTED; - } - - public static int getProcessingMode(VertexFormat format) { - // Fast passthrough for the most common vanilla block/item formats. - if (format == VertexFormats.POSITION_COLOR_UV_LMAP || format == VertexFormats.POSITION_COLOR_UV_NORMAL) { - return MODE_COPY_FAST; - } else { - Integer cached = vertexFormatCache.get(format); - - if (cached == null) { - // VertexFormats are mutable, so we need to make an immutable copy. - format = new VertexFormat(format); - cached = computeProcessingMode(format); - vertexFormatCache.put(format, cached); - } - - return cached; - } - } -} From 211f5694474740e8b24578c420591f757babea63 Mon Sep 17 00:00:00 2001 From: grondag Date: Sat, 27 Jul 2019 21:41:15 -0700 Subject: [PATCH 4/4] Update MixinBufferBuilder.java --- .../net/fabricmc/indigo/renderer/mixin/MixinBufferBuilder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mixin/MixinBufferBuilder.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mixin/MixinBufferBuilder.java index 464489c4d..cc25fd06d 100644 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mixin/MixinBufferBuilder.java +++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mixin/MixinBufferBuilder.java @@ -18,6 +18,7 @@ package net.fabricmc.indigo.renderer.mixin; import java.nio.IntBuffer; +import net.fabricmc.indigo.Indigo; import net.fabricmc.indigo.renderer.helper.BufferBuilderTransformHelper; import net.fabricmc.indigo.renderer.mesh.EncodingFormat; import net.minecraft.client.render.VertexFormat;