DynamicTreesTeam / DynamicTrees

Minecraft Forge mod providing dynamic trees that progressively grow from seed to maturity.
MIT License
230 stars 97 forks source link

Make it possible to modify loot from leaves. #671

Closed Daripher closed 2 years ago

Daripher commented 2 years ago

It seems to be impossible to modify loot from DymanicTrees leaves using LootModifiers.

Please, allow mod creators to modify loot from leaves.

csisDustin commented 2 years ago

using rlcraft reimagined, the loot (lack of sticks %) from these leaves make notreepunch tech tree very difficult.

Harleyoc1 commented 2 years ago

You can modify the loot dropped by dynamic trees (when broken by hand/tool manually) by adding a loot table like normal. Other than that loot is dynamic and as such uses our own systems (drop creators) which are customisable in their own right.

To be honest I am considering trialing fully embracing loot tables at some point in the future, but unfortunately until then customising drops is not easy (requires modifying the species Json themselves except for manual breaking as explained above).

csisDustin commented 2 years ago

I do not understand "(drop creators)" or "that your own system is customizable in their own right" or "species json" ? how? I only know how loot systems affect entity's like a leaf block or a mob. I am trying to infer that a branch or part of a tree is managed by your system, but I'm only interested in the leaf block itself, which shouldn't be overwritten by the dynamic tree system? or am I mistaken?

On Sat, Feb 26, 2022 at 5:19 AM Harleyoc1 @.***> wrote:

You can modify the loot dropped by dynamic trees (when broken by hand/tool manually) by adding a loot table like normal. Other than that loot is dynamic and as such uses our own systems (drop creators) which are customisable in their own right.

To be honest I am considering trialing fully embracing loot tables at some point in the future, but unfortunately until then customising drops is not easy (requires modifying the species Json themselves except for manual breaking as explained above).

— Reply to this email directly, view it on GitHub https://github.com/DynamicTreesTeam/DynamicTrees/issues/671#issuecomment-1052103223, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASFVHRX37MIXUO7NYI5DRSDU5DAL3ANCNFSM5O4BIQHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

Harleyoc1 commented 2 years ago

My point is that we don't integrate with loot tables properly at the moment, but it is something I plan on changing so stuff like this is easier. As I said before you can still change the drops for manual leaves breaks using a custom loot table, but not with loot modifiers.

Drop creators are effectively just our custom loot tables. I ported them from 1.12 to work with our customisation options for species* not realising how internally customisable loot tables are. The current system means you have to override a species, changing its drop_creators array which certainly isn't ideal.

As this is now a planned change I'm going to leave this issue open.

* The trees folder in the MC directory effectively acts as a resources directory like DT and its add-ons use (see DT's resources here), allowing the user to override or create your own trees, leaves, species, etc in Json.

Harleyoc1 commented 2 years ago

And yes, DT uses its own leaves. This is a requirement for the functionality. All DT leaves use the same registry names as their vanilla counterparts except with dynamictrees as the namespace (e.g. dynamictrees:oak_leaves). Also note that this block is only used in the tree multi blocks, so when you break the leaves with shears it will give you the vanilla ones.

csisDustin commented 2 years ago

Thanks!

On Sun, Feb 27, 2022 at 4:02 AM Harleyoc1 @.***> wrote:

And yes, DT uses its own leaves. This is a requirement for the functionality. All DT leaves use the same registry names as their vanilla counterparts except with dynamictrees as the namespace (e.g. `dynamictrees:oak_leaves). Also note that this block is only used in the tree multi blocks, so when you break the leaves with shears it will give you the vanilla ones.

— Reply to this email directly, view it on GitHub https://github.com/DynamicTreesTeam/DynamicTrees/issues/671#issuecomment-1053500097, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASFVHRSMIIUYYD7NLQWQV2LU5IAE7ANCNFSM5O4BIQHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

gedeknepper commented 2 years ago

Has this feature been implemented yet? I tried modifying the leaves loot table with KubeJS, and was very confused when it didn't work.

Harleyoc1 commented 2 years ago

I have done most of the work for fully embracing loot tables here. I will be opening a PR for it soon where the changes will be fully explained.

Harleyoc1 commented 2 years ago

Will be possible in the next beta.