added rooten flesh stripes and carrot stack
@ -7,7 +7,7 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import de.jottyfan.quickiemod.block.ModBlocks;
|
||||
import de.jottyfan.quickiemod.item.ModItems;
|
||||
import de.jottyfan.quickiemod.tab.ModTabs;
|
||||
import de.jottyfan.quickiemod.itemgroup.ModItemGroup;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
@ -25,6 +25,6 @@ public class Quickiemod implements ModInitializer {
|
||||
public void onInitialize() {
|
||||
List<Item> items = ModItems.registerModItems();
|
||||
List<Block> blocks = ModBlocks.registerModBlocks();
|
||||
ModTabs.registerTab(items, blocks);
|
||||
ModItemGroup.registerItemGroup(items, blocks);
|
||||
}
|
||||
}
|
@ -17,4 +17,9 @@ public abstract class AbstractIdentifiedBlock extends Block {
|
||||
super(AbstractBlock.Settings.create().registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||
}
|
||||
|
||||
public AbstractIdentifiedBlock(Identifier identifier, float strength, float hardness) {
|
||||
super(AbstractBlock.Settings.create().strength(strength).hardness(hardness).requiresTool()
|
||||
.registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,45 @@
|
||||
package de.jottyfan.quickiemod.block;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.mojang.serialization.MapCodec;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.FallingBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootWorldContext.Builder;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.explosion.Explosion;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockBreakByTool extends AbstractIdentifiedBlock {
|
||||
|
||||
private final ItemStack[] drops;
|
||||
|
||||
public BlockBreakByTool(Identifier identifier, float strength, float hardness, ItemStack[] drops) {
|
||||
super(identifier, strength, hardness);
|
||||
|
||||
this.drops = drops;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
||||
return Arrays.asList(drops);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldDropItemsOnExplosion(Explosion explosion) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MapCodec<? extends FallingBlock> getCodec() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
@ -27,10 +27,10 @@ public class ModBlocks {
|
||||
ModIdentifiers.BLOCK_QUICKIEPOWDER, new ItemStack[] { new ItemStack(ModItems.ITEM_QUICKIEPOWDER, 9) }));
|
||||
public static final Block BLOCK_SPEEDPOWDER = registerBlock(ModIdentifiers.BLOCK_SPEEDPOWDER, new BlockPowder(
|
||||
ModIdentifiers.BLOCK_SPEEDPOWDER, new ItemStack[] { new ItemStack(ModItems.ITEM_SPEEDPOWDER, 9) }));
|
||||
public static final Block BLOCK_SALPETER = registerBlock(ModIdentifiers.BLOCK_SALPETER, new BlockPowder(
|
||||
ModIdentifiers.BLOCK_SALPETER, new ItemStack[] { new ItemStack(ModItems.ITEM_SALPETER, 9) }));
|
||||
public static final Block BLOCK_SULFOR = registerBlock(ModIdentifiers.BLOCK_SULFOR, new BlockPowder(
|
||||
ModIdentifiers.BLOCK_SULFOR, new ItemStack[] { new ItemStack(ModItems.ITEM_SULFOR, 9) }));
|
||||
public static final Block BLOCK_SALPETER = registerBlock(ModIdentifiers.BLOCK_SALPETER, new BlockBreakByTool(
|
||||
ModIdentifiers.BLOCK_SALPETER, 1.5f, 1.5f, new ItemStack[] { new ItemStack(ModItems.ITEM_SALPETER, 9) }));
|
||||
public static final Block BLOCK_SULFOR = registerBlock(ModIdentifiers.BLOCK_SULFOR, new BlockBreakByTool(
|
||||
ModIdentifiers.BLOCK_SULFOR, 1.5f, 1.5f, new ItemStack[] { new ItemStack(ModItems.ITEM_SULFOR, 9) }));
|
||||
|
||||
private static final Block registerBlock(Identifier identifier, Block block) {
|
||||
Registry.register(Registries.ITEM, identifier, new BlockItem(block, new Item.Settings()
|
||||
|
@ -17,6 +17,8 @@ public class ModIdentifiers {
|
||||
public static final Identifier ITEM_OXIDIZEDCOPPERPOWDER = Identifier.of(Quickiemod.MOD_ID, "oxidizedcopperpowder");
|
||||
public static final Identifier ITEM_SPEEDINGOT = Identifier.of(Quickiemod.MOD_ID, "speedingot");
|
||||
public static final Identifier ITEM_QUICKIEINGOT = Identifier.of(Quickiemod.MOD_ID, "quickieingot");
|
||||
public static final Identifier ITEM_CARROTSTACK = Identifier.of(Quickiemod.MOD_ID, "carrotstack");
|
||||
public static final Identifier ITEM_ROTTENFLESHSTRIPES = Identifier.of(Quickiemod.MOD_ID, "rotten_flesh_stripes");
|
||||
|
||||
public static final Identifier BLOCK_QUICKIEPOWDER = Identifier.of(Quickiemod.MOD_ID, "blockquickiepowder");
|
||||
public static final Identifier BLOCK_SPEEDPOWDER = Identifier.of(Quickiemod.MOD_ID, "blockspeedpowder");
|
||||
|
@ -24,6 +24,8 @@ public class ModItems {
|
||||
public static final Item ITEM_OXIDIZEDCOPPERPOWDER = registerItem(ModIdentifiers.ITEM_OXIDIZEDCOPPERPOWDER, new Item64Stack(ModIdentifiers.ITEM_OXIDIZEDCOPPERPOWDER));
|
||||
public static final Item ITEM_SPEEDINGOT = registerItem(ModIdentifiers.ITEM_SPEEDINGOT, new Item64Stack(ModIdentifiers.ITEM_SPEEDINGOT));
|
||||
public static final Item ITEM_QUICKIEINGOT = registerItem(ModIdentifiers.ITEM_QUICKIEINGOT, new Item64Stack(ModIdentifiers.ITEM_QUICKIEINGOT));
|
||||
public static final Item ITEM_CARROTSTACK = registerItem(ModIdentifiers.ITEM_CARROTSTACK, new Item64Stack(ModIdentifiers.ITEM_CARROTSTACK));
|
||||
public static final Item ITEM_ROTTENFLESHSTRIPES = registerItem(ModIdentifiers.ITEM_ROTTENFLESHSTRIPES, new Item64Stack(ModIdentifiers.ITEM_ROTTENFLESHSTRIPES));
|
||||
|
||||
private static final Item registerItem(Identifier identifier, Item item) {
|
||||
return Registry.register(Registries.ITEM, identifier, item);
|
||||
@ -41,6 +43,8 @@ public class ModItems {
|
||||
items.add(ITEM_OXIDIZEDCOPPERPOWDER);
|
||||
items.add(ITEM_SPEEDINGOT);
|
||||
items.add(ITEM_QUICKIEINGOT);
|
||||
items.add(ITEM_CARROTSTACK);
|
||||
items.add(ITEM_ROTTENFLESHSTRIPES);
|
||||
return items;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package de.jottyfan.quickiemod.tab;
|
||||
package de.jottyfan.quickiemod.itemgroup;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -20,9 +20,9 @@ import net.minecraft.util.Identifier;
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ModTabs {
|
||||
public class ModItemGroup {
|
||||
|
||||
public static final void registerTab(List<Item> items, List<Block> blocks) {
|
||||
public static final void registerItemGroup(List<Item> items, List<Block> blocks) {
|
||||
Registry.register(Registries.ITEM_GROUP,
|
||||
RegistryKey.of(RegistryKeys.ITEM_GROUP, Identifier.of(Quickiemod.MOD_ID, "itemgroup")),
|
||||
FabricItemGroup.builder().icon(() -> new ItemStack(ModItems.ITEM_SPEEDPOWDER))
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "quickiemod:item/carrotstack"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/coal",
|
||||
"textures": {
|
||||
"layer0": "quickiemod:item/rotten_flesh_stripes"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 590 B |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 603 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 743 B |
BIN
src/main/resources/assets/quickiemod/textures/block/drill.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 709 B |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 435 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 959 B |
BIN
src/main/resources/assets/quickiemod/textures/item/canola.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 604 B |
BIN
src/main/resources/assets/quickiemod/textures/item/cotton.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 6.0 KiB |
@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"quickiemod:blocksulphor",
|
||||
"quickiemod:blocksalpeter"
|
||||
]
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
{
|
||||
"type": "crafting_shaped",
|
||||
"pattern": [
|
||||
"cc",
|
||||
"cc"
|
||||
],
|
||||
"key": {
|
||||
"c": "minecraft:carrot"
|
||||
},
|
||||
"result": {
|
||||
"id": "quickiemod:carrotstack"
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"ingredients": [
|
||||
"quickiemod:carrotstack"
|
||||
],
|
||||
"result": {
|
||||
"id": "minecraft:carrot",
|
||||
"count": 4
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"type": "minecraft:smoking",
|
||||
"ingredient": "quickiemod:rotten_flesh_stripes",
|
||||
"result": {
|
||||
"id":"minecraft:leather"
|
||||
},
|
||||
"experience": 0,
|
||||
"cookingtime": 100
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"type": "minecraft:stonecutting",
|
||||
"ingredient": "minecraft:rotten_flesh",
|
||||
"result": {
|
||||
"id": "quickiemod:rotten_flesh_stripes"
|
||||
},
|
||||
"count": 2
|
||||
}
|