From 3ad97d652dea4e45a3b6e3aed5cd2fbe4ae59d88 Mon Sep 17 00:00:00 2001 From: quat1024 Date: Mon, 31 Jul 2023 02:06:11 -0400 Subject: [PATCH] Tweaky tweak --- .../java/io/github/cottonmc/templates/TemplatesClient.java | 2 +- .../cottonmc/templates/block/TemplateVerticalSlabBlock.java | 3 +++ .../templates/advancements/recipes/decorations/templates.json | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/cottonmc/templates/TemplatesClient.java b/src/main/java/io/github/cottonmc/templates/TemplatesClient.java index cf60aeb..b163fb5 100644 --- a/src/main/java/io/github/cottonmc/templates/TemplatesClient.java +++ b/src/main/java/io/github/cottonmc/templates/TemplatesClient.java @@ -111,6 +111,7 @@ public class TemplatesClient implements ClientModInitializer { provider.addTemplateModel(Templates.id("outer_stairs_special") , new UnbakedAutoRetexturedModel(new Identifier("block/outer_stairs"))); provider.addTemplateModel(Templates.id("trapdoor_bottom_special") , new UnbakedAutoRetexturedModel(new Identifier("block/template_trapdoor_bottom"))); provider.addTemplateModel(Templates.id("trapdoor_top_special") , new UnbakedAutoRetexturedModel(new Identifier("block/template_trapdoor_top"))); + provider.addTemplateModel(Templates.id("vertical_slab_special") , new UnbakedAutoRetexturedModel(Templates.id("block/vertical_slab"))); //my model not vanilla provider.addTemplateModel(Templates.id("wall_post_special") , new UnbakedAutoRetexturedModel(new Identifier("block/template_wall_post"))); //vanilla style models (using "special-sprite replacement" method) @@ -123,7 +124,6 @@ public class TemplatesClient implements ClientModInitializer { provider.addTemplateModel(Templates.id("glass_pane_side_alt_special") , new UnbakedAutoRetexturedModel(Templates.id("block/glass_pane_side_alt"))); provider.addTemplateModel(Templates.id("wall_side_special") , new UnbakedJsonRetexturedModel(Templates.id("block/wall_side"))); provider.addTemplateModel(Templates.id("wall_side_tall_special") , new UnbakedJsonRetexturedModel(Templates.id("block/wall_side_tall"))); - provider.addTemplateModel(Templates.id("vertical_slab_special") , new UnbakedJsonRetexturedModel(Templates.id("block/vertical_slab"))); //mesh models provider.addTemplateModel(Templates.id("slope_special") , new UnbakedMeshRetexturedModel(Templates.id("block/slope_base"), SlopeBaseMesh::makeUpright)); diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateVerticalSlabBlock.java b/src/main/java/io/github/cottonmc/templates/block/TemplateVerticalSlabBlock.java index 9c92c86..0361661 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateVerticalSlabBlock.java +++ b/src/main/java/io/github/cottonmc/templates/block/TemplateVerticalSlabBlock.java @@ -68,6 +68,9 @@ public class TemplateVerticalSlabBlock extends TemplateSlabBlock { // }; Direction hmm = ctx.getHorizontalPlayerFacing(); + //So when you click on the ground, they place on the near side of the block rather than the far side. + //Gives you more options when looking at a corner & it feels better imo + if(ctx.getSide().getAxis().isVertical()) hmm = hmm.getOpposite(); return TemplateInteractionUtil.modifyPlacementState(getDefaultState() .with(WATERLOGGED, ctx.getWorld().getFluidState(pos).getFluid() == Fluids.WATER) diff --git a/src/main/resources/data/templates/advancements/recipes/decorations/templates.json b/src/main/resources/data/templates/advancements/recipes/decorations/templates.json index ecdce1e..3c64f5b 100644 --- a/src/main/resources/data/templates/advancements/recipes/decorations/templates.json +++ b/src/main/resources/data/templates/advancements/recipes/decorations/templates.json @@ -18,6 +18,7 @@ "templates:slab", "templates:stairs", "templates:trapdoor", + "templates:vertical_slab", "templates:wall", "templates:slope" ]