Skip to content

Commit

Permalink
Merge pull request #673 from VoidLeech/1.19.2/fix-faf-beekeeper-job
Browse files Browse the repository at this point in the history
Fix EC's FaF beehives not getting recognized as villager workstation. (1.19.2)
  • Loading branch information
Xelbayria authored Nov 7, 2024
2 parents e9c24c9 + fe4849b commit 2e1d6e5
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ public FriendsAndFoesModule(String modId) {

}

private Supplier<PoiType> compatBeeHivePOI = RegHelper.register(EveryCompat.res("faf_beehive"),
protected final ResourceLocation POI_ID = EveryCompat.res("faf_beehive");

private Supplier<PoiType> compatBeeHivePOI = RegHelper.register(POI_ID,
() -> new PoiType(getBeehives(), 1, 1), Registry.POINT_OF_INTEREST_TYPE);


Expand All @@ -67,10 +69,16 @@ private Set<BlockState> getBeehives() {
public void addDynamicServerResources(ServerDynamicResourcesHandler handler, ResourceManager manager) {
super.addDynamicServerResources(handler, manager);

SimpleTagBuilder tb = SimpleTagBuilder.of(PoiTypeTags.BEE_HOME);
SimpleTagBuilder bee_hive = SimpleTagBuilder.of(PoiTypeTags.BEE_HOME);

bee_hive.add(POI_ID);

handler.dynamicPack.addTag(bee_hive, Registry.POINT_OF_INTEREST_TYPE_REGISTRY);

SimpleTagBuilder acquirable_job_site = SimpleTagBuilder.of(PoiTypeTags.ACQUIRABLE_JOB_SITE);

tb.add(EveryCompat.res("faf_beehive"));
acquirable_job_site.add(POI_ID);

handler.dynamicPack.addTag(tb, Registry.POINT_OF_INTEREST_TYPE_REGISTRY);
handler.dynamicPack.addTag(acquirable_job_site, Registry.POINT_OF_INTEREST_TYPE_REGISTRY);
}
}

0 comments on commit 2e1d6e5

Please sign in to comment.