From 4e4742ae1196821c87f71b4b92ebda54e2db8828 Mon Sep 17 00:00:00 2001 From: Jottyfan Date: Sun, 24 Nov 2024 21:46:28 +0100 Subject: [PATCH] added kelpstack --- .../quickiemod/block/BlockSlippery.java | 22 ++++++++++++++++ .../jottyfan/quickiemod/block/ModBlocks.java | 4 +++ .../quickiemod/identifier/ModIdentifiers.java | 1 + .../quickiemod/blockstates/kelpstack.json | 7 ++++++ .../quickiemod/models/block/kelpstack.json | 25 +++++++++++++++++++ .../quickiemod/models/item/kelpstack.json | 25 +++++++++++++++++++ .../recipe/campfire_dried_kelpblock.json | 9 +++++++ .../recipe/shaped_kelpstack_from_kelp.json | 15 +++++++++++ .../recipe/smoking_dried_kelpblock.json | 9 +++++++ 9 files changed, 117 insertions(+) create mode 100644 src/main/java/de/jottyfan/quickiemod/block/BlockSlippery.java create mode 100644 src/main/resources/assets/quickiemod/blockstates/kelpstack.json create mode 100644 src/main/resources/assets/quickiemod/models/block/kelpstack.json create mode 100644 src/main/resources/assets/quickiemod/models/item/kelpstack.json create mode 100644 src/main/resources/data/quickiemod/recipe/campfire_dried_kelpblock.json create mode 100644 src/main/resources/data/quickiemod/recipe/shaped_kelpstack_from_kelp.json create mode 100644 src/main/resources/data/quickiemod/recipe/smoking_dried_kelpblock.json diff --git a/src/main/java/de/jottyfan/quickiemod/block/BlockSlippery.java b/src/main/java/de/jottyfan/quickiemod/block/BlockSlippery.java new file mode 100644 index 0000000..23d6243 --- /dev/null +++ b/src/main/java/de/jottyfan/quickiemod/block/BlockSlippery.java @@ -0,0 +1,22 @@ +package de.jottyfan.quickiemod.block; + +import net.minecraft.block.AbstractBlock; +import net.minecraft.block.Block; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; +import net.minecraft.sound.BlockSoundGroup; +import net.minecraft.util.Identifier; + +/** + * + * @author jotty + * + */ +public class BlockSlippery extends Block { + + public BlockSlippery(Identifier identifier, float hardness, float slipperiness, BlockSoundGroup soundGroup) { + super(AbstractBlock.Settings.create().hardness(hardness).slipperiness(slipperiness).breakInstantly() + .sounds(soundGroup).registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier))); + } + +} diff --git a/src/main/java/de/jottyfan/quickiemod/block/ModBlocks.java b/src/main/java/de/jottyfan/quickiemod/block/ModBlocks.java index c3a5934..8124151 100644 --- a/src/main/java/de/jottyfan/quickiemod/block/ModBlocks.java +++ b/src/main/java/de/jottyfan/quickiemod/block/ModBlocks.java @@ -14,6 +14,7 @@ import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; import net.minecraft.registry.RegistryKey; import net.minecraft.registry.RegistryKeys; +import net.minecraft.sound.BlockSoundGroup; import net.minecraft.util.Identifier; /** @@ -53,6 +54,8 @@ public class ModBlocks { new BlockOreSulphor(ModIdentifiers.BLOCK_ORESULFOR)); public static final Block BLOCK_SANDSALPETER = registerBlock(ModIdentifiers.BLOCK_SANDSALPETER, new BlockSandSalpeter(ModIdentifiers.BLOCK_SANDSALPETER)); + public static final Block BLOCK_KELPSTACK = registerBlock(ModIdentifiers.BLOCK_KELPSTACK, + new BlockSlippery(ModIdentifiers.BLOCK_KELPSTACK, 0.1f, 1.0f, BlockSoundGroup.WET_GRASS)); private static final Block registerBlock(Identifier identifier, Block block) { Registry.register(Registries.ITEM, identifier, new BlockItem(block, new Item.Settings() @@ -79,6 +82,7 @@ public class ModBlocks { blocks.add(BLOCK_ORESANDSALPETER); blocks.add(BLOCK_ORESULFOR); blocks.add(BLOCK_SANDSALPETER); + blocks.add(BLOCK_KELPSTACK); return blocks; } } diff --git a/src/main/java/de/jottyfan/quickiemod/identifier/ModIdentifiers.java b/src/main/java/de/jottyfan/quickiemod/identifier/ModIdentifiers.java index afac175..177e7d1 100644 --- a/src/main/java/de/jottyfan/quickiemod/identifier/ModIdentifiers.java +++ b/src/main/java/de/jottyfan/quickiemod/identifier/ModIdentifiers.java @@ -47,6 +47,7 @@ public class ModIdentifiers { public static final Identifier BLOCK_ORESANDSALPETER = Identifier.of(Quickiemod.MOD_ID, "oresandsalpeter"); public static final Identifier BLOCK_ORESULFOR = Identifier.of(Quickiemod.MOD_ID, "oresulphor"); public static final Identifier BLOCK_SANDSALPETER = Identifier.of(Quickiemod.MOD_ID, "sandsalpeter"); + public static final Identifier BLOCK_KELPSTACK = Identifier.of(Quickiemod.MOD_ID, "kelpstack"); public static final Identifier BLOCKENTITY_ITEMHOARDER = Identifier.of(Quickiemod.MOD_ID, "itemhoarderblockentity"); public static final Identifier BLOCKENTITY_BLOCKSTACKER = Identifier.of(Quickiemod.MOD_ID, "blockstackerblockentity"); diff --git a/src/main/resources/assets/quickiemod/blockstates/kelpstack.json b/src/main/resources/assets/quickiemod/blockstates/kelpstack.json new file mode 100644 index 0000000..44308ba --- /dev/null +++ b/src/main/resources/assets/quickiemod/blockstates/kelpstack.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "quickiemod:block/kelpstack" + } + } +} diff --git a/src/main/resources/assets/quickiemod/models/block/kelpstack.json b/src/main/resources/assets/quickiemod/models/block/kelpstack.json new file mode 100644 index 0000000..7a09f11 --- /dev/null +++ b/src/main/resources/assets/quickiemod/models/block/kelpstack.json @@ -0,0 +1,25 @@ +{ + "parent": "block/block", + "textures": { + "particle": "quickiemod:block/kelpstack_side", + "down": "quickiemod:block/kelpstack_bottom", + "up": "quickiemod:block/kelpstack_top", + "north": "quickiemod:block/kelpstack_side", + "east": "quickiemod:block/kelpstack_side", + "south": "quickiemod:block/kelpstack_side", + "west": "quickiemod:block/kelpstack_side" + }, + "elements": [ + { "from": [ 0, 0, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "down": { "texture": "#down", "cullface": "down" }, + "up": { "texture": "#up", "cullface": "up" }, + "north": { "texture": "#north", "cullface": "north" }, + "south": { "uv": [16, 0, 0, 16], "texture": "#south", "cullface": "south" }, + "west": { "texture": "#west", "cullface": "west" }, + "east": { "uv": [16, 0, 0, 16], "texture": "#east", "cullface": "east" } + } + } + ] +} diff --git a/src/main/resources/assets/quickiemod/models/item/kelpstack.json b/src/main/resources/assets/quickiemod/models/item/kelpstack.json new file mode 100644 index 0000000..7a09f11 --- /dev/null +++ b/src/main/resources/assets/quickiemod/models/item/kelpstack.json @@ -0,0 +1,25 @@ +{ + "parent": "block/block", + "textures": { + "particle": "quickiemod:block/kelpstack_side", + "down": "quickiemod:block/kelpstack_bottom", + "up": "quickiemod:block/kelpstack_top", + "north": "quickiemod:block/kelpstack_side", + "east": "quickiemod:block/kelpstack_side", + "south": "quickiemod:block/kelpstack_side", + "west": "quickiemod:block/kelpstack_side" + }, + "elements": [ + { "from": [ 0, 0, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "down": { "texture": "#down", "cullface": "down" }, + "up": { "texture": "#up", "cullface": "up" }, + "north": { "texture": "#north", "cullface": "north" }, + "south": { "uv": [16, 0, 0, 16], "texture": "#south", "cullface": "south" }, + "west": { "texture": "#west", "cullface": "west" }, + "east": { "uv": [16, 0, 0, 16], "texture": "#east", "cullface": "east" } + } + } + ] +} diff --git a/src/main/resources/data/quickiemod/recipe/campfire_dried_kelpblock.json b/src/main/resources/data/quickiemod/recipe/campfire_dried_kelpblock.json new file mode 100644 index 0000000..8983b9b --- /dev/null +++ b/src/main/resources/data/quickiemod/recipe/campfire_dried_kelpblock.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:campfire_cooking", + "ingredient": "quickiemod:kelpstack", + "result": { + "id": "minecraft:dried_kelp_block" + }, + "experience": 0.9, + "cookingtime": 615 +} diff --git a/src/main/resources/data/quickiemod/recipe/shaped_kelpstack_from_kelp.json b/src/main/resources/data/quickiemod/recipe/shaped_kelpstack_from_kelp.json new file mode 100644 index 0000000..22f5530 --- /dev/null +++ b/src/main/resources/data/quickiemod/recipe/shaped_kelpstack_from_kelp.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "kkk", + "kkk", + "kkk" + ], + "key": { + "k": "minecraft:kelp" + }, + "result": { + "id": "quickiemod:kelpstack", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/quickiemod/recipe/smoking_dried_kelpblock.json b/src/main/resources/data/quickiemod/recipe/smoking_dried_kelpblock.json new file mode 100644 index 0000000..c714cc2 --- /dev/null +++ b/src/main/resources/data/quickiemod/recipe/smoking_dried_kelpblock.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:smoking", + "ingredient": "quickiemod:kelpstack", + "result": { + "id": "minecraft:dried_kelp_block" + }, + "experience": 0, + "cookingtime": 100 +}