I'm trying to register a custom Villager Profession but I'm not sure if what I'm doing is correct. The following runs without a hitch however the villagers never run the the block like they do other Job blocks and even if they are getting the job when I'm not looking, I'm unsure how to set a custom texture so they appear uniquely.
// ModProfessions.java
public class ModProfessions {
public static final DeferredRegister<VillagerProfession> PROFESSIONS = DeferredRegister
.create(ForgeRegistries.PROFESSIONS, HuntingUpdate.MOD_ID);
private static final ImmutableSet<Item> HUNTER_ITEMS = ImmutableSet.of(Items.BEEF, Items.PORKCHOP, Items.CHICKEN,
Items.RABBIT, Items.RABBIT_HIDE, Items.MUTTON, Items.LEATHER, Items.COOKED_BEEF, Items.COOKED_PORKCHOP,
Items.COOKED_CHICKEN, Items.COOKED_RABBIT, Items.COOKED_MUTTON);
public static final RegistryObject<VillagerProfession> HUNTER = PROFESSIONS.register("hunter",
() -> new VillagerProfession("hunter",
new PointOfInterestType("hunting_table",
ImmutableSet.of(ModBlocks.HUNTING_TABLE.get().getDefaultState()), 5, 40),
HUNTER_ITEMS, ImmutableSet.of(ModBlocks.HUNTING_TABLE.get()),
SoundEvents.ENTITY_VILLAGER_WORK_BUTCHER));
}
// HuntingUpdate.java (Main Class)
public HuntingUpdate() {
// Register the setup method for modloading
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
// Register the doClientStuff method for modloading
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);
ModBlocks.BLOCKS.register(FMLJavaModLoadingContext.get().getModEventBus());
ModItems.ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus());
ModEntities.ENTITY_TYPES.register(FMLJavaModLoadingContext.get().getModEventBus());
ModProfessions.PROFESSIONS.register(FMLJavaModLoadingContext.get().getModEventBus());
// Register ourselves for server and other game events we are interested in
MinecraftForge.EVENT_BUS.register(this);
}
Any help would be super appreciated thanks!