Jump to content

appjackstudio

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

appjackstudio's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Just updated to 1.14.4-28.0.41, didn't fix it. I also updated the MCP mappings.
  2. Like This? @ObjectHolder("bakecraft") public class ModVillagers { public static Set<BlockState> getAllStates(Block block) { return ImmutableSet.copyOf(block.getStateContainer().getValidStates()); } public static final PointOfInterestType oven = null; public static void registerPointOfIntrestTypes(IForgeRegistry<PointOfInterestType> registry){ BakecraftMod.LOGGER.info(getAllStates(ModBlocks.TRONA)); registry.registerAll( new PointOfInterestType("oven", getAllStates(ModBlocks.TRONA), 1, (SoundEvent)null, 1).setRegistryName("oven") ); } public static final VillagerProfession baker = null; public static void registerVillagerProfessions(IForgeRegistry<VillagerProfession> registry){ registry.registerAll( new VillagerProfession("baker", oven, ImmutableSet.of(), ImmutableSet.of()).setRegistryName("baker") ); } } Yes // ... @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) public static class RegistryEvents { // ... @SubscribeEvent public static void onPointsOfInterestTypeRegistry(final RegistryEvent.Register<PointOfInterestType> event){ LOGGER.info("Registering Points of Interest"); ModVillagers.registerPointOfIntrestTypes(event.getRegistry()); } @SubscribeEvent public static void onVillagerProfessionRegistry(final RegistryEvent.Register<VillagerProfession> event){ LOGGER.info("Registering Villager Professions"); ModVillagers.registerVillagerProfessions(event.getRegistry()); } } // ...
  3. All mods I've seen and the all the vanilla classes do it that way. What would be the recommended way of doing it? I've updated the post to contain the full code
  4. Can you post the output of the "java -version" command?
  5. I am trying to create a custom "Baker" villager type but am having trouble getting it to be created naturally. I am able to summon a baker villager with "/summon minecraft:villager 92.70 63.00 214.65 {Brain: {memories: {"minecraft:job_site": {pos: [I; 91, 63, 214], dimension: "minecraft:overworld"}}}, VillagerData: {profession: "bakecraft:baker"}}", but it converts into an unemployed villager as soon as it turns time hits 2000. I have double-checked and the job site coordinates are correct. I cannot get one to generate naturally by putting it next to the workstation. I know the profession and POI are registered properly because they show up in the registry while debugging. What am I missing? Why aren't the villagers recognizing their workstations? Any help is appreciated. Thanks! package com.appjackstudio.bakecraft.init; import com.google.common.collect.ImmutableSet; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.entity.merchant.villager.VillagerProfession; import net.minecraft.util.SoundEvent; import net.minecraft.village.PointOfInterestType; import net.minecraftforge.registries.IForgeRegistry; import java.util.Set; public class ModVillagers { public static Set<BlockState> getAllStates(Block block) { return ImmutableSet.copyOf(block.getStateContainer().getValidStates()); } public static final PointOfInterestType OVEN = new PointOfInterestType("oven", getAllStates(ModBlocks.TRONA), 1, (SoundEvent)null, 1).setRegistryName("oven"); public static void registerPointOfIntrestTypes(IForgeRegistry<PointOfInterestType> registry){ registry.registerAll( OVEN ); } public static final VillagerProfession BAKER = new VillagerProfession("baker", OVEN, ImmutableSet.of(), ImmutableSet.of()).setRegistryName("baker"); public static void registerVillagerProfessions(IForgeRegistry<VillagerProfession> registry){ registry.registerAll( BAKER ); } }
×
×
  • Create New...

Important Information

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