Jump to content

Recommended Posts

Posted (edited)

i just have custom villager professions and point of interest but the villager will not use them but i dont know why

poi:

	public static final DeferredRegister<PointOfInterestType> POI_TYPE = DeferredRegister.create(ForgeRegistries.POI_TYPES, Cave.Mod_Id);
	
	
	public static final RegistryObject<PointOfInterestType> LUMBERJACK = POI_TYPE.register("lumberjack", 
			() -> new PointOfInterestType("lumberjack", VillagerUtil.getAllStates(Blocks.CRAFTING_TABLE), 1, 1));
	
	public static final RegistryObject<PointOfInterestType> MOB_HUNTER = POI_TYPE.register("mob_hunter", 
			() -> new PointOfInterestType("mob_hunter", VillagerUtil.getAllStates(Blocks.ANVIL), 1, 1));
	
	public static final RegistryObject<PointOfInterestType> MINER = POI_TYPE.register("miner", 
			() -> new PointOfInterestType("miner", VillagerUtil.getAllStates(ModBlocks.SMELTING_FURNACE.get()), 1, 1));
	
	public static final RegistryObject<PointOfInterestType> ENCHANTER = POI_TYPE.register("enchanter", 
			() -> new PointOfInterestType("enchanter", VillagerUtil.getAllStates(Blocks.ENCHANTING_TABLE), 1, 1));
	
	public static final RegistryObject<PointOfInterestType> BEEKEEPER = POI_TYPE.register("beekeeper", 
			() -> new PointOfInterestType("beekeeper", VillagerUtil.getAllStates(ModBlocks.BEE_TABLE.get()), 1, 1));
	
	public static final RegistryObject<PointOfInterestType> NETHER_TRADER = POI_TYPE.register("nether_trader", 
			() -> new PointOfInterestType("nether_trader", VillagerUtil.getAllStates(Blocks.field_235400_nj_), 1, 1));
	
	public static final RegistryObject<PointOfInterestType> END_TRADER = POI_TYPE.register("end_trader", 
			() -> new PointOfInterestType("end_trader", VillagerUtil.getAllStates(Blocks.ENDER_CHEST), 1, 1));

 

and the professions :

	public static final DeferredRegister<VillagerProfession> PROFESSIONS = DeferredRegister.create(ForgeRegistries.PROFESSIONS, Cave.Mod_Id);
	
	
	public static final RegistryObject<VillagerProfession> LUMBERJACK = PROFESSIONS.register("lumberjack", 
			() -> new VillagerProfession("lumberjack", ModPointOfInterestTypes.LUMBERJACK.get(), ImmutableSet.of(), ImmutableSet.of(), null));
	
	public static final RegistryObject<VillagerProfession> MOB_HUNTER = PROFESSIONS.register("mob_hunter", 
			() -> new VillagerProfession("mob_hunter", ModPointOfInterestTypes.MOB_HUNTER.get(), ImmutableSet.of(), ImmutableSet.of(), null));
	
	public static final RegistryObject<VillagerProfession> MINER = PROFESSIONS.register("miner", 
			() -> new VillagerProfession("miner", ModPointOfInterestTypes.MINER.get(), ImmutableSet.of(), ImmutableSet.of(), null));
	
	public static final RegistryObject<VillagerProfession> ENCHANTER = PROFESSIONS.register("enchanter", 
			() -> new VillagerProfession("enchanter", ModPointOfInterestTypes.ENCHANTER.get(), ImmutableSet.of(), ImmutableSet.of(), null));
	
	public static final RegistryObject<VillagerProfession> BEEKEEPER = PROFESSIONS.register("beekeeper", 
			() -> new VillagerProfession("beekeeper", ModPointOfInterestTypes.BEEKEEPER.get(), ImmutableSet.of(), ImmutableSet.of(), null));
	
	public static final RegistryObject<VillagerProfession> NETHER_TRADER = PROFESSIONS.register("nether_trader", 
			() -> new VillagerProfession("nether_trader", ModPointOfInterestTypes.NETHER_TRADER.get(), ImmutableSet.of(), ImmutableSet.of(), null));
	
	public static final RegistryObject<VillagerProfession> END_TRADER = PROFESSIONS.register("end_trader", 
			() -> new VillagerProfession("end_trader", ModPointOfInterestTypes.END_TRADER.get(), ImmutableSet.of(), ImmutableSet.of(), null));

 

 

 

 

Edited by Luis_ST
Posted
14 hours ago, ChampionAsh5357 said:

How are you verifying this claim? Are the registers attached to the mod event bus?

i just fixed this i use the RegistryEvent and

i think i had read something on github that villager pois are bugged in this version

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.