Skip to content

Commit

Permalink
[~] Fabric final(?) polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
crispytwig committed May 19, 2024
1 parent 5527572 commit b07b1a3
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 32 deletions.
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true


# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,35 @@ public DescriptionBlockItem(Block block, Properties properties) {
@Override
public void appendHoverText(ItemStack stack, Level level, List<Component> tooltip, TooltipFlag flagIn) {

if (stack.is(BBBTags.BBBItemTags.LANTERNS)) {
if (Screen.hasShiftDown()) {
tooltip.add(Component.translatable("description.bbb.pencil").withStyle(ChatFormatting.BLUE)
.append(Component.translatable("description.bbb.lantern1").withStyle(ChatFormatting.GRAY)));
tooltip.add(Component.translatable("description.bbb.lantern2").withStyle(ChatFormatting.GRAY));
} else tooltip.add(Component.literal("[").append(Component.translatable("key.keyboard.left.shift")).append(Component.literal("]")).withStyle(ChatFormatting.DARK_GRAY, ChatFormatting.ITALIC));
}

if (stack.is(BBBTags.BBBItemTags.STONE_FENCES)) {
if (Screen.hasShiftDown()) {
tooltip.add(Component.translatable("description.bbb.pencil").withStyle(ChatFormatting.BLUE).append(Component.translatable("description.bbb.stone_fence1").withStyle(ChatFormatting.GRAY)));
tooltip.add(Component.translatable("description.bbb.stone_fence2").withStyle(ChatFormatting.GRAY));
tooltip.add(Component.translatable("description.bbb.pencil").withStyle(ChatFormatting.BLUE).append(Component.translatable("description.bbb.stone_fence3").withStyle(ChatFormatting.GRAY)));
tooltip.add(Component.translatable("description.bbb.stone_fence4").withStyle(ChatFormatting.GRAY));
} else tooltip.add(Component.literal("[").withStyle(ChatFormatting.DARK_GRAY).append(Component.translatable("key.keyboard.left.shift").withStyle(ChatFormatting.GRAY, ChatFormatting.ITALIC)).append(Component.literal("]").withStyle(ChatFormatting.DARK_GRAY)));
} else tooltip.add(Component.literal("[").append(Component.translatable("key.keyboard.left.shift")).append(Component.literal("]")).withStyle(ChatFormatting.DARK_GRAY, ChatFormatting.ITALIC));
}

if (stack.is(BBBTags.BBBItemTags.MOULDINGS)) {
if (Screen.hasShiftDown()) {
tooltip.add(Component.translatable("description.bbb.pencil").withStyle(ChatFormatting.BLUE).append(Component.translatable("description.bbb.moulding1").withStyle(ChatFormatting.GRAY)));
tooltip.add(Component.translatable("description.bbb.moulding2").withStyle(ChatFormatting.GRAY));
} else
tooltip.add(Component.literal("[").withStyle(ChatFormatting.DARK_GRAY).append(Component.translatable("key.keyboard.left.shift").withStyle(ChatFormatting.GRAY, ChatFormatting.ITALIC)).append(Component.literal("]").withStyle(ChatFormatting.DARK_GRAY)));
} else tooltip.add(Component.literal("[").append(Component.translatable("key.keyboard.left.shift")).append(Component.literal("]")).withStyle(ChatFormatting.DARK_GRAY, ChatFormatting.ITALIC));
}

if (stack.is(BBBTags.BBBItemTags.SUPPORTS)) {
if (Screen.hasShiftDown()) {
tooltip.add(Component.translatable("description.bbb.pencil").withStyle(ChatFormatting.BLUE).append(Component.translatable("description.bbb.support1").withStyle(ChatFormatting.GRAY)));
tooltip.add(Component.translatable("description.bbb.support2").withStyle(ChatFormatting.GRAY));
} else
tooltip.add(Component.literal("[").withStyle(ChatFormatting.DARK_GRAY).append(Component.translatable("key.keyboard.left.shift").withStyle(ChatFormatting.GRAY, ChatFormatting.ITALIC)).append(Component.literal("]").withStyle(ChatFormatting.DARK_GRAY)));
} else tooltip.add(Component.literal("[").append(Component.translatable("key.keyboard.left.shift")).append(Component.literal("]")).withStyle(ChatFormatting.DARK_GRAY, ChatFormatting.ITALIC));
}

else if (stack.is(BBBTags.BBBItemTags.PALLETS)) {
Expand All @@ -52,24 +58,21 @@ else if (stack.is(BBBTags.BBBItemTags.PALLETS)) {
tooltip.add(Component.translatable("description.bbb.pencil").withStyle(ChatFormatting.BLUE).append(Component.translatable("description.bbb.pallet3").withStyle(ChatFormatting.GRAY)));
tooltip.add(Component.translatable("description.bbb.pallet4").withStyle(ChatFormatting.GRAY));
tooltip.add(Component.translatable("description.bbb.pallet5").withStyle(ChatFormatting.GRAY));
} else
tooltip.add(Component.literal("[").withStyle(ChatFormatting.DARK_GRAY).append(Component.translatable("key.keyboard.left.shift").withStyle(ChatFormatting.GRAY, ChatFormatting.ITALIC)).append(Component.literal("]").withStyle(ChatFormatting.DARK_GRAY)));
} else tooltip.add(Component.literal("[").append(Component.translatable("key.keyboard.left.shift")).append(Component.literal("]")).withStyle(ChatFormatting.DARK_GRAY, ChatFormatting.ITALIC));
}

else if (stack.is(BBBTags.BBBItemTags.LADDERS)) {
if (Screen.hasShiftDown()) {
tooltip.add(Component.translatable("description.bbb.pencil").withStyle(ChatFormatting.BLUE).append(Component.translatable("description.bbb.ladder1").withStyle(ChatFormatting.GRAY)));
tooltip.add(Component.translatable("description.bbb.ladder2").withStyle(ChatFormatting.GRAY));
} else
tooltip.add(Component.literal("[").withStyle(ChatFormatting.DARK_GRAY).append(Component.translatable("key.keyboard.left.shift").withStyle(ChatFormatting.GRAY, ChatFormatting.ITALIC)).append(Component.literal("]").withStyle(ChatFormatting.DARK_GRAY)));
} else tooltip.add(Component.literal("[").append(Component.translatable("key.keyboard.left.shift")).append(Component.literal("]")).withStyle(ChatFormatting.DARK_GRAY, ChatFormatting.ITALIC));
}

else if (stack.is(BBBTags.BBBItemTags.COLUMNS)) {
if (Screen.hasShiftDown()) {
tooltip.add(Component.translatable("description.bbb.pencil").withStyle(ChatFormatting.BLUE).append(Component.translatable("description.bbb.column1").withStyle(ChatFormatting.GRAY)));
tooltip.add(Component.translatable("description.bbb.column2").withStyle(ChatFormatting.GRAY));
} else
tooltip.add(Component.literal("[").withStyle(ChatFormatting.DARK_GRAY).append(Component.translatable("key.keyboard.left.shift").withStyle(ChatFormatting.GRAY, ChatFormatting.ITALIC)).append(Component.literal("]").withStyle(ChatFormatting.DARK_GRAY)));
} else tooltip.add(Component.literal("[").append(Component.translatable("key.keyboard.left.shift")).append(Component.literal("]")).withStyle(ChatFormatting.DARK_GRAY, ChatFormatting.ITALIC));
}

else if (stack.is(BBBTags.BBBItemTags.LAYERS)) {
Expand All @@ -78,8 +81,7 @@ else if (stack.is(BBBTags.BBBItemTags.LAYERS)) {
tooltip.add(Component.translatable("description.bbb.layer2").withStyle(ChatFormatting.GRAY));
tooltip.add(Component.translatable("description.bbb.pencil").withStyle(ChatFormatting.BLUE).append(Component.translatable("description.bbb.layer3").withStyle(ChatFormatting.GRAY)));
tooltip.add(Component.translatable("description.bbb.layer4").withStyle(ChatFormatting.GRAY));
} else
tooltip.add(Component.literal("[").withStyle(ChatFormatting.DARK_GRAY).append(Component.translatable("key.keyboard.left.shift").withStyle(ChatFormatting.GRAY, ChatFormatting.ITALIC)).append(Component.literal("]").withStyle(ChatFormatting.DARK_GRAY)));
} else tooltip.add(Component.literal("[").append(Component.translatable("key.keyboard.left.shift")).append(Component.literal("]")).withStyle(ChatFormatting.DARK_GRAY, ChatFormatting.ITALIC));
}

else if (stack.is(BBBTags.BBBItemTags.FRAMES)) {
Expand All @@ -89,8 +91,7 @@ else if (stack.is(BBBTags.BBBItemTags.FRAMES)) {
tooltip.add(Component.translatable("description.bbb.pencil").withStyle(ChatFormatting.BLUE).append(Component.translatable("description.bbb.frame3").withStyle(ChatFormatting.GRAY)));
tooltip.add(Component.translatable("description.bbb.pencil").withStyle(ChatFormatting.BLUE).append(Component.translatable("description.bbb.frame4").withStyle(ChatFormatting.GRAY)));
tooltip.add(Component.translatable("description.bbb.frame5").withStyle(ChatFormatting.GRAY));
} else
tooltip.add(Component.literal("[").withStyle(ChatFormatting.DARK_GRAY).append(Component.translatable("key.keyboard.left.shift").withStyle(ChatFormatting.GRAY, ChatFormatting.ITALIC)).append(Component.literal("]").withStyle(ChatFormatting.DARK_GRAY)));
} else tooltip.add(Component.literal("[").append(Component.translatable("key.keyboard.left.shift")).append(Component.literal("]")).withStyle(ChatFormatting.DARK_GRAY, ChatFormatting.ITALIC));
}

else {
Expand Down
22 changes: 11 additions & 11 deletions src/main/java/com/starfish_studios/bbb/registry/BBBItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,17 @@ public class BBBItems {
public static final Item ROPE = register("rope", new BlockItem(BBBBlocks.ROPE, new FabricItemSettings()));

// region WOODEN LANTERNS
public static final Item OAK_LANTERN = register("oak_lantern", new BlockItem(BBBBlocks.OAK_LANTERN, new FabricItemSettings()));
public static final Item SPRUCE_LANTERN = register("spruce_lantern", new BlockItem(BBBBlocks.SPRUCE_LANTERN, new FabricItemSettings()));
public static final Item BIRCH_LANTERN = register("birch_lantern", new BlockItem(BBBBlocks.BIRCH_LANTERN, new FabricItemSettings()));
public static final Item JUNGLE_LANTERN = register("jungle_lantern", new BlockItem(BBBBlocks.JUNGLE_LANTERN, new FabricItemSettings()));
public static final Item ACACIA_LANTERN = register("acacia_lantern", new BlockItem(BBBBlocks.ACACIA_LANTERN, new FabricItemSettings()));
public static final Item DARK_OAK_LANTERN = register("dark_oak_lantern", new BlockItem(BBBBlocks.DARK_OAK_LANTERN, new FabricItemSettings()));
public static final Item MANGROVE_LANTERN = register("mangrove_lantern", new BlockItem(BBBBlocks.MANGROVE_LANTERN, new FabricItemSettings()));
public static final Item CHERRY_LANTERN = register("cherry_lantern", new BlockItem(BBBBlocks.CHERRY_LANTERN, new FabricItemSettings()));
public static final Item BAMBOO_LANTERN = register("bamboo_lantern", new BlockItem(BBBBlocks.BAMBOO_LANTERN, new FabricItemSettings()));
public static final Item CRIMSON_LANTERN = register("crimson_lantern", new BlockItem(BBBBlocks.CRIMSON_LANTERN, new FabricItemSettings()));
public static final Item WARPED_LANTERN = register("warped_lantern", new BlockItem(BBBBlocks.WARPED_LANTERN, new FabricItemSettings()));
public static final Item OAK_LANTERN = register("oak_lantern", new DescriptionBlockItem(BBBBlocks.OAK_LANTERN, new FabricItemSettings()));
public static final Item SPRUCE_LANTERN = register("spruce_lantern", new DescriptionBlockItem(BBBBlocks.SPRUCE_LANTERN, new FabricItemSettings()));
public static final Item BIRCH_LANTERN = register("birch_lantern", new DescriptionBlockItem(BBBBlocks.BIRCH_LANTERN, new FabricItemSettings()));
public static final Item JUNGLE_LANTERN = register("jungle_lantern", new DescriptionBlockItem(BBBBlocks.JUNGLE_LANTERN, new FabricItemSettings()));
public static final Item ACACIA_LANTERN = register("acacia_lantern", new DescriptionBlockItem(BBBBlocks.ACACIA_LANTERN, new FabricItemSettings()));
public static final Item DARK_OAK_LANTERN = register("dark_oak_lantern", new DescriptionBlockItem(BBBBlocks.DARK_OAK_LANTERN, new FabricItemSettings()));
public static final Item MANGROVE_LANTERN = register("mangrove_lantern", new DescriptionBlockItem(BBBBlocks.MANGROVE_LANTERN, new FabricItemSettings()));
public static final Item CHERRY_LANTERN = register("cherry_lantern", new DescriptionBlockItem(BBBBlocks.CHERRY_LANTERN, new FabricItemSettings()));
public static final Item BAMBOO_LANTERN = register("bamboo_lantern", new DescriptionBlockItem(BBBBlocks.BAMBOO_LANTERN, new FabricItemSettings()));
public static final Item CRIMSON_LANTERN = register("crimson_lantern", new DescriptionBlockItem(BBBBlocks.CRIMSON_LANTERN, new FabricItemSettings()));
public static final Item WARPED_LANTERN = register("warped_lantern", new DescriptionBlockItem(BBBBlocks.WARPED_LANTERN, new FabricItemSettings()));
// endregion

// region TRIMS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ interface BBBBlockTags {
// region ITEM TAGS
interface BBBItemTags {

TagKey<Item> LANTERNS = TagKey.create(Registries.ITEM, new ResourceLocation(MOD_ID, "lanterns"));
TagKey<Item> MOULDINGS = TagKey.create(Registries.ITEM, new ResourceLocation(MOD_ID, "mouldings"));
TagKey<Item> FRAMES = TagKey.create(Registries.ITEM, new ResourceLocation(MOD_ID, "frames"));
TagKey<Item> SUPPORTS = TagKey.create(Registries.ITEM, new ResourceLocation(MOD_ID, "supports"));
Expand Down
Binary file modified src/main/resources/assets/bbb/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion src/main/resources/assets/bbb/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,5 +276,8 @@
"description.bbb.ladder2": "to cycle through styles.",

"description.bbb.support1": "Right-Click with a Hammer",
"description.bbb.support2": "to toggle the support beam."
"description.bbb.support2": "to toggle the support beam.",

"description.bbb.lantern1": "Right-Click with a Hammer",
"description.bbb.lantern2": "to toggle the top hook."
}
8 changes: 7 additions & 1 deletion src/main/resources/data/bbb/tags/items/columns.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"values": [
"bbb:stone_column"
"bbb:stone_column",
"bbb:sandstone_column",
"bbb:red_sandstone_column",
"bbb:quartz_column",
"bbb:nether_brick_column",
"bbb:deepslate_column",
"bbb:blackstone_column"
]
}
15 changes: 15 additions & 0 deletions src/main/resources/data/bbb/tags/items/lanterns.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"values": [
"bbb:oak_lantern",
"bbb:spruce_lantern",
"bbb:birch_lantern",
"bbb:jungle_lantern",
"bbb:acacia_lantern",
"bbb:dark_oak_lantern",
"bbb:crimson_lantern",
"bbb:warped_lantern",
"bbb:mangrove_lantern",
"bbb:bamboo_lantern",
"bbb:cherry_lantern"
]
}
8 changes: 4 additions & 4 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"id": "bbb",
"version": "${version}",
"name": "Building But Better",
"description": "This is an example description! Tell everyone what your mod is about!",
"description": "A mod focused on adding new building blocks with customizability and interactions!",
"accessWidener" : "bbb.accesswidener",
"authors": [
"Starfish Studios"
],
"contact": {
"homepage": "https://www.curseforge.com/minecraft/mc-mods/nomad",
"issues": "https://github.com/starfish-studios/BBB/issues"
"homepage": "https://github.com/starfish-studios/Building-But-Better/",
"issues": "https://github.com/starfish-studios/Building-But-Better/issues"
},
"license": "CC0-1.0",
"license":"https://github.com/starfish-studios/Building-But-Better/blob/main/LICENSE",
"icon": "assets/bbb/icon.png",
"environment": "*",
"entrypoints": {
Expand Down

0 comments on commit b07b1a3

Please sign in to comment.