added kelpstack
This commit is contained in:
		| @@ -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))); | ||||
| 	} | ||||
|  | ||||
| } | ||||
| @@ -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; | ||||
| 	} | ||||
| } | ||||
|   | ||||
| @@ -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"); | ||||
|   | ||||
| @@ -0,0 +1,7 @@ | ||||
| { | ||||
| 	"variants": { | ||||
| 		"": { | ||||
| 			"model": "quickiemod:block/kelpstack" | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| @@ -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" } | ||||
|             } | ||||
|         } | ||||
|     ] | ||||
| } | ||||
| @@ -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" } | ||||
|             } | ||||
|         } | ||||
|     ] | ||||
| } | ||||
| @@ -0,0 +1,9 @@ | ||||
| { | ||||
|     "type": "minecraft:campfire_cooking", | ||||
|     "ingredient": "quickiemod:kelpstack", | ||||
|     "result": { | ||||
|     	"id": "minecraft:dried_kelp_block" | ||||
|     }, | ||||
|     "experience": 0.9, | ||||
|     "cookingtime": 615 | ||||
| } | ||||
| @@ -0,0 +1,15 @@ | ||||
| { | ||||
| 	"type": "minecraft:crafting_shaped", | ||||
| 	"pattern": [ | ||||
| 		"kkk", | ||||
| 		"kkk", | ||||
| 		"kkk" | ||||
| 	], | ||||
| 	"key": { | ||||
| 		"k": "minecraft:kelp" | ||||
| 	}, | ||||
| 	"result": { | ||||
| 		"id": "quickiemod:kelpstack", | ||||
| 		"count": 1 | ||||
| 	} | ||||
| } | ||||
| @@ -0,0 +1,9 @@ | ||||
| { | ||||
|     "type": "minecraft:smoking", | ||||
|     "ingredient": "quickiemod:kelpstack", | ||||
|     "result": { | ||||
|       "id": "minecraft:dried_kelp_block" | ||||
|     }, | ||||
|     "experience": 0, | ||||
|     "cookingtime": 100 | ||||
| } | ||||
		Reference in New Issue
	
	Block a user