Skip to content

Commit

Permalink
Intial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AechtRob committed Jan 25, 2023
1 parent 6776a41 commit 738bcaf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/net/prehistoricdiner/RegistrationHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,20 @@ public RegistrationHandler() {
@SubscribeEvent
public static void registerItems(RegistryEvent.Register<Item> event) {
Item[] items = new Item[]{
((Item)(new ItemFood(2, 1F, false)).setRegistryName("prehistoricdiner", "food_item")).setTranslationKey("prehistoricdiner.food_item").setCreativeTab(PrehistoricDiner.CREATIVE_TAB),
//Example ("amount" is amount of health bars restored, "saturation" is how much it gives you health once hunbger is full (0.5 is about 1-2 hearts).
((Item)(new ItemFood(2, 0.5F, false)).setRegistryName("prehistoricdiner", "food_item")).setTranslationKey("prehistoricdiner.food_item").setCreativeTab(PrehistoricDiner.CREATIVE_TAB),

//Food items:
((Item)(new ItemFood(3, 1F, false)).setRegistryName("prehistoricdiner", "grilled_fish_skewer")).setTranslationKey("prehistoricdiner.grilled_fish_skewer").setCreativeTab(PrehistoricDiner.CREATIVE_TAB),


//Non-food items:
((Item)(new ItemDamageableCrafted()).setRegistryName("prehistoricdiner", "skillet")).setTranslationKey("prehistoricdiner.skillet").setCreativeTab(PrehistoricDiner.CREATIVE_TAB),
((Item)(new ItemDamageableCrafted()).setRegistryName("prehistoricdiner", "pot")).setTranslationKey("prehistoricdiner.pot").setCreativeTab(PrehistoricDiner.CREATIVE_TAB),
((Item)(new ItemDamageableCrafted()).setRegistryName("prehistoricdiner", "knife")).setTranslationKey("prehistoricdiner.knife").setCreativeTab(PrehistoricDiner.CREATIVE_TAB),
((Item)(new ItemDamageableCrafted()).setRegistryName("prehistoricdiner", "ladle")).setTranslationKey("prehistoricdiner.ladle").setCreativeTab(PrehistoricDiner.CREATIVE_TAB),
((Item)(new ItemDamageableCrafted()).setRegistryName("prehistoricdiner", "grinder")).setTranslationKey("prehistoricdiner.grinder").setCreativeTab(PrehistoricDiner.CREATIVE_TAB),
((Item)(new ItemDamageableCrafted()).setRegistryName("prehistoricdiner", "rolling_pin")).setTranslationKey("prehistoricdiner.rolling_pin").setCreativeTab(PrehistoricDiner.CREATIVE_TAB),
((Item)(new ItemDamageableCrafted()).setRegistryName("prehistoricdiner", "rolling_pin")).setTranslationKey("prehistoricdiner.rolling_pin").setCreativeTab(PrehistoricDiner.CREATIVE_TAB)


};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ public ModelRegistrationHandler() {

@SubscribeEvent
public static void registerModels(ModelRegistryEvent event) {
//Example:
registerModel(ModItems.food_item, 0);

//Food items:
registerModel(ModItems.grilled_fish_skewer, 0);


//Non-food items:
registerModel(ModItems.skillet, 0);
registerModel(ModItems.pot, 0);
registerModel(ModItems.grinder, 0);
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/net/prehistoricdiner/init/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@

@ObjectHolder("prehistoricdiner")
public class ModItems {
//Example:
public static final Item food_item = null;

//Food items:
public static final Item grilled_fish_skewer = null;


//Non-food items:
public static final Item skillet = null;
public static final Item pot = null;
public static final Item grinder = null;
Expand Down

0 comments on commit 738bcaf

Please sign in to comment.