mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-24 08:08:34 +01:00
Added black_quartz and the block form including recipes and drops for the block when broken (#1294)
This commit is contained in:
parent
f0022fd560
commit
56b01b9a19
15 changed files with 92 additions and 13 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -19,3 +19,4 @@
|
|||
*.launch
|
||||
.settings/org.eclipse.jdt.core.prefs
|
||||
*.prefs
|
||||
/run/
|
||||
|
|
|
@ -10,13 +10,15 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.item.AAItems;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@Mod(ActuallyAdditions.MODID)
|
||||
public class ActuallyAdditions {
|
||||
|
@ -24,14 +26,20 @@ public class ActuallyAdditions {
|
|||
public static final String MODID = "actuallyadditions";
|
||||
public static final Logger LOGGER = LogManager.getLogger(MODID);
|
||||
|
||||
public static ItemGroup itemGroup = new ItemGroup("actuallyadditions") {
|
||||
public ItemStack createIcon() {
|
||||
return new ItemStack(AAItems.black_quartz);
|
||||
}
|
||||
};
|
||||
|
||||
public ActuallyAdditions() {
|
||||
FMLJavaModLoadingContext ctx = FMLJavaModLoadingContext.get();
|
||||
ctx.getModEventBus().register(this);
|
||||
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void setup(FMLCommonSetupEvent e) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,7 +2,9 @@ package de.ellpeck.actuallyadditions.mod.block;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.block.Block.Properties;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraftforge.event.RegistryEvent.Register;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||
|
@ -13,14 +15,16 @@ import net.minecraftforge.registries.ObjectHolder;
|
|||
@ObjectHolder(ActuallyAdditions.MODID)
|
||||
public class AABlocks {
|
||||
|
||||
@ObjectHolder(ActuallyAdditions.MODID + ":block_black_quartz")
|
||||
public static Block BLACK_QUARTZ;
|
||||
|
||||
@SubscribeEvent
|
||||
public static void register(Register<Block> e) {
|
||||
|
||||
e.getRegistry().register(new Block(Properties.create(Material.ROCK).hardnessAndResistance(0.8F)).setRegistryName("block_black_quartz")); //Values from the QUARTZ_BLOCK
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void registerItemBlocks(Register<Item> e) {
|
||||
|
||||
e.getRegistry().register(new BlockItem(BLACK_QUARTZ, new Item.Properties().group(ActuallyAdditions.itemGroup)).setRegistryName(BLACK_QUARTZ.getRegistryName()));
|
||||
}
|
||||
|
||||
}
|
|
@ -2,6 +2,7 @@ package de.ellpeck.actuallyadditions.mod.item;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.Item.Properties;
|
||||
import net.minecraftforge.event.RegistryEvent.Register;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||
|
@ -12,9 +13,12 @@ import net.minecraftforge.registries.ObjectHolder;
|
|||
@ObjectHolder(ActuallyAdditions.MODID)
|
||||
public class AAItems {
|
||||
|
||||
@ObjectHolder(ActuallyAdditions.MODID + ":black_quartz")
|
||||
public static Item black_quartz = new Item(new Properties().group(ActuallyAdditions.itemGroup)).setRegistryName("black_quartz");
|
||||
|
||||
@SubscribeEvent
|
||||
public static void register(Register<Item> e) {
|
||||
|
||||
e.getRegistry().register(black_quartz);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"variants": {
|
||||
"": { "model": "actuallyadditions:block/block_black_quartz" }
|
||||
}
|
||||
}
|
|
@ -1,3 +1,11 @@
|
|||
{
|
||||
"testkey": "testvalue"
|
||||
"testkey": "testvalue",
|
||||
|
||||
"item.actuallyadditions.black_quartz": "Black Quartz",
|
||||
|
||||
|
||||
"block.actuallyadditions.block_black_quartz": "Black Quarts Block",
|
||||
|
||||
|
||||
"itemGroup.actuallyadditions": "Actually Additions"
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "actuallyadditions:block/block_black_quartz"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "actuallyadditions:item/black_quartz"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"parent": "actuallyadditions:block/block_black_quartz"
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 431 B |
Binary file not shown.
After Width: | Height: | Size: 432 B |
Binary file not shown.
After Width: | Height: | Size: 424 B |
Binary file not shown.
After Width: | Height: | Size: 549 B |
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "actuallyadditions:block_black_quartz"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"##",
|
||||
"##"
|
||||
],
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "actuallyadditions:black_quartz"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "actuallyadditions:block_black_quartz"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue