Straw Golem Rebaled - Forge

Straw Golem Rebaled - Forge

9M Downloads

Berry Bush Mod Compat

WenXin20 opened this issue ยท 20 comments

commented

Straw Golems v1.7

The Straw Golem won't harvest berries from other mods. The ones I tried was the Blueberry Bush from Biomes You'll Go, the Foul Berry Bush from Autumnity, and the Berry Bushes from Simple Farming.

I've also noticed that the golems break and replant the Sweet Berry Bushes, instead of just leaving the bush fully grown and only harvesting the berries, which is what can normally be done with a right-click.

commented

Sorry for missing this!

I've fixed the replanting issue - as for the compatibility thing - this surprises me, it should be working. But I'm looking at it now :)

commented

Hey! I have a candidate for this - try it out and see if the issue is solved (note theres a jar in the zip - use that, github doesnt allow you to upload jars directly)

strawgolem-1.15.2-1.7.1.zip

commented

Thanks!

commented

Ok, so the original issue was just one of my checks being too specific.
As it was though, only the Biomes You'll go bush would have worked anyways, as the other one's dont extend SweetBerryBushBlock.

However, I'm testing a way now to be able to allow for a general solution for anything that extends BushBlock and is an IGrowable.

I'll keep you posted :)

commented

Thanks, I'll see if I can test it soon

commented

It works, but only partially.
For the vanilla bush, it'll only harvest one of the berries, even though the player can gather berries when the bush reaches age 2 or age 3.

For Autumnity, the Foul Berry Bush is two blocks tall, and the top half is broken when harvested.

For Biomes You'll Go, the Blue Berries seem to be voided when harvested.

For Simple Farming, instead of gathering the berries, it instead harvests the bush and dupes it.

commented

I just want to let you know that I haven't forgot about this - it just got put on the backburner while i was changing the main way golems harvest crops

Right now:

  • BYG berries get picked properly but they aren't detected when they grow? or at least when i bone meal them bc they didnt seem to grow otherwise..
  • Simple Farming it voids the berries now and doesnt detect when they grow
  • Autumnity works except it still deletes the top half
commented

Thanks, I had the same problem with the blueberries from BYG as well.

commented

Update:

  • I still dont see how blueberries are supposed to naturally grow, but they work when they are bonemealed now
  • The autumnity bushes work now and the top half no longer gets deleted
  • Simple farming is harder bc the bushes dont post the CropGrowEvent when they grow.. so I'm still investigating on that one
commented

The blueberries not naturally growing is probably a byg bug.

commented

Ok so for simple farming idk if I'll be able to add compatibility for their berries tbh

So first off, they dont fire CropGrownEvent when they grow naturally. So every 300 ticks the golems search themselves for a grown crop, that will find them. And bonemealing them will also find them.

So that issue isnt a deal breaker, but the problem is that the berry bush harvesting in that mod - they do it by listening to PlayerInteractEvent.RightClickBlock event instead of overriding the onBlockActivated event in their berry bush class.

I need to create some sort of fake player to get around it

commented

Ah, that's too bad. But I don't mind if it can't be supported, it's not super important to me.

commented

Turns out making a fake player is actually much much simpler than I had imagined it would be

https://drive.google.com/file/d/1XD9fZTPkxfy2rAgOCWXqGvXLWKv-9XrP/view?usp=sharing

Try this out :)

commented

Thanks! I'll see if I can try it out tomorrow.

commented

Seems to be working great, with both the iron Chests and the Berry Bushes!
Also, is the chest supposed to play an open animation, or is it only the sound that will play?

Edit: I've just noticed that with v2.0 the golem leaves the top half of crops floating from the Pokecube AIO mod. And it won't harvest from the Cattail seeds from Swamp Expansion. But otherwise everything works great. :)

commented

It's just a sound right now :)

I'll see what I can do about the cattail seeds and pokecube mods

commented

Another thing I've noticed, with Simple Farming two block tall crops, the golem will harvest, but the top half will drop onto the ground instead, such as with the Kenaf crop.
And Honeydew, Cantoloupe, & Squash crops from Simple Farming has its fruits deleted when harvested, or any crop that produces a block item.
It'll also harvest the Grapes trunk instead. It'll normally grow a grape leaf base block on top, and if a fence is placed next to that leaf, it'll turn into grapes leaves and produce grapes underneath. :)
Thanks!

commented

I'll see if I can it a try tomorrow, thanks!

commented

strawgolem-1.15.2-1.9-beta-2.zip

Try this!

It should fix compat with the cantaloupe, squash etc.

Should also fix the floating top half with Pokecube AIO, but I'm not sure on that one since the mod doesn't seem to want to run on my installation.

commented

Moving this to here #10 and closing