From e24411f44a3b1b561e75e0fdd0a3057e1ceb808c Mon Sep 17 00:00:00 2001 From: quat1024 Date: Sun, 23 Jul 2023 20:53:18 -0400 Subject: [PATCH] COOL rivulet --- README.md | 2 ++ build.gradle | 2 +- .../github/cottonmc/templates/Templates.java | 16 +++++++++++++++ .../templates/blockstates/cool_rivulet.json | 19 ++++++++++++++++++ .../assets/templates/lang/en_us.json | 4 +++- .../templates/models/block/cool_rivulet.json | 6 ++++++ .../templates/models/item/cool_rivulet.json | 3 +++ .../templates/textures/block/cool_rivulet.png | Bin 0 -> 752 bytes .../tags/blocks/mineable/pickaxe.json | 3 ++- .../loot_tables/blocks/cool_rivulet.json | 19 ++++++++++++++++++ src/main/resources/fabric.mod.json | 3 ++- 11 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 src/main/resources/assets/templates/blockstates/cool_rivulet.json create mode 100644 src/main/resources/assets/templates/models/block/cool_rivulet.json create mode 100644 src/main/resources/assets/templates/models/item/cool_rivulet.json create mode 100644 src/main/resources/assets/templates/textures/block/cool_rivulet.png create mode 100644 src/main/resources/data/templates/loot_tables/blocks/cool_rivulet.json diff --git a/README.md b/README.md index 95c6688..f62afdf 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ While Templates itself adds a handful of common shapes, it's also not too hard f Todo move this into the main readme section +COOL RIVULET is by mev , this is the most important block in the mod & perhaps the most important block in any mod ever since `incorporeal:clearly` + ## Todo * More templates !! diff --git a/build.gradle b/build.gradle index 965758a..4b5ef1b 100755 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ if(rootProject.file("private.gradle").exists()) { //Publishing details archivesBaseName = "templates" group = "io.github.cottonmc" -version = "2.0.2+1.20.1" +version = "2.0.3+1.20.1" repositories { mavenCentral() diff --git a/src/main/java/io/github/cottonmc/templates/Templates.java b/src/main/java/io/github/cottonmc/templates/Templates.java index 1a220b3..d615d48 100644 --- a/src/main/java/io/github/cottonmc/templates/Templates.java +++ b/src/main/java/io/github/cottonmc/templates/Templates.java @@ -7,6 +7,7 @@ import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup; import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder; import net.minecraft.block.*; import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.client.item.TooltipContext; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; @@ -14,10 +15,14 @@ import net.minecraft.item.ItemStack; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; import net.minecraft.text.Text; +import net.minecraft.util.Formatting; import net.minecraft.util.Identifier; import net.minecraft.util.math.BlockPos; +import net.minecraft.world.BlockView; import net.minecraft.world.World; +import org.jetbrains.annotations.Nullable; +import java.util.List; import java.util.function.BiConsumer; public class Templates implements ModInitializer { @@ -49,6 +54,13 @@ public class Templates implements ModInitializer { //corner slopes //quarter slabs???? + public static final Block COOL_RIVULET = Registry.register(Registries.BLOCK, id("cool_rivulet"), new GlazedTerracottaBlock(AbstractBlock.Settings.create().hardness(0.2f)) { + @Override + public void appendTooltip(ItemStack stack, @Nullable BlockView world, List tooltip, TooltipContext eggbals) { + tooltip.add(Text.translatable("block.templates.cool_rivulet").formatted(Formatting.GRAY)); + } + }); //Very good + //for addon devs: it's fine to make your own block entity type instead of gluing additional blocks to this one public static final BlockEntityType TEMPLATE_BLOCK_ENTITY = Registry.register( Registries.BLOCK_ENTITY_TYPE, id("slope"), @@ -106,6 +118,8 @@ public class Templates implements ModInitializer { Registry.register(Registries.ITEM, id("trapdoor") , new BlockItem(TRAPDOOR, new Item.Settings())); Registry.register(Registries.ITEM, id("wall") , new BlockItem(WALL, new Item.Settings())); Registry.register(Registries.ITEM, id("slope") , new BlockItem(SLOPE, new Item.Settings())); + + Registry.register(Registries.ITEM, id("cool_rivulet") , new BlockItem(COOL_RIVULET, new Item.Settings())); //Very good } public static Identifier id(String path) { @@ -140,5 +154,7 @@ public class Templates implements ModInitializer { e.add(CANDLE); e.add(SLOPE); + + e.add(COOL_RIVULET); //Very good } } diff --git a/src/main/resources/assets/templates/blockstates/cool_rivulet.json b/src/main/resources/assets/templates/blockstates/cool_rivulet.json new file mode 100644 index 0000000..9081177 --- /dev/null +++ b/src/main/resources/assets/templates/blockstates/cool_rivulet.json @@ -0,0 +1,19 @@ +{ + "variants": { + "facing=east": { + "model": "templates:block/cool_rivulet", + "y": 270 + }, + "facing=north": { + "model": "templates:block/cool_rivulet", + "y": 180 + }, + "facing=south": { + "model": "templates:block/cool_rivulet" + }, + "facing=west": { + "model": "templates:block/cool_rivulet", + "y": 90 + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/templates/lang/en_us.json b/src/main/resources/assets/templates/lang/en_us.json index b9606c7..cd7f119 100644 --- a/src/main/resources/assets/templates/lang/en_us.json +++ b/src/main/resources/assets/templates/lang/en_us.json @@ -18,5 +18,7 @@ "block.templates.slab": "Slab Template", "block.templates.stairs": "Stairs Template", "block.templates.trapdoor": "Trapdoor Template", - "block.templates.wall": "Wall Template" + "block.templates.wall": "Wall Template", + + "block.templates.cool_rivulet": "cool rivulet" } \ No newline at end of file diff --git a/src/main/resources/assets/templates/models/block/cool_rivulet.json b/src/main/resources/assets/templates/models/block/cool_rivulet.json new file mode 100644 index 0000000..774c143 --- /dev/null +++ b/src/main/resources/assets/templates/models/block/cool_rivulet.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "templates:block/cool_rivulet" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/templates/models/item/cool_rivulet.json b/src/main/resources/assets/templates/models/item/cool_rivulet.json new file mode 100644 index 0000000..a6ef2fe --- /dev/null +++ b/src/main/resources/assets/templates/models/item/cool_rivulet.json @@ -0,0 +1,3 @@ +{ + "parent": "templates:block/cool_rivulet" +} \ No newline at end of file diff --git a/src/main/resources/assets/templates/textures/block/cool_rivulet.png b/src/main/resources/assets/templates/textures/block/cool_rivulet.png new file mode 100644 index 0000000000000000000000000000000000000000..d29410dbbd3ee233a754e1d9a4f5c2fcace17928 GIT binary patch literal 752 zcmVeK~Z@;Kz>1s*Mif+kMprUgB zou`)_8VtHe6VUMB`!78Z*@Dka-~Tx9{m(-P-@{q4=3kbaM&3lUTklMr^0Id+{qCo#nW&8QOvAj@GE!yEzzi(XJY1Q>CZ zgy2vBNv%J{!1zTT(~&$6$?`GLi4bHt$Pw5qM-FbV8YE2BLW#Mj#d2A*FrGHB}es= z5FQH91j)zUkJAw#IqEwA%@LcyiI5IafU^z&Ib!WntWqFxVzVM6p*A7GN(f7WB&8g{ z>i}fSL5Y!&V{j!{inAfiU_us