#help with custom bee variant - stuck on pollination and hives

20 messages · Page 1 of 1 (latest)

lilac tree
#

i've been developing a mod with a custom bee variant, the "Beeper". currently my approach has been to just copy most of the code from vanilla bees and beehives, then alter it to fit what i want. (for example, my BeeperEntity class extends Animal and implements NeutralMob and FlyingAnimal, just like bees, with much of the logic copied over.

currently, the beepers function (i can spawn them, and they properly wander around and animate) but do not attempt to pollinate flowers, nor do they go to any beeper hives (which are also made by copying the vanilla beehive classes).
i'm currently attributing the lack of pollination to the shearing feature i attempted to add; beepers have thick fur that i want to be shearable. when sheared, a beeper is supposed to lose its ability to properly pollinate, since normally the pollen sticks to the fur, but i think i poorly implemented the hasFluff boolean such that pollination is being inhibited entirely? not sure.

here is the repo;
https://github.com/qtpiii/jeepers-beepers
any help is greatly appreciated!!

GitHub

Contribute to qtpiii/jeepers-beepers development by creating an account on GitHub.

#

update: i forgot to implement the visual of whether or not the beeper has fluff. indeed, they are all naked

#

i don't know what the best way of implementing this data is

#

i tried just mimicking what the vanilla class does with flags, but it didn't work, and i don't know why it didn't work

#

i'm also considering that maybe it is implemented properly, and it's just that it's false by default

#

i'm not sure where i would need to set it true though

tawdry thunder
#

Do beepers explode? Does their honey explode?

lilac tree
#

they're allergic to pollen, so they sneeze every so often when they're pollinated

#

their sneezes make explosive puffs of pollen that grow nearby crops

#

and they make spicy honey, which gives the player an "invigorated" effect, increasing movement and dig speed

#

i'm planning on having farmer's delight integration where you can cook meals with the spicy honey that also invigorate you!

#

also considering introducing custom crops or flowers produced through cross-pollination by the beepers

lilac tree
#

update: i fixed the shearing and pollination issue, inadvertently exposing another.

fixes:

  • beepers are now properly shearable
  • their fluff renders when unsheared, and disappears when sheared
  • when sheared, they no longer attempt to pollinate

issues:

  • beeper fluff now disappears when pollinated, despite logic that, to me, looks like it should not be doing that at all
  • existing issue of beepers entirely ignoring beeper hives is still present
night sand
#

I do not know if this could be affecting the issue of beepers ignoring their hives, but I don't think your beeper hive was registered as a poi. I could have missed it though.

lilac tree
#

i was able to fix the visual bug, it's mainly just the hive issue now that i'm still stuck on

night sand
#

That is registering the tag for the poi type, it can be confusing though.
Mojang has their pois in the class PointOfInterestTypes, but you can use this:

public static final RegistryKey<PointOfInterestType> BEEPER_HIVE_POI_KEY = RegistryKey.of(RegistryKeys.POINT_OF_INTEREST_TYPE, Identifier.of(modid, "beeper_hive");
public static final PointOfInterestType BEEPER_HIVE_POI = PointOfInterestHelper.register(Identifier.of(modid, "beeper_hive"), 0, 1, BlockRegistry.BEEPER_HIVE);

Those should go in some sort of method that gets called in your mod's onInitialize method.

lilac tree
#

oh, thank you

night sand
#

Your welcome! I hope it can help!

lilac tree
#

AAH THAT WORKED!! THANK YOU SO MUCH