InspectorCaracal Posted April 17, 2023 Posted April 17, 2023 My mod adds several new beehives, but the mechanism I used in 1.16.5 to make bees actually use them doesn't seem to be working any more in 1.18.2 This is where I patch the POI set in 1.16.5 And this is the version updated for 1.18.2: private void setup(final FMLCommonSetupEvent event) { Runnable patch_hives = () -> { try { LOGGER.debug("Modifying POI register for beehives"); final Set<BlockState> HIVES = ImmutableList.of(Blocks.BEEHIVE, ModBlocks.OAK_BEEHIVE.get(), ModBlocks.DARK_OAK_BEEHIVE.get(), ModBlocks.SPRUCE_BEEHIVE.get(), ModBlocks.ACACIA_BEEHIVE.get(), ModBlocks.BIRCH_BEEHIVE.get(), ModBlocks.JUNGLE_BEEHIVE.get()).stream().flatMap((block) -> { return block.getStateDefinition().getPossibleStates().stream(); }).collect(ImmutableSet.toImmutableSet()); ObfuscationReflectionHelper.setPrivateValue(PoiType.class, PoiType.BEEHIVE, HIVES, "f_27325_"); } catch (Exception e) { LOGGER.error(e); } }; event.enqueueWork(patch_hives); } However, this updated function is resulting in bees ignoring my new hives and only using vanilla hives and nests. Did I update something incorrectly? Or is there a new/better way to do this? Quote
InspectorCaracal Posted April 17, 2023 Author Posted April 17, 2023 (edited) *redacted* Never mind what I had here, the nice tag-based solution was implemented in 1.19 Edited April 17, 2023 by InspectorCaracal Quote
Recommended Posts
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.