Skip to content

Commit

Permalink
fixed styling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
TelepathicGrunt committed Sep 23, 2023
1 parent 7fab6ac commit 2f2e86c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import net.fabricmc.loader.api.FabricLoader;

public class ConventionLogWarnings implements ModInitializer {

public static final String LOG_LEGACY_WARNING_MODE = System.getProperty("fabric-tag-conventions-v1.legacyTagWarning", LOG_WARNING_MODES.DEV_SHORT.name());
public enum LOG_WARNING_MODES {
SILENCED,
Expand Down Expand Up @@ -160,8 +159,9 @@ public enum LOG_WARNING_MODES {

@Override
public void onInitialize() {
if (FabricLoader.getInstance().isDevelopmentEnvironment() && !LOG_LEGACY_WARNING_MODE.equalsIgnoreCase(LOG_WARNING_MODES.SILENCED.name()))
if (FabricLoader.getInstance().isDevelopmentEnvironment() && !LOG_LEGACY_WARNING_MODE.equalsIgnoreCase(LOG_WARNING_MODES.SILENCED.name())) {
setupLegacyTagWarning();
}
}

private static void setupLegacyTagWarning() {
Expand All @@ -187,7 +187,7 @@ private static void setupLegacyTagWarning() {
stringBuilder.append("""
\n Dev warning - Legacy Tags detected. Please migrate your old `c` tags to our new `c` tags that follows better conventions!
See classes under net.fabricmc.fabric.api.tag.convention.v2 package for all tags.
NOTE: Many tags have been moved around or renamed. Some new ones were added so please review the new tags.
And make sure you follow tag conventions for new tags! The convention is `c` with nouns generally being plural and adjectives being singular.
You can disable this message by this system property to your runs: `-Dfabric-tag-conventions-v1.legacyTagWarning=SILENCED`.
Expand Down Expand Up @@ -225,6 +225,7 @@ private static <T> AbstractMap.SimpleEntry<TagKey<T>, TagKey<T>> createMapEntry(
private static <T> TagKey<T> createTagKeyUnderC(RegistryKey<Registry<T>> registryKey, String tagId) {
return TagKey.of(registryKey, new Identifier(TagUtil.C_TAG_NAMESPACE, tagId));
}

private static <T> TagKey<T> createTagKeyUnderFabric(RegistryKey<Registry<T>> registryKey, String tagId) {
return TagKey.of(registryKey, new Identifier(TagUtil.FABRIC_TAG_NAMESPACE, tagId));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@

import java.util.concurrent.CompletableFuture;

import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.Enchantments;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.tag.TagKey;
import net.minecraft.util.Identifier;

import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

import net.minecraft.entity.EntityType;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.tag.TagKey;
import net.minecraft.util.Identifier;

import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@

import java.util.concurrent.CompletableFuture;

import net.minecraft.fluid.Fluid;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.tag.FluidTags;
import net.minecraft.registry.tag.TagKey;
import net.minecraft.util.Identifier;

import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ private ConventionalBlockEntityTypeTags() {
/**
* Blocks should be included in this tag if their movement can cause serious issues such as world corruption
* upon being moved, such as chunk loaders or pipes, for mods that move block entities.
* <p>
* See also the equivalent block tag: {@link ConventionalBlockTags#RELOCATION_NOT_SUPPORTED}
*
* <p>See also the equivalent block tag: {@link ConventionalBlockTags#RELOCATION_NOT_SUPPORTED}
*/
public static final TagKey<BlockEntityType<?>> RELOCATION_NOT_SUPPORTED = register("relocation_not_supported");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ private ConventionalBlockTags() {

// Related to budding mechanics
/**
* For blocks that are similar to amethyst where their budding block produces buds and cluster blocks
* For blocks that are similar to amethyst where their budding block produces buds and cluster blocks.
*/
public static final TagKey<Block> BUDDING_BLOCKS = register("budding_blocks");
/**
* For blocks that are similar to amethyst where they have buddings forming from budding blocks
* For blocks that are similar to amethyst where they have buddings forming from budding blocks.
*/
public static final TagKey<Block> BUDS = register("buds");
/**
* For blocks that are similar to amethyst where they have clusters forming from budding blocks
* For blocks that are similar to amethyst where they have clusters forming from budding blocks.
*/
public static final TagKey<Block> CLUSTERS = register("clusters");

Expand Down Expand Up @@ -100,8 +100,8 @@ private ConventionalBlockTags() {
* Blocks should be included in this tag if their movement can cause serious issues such as world corruption
* upon being moved, such as chunk loaders or pipes, for mods that move blocks but do not respect
* {@link AbstractBlock.AbstractBlockState#getPistonBehavior}.
* <p>
* See also the equivalent block entity type tag: {@link ConventionalBlockEntityTypeTags#RELOCATION_NOT_SUPPORTED}
*
* <p>See also the equivalent block entity type tag: {@link ConventionalBlockEntityTypeTags#RELOCATION_NOT_SUPPORTED}
*/
public static final TagKey<Block> RELOCATION_NOT_SUPPORTED = register("relocation_not_supported");

Expand Down

0 comments on commit 2f2e86c

Please sign in to comment.