Slimefun4 icon indicating copy to clipboard operation
Slimefun4 copied to clipboard

Tree Growth Accelerator Didn't Consume Organic Fertilizer

Open ShizuyaYo opened this issue 2 years ago โ€ข 4 comments

โ— Checklist

  • [X] I am using the official english version of Slimefun and did not modify the jar.
  • [X] I am using an up to date "DEV" (not "RC") version of Slimefun.
  • [X] I am aware that issues related to Slimefun addons need to be reported on their bug trackers and not here.
  • [X] I searched for similar open issues and could not find an existing bug report on this.

๐Ÿ“ Description

One of my server member saying that Tree Growth Accelerator Didn't Consume Organic Fertilizer, when i check it, it wont consume as he said and just take energy when first place, i am trying check slimefun version and change it to dev but the issue still same

After that i try to make Tree Growth Accelerator in other minecraft server version 1.18.x but cant craft it in enhanced crafting table and keep saying didnt recognize this recipe

๐Ÿ“‘ Reproduction Steps

When i place the Tree Growth Accelerator the energy start decreasing then i put the ferlitizer and start placing sapling near it but it wont consume the fertilizer

๐Ÿ’ก Expected Behavior

not sure but my server java still on 8 other than that i don't know

๐Ÿ“ท Screenshots / Videos

https://streamable.com/9fkmwq

๐Ÿ“œ Server Log

https://pastebin.com/y1LdvvQB

๐Ÿ“‚ /error-reports/ folder

No response

๐Ÿ’ป Server Software

Spigot

๐ŸŽฎ Minecraft Version

1.16.x

โญ Slimefun version

Slimefun4 - RC 31 (git 0ea16)

๐Ÿงญ Other plugins

No response

ShizuyaYo avatar Apr 26 '22 13:04 ShizuyaYo

that is a seperate issue. please don't mix issues on one report. if, after you read my comments on discord still have the issue, open up a seperate report

Boomer-1 avatar Apr 26 '22 13:04 Boomer-1

it's only supposed to hit the tree one time. if that did that, that is intended behavior and working as it should

Boomer-1 avatar Apr 28 '22 00:04 Boomer-1

I will need to get a little technical here but I cannot explain why this happens otherwise, sorry for the long reply!

Crops in minecraft have a property called age: this represents the current growth stage of the crop and is associated to different block textures; for example, let's take wheat: it has 8 possible states and the higher the age the bigger the crop looks, from just sprouts to the full yellow harvestable crop. Saplings on the other hand have only two states: ready to grow and not ready to grow. Tree growth is governed by random ticks, where a sapling marked "ready to grow" can attempt to grow a full tree when ticked, while one not ready won't (I say attempt because there is a series of checks that has to be performed: light level, sky access, available space etc.)

What the tree grower does is it marks the sapling as ready to grow, which does speed up the growing process since you don't have to wait for the sapling to "mature", but it does not force growth attempts like bonemeal does as all these additional checks would need to be artificially performed by Slimefun every few mc ticks on a possibly very large number of saplings, which is less than ideal to say the least

So to sum it up: yes the tree growth accelerator is underwhelming, the issue lies in how trees behavior is natively coded compared to crops, yes it could be artificially simulated but it's likely to become an issue. Maybe the best course of action would be to suggest or PR directly a config option, set to the current behavior by default, that allows for these artificial checks to take place if a server decides the additional stress is worth given the extended functionality it would bring

Sfiguz7 avatar Apr 28 '22 00:04 Sfiguz7

What TeamOah reported is not relevant to the issue that the OP is reporting and was addressed in this commit.

I can confirm what OP is experiencing. It occurs when the Organic Fertilizer items are set to use custom item models. The Tree Growth Accelerator will not recognise these items as fertilizer and does not consume them. Specifically, SlimefunUtils#isItemSimilar is returning false when comparing the wrapped base FERTILIZER ItemStack defined here and any Organic Fertilizer item that has CustomModelData. The same issue occurs for Crop Growth Accelerators. I also think this issue happens with the Auto Breeder; the only difference is that a wrapped Organic Food item is being compared (as opposed to Organic Fertilizer).

I believe this issue was introduced after #3275 was merged. The base FERTILIZER item does not have CustomModelData because it is not a "real" item, and it does not appear in item-models.yml. Therefore the comparison here fails. Forgive me if I am mistaken here; I have not looked at this problem for a while.

galacticwarrior9 avatar Jul 16 '22 10:07 galacticwarrior9

Is this still an issue with the new functionality of the Tree Growth Accelerator? If not I think this can be closed.

JustAHuman-xD avatar Mar 02 '23 13:03 JustAHuman-xD

Is this still an issue with the new functionality of the Tree Growth Accelerator? If not I think this can be closed.

~~Will double check it tommorrow and update this.~~

Update it works fine but if using custom resource pack then it breaks, closing this and moving it to #3446

variananora avatar Mar 02 '23 13:03 variananora