Change the horse feed creative tab into a "Foraging" tab and make more blocks foragable

This commit is contained in:
Sollace 2023-09-03 22:13:36 +01:00
parent 17c194dc61
commit 80cb31222b
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
8 changed files with 27 additions and 15 deletions

View file

@ -4,23 +4,15 @@ import java.util.stream.Stream;
import com.minelittlepony.unicopia.item.ChameleonItem; import com.minelittlepony.unicopia.item.ChameleonItem;
import com.minelittlepony.unicopia.item.UItems; import com.minelittlepony.unicopia.item.UItems;
import com.minelittlepony.unicopia.item.toxin.Toxic;
import com.minelittlepony.unicopia.item.toxin.ToxicHolder;
import net.minecraft.item.*; import net.minecraft.item.*;
import net.minecraft.registry.Registries;
import net.minecraft.registry.RegistryKey; import net.minecraft.registry.RegistryKey;
public interface UItemGroups { public interface UItemGroups {
RegistryKey<ItemGroup> ALL_ITEMS = ItemGroupRegistry.createDynamic("items", UItems.EMPTY_JAR::getDefaultStack, () -> { RegistryKey<ItemGroup> ALL_ITEMS = ItemGroupRegistry.createDynamic("items", UItems.CRYSTAL_HEART::getDefaultStack, () -> {
return Stream.concat(Stream.of(Items.APPLE), ItemGroupRegistry.ITEMS.stream() return Stream.concat(Stream.of(Items.APPLE), ItemGroupRegistry.ITEMS.stream()
.filter(item -> !(item instanceof ChameleonItem) || ((ChameleonItem)item).isFullyDisguised())); .filter(item -> !(item instanceof ChameleonItem) || ((ChameleonItem)item).isFullyDisguised()));
}); });
RegistryKey<ItemGroup> HORSE_FEED = ItemGroupRegistry.createDynamic("horsefeed", UItems.ZAP_APPLE::getDefaultStack, () -> { RegistryKey<ItemGroup> FORAGING_ITEMS = ItemGroupRegistry.createGroupFromTag("foraging", Items.HAY_BLOCK::getDefaultStack);
return Registries.ITEM.stream()
.filter(item -> ((ToxicHolder)item).getToxic(item.getDefaultStack()) != Toxic.EMPTY);
});
RegistryKey<ItemGroup> EARTH_PONY_ITEMS = ItemGroupRegistry.createGroupFromTag("earth_pony", UItems.EARTH_BADGE::getDefaultStack); RegistryKey<ItemGroup> EARTH_PONY_ITEMS = ItemGroupRegistry.createGroupFromTag("earth_pony", UItems.EARTH_BADGE::getDefaultStack);
RegistryKey<ItemGroup> UNICORN_ITEMS = ItemGroupRegistry.createGroupFromTag("unicorn", UItems.UNICORN_BADGE::getDefaultStack); RegistryKey<ItemGroup> UNICORN_ITEMS = ItemGroupRegistry.createGroupFromTag("unicorn", UItems.UNICORN_BADGE::getDefaultStack);
RegistryKey<ItemGroup> PEGASUS_ITEMS = ItemGroupRegistry.createGroupFromTag("pegasus", UItems.PEGASUS_BADGE::getDefaultStack); RegistryKey<ItemGroup> PEGASUS_ITEMS = ItemGroupRegistry.createGroupFromTag("pegasus", UItems.PEGASUS_BADGE::getDefaultStack);

View file

@ -11,8 +11,8 @@
"ability.unicopia.too_low": "I need to get higher up", "ability.unicopia.too_low": "I need to get higher up",
"ability.unicopia.clear_skies": "The skies already look pretty clear", "ability.unicopia.clear_skies": "The skies already look pretty clear",
"itemGroup.unicopia.items": "Unicopia - Misc.", "itemGroup.unicopia.items": "Unicopia",
"itemGroup.unicopia.horsefeed": "Unicopia - Horse Feed", "itemGroup.unicopia.foraging": "Unicopia - Foraging",
"itemGroup.unicopia.earth_pony": "Unicopia - Ponyville", "itemGroup.unicopia.earth_pony": "Unicopia - Ponyville",
"itemGroup.unicopia.unicorn": "Unicopia - Canterlot", "itemGroup.unicopia.unicorn": "Unicopia - Canterlot",
"itemGroup.unicopia.pegasus": "Unicopia - Cloudsdale", "itemGroup.unicopia.pegasus": "Unicopia - Cloudsdale",

View file

@ -2,6 +2,7 @@
"replace": false, "replace": false,
"values": [ "values": [
{ "id": "#c:mushrooms", "required": false }, { "id": "#c:mushrooms", "required": false },
{ "id": "#c:saplings", "required": false } { "id": "#c:saplings", "required": false },
{ "id": "farmersdelight:sandy_shrub", "required": false }
] ]
} }

View file

@ -10,6 +10,8 @@
"minecraft:dandelion", "minecraft:dandelion",
"minecraft:tall_grass", "minecraft:tall_grass",
"minecraft:wheat", "minecraft:wheat",
"minecraft:dead_bush",
"minecraft:pink_petals",
"#c:foraging/edibles" "#c:foraging/edibles"
] ]
} }

View file

@ -2,6 +2,7 @@
"replace": false, "replace": false,
"values": [ "values": [
"minecraft:hay_block", "minecraft:hay_block",
"#minecraft:leaves",
"#c:foraging/edibles_filling", "#c:foraging/edibles_filling",
{ "id": "farmersdelight:rice_bale", "required": false } { "id": "farmersdelight:rice_bale", "required": false }
] ]

View file

@ -1,6 +1,7 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"minecraft:rose_bush" "minecraft:rose_bush",
"#minecraft:saplings"
] ]
} }

View file

@ -1,6 +1,6 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"minecraft:dead_bush"
] ]
} }

View file

@ -0,0 +1,15 @@
{
"replace": false,
"values": [
"#unicopia:food_types/forage_dangerous",
"#unicopia:food_types/forage_edible_filling",
"#unicopia:food_types/forage_edible",
"#unicopia:food_types/forage_nauseating",
"#unicopia:food_types/forage_prickly",
"#unicopia:food_types/forage_radioactive",
"#unicopia:food_types/forage_risky",
"#unicopia:food_types/forage_severely_nauseating",
"#unicopia:food_types/forage_severely_prickly",
"#unicopia:food_types/forage_strengthening"
]
}