diff --git a/src/main/java/de/jottyfan/minecraft/block/BlockDrops.java b/src/main/java/de/jottyfan/minecraft/block/BlockDrops.java new file mode 100644 index 0000000..08ec828 --- /dev/null +++ b/src/main/java/de/jottyfan/minecraft/block/BlockDrops.java @@ -0,0 +1,30 @@ +package de.jottyfan.minecraft.block; + +import java.util.Arrays; +import java.util.List; + +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.storage.loot.LootParams.Builder; + +/** + * + * @author jotty + * + */ +public class BlockDrops extends Block { + + private ItemStack dropItems; + + public BlockDrops(Properties properties, ItemStack dropItems) { + super(properties); + this.dropItems = dropItems; + } + + @Override + protected List getDrops(BlockState state, Builder builder) { + ItemStack droppable = dropItems == null ? new ItemStack(this.asItem()) : dropItems; + return Arrays.asList(new ItemStack[] { droppable }); + } +} diff --git a/src/main/java/de/jottyfan/minecraft/block/QuicklyBlocks.java b/src/main/java/de/jottyfan/minecraft/block/QuicklyBlocks.java index 6dd42ca..b06f742 100644 --- a/src/main/java/de/jottyfan/minecraft/block/QuicklyBlocks.java +++ b/src/main/java/de/jottyfan/minecraft/block/QuicklyBlocks.java @@ -43,6 +43,10 @@ public class QuicklyBlocks { Properties.of().strength(2.5f).lightLevel(state -> 15), properties -> new BlockLavahoarder(properties)); public static final Block EMPTYLAVAHOARDER = registerBlock("emptylavahoarder", Properties.of().strength(2.5f), properties -> new BlockEmptyLavahoarder(properties)); + public static final Block QUICKIEPOWDER = registerBlock("blockquickiepowder", + properties -> new BlockDrops(properties, new ItemStack(QuicklyItems.QUICKIEPOWDER, 9))); + public static final Block SPEEDPOWDER = registerBlock("blockspeedpowder", + properties -> new BlockDrops(properties, new ItemStack(QuicklyItems.SPEEDPOWDER, 9))); private static final Block registerBlock(String name, Properties properties) { return QuicklyBlocks.registerBlock(name, properties, p -> new Block(p)); @@ -69,6 +73,8 @@ public class QuicklyBlocks { block.accept(ORETURQUOISE); block.accept(OREDEEPSLATETURQUOISE); block.accept(EMPTYLAVAHOARDER); + block.accept(SPEEDPOWDER); + block.accept(QUICKIEPOWDER); }); } } diff --git a/src/main/java/de/jottyfan/minecraft/item/QuicklyItems.java b/src/main/java/de/jottyfan/minecraft/item/QuicklyItems.java index f363a58..5a26079 100644 --- a/src/main/java/de/jottyfan/minecraft/item/QuicklyItems.java +++ b/src/main/java/de/jottyfan/minecraft/item/QuicklyItems.java @@ -39,6 +39,10 @@ public class QuicklyItems { public static final Item COPPERPOWDER = registerItem("copperpowder"); public static final Item COPPERSTUB = registerItem("copperstub"); public static final Item COPPERSTICK = registerItem("copperstick"); + public static final Item SPEEDPOWDER = registerItem("speedpowder"); + public static final Item QUICKIEPOWDER = registerItem("quickiepowder"); + public static final Item SPEEDINGOT = registerItem("speedingot"); + public static final Item QUICKIEINGOT = registerItem("quickieingot"); public static final Item ARMOR_TURQUOISE_BOOTS = registerItem("turquoise_boots", ArmorType.BOOTS); public static final Item ARMOR_TURQUOISE_HELMET = registerItem("turquoise_helmet", ArmorType.HELMET); @@ -80,7 +84,11 @@ public class QuicklyItems { item.accept(CANOLABOTTLE); item.accept(CANOLABOTTLESTACK); item.accept(RAWTURQUOISE); + item.accept(SPEEDPOWDER); + item.accept(QUICKIEPOWDER); item.accept(TURQUOISEINGOT); + item.accept(SPEEDINGOT); + item.accept(QUICKIEINGOT); item.accept(COPPERPOWDER); item.accept(OXIDIZEDCOPPERPOWDER); item.accept(COPPERSTRING); diff --git a/src/main/resources/assets/quickly/blockstates/blockquickiepowder.json b/src/main/resources/assets/quickly/blockstates/blockquickiepowder.json new file mode 100644 index 0000000..52e266b --- /dev/null +++ b/src/main/resources/assets/quickly/blockstates/blockquickiepowder.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "quickly:block/blockquickiepowder" + } + } +} diff --git a/src/main/resources/assets/quickly/blockstates/blockspeedpowder.json b/src/main/resources/assets/quickly/blockstates/blockspeedpowder.json new file mode 100644 index 0000000..6bf94e2 --- /dev/null +++ b/src/main/resources/assets/quickly/blockstates/blockspeedpowder.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "quickly:block/blockspeedpowder" + } + } +} diff --git a/src/main/resources/assets/quickly/items/blockquickiepowder.json b/src/main/resources/assets/quickly/items/blockquickiepowder.json new file mode 100644 index 0000000..2afb0f8 --- /dev/null +++ b/src/main/resources/assets/quickly/items/blockquickiepowder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "quickly:item/blockquickiepowder" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/items/blockspeedpowder.json b/src/main/resources/assets/quickly/items/blockspeedpowder.json new file mode 100644 index 0000000..6ac50a6 --- /dev/null +++ b/src/main/resources/assets/quickly/items/blockspeedpowder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "quickly:block/blockspeedpowder" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/items/quickieingot.json b/src/main/resources/assets/quickly/items/quickieingot.json new file mode 100644 index 0000000..6310c6d --- /dev/null +++ b/src/main/resources/assets/quickly/items/quickieingot.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "quickly:item/quickieingot" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/items/quickiepowder.json b/src/main/resources/assets/quickly/items/quickiepowder.json new file mode 100644 index 0000000..5ace014 --- /dev/null +++ b/src/main/resources/assets/quickly/items/quickiepowder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "quickly:item/quickiepowder" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/items/speedingot.json b/src/main/resources/assets/quickly/items/speedingot.json new file mode 100644 index 0000000..0e40266 --- /dev/null +++ b/src/main/resources/assets/quickly/items/speedingot.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "quickly:item/speedingot" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/items/speedpowder.json b/src/main/resources/assets/quickly/items/speedpowder.json new file mode 100644 index 0000000..189781d --- /dev/null +++ b/src/main/resources/assets/quickly/items/speedpowder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "quickly:item/speedpowder" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/lang/de_de.json b/src/main/resources/assets/quickly/lang/de_de.json index c132563..ba01272 100644 --- a/src/main/resources/assets/quickly/lang/de_de.json +++ b/src/main/resources/assets/quickly/lang/de_de.json @@ -1,6 +1,8 @@ { "item.quickly.blockcanolaplant": "Rapspflanze", "item.quickly.blockcottonplant": "Baumwollpflanze", + "item.quickly.blockquickiepowder": "Eilpulverblock", + "item.quickly.blockspeedpowder": "Fluchtpulverblock", "item.quickly.blockturquoise": "Türkisblock", "item.quickly.canola": "Raps", "item.quickly.canolabottle": "Rapsöl", @@ -18,8 +20,12 @@ "item.quickly.oredeepslateturquoise": "Türkistiefenerz", "item.quickly.oreturquoise": "Türkiserz", "item.quickly.oxidizedcopperpowder": "oxidiertes Kupferpulver", + "item.quickly.quickieingot": "Eilpulverbarren", + "item.quickly.quickiepowder": "Eilpulver", "item.quickly.rawturquoise": "rohes Türkis", "item.quickly.rotten_flesh_stripes": "geschnittenes Gammelfleisch", + "item.quickly.speedingot": "Fluchtpulverbarren", + "item.quickly.speedpowder": "Fluchtpulver", "item.quickly.stub": "Stummel", "item.quickly.turquoise_boots": "Türkisschuhe", "item.quickly.turquoise_chestplate": "Türkisbrustpanzer", diff --git a/src/main/resources/assets/quickly/lang/en_us.json b/src/main/resources/assets/quickly/lang/en_us.json index 4fd8ec8..c0b5953 100644 --- a/src/main/resources/assets/quickly/lang/en_us.json +++ b/src/main/resources/assets/quickly/lang/en_us.json @@ -1,6 +1,8 @@ { "item.quickly.blockcanolaplant": "canola plant", "item.quickly.blockcottonplant": "cotton plant", + "item.quickly.blockquickiepowder": "quickie powder block", + "item.quickly.blockspeedpowder": "speed powder block", "item.quickly.blockturquoise": "block of turquoise", "item.quickly.canola": "canola", "item.quickly.canolabottle": "canola oil", @@ -18,8 +20,12 @@ "item.quickly.oredeepslateturquoise": "turquoise deepslate ore", "item.quickly.oreturquoise": "turquoise ore", "item.quickly.oxidizedcopperpowder": "oxidized copper powder", + "item.quickly.quickieingot": "quickie powder ingot", + "item.quickly.quickiepowder": "quickie powder", "item.quickly.rawturquoise": "raw turquoise", "item.quickly.rotten_flesh_stripes": "rotton flesh stripes", + "item.quickly.speedingot": "speed powder ingot", + "item.quickly.speedpowder": "speed powder", "item.quickly.stub": "stub", "item.quickly.turquoise_boots": "turquoise boots", "item.quickly.turquoise_chestplate": "turquoise chestplate", diff --git a/src/main/resources/assets/quickly/models/block/blockquickiepowder.json b/src/main/resources/assets/quickly/models/block/blockquickiepowder.json new file mode 100644 index 0000000..9759c52 --- /dev/null +++ b/src/main/resources/assets/quickly/models/block/blockquickiepowder.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "quickly:block/blockquickiepowder" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/models/block/blockspeedpowder.json b/src/main/resources/assets/quickly/models/block/blockspeedpowder.json new file mode 100644 index 0000000..31f2532 --- /dev/null +++ b/src/main/resources/assets/quickly/models/block/blockspeedpowder.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "quickly:block/blockspeedpowder" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/models/item/blockquickiepowder.json b/src/main/resources/assets/quickly/models/item/blockquickiepowder.json new file mode 100644 index 0000000..5df6a79 --- /dev/null +++ b/src/main/resources/assets/quickly/models/item/blockquickiepowder.json @@ -0,0 +1,10 @@ +{ + "parent": "quickly:block/blockquickiepowder", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/models/item/blockspeedpowder.json b/src/main/resources/assets/quickly/models/item/blockspeedpowder.json new file mode 100644 index 0000000..ff5188d --- /dev/null +++ b/src/main/resources/assets/quickly/models/item/blockspeedpowder.json @@ -0,0 +1,10 @@ +{ + "parent": "quickly:block/blockspeedpowder", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/models/item/quickieingot.json b/src/main/resources/assets/quickly/models/item/quickieingot.json new file mode 100644 index 0000000..ea94361 --- /dev/null +++ b/src/main/resources/assets/quickly/models/item/quickieingot.json @@ -0,0 +1,6 @@ +{ + "parent": "item/coal", + "textures": { + "layer0": "quickly:item/quickieingot" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/models/item/quickiepowder.json b/src/main/resources/assets/quickly/models/item/quickiepowder.json new file mode 100644 index 0000000..e8d489e --- /dev/null +++ b/src/main/resources/assets/quickly/models/item/quickiepowder.json @@ -0,0 +1,6 @@ +{ + "parent": "item/coal", + "textures": { + "layer0": "quickly:item/quickiepowder" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/models/item/speedingot.json b/src/main/resources/assets/quickly/models/item/speedingot.json new file mode 100644 index 0000000..4323279 --- /dev/null +++ b/src/main/resources/assets/quickly/models/item/speedingot.json @@ -0,0 +1,6 @@ +{ + "parent": "item/coal", + "textures": { + "layer0": "quickly:item/speedingot" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/models/item/speedpowder.json b/src/main/resources/assets/quickly/models/item/speedpowder.json new file mode 100644 index 0000000..b24758b --- /dev/null +++ b/src/main/resources/assets/quickly/models/item/speedpowder.json @@ -0,0 +1,6 @@ +{ + "parent": "item/coal", + "textures": { + "layer0": "quickly:item/speedpowder" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/textures/block/blockquickiepowder.png b/src/main/resources/assets/quickly/textures/block/blockquickiepowder.png new file mode 100644 index 0000000..958902d Binary files /dev/null and b/src/main/resources/assets/quickly/textures/block/blockquickiepowder.png differ diff --git a/src/main/resources/assets/quickly/textures/block/blockspeedpowder.png b/src/main/resources/assets/quickly/textures/block/blockspeedpowder.png new file mode 100644 index 0000000..2b5b745 Binary files /dev/null and b/src/main/resources/assets/quickly/textures/block/blockspeedpowder.png differ diff --git a/src/main/resources/assets/quickly/textures/item/quickieingot.png b/src/main/resources/assets/quickly/textures/item/quickieingot.png new file mode 100644 index 0000000..cc7b6d3 Binary files /dev/null and b/src/main/resources/assets/quickly/textures/item/quickieingot.png differ diff --git a/src/main/resources/assets/quickly/textures/item/quickiepowder.png b/src/main/resources/assets/quickly/textures/item/quickiepowder.png new file mode 100644 index 0000000..317fdb7 Binary files /dev/null and b/src/main/resources/assets/quickly/textures/item/quickiepowder.png differ diff --git a/src/main/resources/assets/quickly/textures/item/speedingot.png b/src/main/resources/assets/quickly/textures/item/speedingot.png new file mode 100644 index 0000000..dd44c2f Binary files /dev/null and b/src/main/resources/assets/quickly/textures/item/speedingot.png differ diff --git a/src/main/resources/assets/quickly/textures/item/speedpowder.png b/src/main/resources/assets/quickly/textures/item/speedpowder.png new file mode 100644 index 0000000..a096fe3 Binary files /dev/null and b/src/main/resources/assets/quickly/textures/item/speedpowder.png differ diff --git a/src/main/resources/data/quickly/recipe/blasting_quickieingot.json b/src/main/resources/data/quickly/recipe/blasting_quickieingot.json new file mode 100644 index 0000000..29a60f7 --- /dev/null +++ b/src/main/resources/data/quickly/recipe/blasting_quickieingot.json @@ -0,0 +1,7 @@ +{ + "type": "minecraft:blasting", + "ingredient": "quickly:quickiepowder", + "result": {"id":"quickly:quickieingot"}, + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/src/main/resources/data/quickly/recipe/blasting_speedingot.json b/src/main/resources/data/quickly/recipe/blasting_speedingot.json new file mode 100644 index 0000000..0656598 --- /dev/null +++ b/src/main/resources/data/quickly/recipe/blasting_speedingot.json @@ -0,0 +1,7 @@ +{ + "type": "minecraft:blasting", + "ingredient": "quickly:speedpowder", + "result": {"id":"quickly:speedingot"}, + "experience": 0.1, + "cookingtime": 200 +} \ No newline at end of file diff --git a/src/main/resources/data/quickly/recipe/shaped_blockquickiepowder_from_quickiepowder.json b/src/main/resources/data/quickly/recipe/shaped_blockquickiepowder_from_quickiepowder.json new file mode 100644 index 0000000..9249515 --- /dev/null +++ b/src/main/resources/data/quickly/recipe/shaped_blockquickiepowder_from_quickiepowder.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "sss", + "sss", + "sss" + ], + "key": { + "s": "quickly:quickiepowder" + }, + "result": { + "id": "quickly:blockquickiepowder", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/quickly/recipe/shaped_blockspeedpowder_from_speedpowder.json b/src/main/resources/data/quickly/recipe/shaped_blockspeedpowder_from_speedpowder.json new file mode 100644 index 0000000..5284d3c --- /dev/null +++ b/src/main/resources/data/quickly/recipe/shaped_blockspeedpowder_from_speedpowder.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "sss", + "sss", + "sss" + ], + "key": { + "s": "quickly:speedpowder" + }, + "result": { + "id": "quickly:blockspeedpowder", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/quickly/recipe/shapeless_quickiepowder_from_block.json b/src/main/resources/data/quickly/recipe/shapeless_quickiepowder_from_block.json new file mode 100644 index 0000000..0e874a6 --- /dev/null +++ b/src/main/resources/data/quickly/recipe/shapeless_quickiepowder_from_block.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + "quickly:blockquickiepowder" + ], + "result": { + "id": "quickly:quickiepowder", + "count": 9 + } +} \ No newline at end of file diff --git a/src/main/resources/data/quickly/recipe/shapeless_quickiepowder_from_oxidizedcopperpowder.json b/src/main/resources/data/quickly/recipe/shapeless_quickiepowder_from_oxidizedcopperpowder.json new file mode 100644 index 0000000..b20f1b5 --- /dev/null +++ b/src/main/resources/data/quickly/recipe/shapeless_quickiepowder_from_oxidizedcopperpowder.json @@ -0,0 +1,11 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + "quickly:speedpowder", + "quickly:oxidizedcopperpowder" + ], + "result": { + "id": "quickly:quickiepowder", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/quickly/recipe/shapeless_speedpowder.json b/src/main/resources/data/quickly/recipe/shapeless_speedpowder.json new file mode 100644 index 0000000..e02bc3b --- /dev/null +++ b/src/main/resources/data/quickly/recipe/shapeless_speedpowder.json @@ -0,0 +1,11 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + "minecraft:gunpowder", + "minecraft:redstone" + ], + "result": { + "id": "quickly:speedpowder", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/quickly/recipe/shapeless_speedpowder_from_block.json b/src/main/resources/data/quickly/recipe/shapeless_speedpowder_from_block.json new file mode 100644 index 0000000..fff1196 --- /dev/null +++ b/src/main/resources/data/quickly/recipe/shapeless_speedpowder_from_block.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + "quickly:blockspeedpowder" + ], + "result": { + "id": "quickly:speedpowder", + "count": 9 + } +} \ No newline at end of file diff --git a/src/main/resources/data/quickly/recipe/stonecutting_quickiepowder.json b/src/main/resources/data/quickly/recipe/stonecutting_quickiepowder.json new file mode 100644 index 0000000..c4de972 --- /dev/null +++ b/src/main/resources/data/quickly/recipe/stonecutting_quickiepowder.json @@ -0,0 +1,8 @@ +{ + "type": "minecraft:stonecutting", + "ingredient": "quickly:quickieingot", + "result": { + "id": "quickly:quickiepowder" + }, + "count": 1 +} diff --git a/src/main/resources/data/quickly/recipe/stonecutting_speedpowder.json b/src/main/resources/data/quickly/recipe/stonecutting_speedpowder.json new file mode 100644 index 0000000..3263bc7 --- /dev/null +++ b/src/main/resources/data/quickly/recipe/stonecutting_speedpowder.json @@ -0,0 +1,8 @@ +{ + "type": "minecraft:stonecutting", + "ingredient": "quickly:speedingot", + "result": { + "id": "quickly:speedpowder" + }, + "count": 1 +}