Attempt to add Palm Tree Log & Stove Blcok

This commit is contained in:
nelle 2023-10-05 05:22:49 -06:00
parent 29e0adac59
commit 3152e6a812
3 changed files with 18 additions and 4 deletions

View file

@ -10,6 +10,10 @@ import net.minecraft.item.itemgroup.ItemGroup;
import xyz.limepot.emb.EMB;
import java.util.ArrayList;
import java.util.List;
import static net.minecraft.block.Block.STONE_SOUND_GROUP;
import static xyz.limepot.emb.EMB.MOD_ID;
public class ModBlocks {
@ -17,16 +21,16 @@ public class ModBlocks {
//public static final Block CYAN_ROSE = registerBlock(new FlowerBlock(0).setStrength(0.0F).setBlockSoundGroup(GRASS_SOUND_GROUP).setItemGroup(ItemGroup.DECORATIONS).setTranslationKey("cyan_flower"), "cyan_rose");
public static final Block CYAN_ROSE = registerBlock(new CustomFlowerBlock().method_5546("cyan_rose").setBlockSoundGroup(Block.GRASS_SOUND_GROUP).setStrength(0.0F).setItemGroup(ItemGroup.DECORATIONS), "cyan_rose");
//public static final Block CYAN_ROSE_BUSH = registerBlock(new TallPlantBlock().method_5546("cyan_rose_bush").setBlockSoundGroup(Block.GRASS_SOUND_GROUP).setStrength(0.0F).setItemGroup(ItemGroup.DECORATIONS), "cyan_rose_bush");
public static final Block IRON_BUTTON = registerBlock(new IronButtonBlock().method_5546("iron_button").setStrength(0.5F).setBlockSoundGroup(Block.STONE_SOUND_GROUP), "iron_button");
public static final Block IRON_BUTTON = registerBlock(new IronButtonBlock().method_5546("iron_button").setStrength(0.5F).setBlockSoundGroup(STONE_SOUND_GROUP), "iron_button");
public static final Block ROPE = registerBlock(new RopeBlock().method_5546("rope").setStrength(0.4F), "rope");
public static final Block STOVE_BLOCK = registerBlock(new StoveBlock(false).method_5546("stove_block").setStrength(3.5F).setBlockSoundGroup(STONE_SOUND_GROUP).setItemGroup(ItemGroup.DECORATIONS), "stove_block");
public static final Block LIT_STOVE_BLOCK = registerBlock(new StoveBlock(true).method_5546("lit_stove_block").setLightLevel(0.875F).setStrength(3.5F).setBlockSoundGroup(STONE_SOUND_GROUP).setItemGroup(ItemGroup.DECORATIONS), "lit_stove_block");
public static final Block PALM_LOG_BLOCK = registerBlock(new ModLogBlock().method_5546("palm_log"), "palm_log");
public static Block registerBlock(Block block, String name) {
return RegistryHelperImpl.registerBlock(block, new Identifier(MOD_ID, name));
}
public static Item registerBlockItem(Block block, String name) {
return RegistryHelperImpl.registerItem(new BlockItem(block), new Identifier(MOD_ID, name));
}
public static void registerModBlocks() {EMB.LOGGER.debug("Registering Blocks....");
}
}

View file

@ -0,0 +1,6 @@
package xyz.limepot.emb.block;
import net.minecraft.block.LogBlock;
public class ModLogBlock extends LogBlock {
}

View file

@ -38,6 +38,9 @@ public class ModItems {
//Block Items
public static final Item IRON_BUTTON_ITEM = registerItem(new BlockItem(ModBlocks.IRON_BUTTON).setItemGroup(ItemGroup.MISC), "iron_button");
public static final Item CYAN_ROSE_ITEM = registerItem(new BlockItem(ModBlocks.CYAN_ROSE).setItemGroup(ItemGroup.DECORATIONS), "cyan_rose");
public static final Item STOVE_BLOCK_ITEM = registerItem(new BlockItem(ModBlocks.STOVE_BLOCK).setItemGroup(ItemGroup.MISC), "stove_block");
public static final Item PALM_LOG_ITEM = registerItem(new BlockItem(ModBlocks.PALM_LOG_BLOCK).setItemGroup(ItemGroup.MISC), "palm_log");
//Potions/Medicine
/*this actually registers an entire set of potion items, potion item/potion bottle*/
@ -47,6 +50,7 @@ public class ModItems {
public static Item registerItem(Item item, String name) {
return RegistryHelperImpl.registerItem(item.getFromId(name), new Identifier(MOD_ID, name));
}
//Method to call in main class
public static void registerModItems() { EMB.LOGGER.debug("Registering Items....");
}