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
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -18,4 +18,5 @@
|
||||||
.settings/org.eclipse.buildship.core.prefs
|
.settings/org.eclipse.buildship.core.prefs
|
||||||
*.launch
|
*.launch
|
||||||
.settings/org.eclipse.jdt.core.prefs
|
.settings/org.eclipse.jdt.core.prefs
|
||||||
*.prefs
|
*.prefs
|
||||||
|
/run/
|
||||||
|
|
|
@ -10,28 +10,36 @@
|
||||||
|
|
||||||
package de.ellpeck.actuallyadditions.mod;
|
package de.ellpeck.actuallyadditions.mod;
|
||||||
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import de.ellpeck.actuallyadditions.mod.item.AAItems;
|
||||||
import org.apache.logging.log4j.Logger;
|
import net.minecraft.item.ItemGroup;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
@Mod(ActuallyAdditions.MODID)
|
@Mod(ActuallyAdditions.MODID)
|
||||||
public class ActuallyAdditions {
|
public class ActuallyAdditions {
|
||||||
|
|
||||||
public static final String MODID = "actuallyadditions";
|
public static final String MODID = "actuallyadditions";
|
||||||
public static final Logger LOGGER = LogManager.getLogger(MODID);
|
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() {
|
public ActuallyAdditions() {
|
||||||
FMLJavaModLoadingContext ctx = FMLJavaModLoadingContext.get();
|
FMLJavaModLoadingContext ctx = FMLJavaModLoadingContext.get();
|
||||||
ctx.getModEventBus().register(this);
|
ctx.getModEventBus().register(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void setup(FMLCommonSetupEvent e) {
|
public void setup(FMLCommonSetupEvent e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,9 @@ package de.ellpeck.actuallyadditions.mod.block;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import net.minecraft.block.Block;
|
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.event.RegistryEvent.Register;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
|
@ -12,15 +14,17 @@ import net.minecraftforge.registries.ObjectHolder;
|
||||||
@EventBusSubscriber(modid = ActuallyAdditions.MODID, bus = Bus.MOD)
|
@EventBusSubscriber(modid = ActuallyAdditions.MODID, bus = Bus.MOD)
|
||||||
@ObjectHolder(ActuallyAdditions.MODID)
|
@ObjectHolder(ActuallyAdditions.MODID)
|
||||||
public class AABlocks {
|
public class AABlocks {
|
||||||
|
|
||||||
|
@ObjectHolder(ActuallyAdditions.MODID + ":block_black_quartz")
|
||||||
|
public static Block BLACK_QUARTZ;
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void register(Register<Block> e) {
|
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
|
@SubscribeEvent
|
||||||
public static void registerItemBlocks(Register<Item> e) {
|
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 de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.Item.Properties;
|
||||||
import net.minecraftforge.event.RegistryEvent.Register;
|
import net.minecraftforge.event.RegistryEvent.Register;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
|
@ -12,9 +13,12 @@ import net.minecraftforge.registries.ObjectHolder;
|
||||||
@ObjectHolder(ActuallyAdditions.MODID)
|
@ObjectHolder(ActuallyAdditions.MODID)
|
||||||
public class AAItems {
|
public class AAItems {
|
||||||
|
|
||||||
|
@ObjectHolder(ActuallyAdditions.MODID + ":black_quartz")
|
||||||
|
public static Item black_quartz = new Item(new Properties().group(ActuallyAdditions.itemGroup)).setRegistryName("black_quartz");
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void register(Register<Item> e) {
|
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