Block complete
This commit is contained in:
parent
d8ea17d31d
commit
886497fcc4
6 changed files with 29 additions and 1 deletions
|
@ -25,6 +25,9 @@ public class ExampleMod implements ModInitializer {
|
||||||
// Our ingredient item
|
// Our ingredient item
|
||||||
public static final AdamantiteIngot ADAMANTITE_INGOT = new AdamantiteIngot(new Item.Settings());
|
public static final AdamantiteIngot ADAMANTITE_INGOT = new AdamantiteIngot(new Item.Settings());
|
||||||
|
|
||||||
|
// Our block
|
||||||
|
public static final Block ADAMANTITE_BLOCK = new AdamantiteBlock(Block.Settings.create().strength(1.0f).requiresTool().sounds(BlockSoundGroup.ANVIL));
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
// This code runs as soon as Minecraft is in a mod-load-ready state.
|
// This code runs as soon as Minecraft is in a mod-load-ready state.
|
||||||
|
@ -36,5 +39,13 @@ public class ExampleMod implements ModInitializer {
|
||||||
ItemGroupEvents.modifyEntriesEvent(ItemGroups.INGREDIENTS).register(content -> {
|
ItemGroupEvents.modifyEntriesEvent(ItemGroups.INGREDIENTS).register(content -> {
|
||||||
content.addAfter(Items.DIAMOND, ADAMANTITE_INGOT);
|
content.addAfter(Items.DIAMOND, ADAMANTITE_INGOT);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Registering our block
|
||||||
|
Registry.register(Registries.BLOCK, new Identifier("examplemod", "adamantite_block"), ADAMANTITE_BLOCK);
|
||||||
|
Registry.register(Registries.ITEM, new Identifier("examplemod", "adamantite_block"), new BlockItem(ADAMANTITE_BLOCK,
|
||||||
|
new FabricItemSettings()));
|
||||||
|
ItemGroupEvents.modifyEntriesEvent(ItemGroups.BUILDING_BLOCKS).register(content -> {
|
||||||
|
content.addAfter(Items.OBSIDIAN, ADAMANTITE_BLOCK);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "examplemod:block/adamantite_block"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,3 +1,4 @@
|
||||||
{
|
{
|
||||||
"item.examplemod.adamantite_ingot": "Adamantite Ingot"
|
"item.examplemod.adamantite_ingot": "Adamantite Ingot",
|
||||||
|
"block.examplemod.adamantite_block": "Block of Adamantite"
|
||||||
}
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "examplemod:block/adamantite_block"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "examplemod:block/adamantite_block"
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 308 B |
Loading…
Reference in a new issue