_Criber_

ModItems

Aug 17th, 2022 (edited)
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.28 KB | None | 0 0
  1. package com.anbe.logfences.items;
  2.  
  3. import com.anbe.logfences.Logfences;
  4. import com.anbe.logfences.blocks.ModBlocks;
  5. import net.minecraft.world.item.BlockItem;
  6. import net.minecraft.world.item.CreativeModeTab;
  7. import net.minecraft.world.item.Item;
  8. import net.minecraft.world.item.ItemStack;
  9. import net.minecraft.world.item.crafting.RecipeType;
  10. import net.minecraftforge.registries.DeferredRegister;
  11. import net.minecraftforge.registries.ForgeRegistries;
  12. import net.minecraftforge.registries.RegistryObject;
  13.  
  14. import javax.annotation.Nullable;
  15.  
  16. public class ModItems {
  17. public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, Logfences.MODID);
  18.  
  19. public static final RegistryObject<BlockItem> OAK_LOG_FENCE = ITEMS.register("oak_log_fence", () -> new BlockItem(
  20. ModBlocks.OAK_LOG_FENCE.get(), new Item.Properties().tab(CreativeModeTab.TAB_DECORATIONS)){
  21. @Override
  22. public int getBurnTime(ItemStack itemStack, @Nullable RecipeType<?> recipeType) {
  23. return 300;
  24. }
  25. });
  26. public static final RegistryObject<BlockItem> OAK_LOG_FENCE_GATE = ITEMS.register("oak_log_fence_gate", () -> new BlockItem(
  27. ModBlocks.OAK_LOG_FENCE_GATE.get(), new Item.Properties().tab(CreativeModeTab.TAB_REDSTONE)){
  28. @Override
  29. public int getBurnTime(ItemStack itemStack, @Nullable RecipeType<?> recipeType) {
  30. return 300;
  31. }
  32. });
  33.  
  34. public static final RegistryObject<BlockItem> SPRUCE_LOG_FENCE = ITEMS.register("spruce_log_fence", () -> new BlockItem(
  35. ModBlocks.SPRUCE_LOG_FENCE.get(), new Item.Properties().tab(CreativeModeTab.TAB_DECORATIONS)){
  36. @Override
  37. public int getBurnTime(ItemStack itemStack, @Nullable RecipeType<?> recipeType) {
  38. return 300;
  39. }
  40. });
  41. public static final RegistryObject<BlockItem> SPRUCE_LOG_FENCE_GATE = ITEMS.register("spruce_log_fence_gate", () -> new BlockItem(
  42. ModBlocks.SPRUCE_LOG_FENCE_GATE.get(), new Item.Properties().tab(CreativeModeTab.TAB_REDSTONE)){
  43. @Override
  44. public int getBurnTime(ItemStack itemStack, @Nullable RecipeType<?> recipeType) {
  45. return 300;
  46. }
  47. });
  48.  
  49. public static final RegistryObject<BlockItem> BIRCH_LOG_FENCE = ITEMS.register("birch_log_fence", () -> new BlockItem(
  50. ModBlocks.BIRCH_LOG_FENCE.get(), new Item.Properties().tab(CreativeModeTab.TAB_DECORATIONS)){
  51. @Override
  52. public int getBurnTime(ItemStack itemStack, @Nullable RecipeType<?> recipeType) {
  53. return 300;
  54. }
  55. });
  56. public static final RegistryObject<BlockItem> BIRCH_LOG_FENCE_GATE = ITEMS.register("birch_log_fence_gate", () -> new BlockItem(
  57. ModBlocks.BIRCH_LOG_FENCE_GATE.get(), new Item.Properties().tab(CreativeModeTab.TAB_REDSTONE)){
  58. @Override
  59. public int getBurnTime(ItemStack itemStack, @Nullable RecipeType<?> recipeType) {
  60. return 300;
  61. }
  62. });
  63.  
  64. public static final RegistryObject<BlockItem> JUNGLE_LOG_FENCE = ITEMS.register("jungle_log_fence", () -> new BlockItem(
  65. ModBlocks.JUNGLE_LOG_FENCE.get(), new Item.Properties().tab(CreativeModeTab.TAB_DECORATIONS)){
  66. @Override
  67. public int getBurnTime(ItemStack itemStack, @Nullable RecipeType<?> recipeType) {
  68. return 300;
  69. }
  70. });
  71. public static final RegistryObject<BlockItem> JUNGLE_LOG_FENCE_GATE = ITEMS.register("jungle_log_fence_gate", () -> new BlockItem(
  72. ModBlocks.JUNGLE_LOG_FENCE_GATE.get(), new Item.Properties().tab(CreativeModeTab.TAB_REDSTONE)){
  73. @Override
  74. public int getBurnTime(ItemStack itemStack, @Nullable RecipeType<?> recipeType) {
  75. return 300;
  76. }
  77. });
  78.  
  79. public static final RegistryObject<BlockItem> ACACIA_LOG_FENCE = ITEMS.register("acacia_log_fence", () -> new BlockItem(
  80. ModBlocks.ACACIA_LOG_FENCE.get(), new Item.Properties().tab(CreativeModeTab.TAB_DECORATIONS)){
  81. @Override
  82. public int getBurnTime(ItemStack itemStack, @Nullable RecipeType<?> recipeType) {
  83. return 300;
  84. }
  85. });
  86. public static final RegistryObject<BlockItem> ACACIA_LOG_FENCE_GATE = ITEMS.register("acacia_log_fence_gate", () -> new BlockItem(
  87. ModBlocks.ACACIA_LOG_FENCE_GATE.get(), new Item.Properties().tab(CreativeModeTab.TAB_REDSTONE)){
  88. @Override
  89. public int getBurnTime(ItemStack itemStack, @Nullable RecipeType<?> recipeType) {
  90. return 300;
  91. }
  92. });
  93.  
  94. public static final RegistryObject<BlockItem> DARK_OAK_LOG_FENCE = ITEMS.register("dark_oak_log_fence", () -> new BlockItem(
  95. ModBlocks.DARK_OAK_LOG_FENCE.get(), new Item.Properties().tab(CreativeModeTab.TAB_DECORATIONS)){
  96. @Override
  97. public int getBurnTime(ItemStack itemStack, @Nullable RecipeType<?> recipeType) {
  98. return 300;
  99. }
  100. });
  101. public static final RegistryObject<BlockItem> DARK_OAK_LOG_FENCE_GATE = ITEMS.register("dark_oak_log_fence_gate", () -> new BlockItem(
  102. ModBlocks.DARK_OAK_LOG_FENCE_GATE.get(), new Item.Properties().tab(CreativeModeTab.TAB_REDSTONE)){
  103. @Override
  104. public int getBurnTime(ItemStack itemStack, @Nullable RecipeType<?> recipeType) {
  105. return 300;
  106. }
  107. });
  108.  
  109. public static final RegistryObject<BlockItem> CRIMSON_STEM_FENCE = ITEMS.register("crimson_stem_fence", () -> new BlockItem(
  110. ModBlocks.CRIMSON_STEM_FENCE.get(), new Item.Properties().tab(CreativeModeTab.TAB_DECORATIONS)));
  111. public static final RegistryObject<BlockItem> CRIMSON_STEM_FENCE_GATE = ITEMS.register("crimson_stem_fence_gate", () -> new BlockItem(
  112. ModBlocks.CRIMSON_STEM_FENCE_GATE.get(), new Item.Properties().tab(CreativeModeTab.TAB_REDSTONE)));
  113.  
  114. public static final RegistryObject<BlockItem> WARPED_STEM_FENCE = ITEMS.register("warped_stem_fence", () -> new BlockItem(
  115. ModBlocks.WARPED_STEM_FENCE.get(), new Item.Properties().tab(CreativeModeTab.TAB_DECORATIONS)));
  116. public static final RegistryObject<BlockItem> WARPED_STEM_FENCE_GATE = ITEMS.register("warped_stem_fence_gate", () -> new BlockItem(
  117. ModBlocks.WARPED_STEM_FENCE_GATE.get(), new Item.Properties().tab(CreativeModeTab.TAB_REDSTONE)));
  118. }
  119.  
Advertisement
Add Comment
Please, Sign In to add comment