-
-
Notifications
You must be signed in to change notification settings - Fork 12
Datagen remaining tags #233
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,41 @@ | ||
| package fr.hugman.promenade.data.provider; | ||
|
|
||
| import fr.hugman.promenade.entity.PromenadeEntityTypes; | ||
| import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; | ||
| import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider; | ||
| import net.minecraft.registry.RegistryWrapper; | ||
| import net.minecraft.registry.tag.EntityTypeTags; | ||
|
|
||
| import java.util.concurrent.CompletableFuture; | ||
|
|
||
| import static fr.hugman.promenade.entity.PromenadeEntityTypes.*; | ||
| import static fr.hugman.promenade.tag.PromenadeEntityTypeTags.*; | ||
|
|
||
| public class PromenadeEntityTypeTagProvider extends FabricTagProvider.EntityTypeTagProvider { | ||
| public PromenadeEntityTypeTagProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> completableFuture) { | ||
| super(output, completableFuture); | ||
| } | ||
|
|
||
| @Override | ||
| protected void configure(RegistryWrapper.WrapperLookup wrapperLookup) { | ||
| // Vanilla | ||
| valueLookupBuilder(EntityTypeTags.SKELETONS).add(PromenadeEntityTypes.SUNKEN); | ||
| valueLookupBuilder(EntityTypeTags.AXOLOTL_ALWAYS_HOSTILES).add(PromenadeEntityTypes.SUNKEN); | ||
| valueLookupBuilder(EntityTypeTags.FREEZE_IMMUNE_ENTITY_TYPES).add(PromenadeEntityTypes.DUCK); | ||
| valueLookupBuilder(EntityTypeTags.FALL_DAMAGE_IMMUNE).add(PromenadeEntityTypes.DUCK); | ||
|
|
||
| valueLookupBuilder(EntityTypeTags.BOAT).add(PromenadeEntityTypes.SAKURA_BOAT, PromenadeEntityTypes.MAPLE_BOAT, PromenadeEntityTypes.PALM_BOAT); | ||
| } | ||
| public PromenadeEntityTypeTagProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> completableFuture) { | ||
| super(output, completableFuture); | ||
| } | ||
|
|
||
| @Override | ||
| protected void configure(RegistryWrapper.WrapperLookup wrapperLookup) { | ||
| // Vanilla | ||
| valueLookupBuilder(EntityTypeTags.SKELETONS).add(SUNKEN); | ||
| valueLookupBuilder(EntityTypeTags.BOAT).add(SAKURA_BOAT, MAPLE_BOAT, PALM_BOAT); | ||
| valueLookupBuilder(EntityTypeTags.AQUATIC).add(SUNKEN, CAPYBARA); | ||
|
|
||
| valueLookupBuilder(EntityTypeTags.AXOLOTL_ALWAYS_HOSTILES).add(SUNKEN); | ||
| valueLookupBuilder(EntityTypeTags.FREEZE_IMMUNE_ENTITY_TYPES).add(DUCK); | ||
| valueLookupBuilder(EntityTypeTags.FALL_DAMAGE_IMMUNE).add(DUCK); | ||
| valueLookupBuilder(EntityTypeTags.POWDER_SNOW_WALKABLE_MOBS).add(DUCK); | ||
| valueLookupBuilder(EntityTypeTags.NOT_SCARY_FOR_PUFFERFISH).add(CAPYBARA); | ||
| valueLookupBuilder(EntityTypeTags.CANDIDATE_FOR_IRON_GOLEM_GIFT).add(CAPYBARA); | ||
| valueLookupBuilder(EntityTypeTags.FOLLOWABLE_FRIENDLY_MOBS).add(DUCK, CAPYBARA); | ||
|
|
||
| // Conventional | ||
| valueLookupBuilder(ANIMALS).add(DUCK, CAPYBARA); | ||
| valueLookupBuilder(MONSTERS).add(LUSH_CREEPER); | ||
|
|
||
| valueLookupBuilder(BIRDS).add(DUCK); | ||
| valueLookupBuilder(RODENTS).add(CAPYBARA); | ||
| valueLookupBuilder(CREEPERS).add(LUSH_CREEPER); | ||
Hugman76 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,15 +1,18 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| package fr.hugman.promenade.tag; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| import fr.hugman.promenade.Promenade; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| import net.fabricmc.fabric.api.tag.convention.v2.TagUtil; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| import net.minecraft.item.Item; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| import net.minecraft.item.Item; |
Copilot
AI
Oct 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation: lines 24-27, 33-35 use tabs while lines 29-31 use spaces. Should maintain consistent spacing throughout the file.
| public static final TagKey<Biome> PRIMARY_WOOD_TYPE_SAKURA = ofConventional("primary_wood_type/sakura"); | |
| public static final TagKey<Biome> PRIMARY_WOOD_TYPE_PALM = ofConventional("primary_wood_type/palm"); | |
| public static final TagKey<Biome> PRIMARY_WOOD_TYPE_MAPLE = ofConventional("primary_wood_type/maple"); | |
| public static final TagKey<Biome> PRIMARY_WOOD_TYPE_DARK_AMARANTH = ofConventional("primary_wood_type/dark_amaranth"); | |
| private static TagKey<Biome> of(String path) { | |
| return TagKey.of(RegistryKeys.BIOME, Promenade.id(path)); | |
| } | |
| private static TagKey<Biome> ofConventional(String path) { | |
| return TagKey.of(RegistryKeys.BIOME, Identifier.of(TagUtil.C_TAG_NAMESPACE, path)); | |
| } | |
| public static final TagKey<Biome> PRIMARY_WOOD_TYPE_SAKURA = ofConventional("primary_wood_type/sakura"); | |
| public static final TagKey<Biome> PRIMARY_WOOD_TYPE_PALM = ofConventional("primary_wood_type/palm"); | |
| public static final TagKey<Biome> PRIMARY_WOOD_TYPE_MAPLE = ofConventional("primary_wood_type/maple"); | |
| public static final TagKey<Biome> PRIMARY_WOOD_TYPE_DARK_AMARANTH = ofConventional("primary_wood_type/dark_amaranth"); | |
| private static TagKey<Biome> of(String path) { | |
| return TagKey.of(RegistryKeys.BIOME, Promenade.id(path)); | |
| } | |
| private static TagKey<Biome> ofConventional(String path) { | |
| return TagKey.of(RegistryKeys.BIOME, Identifier.of(TagUtil.C_TAG_NAMESPACE, path)); | |
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package fr.hugman.promenade.tag; | ||
|
|
||
| import fr.hugman.promenade.Promenade; | ||
| import net.fabricmc.fabric.api.tag.convention.v2.TagUtil; | ||
| import net.minecraft.entity.EntityType; | ||
| import net.minecraft.item.Item; | ||
Hugman76 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| import net.minecraft.registry.RegistryKeys; | ||
| import net.minecraft.registry.tag.TagKey; | ||
| import net.minecraft.util.Identifier; | ||
|
|
||
| public class PromenadeEntityTypeTags { | ||
| public static final TagKey<EntityType<?>> ANIMALS = ofConventional("animals"); | ||
| public static final TagKey<EntityType<?>> MONSTERS = ofConventional("monsters"); | ||
| public static final TagKey<EntityType<?>> BIRDS = ofConventional("birds"); | ||
| public static final TagKey<EntityType<?>> RODENTS = ofConventional("rodents"); | ||
| public static final TagKey<EntityType<?>> CREEPERS = ofConventional("creepers"); | ||
|
|
||
| private static TagKey<EntityType<?>> of(String path) { | ||
| return TagKey.of(RegistryKeys.ENTITY_TYPE, Promenade.id(path)); | ||
| } | ||
|
|
||
| private static TagKey<EntityType<?>> ofConventional(String path) { | ||
| return TagKey.of(RegistryKeys.ENTITY_TYPE, Identifier.of(TagUtil.C_TAG_NAMESPACE, path)); | ||
Hugman76 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.