Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.3.0.0 #111

Merged
merged 146 commits into from
Jan 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
430d54e
fix: fix machine menus displaying wrong crafting cost
Elenterius Sep 14, 2023
bd03595
chore: update language file
Elenterius Sep 14, 2023
10e80c7
feat: tweak primal flesh block recipe
Elenterius Sep 14, 2023
8f8f086
chore: refactor BlockPropertyUtil
Elenterius Sep 17, 2023
2749d03
refactor: move recipes and crafting states into one shared crafting n…
Elenterius Sep 17, 2023
c6d0bdc
chore: add space, new line and ellipsis chat components
Elenterius Sep 17, 2023
12dfe8c
refactor: move ComponentUtil inside uitl package
Elenterius Sep 17, 2023
47ae062
refactor: refactor mob loot item
Elenterius Sep 17, 2023
bffef36
chore: add addValue method to EnhancedIntegerProperty
Elenterius Sep 18, 2023
12b883c
refactor: refactor FleshSpikeBlock
Elenterius Sep 18, 2023
4e115ae
refactor: refactor EffectCureItem
Elenterius Sep 18, 2023
633c014
refactor: make preconfigured projectiles shoot-able with origin and t…
Elenterius Sep 20, 2023
6d575d2
feat: add Malignant Bloom and Sapberry
Elenterius Sep 20, 2023
90acf5f
chore(release): 1.19.2-v2.2.1.0 [skip ci]
invalid-email-address Sep 21, 2023
9db734f
chore: refactor level util class and add additional helper methods
Elenterius Oct 14, 2023
d483871
feat: improve make malignant bloom shooting and check for blocks obst…
Elenterius Oct 14, 2023
1989d6f
chore: tweak flesh spreading in regards to the cellular noise borders
Elenterius Oct 14, 2023
c6aa30e
chore: add dev feature for dumping temperature and downfall for all r…
Elenterius Oct 14, 2023
1137763
fix: fix serum duplication bug with Injector
Elenterius Oct 14, 2023
11fcd4d
feat: remove the ability of mob effects to influence the hostility of…
Elenterius Oct 14, 2023
9ab0c36
feat: make it possible to add more cradle tributes via code
Elenterius Oct 14, 2023
cdfde73
chore: refactor MobEffectTribute to avoid creation of new empty objects
Elenterius Oct 14, 2023
0abd696
feat(tetra-compat): make Dragon Sinew a valid cradle tribute
Elenterius Oct 14, 2023
9dd10ee
fix: add workaround for NERB incompatibility ("unlocks" all recipes w…
Elenterius Oct 28, 2023
e9f4eb5
fix: fix Wide Flesh Doors incompatibility with Quark's double door fe…
Elenterius Oct 28, 2023
6f4732b
feat(tetra-compat): make Dragon Sinew decomposable
Elenterius Oct 28, 2023
ca75b23
feat: make life energy affect the energy charge of the Primordial Cra…
Elenterius Oct 28, 2023
aa92c3a
feat: make nether stars a valid sacrifice source
Elenterius Oct 28, 2023
8a9df68
chore(release): 1.19.2-v2.2.2.0 [skip ci]
invalid-email-address Oct 28, 2023
dd31596
feat: remove legacy item tags for biomass
Elenterius Nov 1, 2023
47a8b12
feat: add server config for BioForge recipe unlocking and villager tr…
Elenterius Nov 2, 2023
0eb8f80
feat: make wandering trader trades less expensive
Elenterius Nov 2, 2023
8a5cc93
chore: update Modonomicon maven and version
Elenterius Nov 2, 2023
ee4096b
chore(guide-book): do guide book stuff
MissionArcher Mar 10, 2023
66e4349
chore(guide-book): add guide book textures
MissionArcher Mar 13, 2023
106a796
chore(guide-book): add Living Flesh page entry
MissionArcher Mar 13, 2023
e3aab81
chore(guide-book): reorder book entries
MissionArcher Mar 14, 2023
d575148
chore(guide-book): rework Flesh Blob entry
MissionArcher Mar 16, 2023
cdb2308
chore(guide-book): refactor guide book datagen
Elenterius Nov 2, 2023
5999030
chore: refactor primal energy charge handling and mitigate int overflow
Elenterius Nov 3, 2023
826c988
feat: add config for enabling unlimited flesh growth near cradles
Elenterius Nov 3, 2023
50df048
feat: remove infinite flesh growth near cradles (distance < 8)
Elenterius Nov 3, 2023
e28dc68
feat: add config for enabling unlimited flesh growth globally
Elenterius Nov 3, 2023
320cc67
feat: increase life/primal energy value of sacrificed Nether Stars te…
Elenterius Nov 3, 2023
c574f3d
feat: make malignant flesh veins replaceable
Elenterius Nov 3, 2023
18e7c96
chore(release): 1.19.2-v2.2.3.0 [skip ci]
invalid-email-address Nov 3, 2023
0596b36
build(gradle): simplify client run configurations for Hot-Swapping
Elenterius Nov 8, 2023
ac17061
fix: fix Primordial Cradle not persisting internal sacrifice values w…
Elenterius Nov 8, 2023
f244c70
feat: make Primordial Cradle block items display their internal sacri…
Elenterius Nov 8, 2023
b3923db
feat(buff): increase primal energy conversion of sacrifices in the Pr…
Elenterius Nov 8, 2023
dc1beb9
feat(nerf): decrease Malignant Bloom spawn rate
Elenterius Nov 8, 2023
e67d7c8
docs(readme): replace outdated Trello links with Github Project links
Elenterius Nov 10, 2023
b319e1e
fix: fix flesh veins inability to spread over dirt paths
Elenterius Nov 10, 2023
8fbe8a5
chore: refactor flesh veins block
Elenterius Nov 10, 2023
f02208e
feat: make overworld logs replaceable by malignant veins
Elenterius Nov 10, 2023
c75eb04
chore(release): 1.19.2-v2.2.4.0 [skip ci]
invalid-email-address Nov 11, 2023
c87b9c7
docs(readme): fix Github Project link
Elenterius Nov 13, 2023
77c1fee
feat: add block tags to explicitly allow/disallow attachment of flesh…
Elenterius Nov 13, 2023
19f3e6c
chore: refactor flesh veins
Elenterius Nov 13, 2023
37baff2
chore: add biome temperature utils
Elenterius Nov 19, 2023
891e4f4
chore: add getIndices method to Bit32Set
Elenterius Nov 19, 2023
8175714
feat(flesh-mound): add first iteration of the flesh mound growth to t…
Elenterius Nov 19, 2023
e528ba8
feat(flesh-mound): decrease volume of growth
Elenterius Nov 19, 2023
4b31341
chore(release): 1.19.2-v2.2.5.0 [skip ci]
invalid-email-address Nov 19, 2023
6e9b2e5
refactor(flesh-mound): refactor mound shape generation
Elenterius Nov 21, 2023
593f9c9
feat(flesh-mound): allow flesh mounds to excavate chambers and conver…
Elenterius Nov 21, 2023
bdfa12f
feat(flesh-mound): add bloomlight block as flesh type replacement of …
Elenterius Nov 21, 2023
32c2efd
feat(flesh-mound): make mound shapes persist across unloaded chunks a…
Elenterius Nov 29, 2023
0af5924
feat(flesh-mound): prevent natural spawning of mobs inside flesh mounds
Elenterius Nov 29, 2023
a0ea6e8
feat: add primal membrane block for living mobs
Elenterius Nov 29, 2023
2680d0e
feat(flesh-mound): create "Doors" between two adjacent chambers with …
Elenterius Nov 29, 2023
a5cb46b
fix(flesh-mound): fix unintentional MoundShape removal when the Cradl…
Elenterius Nov 29, 2023
e127cf6
feat(flesh-mound): improve storage and lookup of mound shapes
Elenterius Dec 4, 2023
36b6e65
feat(flesh-mound): prevent flesh veins from eating living flesh
Elenterius Dec 4, 2023
b1309ef
chore(flesh-mound): count primal membrane as full block
Elenterius Dec 4, 2023
eb763b2
chore: refactor mob spawning checks and improve spatial query
Elenterius Dec 5, 2023
0902a3b
feat: add undead-permeable membrane
Elenterius Dec 5, 2023
d2904fd
chore(spatial): add cuboid shape and allow spatial querying with box …
Elenterius Dec 7, 2023
4a06b22
chore(spatial): add a wrapper shape that is a mob spawn filter and ho…
Elenterius Dec 7, 2023
4ecc094
feat: add neural interceptor block
Elenterius Dec 7, 2023
9d71212
chore(spatial): add logging to the storage handler
Elenterius Dec 7, 2023
60d4ad0
chore(release): 1.19.2-v2.2.6.0 [skip ci]
invalid-email-address Dec 9, 2023
95c32e7
fix(gradle): fix build configuration not including the api sourceset …
Elenterius Dec 9, 2023
3acb916
feat(flesh-mound): make Malignant Bloom spawn less likely inside the …
Elenterius Dec 9, 2023
8750164
fix(flesh-mound): fix flesh veins being unable to find the flesh moun…
Elenterius Dec 9, 2023
be7e5d9
feat: change chiseled flesh block/texture
Elenterius Dec 10, 2023
0ce643b
chore: remove unused/old textures
Elenterius Dec 10, 2023
6c48122
chore: reorganize mod blocks registry
Elenterius Dec 10, 2023
02a2c84
feat: add primal orifice block
Elenterius Dec 10, 2023
7f06b15
feat(flesh-mound): tweak default mound gen settings
Elenterius Dec 10, 2023
d656a79
chore(flesh-mound): make radius, height and spire modifiers capable t…
Elenterius Dec 10, 2023
6924fff
chore: add helper methods for acid damage
Elenterius Dec 11, 2023
f3fb0b9
chore: add fluid registry
Elenterius May 3, 2023
61da539
feat(acid): add acid fluid
Elenterius May 3, 2023
050bf47
feat(acid): add fluid interaction with lava & water
Elenterius Dec 11, 2023
dc17391
feat(acid): add fluid compat for open pipes from Create
Elenterius May 3, 2023
dd32f9d
feat(acid): add dripping acid particle
Elenterius Dec 11, 2023
ac10f68
chore(release): 1.19.2-v2.2.7.0 [skip ci]
invalid-email-address Dec 11, 2023
df8e315
feat(acid): reduce probability for acid particles to produce fizzling…
Elenterius Dec 12, 2023
2949671
feat: make primal orifices milk-able with empty buckets
Elenterius Dec 12, 2023
52d2b60
feat(item-tag): add `cannot_be_eaten_by_cradle` tag for items that sh…
Elenterius Dec 19, 2023
138f2f1
feat(item-tag): add items to forge tags for doors, trapdoors and chests
Elenterius Dec 19, 2023
d1e9c66
fix: prevent storage sac from being eaten by the Cradle
Elenterius Dec 19, 2023
2de5134
feat: add bloomlight recipe
Elenterius Dec 19, 2023
33f3c25
feat: change Primordial Lantern recipe to require a Sapberry
Elenterius Dec 19, 2023
844b217
feat: tweak decomposing recipe of bloomlight
Elenterius Dec 19, 2023
2c9074a
feat: change the block material of Flesh Pillar, Chiseled Flesh and O…
Elenterius Dec 21, 2023
9b7bf5c
feat: buff strength of `FleshyBone` material (increase destroy time f…
Elenterius Dec 21, 2023
cf05380
feat: increase explosion resistance of Packed Flesh from 6 to 12
Elenterius Dec 21, 2023
648650c
feat: make bony flesh blocks play flesh or bone sounds (with equal pr…
Elenterius Dec 21, 2023
8f0bdb2
feat(flesh-mound): add chamber decorations such as pillars, orifices,…
Elenterius Dec 24, 2023
1ae0440
chore(release): 1.19.2-v2.2.8.0 [skip ci]
invalid-email-address Dec 24, 2023
6435e3a
feat: make primal membrane consider golems as not alive
Elenterius Dec 27, 2023
8835483
chore(flesh-mound): refactor mound shape stuff
Elenterius Dec 29, 2023
f7acee8
feat(flesh-mound): allow destruction of melons, pumpkins and moss
Elenterius Dec 29, 2023
6c65cc1
feat(flesh-mound): add bone pillar generation
Elenterius Dec 29, 2023
3db8c25
feat(flesh-mound): make Primal Membrane self-spreading inside flesh m…
Elenterius Dec 29, 2023
0448cd8
feat(flesh-mound): make mounds slightly smaller
Elenterius Dec 29, 2023
28f3c50
chore(release): 1.19.2-v2.2.9.0 [skip ci]
invalid-email-address Dec 29, 2023
d6e1db9
feat(acid-fluid): make acid randomly destroy flesh veins or crack sto…
Elenterius Dec 31, 2023
4dd6645
feat(acid-effect): increase acid effect damage for wet entities
Elenterius Dec 31, 2023
17ea367
feat(acid-effect): make entities sensitive to water (water splash pot…
Elenterius Dec 31, 2023
b21faf6
feat: make Bio-Forge reduce fall damage
Elenterius Dec 31, 2023
bd8a36a
chore: refactor entity type registration for projectiles
Elenterius Dec 31, 2023
d076e73
feat: add acid blob projectile and spawn it from primal orifices
Elenterius Dec 31, 2023
1cb2b2b
chore: partially fix geo projectile renderer
Elenterius Jan 2, 2024
d317313
chore: add custom shooting sound support to ConfiguredProjectiles
Elenterius Jan 2, 2024
00e2d9a
chore: improve debug messages for the spatial store
Elenterius Jan 8, 2024
be5fa53
chore: remove unused chunk section related code
Elenterius Jan 8, 2024
3e5b9c3
feat: prevent low acid fluid levels from destroying flesh veins
Elenterius Jan 8, 2024
7eeaa1a
feat: make acid fluid erode dirt
Elenterius Jan 8, 2024
ed54252
feat: replace acid fluid erosion of stone into cobblestone with cobbl…
Elenterius Jan 8, 2024
b255ea9
feat(flesh-mound): make flowers replaceable
Elenterius Jan 8, 2024
5243068
fix: fix flesh veins not being being mineable with a hoe
Elenterius Jan 8, 2024
9fd7c6c
feat(tags)!: rename primordial_ecosystem_replaceable tag to flesh_rep…
Elenterius Jan 8, 2024
2b59be1
feat(server-config)!: remove doUnlimitedGrowth settings
Elenterius Jan 8, 2024
6e51737
feat(acid-fluid): make acid fluid able to sweep away flesh veins
Elenterius Jan 8, 2024
56e4ccf
feat(acid-fluid): make acid fluid able to slowly destroy blocks with …
Elenterius Jan 8, 2024
4fb1312
feat(flesh-mound): tweak flesh mound size
Elenterius Jan 9, 2024
40621ee
chore: improve debug message for the spatial store
Elenterius Jan 9, 2024
509b93d
fix(flesh-mound): prevent chamber intersections with the main cradle …
Elenterius Jan 10, 2024
b4c9e99
feat!: remove neural interceptor block
Elenterius Jan 10, 2024
a4fee52
feat: rename Bloom related stuff
Elenterius Jan 10, 2024
6d98ccd
feat(tributes): make totem of undying a valid cradle sacrifice and bu…
Elenterius Jan 10, 2024
b2a82d3
build(workflow): fix download url in discord message
Elenterius Jan 10, 2024
3bcd2c8
fix: fix wrong file name for bloomberry item texture
Elenterius Jan 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: make it possible to add more cradle tributes via code
Elenterius committed Oct 14, 2023
commit 9ab0c3692757e1261d695774123166bd697f37d0
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
import com.github.elenterius.biomancy.init.*;
import com.github.elenterius.biomancy.network.ISyncableAnimation;
import com.github.elenterius.biomancy.network.ModNetworkHandler;
import com.github.elenterius.biomancy.tribute.Tribute;
import com.github.elenterius.biomancy.util.SoundUtil;
import com.github.elenterius.biomancy.world.PrimordialEcosystem;
import net.minecraft.core.BlockPos;
@@ -77,7 +78,7 @@ public boolean insertItem(ItemStack stack) {
});
}

private void spawnTributeParticles(ServerLevel level, ITribute tribute) {
private void spawnTributeParticles(ServerLevel level, Tribute tribute) {
BlockPos pos = getBlockPos();

if (tribute.successModifier() < 0) {
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.github.elenterius.biomancy.block.cradle;

import com.github.elenterius.biomancy.tribute.Tribute;
import com.github.elenterius.biomancy.tribute.Tributes;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.util.Mth;
import net.minecraft.world.item.ItemStack;
@@ -116,11 +118,11 @@ public boolean hasModifiers() {
return hasModifiers;
}

public boolean addItem(ItemStack stack, Consumer<ITribute> onSuccess) {
public boolean addItem(ItemStack stack, Consumer<Tribute> onSuccess) {
if (isFull()) return false;
if (stack.isEmpty()) return false;

ITribute tribute = Tributes.from(stack);
Tribute tribute = Tributes.from(stack);
int count = addTribute(tribute, stack.getCount());
if (count > 0) {
stack.shrink(count);
@@ -144,13 +146,13 @@ public boolean addItem(ItemStack stack) {
return false;
}

private int addTribute(ITribute tribute, int maxCount) {
private int addTribute(Tribute tribute, int maxCount) {
int n = maxCount;
while (n > 0 && addTribute(tribute)) n--;
return maxCount - n;
}

public boolean addTribute(ITribute tribute) {
public boolean addTribute(Tribute tribute) {
if (isFull()) return false;
if (tribute.isEmpty()) return false;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.elenterius.biomancy.block.cradle;
package com.github.elenterius.biomancy.tribute;

import com.github.elenterius.biomancy.init.ModMobEffects;
import com.mojang.datafixers.util.Pair;
@@ -13,7 +13,7 @@
import java.util.List;
import java.util.Set;

class MobEffectTribute implements ITribute {
class MobEffectTribute implements Tribute {

//TODO: Replace with TagKeys?
//
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package com.github.elenterius.biomancy.block.cradle;
package com.github.elenterius.biomancy.tribute;

public interface ITribute {
ITribute EMPTY = new ITribute() {
import org.jetbrains.annotations.ApiStatus;

@ApiStatus.Experimental
public interface Tribute {
Tribute EMPTY = new Tribute() {
@Override
public int biomass() {
return 0;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.github.elenterius.biomancy.block.cradle;
package com.github.elenterius.biomancy.tribute;

public record Tribute(int biomass, int lifeEnergy, int successModifier, int diseaseModifier, int hostileModifier, int anomalyModifier) implements ITribute {
public Tribute(ITribute a, ITribute b) {
public record TributeImpl(int biomass, int lifeEnergy, int successModifier, int diseaseModifier, int hostileModifier, int anomalyModifier) implements Tribute {
public TributeImpl(Tribute a, Tribute b) {
this(
a.biomass() + b.biomass(),
a.lifeEnergy() + b.lifeEnergy(),
@@ -12,8 +12,8 @@ public Tribute(ITribute a, ITribute b) {
);
}

public static Tribute.Builder builder() {
return new Tribute.Builder();
public static TributeImpl.Builder builder() {
return new TributeImpl.Builder();
}

public static class Builder {
@@ -54,8 +54,8 @@ public Builder anomalyModifier(int anomalyModifier) {
return this;
}

public ITribute create() {
return new Tribute(biomass, lifeEnergy, successModifier, diseaseModifier, hostileModifier, anomalyModifier);
public Tribute create() {
return new TributeImpl(biomass, lifeEnergy, successModifier, diseaseModifier, hostileModifier, anomalyModifier);
}
}
}
101 changes: 101 additions & 0 deletions src/main/java/com/github/elenterius/biomancy/tribute/Tributes.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
package com.github.elenterius.biomancy.tribute;

import com.github.elenterius.biomancy.init.ModItems;
import com.github.elenterius.biomancy.init.tags.ModItemTags;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraftforge.common.Tags;
import org.jetbrains.annotations.ApiStatus;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Predicate;

@ApiStatus.Experimental
public final class Tributes {

private static final Map<Item, Tribute> TRIBUTES = new HashMap<>();
private static final List<FuzzyTribute> FUZZY_TRIBUTES = new ArrayList<>();

public static final Tribute INVALID_ITEM = TributeImpl.builder().successModifier(-99).diseaseModifier(5).hostileModifier(20).create();

public static final Tribute EXOTIC_MEAL = register(ModItems.CREATOR_MIX.get(), TributeImpl.builder().biomass(20).lifeEnergy(20).successModifier(19).diseaseModifier(6).hostileModifier(-12).create());
public static final Tribute PRIMORDIAL_CORE = register(ModItems.PRIMORDIAL_CORE.get(), TributeImpl.builder().biomass(80).successModifier(64).anomalyModifier(100).diseaseModifier(50).create());

public static final Tribute LIVING_FLESH = register(ModItems.LIVING_FLESH.get(), TributeImpl.builder().biomass(10).lifeEnergy(10).successModifier(40).anomalyModifier(55).create());
public static final Tribute SAPBERRY = register(ModItems.SAPBERRY.get(), TributeImpl.builder().successModifier(10).lifeEnergy(20).anomalyModifier(20).create());
public static final Tribute GOLDEN_APPLE = register(Items.GOLDEN_APPLE, TributeImpl.builder().successModifier(10).hostileModifier(-100).create());
public static final Tribute ENCHANTED_GOLDEN_APPLE = register(Items.ENCHANTED_GOLDEN_APPLE, TributeImpl.builder().lifeEnergy(15).successModifier(40).hostileModifier(-200).create());
public static final Tribute CAKE = register(Items.CAKE, TributeImpl.builder().hostileModifier(-80).diseaseModifier(10).create());

public static final Tribute HEALING_ADDITIVE = register(ModItems.HEALING_ADDITIVE.get(), TributeImpl.builder().lifeEnergy(50).successModifier(1).diseaseModifier(-5).hostileModifier(-10).create());
public static final Tribute REGENERATIVE_FLUID = register(ModItems.REGENERATIVE_FLUID.get(), TributeImpl.builder().lifeEnergy(5).hostileModifier(-1).create());

public static final Tribute ROTTEN_FLESH = register(Items.ROTTEN_FLESH, TributeImpl.builder().biomass(10).successModifier(-10).diseaseModifier(20).create());
public static final Tribute MOB_SINEW = register(ModItems.MOB_SINEW.get(), TributeImpl.builder().biomass(5).successModifier(2).hostileModifier(-2).create());
public static final Tribute FLESH_BITS = register(ModItems.FLESH_BITS.get(), TributeImpl.builder().biomass(5).successModifier(2).hostileModifier(-2).create());

public static final Tribute RABBIT_FOOT = register(Items.RABBIT_FOOT, TributeImpl.builder().successModifier(1000).hostileModifier(-50).anomalyModifier(50).create());
public static final Tribute SPIDER_EYE = register(Items.SPIDER_EYE, TributeImpl.builder().successModifier(10).diseaseModifier(10).hostileModifier(-5).create());
public static final Tribute FERMENTED_SPIDER_EYE = register(Items.FERMENTED_SPIDER_EYE, TributeImpl.builder().successModifier(-10).hostileModifier(-10).create());
public static final Tribute TOXIN_GLAND = register(ModItems.TOXIN_GLAND.get(), TributeImpl.builder().successModifier(-5).diseaseModifier(50).create());
public static final Tribute VOLATILE_GLAND = register(ModItems.VOLATILE_GLAND.get(), TributeImpl.builder().successModifier(-5).diseaseModifier(20).create());
public static final Tribute GENERIC_MOB_GLAND = register(ModItems.GENERIC_MOB_GLAND.get(), TributeImpl.builder().diseaseModifier(-5).hostileModifier(-20).create());
public static final Tribute BONE = register(Items.BONE, TributeImpl.builder().successModifier(3).diseaseModifier(-10).create());
public static final Tribute BONE_MEAL = register(Items.BONE_MEAL, TributeImpl.builder().successModifier(1).diseaseModifier(-1).create());
public static final Tribute MOB_MARROW = register(ModItems.MOB_MARROW.get(), TributeImpl.builder().successModifier(5).diseaseModifier(-20).hostileModifier(-10).create());
public static final Tribute WITHERED_MOB_MARROW = register(ModItems.WITHERED_MOB_MARROW.get(), TributeImpl.builder().successModifier(-30).diseaseModifier(-40).create());
public static final Tribute MOB_FANG = register(ModItems.MOB_FANG.get(), TributeImpl.builder().successModifier(5).hostileModifier(5).create());
public static final Tribute MOB_CLAW = register(ModItems.MOB_CLAW.get(), TributeImpl.builder().successModifier(5).hostileModifier(5).create());
public static final Tribute ENDER_PEARL = register(Items.ENDER_PEARL, TributeImpl.builder().hostileModifier(50).anomalyModifier(50).create());

public static final Tribute ELASTIC_FIBERS = register(ModItems.ELASTIC_FIBERS.get(), TributeImpl.builder().diseaseModifier(1).anomalyModifier(1).create());
public static final Tribute TOUGH_FIBERS = register(ModItems.TOUGH_FIBERS.get(), TributeImpl.builder().diseaseModifier(1).anomalyModifier(1).create());

// tributes which are matched when no tribute was found beforehand
public static final Tribute RAW_MEATS = registerFuzzy(stack -> stack.is(ModItemTags.RAW_MEATS), TributeImpl.builder().biomass(20).successModifier(16).diseaseModifier(5).hostileModifier(-5).create());
public static final Tribute COOKED_MEATS = registerFuzzy(stack -> stack.is(ModItemTags.COOKED_MEATS), TributeImpl.builder().successModifier(-999).create());
public static final Tribute BONES = registerFuzzy(stack -> stack.is(Tags.Items.BONES), TributeImpl.builder().successModifier(5).diseaseModifier(-5).create());

private Tributes() {}

public static Tribute register(Item item, Tribute tribute) {
TRIBUTES.put(item, tribute);
return tribute;
}

public static Tribute registerFuzzy(Predicate<ItemStack> predicate, Tribute tribute) {
FUZZY_TRIBUTES.add(new FuzzyTribute(predicate, tribute));
return tribute;
}

public static Tribute from(ItemStack stack) {

MobEffectTribute mobEffectTribute = MobEffectTribute.from(stack);
Tribute tribute = findExistingTribute(stack);

if (mobEffectTribute.isEmpty() && tribute.isEmpty()) {
return INVALID_ITEM;
}

return new TributeImpl(tribute, mobEffectTribute);
}

private static Tribute findExistingTribute(ItemStack stack) {
if (stack.isEmpty()) return Tribute.EMPTY;

Tribute foundTribute = TRIBUTES.get(stack.getItem());
if (foundTribute != null) return foundTribute;

for (FuzzyTribute fuzzyTribute : FUZZY_TRIBUTES) {
if (fuzzyTribute.predicate().test(stack)) return fuzzyTribute.tribute();
}

return Tribute.EMPTY;
}

record FuzzyTribute(Predicate<ItemStack> predicate, Tribute tribute) {}
}