Foods skeletons :D

This commit is contained in:
Michael Hillcox 2020-12-06 20:42:28 +00:00
parent 434a4dc742
commit ba452d0988
No known key found for this signature in database
GPG key ID: 971C5B254742488F
3 changed files with 87 additions and 22 deletions

View file

@ -3,6 +3,7 @@ package de.ellpeck.actuallyadditions.common.items;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import de.ellpeck.actuallyadditions.common.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.common.items.misc.DrillAugmentItem; import de.ellpeck.actuallyadditions.common.items.misc.DrillAugmentItem;
import de.ellpeck.actuallyadditions.common.items.misc.YummyItem;
import de.ellpeck.actuallyadditions.common.items.useables.*; import de.ellpeck.actuallyadditions.common.items.useables.*;
import de.ellpeck.actuallyadditions.common.materials.ArmorMaterials; import de.ellpeck.actuallyadditions.common.materials.ArmorMaterials;
import de.ellpeck.actuallyadditions.common.materials.ToolMaterials; import de.ellpeck.actuallyadditions.common.materials.ToolMaterials;
@ -142,27 +143,30 @@ public final class ActuallyItems {
public static final RegistryObject<Item> CUP_WITH_COFFEE = ITEMS.register("cup_with_coffee", basicItem()); public static final RegistryObject<Item> CUP_WITH_COFFEE = ITEMS.register("cup_with_coffee", basicItem());
public static final RegistryObject<Item> PHANTOM_CONNECTOR = ITEMS.register("phantom_connector", basicItem()); public static final RegistryObject<Item> PHANTOM_CONNECTOR = ITEMS.register("phantom_connector", basicItem());
public static final RegistryObject<Item> RESONANT_RICE = ITEMS.register("resonant_rice", basicItem()); public static final RegistryObject<Item> RESONANT_RICE = ITEMS.register("resonant_rice", basicItem());
public static final RegistryObject<Item> FOOD_CHEESE = ITEMS.register("food_cheese", basicItem());
public static final RegistryObject<Item> FOOD_PUMPKIN_STEW = ITEMS.register("food_pumpkin_stew", basicItem()); // Foods! :D
public static final RegistryObject<Item> FOOD_CARROT_JUICE = ITEMS.register("food_carrot_juice", basicItem()); public static final RegistryObject<Item> FOOD_CHEESE = ITEMS.register("food_cheese", () -> new YummyItem(YummyItem.Foods.CHEESE));
public static final RegistryObject<Item> FOOD_FISH_N_CHIPS = ITEMS.register("food_fish_n_chips", basicItem()); public static final RegistryObject<Item> FOOD_PUMPKIN_STEW = ITEMS.register("food_pumpkin_stew", () -> new YummyItem(YummyItem.Foods.PUMPKIN_STEW));
public static final RegistryObject<Item> FOOD_FRENCH_FRIES = ITEMS.register("food_french_fries", basicItem()); public static final RegistryObject<Item> FOOD_CARROT_JUICE = ITEMS.register("food_carrot_juice", () -> new YummyItem(YummyItem.Foods.CARROT_JUICE));
public static final RegistryObject<Item> FOOD_FRENCH_FRY = ITEMS.register("food_french_fry", basicItem()); public static final RegistryObject<Item> FOOD_FISH_N_CHIPS = ITEMS.register("food_fish_n_chips", () -> new YummyItem(YummyItem.Foods.FISH_N_CHIPS));
public static final RegistryObject<Item> FOOD_SPAGHETTI = ITEMS.register("food_spaghetti", basicItem()); public static final RegistryObject<Item> FOOD_FRENCH_FRIES = ITEMS.register("food_french_fries", () -> new YummyItem(YummyItem.Foods.FRENCH_FRIES));
public static final RegistryObject<Item> FOOD_NOODLE = ITEMS.register("food_noodle", basicItem()); public static final RegistryObject<Item> FOOD_FRENCH_FRY = ITEMS.register("food_french_fry", () -> new YummyItem(YummyItem.Foods.FRENCH_FRY));
public static final RegistryObject<Item> FOOD_CHOCOLATE_CAKE = ITEMS.register("food_chocolate_cake", basicItem()); public static final RegistryObject<Item> FOOD_SPAGHETTI = ITEMS.register("food_spaghetti", () -> new YummyItem(YummyItem.Foods.SPAGHETTI));
public static final RegistryObject<Item> FOOD_CHOCOLATE = ITEMS.register("food_chocolate", basicItem()); public static final RegistryObject<Item> FOOD_NOODLE = ITEMS.register("food_noodle", () -> new YummyItem(YummyItem.Foods.NOODLE));
public static final RegistryObject<Item> FOOD_TOAST = ITEMS.register("food_toast", basicItem()); public static final RegistryObject<Item> FOOD_CHOCOLATE_CAKE = ITEMS.register("food_chocolate_cake", () -> new YummyItem(YummyItem.Foods.CHOCOLATE_CAKE));
public static final RegistryObject<Item> FOOD_SUBMARINE_SANDWICH = ITEMS.register("food_submarine_sandwich", basicItem()); public static final RegistryObject<Item> FOOD_CHOCOLATE = ITEMS.register("food_chocolate", () -> new YummyItem(YummyItem.Foods.CHOCOLATE));
public static final RegistryObject<Item> FOOD_BIG_COOKIE = ITEMS.register("food_big_cookie", basicItem()); public static final RegistryObject<Item> FOOD_TOAST = ITEMS.register("food_toast", () -> new YummyItem(YummyItem.Foods.TOAST));
public static final RegistryObject<Item> FOOD_HAMBURGER = ITEMS.register("food_hamburger", basicItem()); public static final RegistryObject<Item> FOOD_SUBMARINE_SANDWICH = ITEMS.register("food_submarine_sandwich", () -> new YummyItem(YummyItem.Foods.SUBMARINE_SANDWICH));
public static final RegistryObject<Item> FOOD_PIZZA = ITEMS.register("food_pizza", basicItem()); public static final RegistryObject<Item> FOOD_BIG_COOKIE = ITEMS.register("food_big_cookie", () -> new YummyItem(YummyItem.Foods.BIG_COOKIE));
public static final RegistryObject<Item> FOOD_BAGUETTE = ITEMS.register("food_baguette", basicItem()); public static final RegistryObject<Item> FOOD_HAMBURGER = ITEMS.register("food_hamburger", () -> new YummyItem(YummyItem.Foods.HAMBURGER));
public static final RegistryObject<Item> FOOD_RICE = ITEMS.register("food_rice", basicItem()); public static final RegistryObject<Item> FOOD_PIZZA = ITEMS.register("food_pizza", () -> new YummyItem(YummyItem.Foods.PIZZA));
public static final RegistryObject<Item> FOOD_RICE_BREAD = ITEMS.register("food_rice_bread", basicItem()); public static final RegistryObject<Item> FOOD_BAGUETTE = ITEMS.register("food_baguette", () -> new YummyItem(YummyItem.Foods.BAGUETTE));
public static final RegistryObject<Item> FOOD_DOUGHNUT = ITEMS.register("food_doughnut", basicItem()); public static final RegistryObject<Item> FOOD_RICE = ITEMS.register("food_rice", () -> new YummyItem(YummyItem.Foods.RICE));
public static final RegistryObject<Item> FOOD_TOAST_O_CHOCOLATE = ITEMS.register("food_toast_o_chocolate", basicItem()); public static final RegistryObject<Item> FOOD_RICE_BREAD = ITEMS.register("food_rice_bread", () -> new YummyItem(YummyItem.Foods.RICE_BREAD));
public static final RegistryObject<Item> FOOD_BACON = ITEMS.register("food_bacon", basicItem()); public static final RegistryObject<Item> FOOD_DOUGHNUT = ITEMS.register("food_doughnut", () -> new YummyItem(YummyItem.Foods.DOUGHNUT));
public static final RegistryObject<Item> FOOD_TOAST_O_CHOCOLATE = ITEMS.register("food_toast_o_chocolate", () -> new YummyItem(YummyItem.Foods.CHOCOLATE_TOAST));
public static final RegistryObject<Item> FOOD_BACON = ITEMS.register("food_bacon", () -> new YummyItem(YummyItem.Foods.BACON));
public static final RegistryObject<Item> CU_BA_RA_JAM = ITEMS.register("jam_cu_ba_ra", basicItem()); public static final RegistryObject<Item> CU_BA_RA_JAM = ITEMS.register("jam_cu_ba_ra", basicItem());
public static final RegistryObject<Item> GRA_KI_BA_JAM = ITEMS.register("jam_gra_ki_ba", basicItem()); public static final RegistryObject<Item> GRA_KI_BA_JAM = ITEMS.register("jam_gra_ki_ba", basicItem());
public static final RegistryObject<Item> PL_AP_LE_JAM = ITEMS.register("jam_pl_ap_le", basicItem()); public static final RegistryObject<Item> PL_AP_LE_JAM = ITEMS.register("jam_pl_ap_le", basicItem());

View file

@ -0,0 +1,61 @@
package de.ellpeck.actuallyadditions.common.items.misc;
import de.ellpeck.actuallyadditions.common.items.ActuallyItem;
import de.ellpeck.actuallyadditions.common.items.ActuallyItems;
import net.minecraft.item.Food;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
public class YummyItem extends ActuallyItem {
private final Foods food;
public YummyItem(Foods food) {
super(baseProps().food(food.food));
this.food = food;
}
public enum Foods {
CHEESE(new Food.Builder().hunger(1).saturation(0.05F), 3),
PUMPKIN_STEW(new Food.Builder().hunger(6).saturation(0.3F), 30, true, new ItemStack(Items.BOWL)),
CARROT_JUICE(new Food.Builder().hunger(4).saturation(0.2F), 20, true, new ItemStack(Items.GLASS_BOTTLE)),
FISH_N_CHIPS(new Food.Builder().hunger(14).saturation(0.65F), 40, new ItemStack(ActuallyItems.PAPER_CONE.get())),
FRENCH_FRIES(new Food.Builder().hunger(10).saturation(0.6F), 32, new ItemStack(ActuallyItems.PAPER_CONE.get())),
FRENCH_FRY(new Food.Builder().hunger(2).saturation(0.025F), 3),
SPAGHETTI(new Food.Builder().hunger(7).saturation(0.4F), 38, new ItemStack(Items.BOWL)),
NOODLE(new Food.Builder().hunger(1).saturation(0.01F), 3),
CHOCOLATE_CAKE(new Food.Builder().hunger(16).saturation(0.8F), 45),
CHOCOLATE(new Food.Builder().hunger(3).saturation(0.3F), 15),
TOAST(new Food.Builder().hunger(3).saturation(0.08F), 25),
SUBMARINE_SANDWICH(new Food.Builder().hunger(9).saturation(0.4F), 40),
BIG_COOKIE(new Food.Builder().hunger(4).saturation(0.25F), 20),
HAMBURGER(new Food.Builder().hunger(13).saturation(0.65F), 40),
PIZZA(new Food.Builder().hunger(16).saturation(0.8F), 45),
BAGUETTE(new Food.Builder().hunger(6).saturation(0.5F), 25),
RICE(new Food.Builder().hunger(2).saturation(0.05F), 10),
RICE_BREAD(new Food.Builder().hunger(6).saturation(0.5F), 25),
DOUGHNUT(new Food.Builder().hunger(2).saturation(0.1F), 10),
CHOCOLATE_TOAST(new Food.Builder().hunger(5).saturation(0.2F), 40),
BACON(new Food.Builder().hunger(4).saturation(0.1F), 30);
Food food;
int useDuration;
boolean isDrunken;
ItemStack returnItem;
Foods(Food.Builder food, int useDuration, boolean isDrunken, ItemStack returnItem) {
this.food = food.build();
this.useDuration = useDuration;
this.isDrunken = isDrunken;
this.returnItem = returnItem;
}
Foods(Food.Builder food, int useDuration) {
this(food, useDuration, false, ItemStack.EMPTY);
}
Foods(Food.Builder food, int useDuration, ItemStack returnItem) {
this(food, useDuration, false, returnItem);
}
}
}

View file

@ -48,7 +48,7 @@ import static de.ellpeck.actuallyadditions.common.items.misc.DrillAugmentItem.Au
/** /**
* @implNote The augment system might be made more abstract as I think other things might use it. * @implNote The augment system might be made more abstract as I think other things might use it.
* *
* todo: Still need to support the placement augment. Tired out after all the AOE crap * todo: Still need to support the placement augment. Tired out after all the AOE crap
*/ */
public class DrillItem extends CrystalFluxItem { public class DrillItem extends CrystalFluxItem {
public static final String NBT_AUGMENT_TAG = "augments"; public static final String NBT_AUGMENT_TAG = "augments";