From 1628ac9a86c584957a379dcb248be50058ac42d7 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 21 Jul 2022 12:12:50 +0200 Subject: [PATCH] [Feature] Add Tag to Fisherman Workstation POI (quiqueck/BetterNether#39) --- .../org/betterx/bclib/api/v2/poi/PoiManager.java | 8 ++++++++ .../worlds/together/tag/v3/CommonPoiTags.java | 12 ++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 src/main/java/org/betterx/worlds/together/tag/v3/CommonPoiTags.java diff --git a/src/main/java/org/betterx/bclib/api/v2/poi/PoiManager.java b/src/main/java/org/betterx/bclib/api/v2/poi/PoiManager.java index 59246925..4d08d9e6 100644 --- a/src/main/java/org/betterx/bclib/api/v2/poi/PoiManager.java +++ b/src/main/java/org/betterx/bclib/api/v2/poi/PoiManager.java @@ -1,5 +1,7 @@ package org.betterx.bclib.api.v2.poi; +import org.betterx.worlds.together.tag.v3.CommonPoiTags; + import net.minecraft.core.Registry; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; @@ -10,6 +12,7 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; import java.util.Set; +import org.jetbrains.annotations.ApiStatus; public class PoiManager { public static BCLPoiType register( @@ -32,4 +35,9 @@ public class PoiManager { ext.bcl_setTag(tag); } } + + @ApiStatus.Internal + public static void registerAll() { + PoiManager.setTag(PoiTypes.FISHERMAN, CommonPoiTags.FISHERMAN_WORKSTATION); + } } diff --git a/src/main/java/org/betterx/worlds/together/tag/v3/CommonPoiTags.java b/src/main/java/org/betterx/worlds/together/tag/v3/CommonPoiTags.java new file mode 100644 index 00000000..1381f45d --- /dev/null +++ b/src/main/java/org/betterx/worlds/together/tag/v3/CommonPoiTags.java @@ -0,0 +1,12 @@ +package org.betterx.worlds.together.tag.v3; + +import net.minecraft.tags.TagKey; +import net.minecraft.world.level.block.Block; + +public class CommonPoiTags { + public static final TagKey FISHERMAN_WORKSTATION = TagManager.BLOCKS.makeCommonTag("workstation/fisherman"); + + static { + TagManager.BLOCKS.addOtherTags(FISHERMAN_WORKSTATION, CommonBlockTags.BARREL, CommonBlockTags.WOODEN_BARREL); + } +}