Added horse shoe fries, rock candy, salt cubes, toast, and candied apples
|
@ -148,6 +148,9 @@ public interface URenderers {
|
|||
ModelPredicateProviderRegistry.register(UItems.GEMSTONE, new Identifier("affinity"), (stack, world, entity, seed) -> {
|
||||
return EnchantableItem.isEnchanted(stack) ? EnchantableItem.getSpellKey(stack).getAffinity().getAlignment() : 0;
|
||||
});
|
||||
ModelPredicateProviderRegistry.register(UItems.ROCK_CANDY, new Identifier("count"), (stack, world, entity, seed) -> {
|
||||
return stack.getCount() / (float)stack.getMaxCount();
|
||||
});
|
||||
ColorProviderRegistry.ITEM.register((stack, i) -> {
|
||||
return i > 0 || !EnchantableItem.isEnchanted(stack) ? -1 : EnchantableItem.getSpellKey(stack).getColor();
|
||||
}, UItems.GEMSTONE);
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package com.minelittlepony.unicopia.item;
|
||||
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemConvertible;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class StagedFoodItem extends Item {
|
||||
|
||||
private final ItemConvertible eatingRemainder;
|
||||
|
||||
public StagedFoodItem(Settings settings, ItemConvertible eatingRemainder) {
|
||||
super(settings);
|
||||
this.eatingRemainder = eatingRemainder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack finishUsing(ItemStack stack, World world, LivingEntity user) {
|
||||
if (isFood()) {
|
||||
user.eatFood(world, stack.copy());
|
||||
if (user instanceof PlayerEntity player && player.getAbilities().creativeMode) {
|
||||
return stack;
|
||||
}
|
||||
|
||||
if (stack.isDamageable() && stack.getDamage() < stack.getMaxDamage() - 1) {
|
||||
stack.damage(1, user, ply -> {
|
||||
// noop
|
||||
});
|
||||
return stack;
|
||||
}
|
||||
return eatingRemainder.asItem().getDefaultStack();
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
}
|
|
@ -54,6 +54,10 @@ public interface UItems {
|
|||
Item LIGHTNING_JAR = register("lightning_jar", new JarItem(new Item.Settings().maxCount(1).fireproof().recipeRemainder(EMPTY_JAR), false, false, true), ItemGroups.FUNCTIONAL);
|
||||
Item ZAP_APPLE_JAM_JAR = register("zap_apple_jam_jar", new JarItem(new Item.Settings().maxCount(1).fireproof().recipeRemainder(EMPTY_JAR), false, false, true), ItemGroups.FUNCTIONAL);
|
||||
|
||||
Item TOAST = register("toast", new Item(new Item.Settings().maxCount(1).food(UFoodComponents.TOAST)), ItemGroups.FOOD_AND_DRINK);
|
||||
Item BURNED_TOAST = register("burned_toast", new Item(new Item.Settings().maxCount(1).food(UFoodComponents.BURNED_TOAST)), ItemGroups.FOOD_AND_DRINK);
|
||||
Item JAM_TOAST = register("jam_toast", new Item(new Item.Settings().maxCount(1).food(UFoodComponents.JAM_TOAST)), ItemGroups.FOOD_AND_DRINK);
|
||||
|
||||
Item CRYSTAL_HEART = register("crystal_heart", new CrystalHeartItem(new Item.Settings().maxCount(1)), ItemGroups.TOOLS);
|
||||
Item CRYSTAL_SHARD = register("crystal_shard", new Item(new Item.Settings()), ItemGroups.NATURAL);
|
||||
|
||||
|
@ -72,6 +76,10 @@ public interface UItems {
|
|||
Item HAY_BURGER = register("hay_burger", new Item(new Item.Settings().maxCount(1).food(UFoodComponents.HAY_BURGER)), ItemGroups.FOOD_AND_DRINK);
|
||||
Item HAY_FRIES = register("hay_fries", new Item(new Item.Settings().maxCount(16).food(UFoodComponents.HAY_FRIES)), ItemGroups.FOOD_AND_DRINK);
|
||||
Item CRISPY_HAY_FRIES = register("crispy_hay_fries", new Item(new Item.Settings().maxCount(16).food(UFoodComponents.CRISPY_HAY_FRIES)), ItemGroups.FOOD_AND_DRINK);
|
||||
/**
|
||||
* https://mlp.fandom.com/wiki/Food_and_beverage
|
||||
*/
|
||||
Item HORSE_SHOE_FRIES = register("horse_shoe_fries", new Item(new Item.Settings().maxCount(32).food(UFoodComponents.HAY_FRIES)), ItemGroups.FOOD_AND_DRINK);
|
||||
|
||||
Item WHEAT_WORMS = register("wheat_worms", new Item(new Item.Settings().maxCount(16).food(UFoodComponents.WORMS)), ItemGroups.NATURAL);
|
||||
Item MUFFIN = register("muffin", new MuffinItem(new Item.Settings().maxCount(32).food(FoodComponents.BREAD), 0), ItemGroups.FOOD_AND_DRINK);
|
||||
|
@ -91,6 +99,8 @@ public interface UItems {
|
|||
EntityAttributes.GENERIC_KNOCKBACK_RESISTANCE, new EntityAttributeModifier(BluntWeaponItem.KNOCKBACK_MODIFIER_ID, "Weapon modifier", 0.9, EntityAttributeModifier.Operation.ADDITION)
|
||||
)), ItemGroups.NATURAL);
|
||||
Item ROCK_STEW = register("rock_stew", new Item(new Item.Settings().food(FoodComponents.MUSHROOM_STEW)), ItemGroups.FOOD_AND_DRINK);
|
||||
Item ROCK_CANDY = register("rock_candy", new Item(new Item.Settings().food(UFoodComponents.CANDY).maxCount(16)), ItemGroups.FOOD_AND_DRINK);
|
||||
Item SALT_CUBE = register("salt_cube", new Item(new Item.Settings().food(UFoodComponents.SALT_CUBE)), ItemGroups.FOOD_AND_DRINK);
|
||||
|
||||
Item GREEN_APPLE_SEEDS = register("green_apple_seeds", new AliasedBlockItem(UBlocks.GREEN_APPLE_SPROUT, new Item.Settings()), ItemGroups.NATURAL);
|
||||
Item SWEET_APPLE_SEEDS = register("sweet_apple_seeds", new AliasedBlockItem(UBlocks.SWEET_APPLE_SPROUT, new Item.Settings()), ItemGroups.NATURAL);
|
||||
|
@ -103,6 +113,7 @@ public interface UItems {
|
|||
Item APPLE_PIE = register("apple_pie", new BlockItem(UBlocks.APPLE_PIE, new Item.Settings().maxCount(1)), ItemGroups.FOOD_AND_DRINK);
|
||||
Item APPLE_PIE_HOOF = register("apple_pie_hoof", new AliasedBlockItem(UBlocks.APPLE_PIE, new Item.Settings().maxCount(1)), ItemGroups.FOOD_AND_DRINK);
|
||||
Item APPLE_PIE_SLICE = register("apple_pie_slice", new Item(new Item.Settings().maxCount(16).food(UFoodComponents.PIE)), ItemGroups.FOOD_AND_DRINK);
|
||||
Item CANDIED_APPLE = register("candied_apple", new StagedFoodItem(new Item.Settings().food(UFoodComponents.CANDY).maxDamage(3), () -> Items.STICK), ItemGroups.FOOD_AND_DRINK);
|
||||
|
||||
Item LOVE_BOTTLE = register("love_bottle", new DrinkableItem(new Item.Settings().food(UFoodComponents.LOVE_BOTTLE).maxCount(1).recipeRemainder(Items.GLASS_BOTTLE)), ItemGroups.FOOD_AND_DRINK);
|
||||
Item LOVE_BUCKET = register("love_bucket", new DrinkableItem(new Item.Settings().food(UFoodComponents.LOVE_BUCKET).recipeRemainder(Items.BUCKET)), ItemGroups.FOOD_AND_DRINK);
|
||||
|
|
|
@ -28,9 +28,9 @@ public interface UFoodComponents {
|
|||
FoodComponent WORMS = builder(1, 1.5F).alwaysEdible().meat().build();
|
||||
FoodComponent INSECTS = builder(1, 0).alwaysEdible().build();
|
||||
|
||||
FoodComponent CEREAL = builder(9, 0.8F).build();
|
||||
FoodComponent SUGAR = builder(20, -2).build();
|
||||
|
||||
FoodComponent TOAST = builder(1, 0.6F).alwaysEdible().snack().build();
|
||||
FoodComponent BURNED_TOAST = builder(1, -0.8F).alwaysEdible().snack().build();
|
||||
FoodComponent JAM_TOAST = builder(4, 0.6F).alwaysEdible().snack().build();
|
||||
FoodComponent ZAP_APPLE = builder(4, 0.3F).alwaysEdible().snack().build();
|
||||
FoodComponent ZAP_BULB = builder(-2, -0.8f)
|
||||
.alwaysEdible()
|
||||
|
@ -48,6 +48,9 @@ public interface UFoodComponents {
|
|||
FoodComponent MANGO = builder(8, 0.8F).alwaysEdible().build();
|
||||
FoodComponent BANANA = builder(6, 0.9F).build();
|
||||
|
||||
FoodComponent CANDY = builder(7, 0.9F).alwaysEdible().build();
|
||||
FoodComponent SALT_CUBE = builder(0, 2.9F).alwaysEdible().build();
|
||||
|
||||
static FoodComponent.Builder builder(int hunger, float saturation) {
|
||||
return new FoodComponent.Builder()
|
||||
.hunger(hunger)
|
||||
|
|
|
@ -74,6 +74,10 @@
|
|||
"item.unicopia.storm_cloud_jar": "Storm in a Jar",
|
||||
"item.unicopia.lightning_jar": "Lightning in a Jar",
|
||||
"item.unicopia.zap_apple_jam_jar": "Zap Apple Jam",
|
||||
|
||||
"item.unicopia.toast": "Toast",
|
||||
"item.unicopia.burned_toast": "Burned Toast",
|
||||
"item.unicopia.jam_toast": "Toast with Zap Apple Jam",
|
||||
|
||||
"item.unicopia.crystal_heart": "Crystal Heart",
|
||||
"item.unicopia.crystal_shard": "Crystal Shard",
|
||||
|
@ -107,6 +111,8 @@
|
|||
"item.unicopia.weird_rock": "Weird Rock",
|
||||
"item.unicopia.tom": "Tom",
|
||||
"item.unicopia.rock_stew": "Rock Stew",
|
||||
"item.unicopia.rock_candy": "Rock Candy",
|
||||
"item.unicopia.salt_cube": "Salt Cube",
|
||||
"item.unicopia.pinecone": "Pinecone",
|
||||
"item.unicopia.acorn": "Acorn",
|
||||
"item.unicopia.green_apple_seeds": "Granny Smith Apple Seeds",
|
||||
|
@ -114,6 +120,7 @@
|
|||
"item.unicopia.sour_apple_seeds": "Sour Apple Seeds",
|
||||
"item.unicopia.apple_pie_hoof": "Apple Pie with a Hoofprint",
|
||||
"item.unicopia.apple_pie_slice": "Slice Of Apple Pie",
|
||||
"item.unicopia.candied_apple": "Candied Apple",
|
||||
|
||||
"item.unicopia.oats": "Oats",
|
||||
"item.unicopia.imported_oats": "Fancy Imported Oats",
|
||||
|
@ -123,6 +130,7 @@
|
|||
"item.unicopia.hay_burger": "Hay Burger",
|
||||
"item.unicopia.hay_fries": "Hay Fries",
|
||||
"item.unicopia.crispy_hay_fries": "Crispy Hay Fries",
|
||||
"item.unicopia.horse_shoe_fries": "Horse Shoe Fries",
|
||||
"item.unicopia.wheat_worms": "Wheat Worms",
|
||||
"item.unicopia.muffin": "Muffin",
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/burned_toast"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/candied_apple"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"predicate": {
|
||||
"damage": 0.3
|
||||
},
|
||||
"model": "unicopia:item/candied_apple_bite1"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"damage": 0.6
|
||||
},
|
||||
"model": "unicopia:item/candied_apple_bite2"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/candied_apple_bite1"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/candied_apple_bite2"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/horse_shoe_fries"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/jam_toast"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/rock_candy"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"predicate": {
|
||||
"count": 0.125
|
||||
},
|
||||
"model": "unicopia:item/rock_candy_2"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"count": 0.1875
|
||||
},
|
||||
"model": "unicopia:item/rock_candy_3"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"count": 0.25
|
||||
},
|
||||
"model": "unicopia:item/rock_candy_4"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"count": 0.3125
|
||||
},
|
||||
"model": "unicopia:item/rock_candy_5"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"count": 0.375
|
||||
},
|
||||
"model": "unicopia:item/rock_candy_6"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"count": 0.4375
|
||||
},
|
||||
"model": "unicopia:item/rock_candy_7"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"count": 0.5
|
||||
},
|
||||
"model": "unicopia:item/rock_candy_8"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"count": 0.5625
|
||||
},
|
||||
"model": "unicopia:item/rock_candy_9"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"count": 0.625
|
||||
},
|
||||
"model": "unicopia:item/rock_candy_10"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"count": 0.6875
|
||||
},
|
||||
"model": "unicopia:item/rock_candy_11"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"count": 0.75
|
||||
},
|
||||
"model": "unicopia:item/rock_candy_12"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"count": 0.8125
|
||||
},
|
||||
"model": "unicopia:item/rock_candy_13"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"count": 0.875
|
||||
},
|
||||
"model": "unicopia:item/rock_candy_14"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"count": 0.9375
|
||||
},
|
||||
"model": "unicopia:item/rock_candy_15"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"count": 1
|
||||
},
|
||||
"model": "unicopia:item/rock_candy_16"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/rock_candy_10"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/rock_candy_11"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/rock_candy_12"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/rock_candy_13"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/rock_candy_14"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/rock_candy_15"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/rock_candy_16"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/rock_candy_2"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/rock_candy_3"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/rock_candy_4"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/rock_candy_5"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/rock_candy_6"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/rock_candy_7"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/rock_candy_8"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/rock_candy_9"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/salt_cube"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "unicopia:item/toast"
|
||||
}
|
||||
}
|
BIN
src/main/resources/assets/unicopia/textures/item/bread_slice.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 7 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 6.9 KiB |
BIN
src/main/resources/assets/unicopia/textures/item/jam_toast.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
src/main/resources/assets/unicopia/textures/item/rock_candy.png
Normal file
After Width: | Height: | Size: 7 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 8 KiB |
After Width: | Height: | Size: 8 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 7 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 7.4 KiB |
BIN
src/main/resources/assets/unicopia/textures/item/salt_cube.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
src/main/resources/assets/unicopia/textures/item/toast.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
|
@ -9,6 +9,7 @@
|
|||
"unicopia:zap_wood",
|
||||
"unicopia:stripped_zap_log",
|
||||
"unicopia:stripped_zap_wood",
|
||||
"unicopia:candied_apple",
|
||||
"minecraft:apple",
|
||||
"unicopia:green_apple",
|
||||
"unicopia:sweet_apple",
|
||||
|
@ -36,6 +37,7 @@
|
|||
"unicopia:hay_burger",
|
||||
"unicopia:hay_fries",
|
||||
"unicopia:crispy_hay_fries",
|
||||
"unicopia:horse_shoe_fries",
|
||||
"unicopia:wheat_worms",
|
||||
"unicopia:muffin",
|
||||
"unicopia:acorn",
|
||||
|
@ -45,10 +47,15 @@
|
|||
"unicopia:rock",
|
||||
"unicopia:weird_rock",
|
||||
"unicopia:rock_stew",
|
||||
"unicopia:rock_candy",
|
||||
"unicopia:salt_cube",
|
||||
"unicopia:mug",
|
||||
"unicopia:cider",
|
||||
"unicopia:juice",
|
||||
"unicopia:burned_juice",
|
||||
"unicopia:toast",
|
||||
"unicopia:jam_toast",
|
||||
"unicopia:burned_toast",
|
||||
"unicopia:apple_pie",
|
||||
"unicopia:apple_pie_hoof",
|
||||
"unicopia:apple_pie_slice",
|
||||
|
|