COOL rivulet

This commit is contained in:
quat1024 2023-07-23 20:53:18 -04:00
parent 893ce0acc9
commit e24411f44a
11 changed files with 73 additions and 4 deletions

View File

@ -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 !!

View File

@ -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()

View File

@ -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<Text> 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<TemplateEntity> 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
}
}

View File

@ -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
}
}
}

View File

@ -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"
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "templates:block/cool_rivulet"
}
}

View File

@ -0,0 +1,3 @@
{
"parent": "templates:block/cool_rivulet"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

View File

@ -2,6 +2,7 @@
"replace": false,
"values": [
"templates:iron_door",
"templates:iron_trapdoor"
"templates:iron_trapdoor",
"templates:cool_rivulet"
]
}

View File

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "templates:cool_rivulet"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -7,7 +7,8 @@
"authors": [
"quaternary",
"LemmaEOF",
"Grondag"
"Grondag",
"mevvern"
],
"contact": {
"homepage": "https://highlysuspect.agency/",