Add loot table to obtain stomped apple pies and make them compostable

This commit is contained in:
Sollace 2023-08-16 18:35:10 +01:00
parent 7a5218dfe1
commit 655b968725
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
4 changed files with 56 additions and 0 deletions

View file

@ -17,6 +17,7 @@ public interface UTags {
TagKey<Item> FRESH_APPLES = item("fresh_apples"); TagKey<Item> FRESH_APPLES = item("fresh_apples");
TagKey<Item> FALLS_SLOWLY = item("falls_slowly"); TagKey<Item> FALLS_SLOWLY = item("falls_slowly");
TagKey<Item> PIES = item("pies");
TagKey<Item> CAN_CUT_PIE = item("can_cut_pie"); TagKey<Item> CAN_CUT_PIE = item("can_cut_pie");
TagKey<Item> MAGIC_FEATHERS = item("magic_feathers"); TagKey<Item> MAGIC_FEATHERS = item("magic_feathers");

View file

@ -202,6 +202,7 @@ public interface UItems {
CompostingChanceRegistry.INSTANCE.add(SWEET_APPLE_SEEDS, 0.3F); CompostingChanceRegistry.INSTANCE.add(SWEET_APPLE_SEEDS, 0.3F);
CompostingChanceRegistry.INSTANCE.add(SOUR_APPLE_SEEDS, 0.3F); CompostingChanceRegistry.INSTANCE.add(SOUR_APPLE_SEEDS, 0.3F);
CompostingChanceRegistry.INSTANCE.add(APPLE_PIE, 0.5F); CompostingChanceRegistry.INSTANCE.add(APPLE_PIE, 0.5F);
CompostingChanceRegistry.INSTANCE.add(APPLE_PIE_HOOF, 0.5F);
CompostingChanceRegistry.INSTANCE.add(APPLE_PIE_SLICE, 0.1F); CompostingChanceRegistry.INSTANCE.add(APPLE_PIE_SLICE, 0.1F);
CompostingChanceRegistry.INSTANCE.add(BUTTERFLY, 0.1F); CompostingChanceRegistry.INSTANCE.add(BUTTERFLY, 0.1F);

View file

@ -0,0 +1,47 @@
{
"type": "minecraft:block",
"functions": [
{
"function": "minecraft:explosion_decay"
}
],
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:all_of",
"terms": [
{
"block": "unicopia:apple_pie",
"condition": "minecraft:block_state_property",
"properties": {
"stomped": true
}
},
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
]
}
],
"entries": [
{
"type": "minecraft:item",
"name": "unicopia:apple_pie_hoof"
}
],
"rolls": 1.0
}
]
}

View file

@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"unicopia:apple_pie",
"unicopia:apple_pie_hoof"
]
}