Added tiny coal/charcoal and biocoal

This commit is contained in:
canitzp 2020-09-07 07:37:56 +02:00
parent ca67ccfc45
commit 7e2be8712e
11 changed files with 79 additions and 2 deletions

View file

@ -3,6 +3,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.minecraft.util.ResourceLocation;
import net.minecraftforge.event.RegistryEvent.Register;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
@ -14,12 +15,18 @@ import net.minecraftforge.registries.ObjectHolder;
public class AAItems {
public static final Item BLACK_QUARTZ = null;
public static final BurnableItem TINY_COAL = null;
public static final BurnableItem TINY_CHARCOAL = null;
public static final BurnableItem BIOCOAL = null;
@SubscribeEvent
public static void register(Register<Item> e) {
//Formatter::off
e.getRegistry().registerAll(
new Item(new Properties().group(ActuallyAdditions.GROUP)).setRegistryName("black_quartz")
new Item(new Properties().group(ActuallyAdditions.GROUP)).setRegistryName("black_quartz"),
new BurnableItem(new ResourceLocation(ActuallyAdditions.MODID, "tiny_coal"), 200),
new BurnableItem(new ResourceLocation(ActuallyAdditions.MODID, "tiny_charcoal"), 200),
new BurnableItem(new ResourceLocation(ActuallyAdditions.MODID, "biocoal"), 800)
);
//Formatter::on
}

View file

@ -0,0 +1,26 @@
package de.ellpeck.actuallyadditions.mod.item;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
public class BurnableItem extends Item {
private static final Properties PROPERTIES = new Properties().group(ActuallyAdditions.GROUP);
private final int burnTime;
public BurnableItem(ResourceLocation registryName, int burnTime){
super(PROPERTIES);
this.burnTime = burnTime;
this.setRegistryName(registryName);
}
@Override
public int getBurnTime(ItemStack itemStack){
return this.burnTime;
}
}

View file

@ -1,6 +1,9 @@
{
"itemGroup.actuallyadditions": "Actually Additions",
"item.actuallyadditions.black_quartz": "Black Quartz",
"item.actuallyadditions.tiny_coal": "Tiny Coal",
"item.actuallyadditions.tiny_charcoal": "Tiny Charcoal",
"item.actuallyadditions.biocoal": "Biocoal",
"block.actuallyadditions.black_quartz_block": "Black Quartz Block",
"block.actuallyadditions.chiseled_black_quartz_block": "Chiseled Black Quartz Block",
"block.actuallyadditions.black_quartz_pillar": "Black Quartz Pillar",
@ -23,5 +26,4 @@
"block.actuallyadditions.red_lamp": "Red Lamp",
"block.actuallyadditions.black_lamp": "Black Lamp",
"block.actuallyadditions.tiny_torch": "Tiny Torch"
}

View file

@ -0,0 +1,6 @@
{
"parent": "actuallyadditions:item/standard_item",
"textures": {
"layer0": "actuallyadditions:item/biocoal"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "actuallyadditions:item/standard_item",
"textures": {
"layer0": "actuallyadditions:item/tiny_charcoal"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "actuallyadditions:item/standard_item",
"textures": {
"layer0": "actuallyadditions:item/tiny_coal"
}
}

View file

@ -0,0 +1,12 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "minecraft:charcoal"
}
],
"result": {
"item": "actuallyadditions:tiny_charcoal",
"count": 9
}
}

View file

@ -0,0 +1,12 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "minecraft:coal"
}
],
"result": {
"item": "actuallyadditions:tiny_coal",
"count": 9
}
}