Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify tag namespace and conventions between Neoforge and Fabric for 1.20.5 MC #3310

Merged
merged 126 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
c64626d
Large unification of common tags with neo
TelepathicGrunt Sep 9, 2023
a712db2
Added tag translations
TelepathicGrunt Sep 9, 2023
44189bd
fixed lang file keys
TelepathicGrunt Sep 9, 2023
a350860
checkstyle fixes and module dep fixes
TelepathicGrunt Sep 10, 2023
3b4e17b
Fixed dev environment check and wordings
TelepathicGrunt Sep 10, 2023
7c62078
print registry the key is from
TelepathicGrunt Sep 10, 2023
f77c070
removed unused import
TelepathicGrunt Sep 10, 2023
bbce220
Add missing license header
TelepathicGrunt Sep 10, 2023
a0c56a2
Added capturing_not_supported entity type tag
TelepathicGrunt Sep 10, 2023
c0e76ad
Fixed comment
TelepathicGrunt Sep 10, 2023
d54b39f
removed extra space for checkstyle
TelepathicGrunt Sep 10, 2023
22113e9
Added missing wall banners to dyed tags
TelepathicGrunt Sep 10, 2023
f154377
Fix modded registries inputs for getTagTranslationKey
TelepathicGrunt Sep 10, 2023
2c3ac14
Changed field names to match yarn convention
TelepathicGrunt Sep 10, 2023
cab27e5
Split out non-clientside warning to its own init
TelepathicGrunt Sep 10, 2023
a1df3d1
Make tag switch no longer a code breaking change
TelepathicGrunt Sep 13, 2023
fba9b14
Lang translation suggested fixes
TelepathicGrunt Sep 13, 2023
b794e98
Fixed logic and use minecraft constant
TelepathicGrunt Sep 13, 2023
734b113
Fixed imports.
TelepathicGrunt Sep 13, 2023
770dd9a
set translation warning to silenced by default
TelepathicGrunt Sep 13, 2023
1aad87d
Migrated the translation method to TagKey
TelepathicGrunt Sep 13, 2023
3b40f24
datagenned proper lang keys
TelepathicGrunt Sep 13, 2023
2b7e73d
fixed package names
TelepathicGrunt Sep 14, 2023
685e960
Fixed tag test package still using v1
TelepathicGrunt Sep 14, 2023
14fb3f3
Switch to c tag namespace with folder kept
TelepathicGrunt Sep 23, 2023
1fb65cf
Switch some spaces for tabs again
TelepathicGrunt Sep 23, 2023
635e3d9
link the two relocation not supported tags together
TelepathicGrunt Sep 23, 2023
5246c6a
Added javadoc for capturing not supported
TelepathicGrunt Sep 23, 2023
1b92682
adjusted log warning message
TelepathicGrunt Sep 23, 2023
f898443
Added budding javadocs
TelepathicGrunt Sep 23, 2023
7f6ed65
tag renames and some javadoc
TelepathicGrunt Sep 23, 2023
0d598d9
Pulled out tag translation for future PR
TelepathicGrunt Sep 23, 2023
ecee162
Fixed legacy tag detection and optional tag entries
TelepathicGrunt Sep 23, 2023
46cabdd
Added missing deprecated javadoc
TelepathicGrunt Sep 23, 2023
c7800d1
Fixed deprecation on old api
TelepathicGrunt Sep 23, 2023
4095208
Moved tag namespace to constant
TelepathicGrunt Sep 23, 2023
0e49222
Convert TagRegistration to record
TelepathicGrunt Sep 23, 2023
abc2292
Fixed version requirements and versioning
TelepathicGrunt Sep 23, 2023
de96c11
Added missing deprecation for old fluid tags
TelepathicGrunt Sep 23, 2023
83204fc
Made fabric api's own internal tag generator final
TelepathicGrunt Sep 23, 2023
b253d3e
Improve the legacy tag detection and added some new tags
TelepathicGrunt Sep 23, 2023
01dec05
Moved logger to v1 and improve the logging
TelepathicGrunt Sep 23, 2023
7fab6ac
Moved logging to v1 and improve the logging
TelepathicGrunt Sep 23, 2023
2f2e86c
fixed styling issues
TelepathicGrunt Sep 23, 2023
cb30f41
fixed missing module lifecycle
TelepathicGrunt Sep 23, 2023
06baabd
reran gendata and log workstation replacements
TelepathicGrunt Sep 23, 2023
f2bffc6
Proper stone javadocs
TelepathicGrunt Sep 23, 2023
1b08fd9
Fixed namespace in test warnings and renamed enchantment tags
TelepathicGrunt Sep 23, 2023
2f4f70e
Removed ingot from block ore comments
TelepathicGrunt Sep 23, 2023
ba6a34e
updated log message
TelepathicGrunt Sep 23, 2023
f59ec63
Fixed tag entry ordering
TelepathicGrunt Sep 23, 2023
6bfa408
Put Wooden rods first
TelepathicGrunt Sep 23, 2023
d4b2157
Adjusted param names and field names
TelepathicGrunt Sep 24, 2023
8f5097b
removed unneeded dep in datagen
TelepathicGrunt Sep 24, 2023
a7c0d63
Adjusted tag field names to be more readable
TelepathicGrunt Sep 24, 2023
1208f8c
Slight cleanup on biome tag datagen class
TelepathicGrunt Sep 30, 2023
ed9a300
javadoc for rods and sticks
TelepathicGrunt Sep 30, 2023
c826101
Rename speed enchantment tag and made new one
TelepathicGrunt Sep 30, 2023
0322410
Added links to enchantment javadoc
TelepathicGrunt Sep 30, 2023
b8a2a4b
reorder enchantment tag entries to be better representative
TelepathicGrunt Sep 30, 2023
cee9439
Fixed checkstyle complaints
TelepathicGrunt Sep 30, 2023
ba5f8c1
Removed Relocation Entity Type tag and updated spear javadoc
TelepathicGrunt Oct 1, 2023
9236b79
dyed tags javadoc
TelepathicGrunt Oct 1, 2023
d048b46
Added weapon and mining tags (Will be fabric exclusive)
TelepathicGrunt Oct 8, 2023
d27a858
Ported over Storage Block tags to sync them between the two PRs
TelepathicGrunt Oct 8, 2023
3d9653c
Fixed javadoc spacing
TelepathicGrunt Oct 8, 2023
03d4f24
fixed bone meal storage block tag name
TelepathicGrunt Oct 11, 2023
bc07573
Added cobblestones tag due to mod usages
TelepathicGrunt Oct 15, 2023
92338a5
Added brushes tag
TelepathicGrunt Oct 24, 2023
ac4eac3
Added heads tag
TelepathicGrunt Oct 24, 2023
55a416d
Added minecraft's tool tags to c:tools for completeness
TelepathicGrunt Oct 27, 2023
523470b
Added no_default_monsters biome tag
TelepathicGrunt Nov 11, 2023
1827679
added fish and meat food tags
TelepathicGrunt Nov 11, 2023
3540155
datagen new tags
TelepathicGrunt Nov 11, 2023
1d0a2e8
better sort food tag
TelepathicGrunt Nov 11, 2023
5455ca5
warn for more old tag names
TelepathicGrunt Nov 11, 2023
5c71cd8
sort food tag better and remove redundant entries
TelepathicGrunt Nov 11, 2023
a35e975
Match vanilla fishes format
TelepathicGrunt Nov 12, 2023
cb6b171
bread and cookie tags
TelepathicGrunt Nov 12, 2023
7528e93
added edible when placed
TelepathicGrunt Nov 12, 2023
6372457
candies tag
TelepathicGrunt Nov 12, 2023
9e807f7
rerun datagen for foods
TelepathicGrunt Nov 12, 2023
1d940ff
ropes and chains tag added on request
TelepathicGrunt Nov 13, 2023
414a534
moved poisonous potato out of vegetables tag
TelepathicGrunt Nov 13, 2023
ec2f994
food poisoning tag
TelepathicGrunt Nov 13, 2023
6c2ee70
added chicken to food poisoning
TelepathicGrunt Nov 13, 2023
d07240f
pluralize some tag names properly
TelepathicGrunt Nov 17, 2023
1ce3d65
plural fluids. Added bricks. Parent tags uses sub tags properly
TelepathicGrunt Nov 17, 2023
9034040
unplurarize fluid tag
TelepathicGrunt Nov 17, 2023
47b7c46
Added hidden_from_recipe_viewers tag
TelepathicGrunt Dec 20, 2023
0d4c579
Merge branch '1.20.4' into Common-Tag-Refactor
TelepathicGrunt Dec 21, 2023
569f71c
Fix merge issues
TelepathicGrunt Dec 21, 2023
d4c0a15
removed duplicate warning entry
TelepathicGrunt Dec 21, 2023
cd779bc
Fixed fabric loader expected value
TelepathicGrunt Dec 21, 2023
fd7a930
Add crafting table and furnace tag
TelepathicGrunt Jan 16, 2024
bc9aed8
spotless and warn about old crafting table/furnace tags
TelepathicGrunt Jan 16, 2024
243e7cb
Add old growth tag for old growth named biomes
TelepathicGrunt Jan 22, 2024
8fbf306
removed heads item tag due to mojang adding one
TelepathicGrunt Jan 24, 2024
63f010b
Fixed missing biomes from is_snowy tag
TelepathicGrunt Feb 27, 2024
faa4093
Added c:teleporting_not_supported tag
TelepathicGrunt Mar 16, 2024
749533a
Changed name of the javadoc method referenced
TelepathicGrunt Mar 16, 2024
c8a6da5
Merge branch '1.20.5' into Common-Tag-Refactor
TelepathicGrunt Apr 10, 2024
1a17250
Updated to 1.20.5
TelepathicGrunt Apr 10, 2024
2f712d2
renamed end biome tag
TelepathicGrunt Apr 10, 2024
5e76d2f
removed unneeded comment
TelepathicGrunt Apr 10, 2024
b29c876
Updated module's depends
TelepathicGrunt Apr 10, 2024
f76dcb4
adjusted enchantables tag and fixed version requirements
TelepathicGrunt Apr 11, 2024
4540bd9
Improve the overworld bioem tag ordering
TelepathicGrunt Apr 11, 2024
2ed0b37
updated comments
TelepathicGrunt Apr 11, 2024
b9c7980
adjust end island javadoc
TelepathicGrunt Apr 11, 2024
43cca0c
Add end biomes to end island tags
TelepathicGrunt Apr 11, 2024
a4e13e1
adjusted end island tag name and reorder ocean tags
TelepathicGrunt Apr 11, 2024
4ad4389
Added suggested changes
TelepathicGrunt Apr 12, 2024
d680606
Moved no default monster to top
TelepathicGrunt Apr 12, 2024
e337074
spotless apply
TelepathicGrunt Apr 12, 2024
255e8be
Added clarification to overworld tag doc for strongholds
TelepathicGrunt Apr 12, 2024
27cd11f
Fixed p tag in javadoc
TelepathicGrunt Apr 12, 2024
90a9176
added info for block recipe viewer hiding tag
TelepathicGrunt Apr 12, 2024
e683e86
added structure tags for hiding structures
TelepathicGrunt Apr 12, 2024
b44b5fa
Added hidden tag for biomes
TelepathicGrunt Apr 12, 2024
d5976db
Oh my gosh, MORE SPOTLESS
TelepathicGrunt Apr 12, 2024
9f9f046
sacrificed a goat to the linter
TelepathicGrunt Apr 12, 2024
028a828
cleaned up redundant entries in biome tags
TelepathicGrunt Apr 14, 2024
3d49be6
fixed biome tag inconsistencies and match neo a bit better
TelepathicGrunt Apr 14, 2024
7b3c4df
fixed item tag issues
TelepathicGrunt Apr 14, 2024
ef1f4ce
Merge branch '1.20.5' into Common-Tag-Refactor
TelepathicGrunt Apr 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ Fabric API is organized in different modules. Each module is located in a specif
- Module names should be named after the exposed functionality.
- Consider future developments when naming a module: they might later be expanded.
- Module names should usually be suffixed by `-api`.
- Modules whose primary purpose is not interaction with their API do not need this suffix. For example, `fabric-transitive-access-wideners-v1` or `fabric-convention-tags-v1`.
- Modules whose primary purpose is not interaction with their API do not need this suffix. For example, `fabric-transitive-access-wideners-v1` or `fabric-convention-tags-v2`.
- Event modules should have the `-events` suffix instead.
- Module names should always be suffixed by a major version (`-v1`, `-v2`, etc).
- The major version starts at `v1` for new functionality, unless they replace a module with equivalent functionality, in which case the version is incremented.
Expand Down
6 changes: 6 additions & 0 deletions deprecated/fabric-convention-tags-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version = getSubprojectVersion(project)

moduleDependencies(project, [
'fabric-api-base',
'fabric-convention-tags-v2'
])
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@
import net.fabricmc.fabric.impl.tag.convention.TagRegistration;

/**
* See {@link net.minecraft.registry.tag.BiomeTags} for vanilla tags.
* Note that addition to some vanilla tags implies having certain functionality,
* and as such certain biome tags exist to mirror vanilla tags, and should be preferred
* over vanilla unless its behavior is desired.
* @deprecated Please use {@link net.fabricmc.fabric.api.tag.convention.v2.ConventionalBiomeTags}
*/
@Deprecated
TelepathicGrunt marked this conversation as resolved.
Show resolved Hide resolved
public final class ConventionalBiomeTags {
private ConventionalBiomeTags() {
}
Expand Down Expand Up @@ -136,6 +134,6 @@ private ConventionalBiomeTags() {
public static final TagKey<Biome> SHALLOW_OCEAN = register("shallow_ocean");

private static TagKey<Biome> register(String tagID) {
return TagRegistration.BIOME_TAG_REGISTRATION.registerCommon(tagID);
return TagRegistration.BIOME_TAG_REGISTRATION.registerC(tagID);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
import net.fabricmc.fabric.impl.tag.convention.TagRegistration;

/**
* See {@link net.minecraft.registry.tag.BlockTags} for vanilla tags.
* Note that addition to some vanilla tags implies having certain functionality.
* @deprecated Please use {@link net.fabricmc.fabric.api.tag.convention.v2.ConventionalBlockTags}
*/
@Deprecated
public final class ConventionalBlockTags {
private ConventionalBlockTags() {
}
Expand Down Expand Up @@ -68,6 +68,6 @@ private ConventionalBlockTags() {
public static final TagKey<Block> MOVEMENT_RESTRICTED = register("movement_restricted");

private static TagKey<Block> register(String tagID) {
return TagRegistration.BLOCK_TAG_REGISTRATION.registerCommon(tagID);
return TagRegistration.BLOCK_TAG_REGISTRATION.registerC(tagID);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@

import net.fabricmc.fabric.impl.tag.convention.TagRegistration;

/**
* @deprecated Please use {@link net.fabricmc.fabric.api.tag.convention.v2.ConventionalEnchantmentTags}
*/
@Deprecated
public final class ConventionalEnchantmentTags {
private ConventionalEnchantmentTags() {
}
Expand Down Expand Up @@ -49,6 +53,6 @@ private ConventionalEnchantmentTags() {
public static final TagKey<Enchantment> ENTITY_DEFENSE_ENHANCEMENT = register("entity_defense_enhancement");

private static TagKey<Enchantment> register(String tagID) {
return TagRegistration.ENCHANTMENT_TAG_REGISTRATION.registerCommon(tagID);
return TagRegistration.ENCHANTMENT_TAG_REGISTRATION.registerC(tagID);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import net.fabricmc.fabric.impl.tag.convention.TagRegistration;

/**
* See {@link net.minecraft.registry.tag.EntityTypeTags} for vanilla tags.
* Note that addition to some vanilla tags implies having certain functionality.
* @deprecated Please use {@link net.fabricmc.fabric.api.tag.convention.v2.ConventionalEntityTypeTags}
*/
@Deprecated
public final class ConventionalEntityTypeTags {
private ConventionalEntityTypeTags() {
}
Expand All @@ -37,6 +37,6 @@ private ConventionalEntityTypeTags() {
public static final TagKey<EntityType<?>> BOATS = register("boats");

private static TagKey<EntityType<?>> register(String tagID) {
return TagRegistration.ENTITY_TYPE_TAG_REGISTRATION.registerCommon(tagID);
return TagRegistration.ENTITY_TYPE_TAG_REGISTRATION.registerC(tagID);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* 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.tag.convention.v1;

import net.minecraft.fluid.Fluid;
import net.minecraft.registry.tag.TagKey;

import net.fabricmc.fabric.impl.tag.convention.TagRegistration;

/**
* @deprecated Please use {@link net.fabricmc.fabric.api.tag.convention.v2.ConventionalFluidTags}
*/
@Deprecated
public final class ConventionalFluidTags {
TelepathicGrunt marked this conversation as resolved.
Show resolved Hide resolved
private ConventionalFluidTags() {
}

public static final TagKey<Fluid> LAVA = register("lava");
public static final TagKey<Fluid> WATER = register("water");
public static final TagKey<Fluid> MILK = register("milk");
public static final TagKey<Fluid> HONEY = register("honey");

private static TagKey<Fluid> register(String tagID) {
return TagRegistration.FLUID_TAG_REGISTRATION.registerC(tagID);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
import net.fabricmc.fabric.impl.tag.convention.TagRegistration;

/**
* See {@link net.minecraft.registry.tag.ItemTags} for vanilla tags.
* Note that addition to some vanilla tags implies having certain functionality.
* @deprecated Please use {@link net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags}
*/
@Deprecated
public final class ConventionalItemTags {
private ConventionalItemTags() {
}
Expand Down Expand Up @@ -151,6 +151,6 @@ private ConventionalItemTags() {
public static final TagKey<Item> SWORDS = register("swords");

private static TagKey<Item> register(String tagID) {
return TagRegistration.ITEM_TAG_REGISTRATION.registerCommon(tagID);
return TagRegistration.ITEM_TAG_REGISTRATION.registerC(tagID);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* 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.tag.convention.v1;

import org.jetbrains.annotations.Nullable;

import net.minecraft.registry.tag.TagKey;
import net.minecraft.registry.DynamicRegistryManager;

/**
* @deprecated Please use {@link net.fabricmc.fabric.api.tag.convention.v2.TagUtil}
*/
@Deprecated
public final class TagUtil {
private TagUtil() {
}

/**
* @deprecated Please use {@link net.fabricmc.fabric.api.tag.convention.v2.TagUtil#isIn}
TelepathicGrunt marked this conversation as resolved.
Show resolved Hide resolved
*/
@Deprecated
public static <T> boolean isIn(TagKey<T> tagKey, T entry) {
return net.fabricmc.fabric.api.tag.convention.v2.TagUtil.isIn(null, tagKey, entry);
}

/**
* @deprecated Please use {@link net.fabricmc.fabric.api.tag.convention.v2.TagUtil#isIn}
*/
@Deprecated
@SuppressWarnings("unchecked")
public static <T> boolean isIn(@Nullable DynamicRegistryManager registryManager, TagKey<T> tagKey, T entry) {
return net.fabricmc.fabric.api.tag.convention.v2.TagUtil.isIn(registryManager, tagKey, entry);
}
}
Loading
Loading