Skip to content

Commit

Permalink
Make heartbeets drop again
Browse files Browse the repository at this point in the history
  • Loading branch information
KnightMiner committed May 14, 2021
1 parent cab24f0 commit 829b8f1
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 9 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Expand Up @@ -6,8 +6,8 @@ minecraft_range=[1.16.5,1.17)

# Forge Version Information
loader_range=[33.0,)
forge_version=36.0.1
forge_range=[36.0.1,)
forge_version=36.0.14
forge_range=[36.0.14,)
mappings_version=20200916-1.16.2

# Dependencies
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/knightminer/inspirations/common/Config.java
Expand Up @@ -144,8 +144,6 @@ public class Config {
public static final CachedBoolean enableHeartbeet;
public static final CachedBoolean brewHeartbeet;

public static final CachedValue<Integer> heartbeetChance;

// seeds
public static final CachedBoolean enableBlockCrops;
public static final CachedBoolean smoothBlockCropGrowth;
Expand Down Expand Up @@ -575,11 +573,6 @@ public class Config {
.worldRestart()
.define("heartbeet.brewRegeneration", true));

// TODO: move to loot tables
heartbeetChance = server(server
.comment("Chance of a heartbeet to drop instead of a normal drop. Formula is two 1 in [chance] chances for it to drop each harvest")
.defineInRange("heartbeet.chance", 75, 10, 1000));

// dispensers place anvils
dispensersPlaceAnvils = and(tweaksModule, server
.comment("Dispensers will place anvils instead of dropping them. Plays well with anvil smashing.")
Expand Down
Expand Up @@ -142,6 +142,7 @@ private static ConfigEnabledCondition add(String prop, BooleanSupplier supplier)
public static final ConfigEnabledCondition UNSTACKABLE_ALTS = add("unstackable_alts", Config.unstackableRecipeAlts);
public static final ConfigEnabledCondition SKELETON_SKULL = add("skeleton_skull", Config.skeletonSkull);
public static final ConfigEnabledCondition CAVE_SPIDER_WEB = add("cave_spider_web", Config.caveSpiderDrops);
public static final ConfigEnabledCondition HEARTBEETS = add("heartbeets", Config.enableHeartbeet);

// recipes
public static final ConfigEnabledCondition CAULDRON_RECIPES = add("cauldron_recipes", Config.cauldronRecipes);
Expand Down
@@ -0,0 +1,6 @@
{
"replace": false,
"entries": [
"inspirations:heartbeet"
]
}
32 changes: 32 additions & 0 deletions src/main/resources/data/inspirations/loot_modifiers/heartbeet.json
@@ -0,0 +1,32 @@
{
"type": "mantle:replace_item",
"conditions": [
{
"condition": "forge:loot_table_id",
"loot_table_id": "minecraft:blocks/beetroots"
},
{
"condition": "inspirations:config",
"prop": "heartbeets"
},
{
"condition": "minecraft:block_state_property",
"block": "minecraft:beetroots",
"properties": {
"age": "3"
}
},
{
"condition": "minecraft:table_bonus",
"enchantment": "minecraft:fortune",
"chances": [
0.05,
0.0625,
0.083333336,
0.1
]
}
],
"original": "minecraft:beetroot",
"replacement": "inspirations:heartbeet"
}

0 comments on commit 829b8f1

Please sign in to comment.