Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// 1.21.1 2026-05-24T05:53:10.9684448 Tags for minecraft:item mod id lemonmates
c3b5fb89d505d662d95dfee5f9199f6ea85224c5 data/create/tags/item/upright_on_belt.json
// 1.21.1 2026-05-29T19:22:40.1888447 Tags for minecraft:item mod id lemonmates
d231b55caa33415899617007b0dbfbc428a9495d data/create/tags/item/upright_on_belt.json
28511dee5e7f0634f2aece3397d9ffd9274aefed data/c/tags/item/buckets.json
0c38161e712608c74a46b6afa4e53a0a4e1ee80f data/c/tags/item/buckets/plastic.json
82c82b1bb47c267ab2926e6ce0705705f1ae5c7e data/c/tags/item/drinks.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21.1 2026-05-28T23:38:51.8802081 Loot Tables
// 1.21.1 2026-05-29T19:22:40.1918185 Loot Tables
7e6629cf425f2397f87b1a6c439f701aa8b4fd04 data/lemonmates/loot_table/blocks/citron_button.json
5ecfcd3e41895ce2db80738f891e13845547f945 data/lemonmates/loot_table/blocks/citron_crate.json
1126754d8c95732b55490a43313d49624d070270 data/lemonmates/loot_table/blocks/citron_door.json
Expand All @@ -18,6 +18,8 @@ be56f3f3d40997839e2f5cafbdd671ad138bff15 data/lemonmates/loot_table/blocks/citro
d4e59033f364cc2b689d470b73733bcad5a931a8 data/lemonmates/loot_table/blocks/citron_wall_sign.json
4098d61de0b4bf5314926c5a4b04f366f2f7f8d2 data/lemonmates/loot_table/blocks/citron_wood.json
52b02e8a86046b0714d06d30e507355d0db80338 data/lemonmates/loot_table/blocks/lemonade_glass.json
6cec54e70429e90771526e7e9654ddf9c135eced data/lemonmates/loot_table/blocks/lemonade_glass_decorated.json
aed3ef01a3de02d9c3c734a23806caf4d1878430 data/lemonmates/loot_table/blocks/lemonade_jug_terracotta.json
f904d74cc3fafb07d9e23051af019f5edaebaeae data/lemonmates/loot_table/blocks/orange_button.json
8c2027370536a83e1ebc819a9b0d034c20326f33 data/lemonmates/loot_table/blocks/orange_crate.json
48e8f83773044b736f7636152a6aba42210a525e data/lemonmates/loot_table/blocks/orange_door.json
Expand All @@ -42,4 +44,3 @@ f449a514381baf54e4515a0ca8f4a304d9c2735d data/lemonmates/loot_table/blocks/strip
52a1b6d1cba20cd6b102a26193248df56eb37c52 data/lemonmates/loot_table/blocks/stripped_citron_wood.json
6119e198844f5713fd685fdd8ade49f8c00a7733 data/lemonmates/loot_table/blocks/stripped_orange_log.json
7dfcf28cad578249cb297340014d8229e44ee1c1 data/lemonmates/loot_table/blocks/stripped_orange_wood.json
0c4ae2b05dbe46f34cfe03c0528c2ce346452121 data/lemonmates/loot_table/blocks/terracotta_lemonade_jug.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21.1 2026-05-28T23:38:51.8963216 Recipes
// 1.21.1 2026-05-29T19:22:40.1918185 Recipes
facd248ef881f97de28f9e5e269db79dc09c7fb3 data/lemonmates/advancement/recipes/building_blocks/citron.json
1d7c61d7aa66adee3bb6a9752e28e5b3481ff485 data/lemonmates/advancement/recipes/building_blocks/citron_crate.json
8c180e50e9625c1985dfc40e7be05f0293d92fd2 data/lemonmates/advancement/recipes/building_blocks/citron_planks.json
Expand Down Expand Up @@ -28,12 +28,12 @@ ed7cc37c657142fcfb7a9f35e05ee108279cba8f data/lemonmates/advancement/recipes/mis
3f7b9d8f197674a62374728056c3fbb0390897b6 data/lemonmates/advancement/recipes/misc/citron_slice.json
8a5ff5088292e7db5904b0488942fcdeb4f3d8b7 data/lemonmates/advancement/recipes/misc/label_empty.json
2ce38d1b0a3191d6ccf0b53638f457b5a8c0f517 data/lemonmates/advancement/recipes/misc/lemonade_glass.json
07794e11bca6b3f5a4541c23ce70e184079ba7f2 data/lemonmates/advancement/recipes/misc/lemonade_jug_terracotta.json
7090289653e8095ab022c12bc87396441acb7b00 data/lemonmates/advancement/recipes/misc/orange_from_crate.json
79dda7e25b11b57791df4af5f50cd05c55a68eb6 data/lemonmates/advancement/recipes/misc/orange_slice.json
02a69065c1431db74b184acb80e738e17de6d632 data/lemonmates/advancement/recipes/misc/preform.json
083334ac302ce3a0a69dc54ede3b36bd5a284ae1 data/lemonmates/advancement/recipes/misc/preform_mold.json
e9a2fe0611d96dcfaafadbb8ada78fd10586215a data/lemonmates/advancement/recipes/misc/raspberry.json
28dec962d44773cfc954691c71ed68ac008cdcbe data/lemonmates/advancement/recipes/misc/terracotta_lemonade_jug.json
8705e703b642f9226f38b7eea60d820b32112c90 data/lemonmates/advancement/recipes/redstone/citron_button.json
88f5d881de84c5dd384ce0c3292e009440b74ab6 data/lemonmates/advancement/recipes/redstone/citron_door.json
b9b463ee4a3fea1c84dc3e78179dd0d0e6667473 data/lemonmates/advancement/recipes/redstone/citron_fence_gate.json
Expand Down Expand Up @@ -71,7 +71,8 @@ a2e9563dd03da6f91007bce9d7f5ca443a86d2be data/lemonmates/recipe/citron_slice.jso
7d7e2f8febe477605eddf1d6883a81ec8e8e7f9e data/lemonmates/recipe/citron_trapdoor.json
8a180511c751f3e23544d072d880c7d0cc60ccec data/lemonmates/recipe/citron_wood.json
f37e26b1d661dbf1d288bc4fa2a3d2590aa307d7 data/lemonmates/recipe/label_empty.json
6eb50907c1d53ee5caf1c6799e332f998b5d8b2c data/lemonmates/recipe/lemonade_glass.json
972a1051a558fd53ff3e93e533239e7822f32984 data/lemonmates/recipe/lemonade_glass.json
95577366693e19041ea153ada391de14ccdca07c data/lemonmates/recipe/lemonade_jug_terracotta.json
fa5c3be35146baac35c21ac10ea3fce7aa431d80 data/lemonmates/recipe/orange.json
4fee22ae48a9903db8201e411fad82b780879c23 data/lemonmates/recipe/orange_boat.json
446643ff87c3cd0eea22285bb723163ae970c0d4 data/lemonmates/recipe/orange_button.json
Expand All @@ -96,4 +97,3 @@ de2f1cb106b62ea49608bebd5f9a1671727c86d2 data/lemonmates/recipe/preform_mold.jso
1445516a5fab144d5ab7dfed1ad3de0efa970a3c data/lemonmates/recipe/raspberry_crate.json
145218accb1ca38a0a5f92fa8c36fec665f9fb60 data/lemonmates/recipe/stripped_citron_wood.json
538d2929b9a38901bd7becd5ad38af94afe42e5a data/lemonmates/recipe/stripped_orange_wood.json
39118b7a981c91df62b5dfe84a0878bce90b3851 data/lemonmates/recipe/terracotta_lemonade_jug.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"lemonmates:straw_agender",
"lemonmates:straw_bi",
"lemonmates:straw_pan",
"lemonmates:straw_german",
"lemonmates:straw_omnisexual",
"lemonmates:drink_umbrella_1",
"lemonmates:drink_umbrella_2",
"lemonmates:drink_umbrella_3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"has_the_recipe": {
"conditions": {
"recipe": "lemonmates:terracotta_lemonade_jug"
"recipe": "lemonmates:lemonade_jug_terracotta"
},
"trigger": "minecraft:recipe_unlocked"
}
Expand All @@ -26,7 +26,7 @@
],
"rewards": {
"recipes": [
"lemonmates:terracotta_lemonade_jug"
"lemonmates:lemonade_jug_terracotta"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "minecraft:block",
"random_sequence": "lemonmates:blocks/lemonade_glass"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "minecraft:block",
"random_sequence": "lemonmates:blocks/lemonade_glass_decorated"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "minecraft:block",
"random_sequence": "lemonmates:blocks/lemonade_jug_terracotta"
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
],
"result": {
"count": 1,
"id": "lemonmates:terracotta_lemonade_jug"
"id": "lemonmates:lemonade_jug_terracotta"
}
}
29 changes: 10 additions & 19 deletions src/main/java/net/doppelr/lemonmates/AllCreativeModeTabs.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package net.doppelr.lemonmates;

import net.doppelr.lemonmates.block.ModBlocks;
import net.doppelr.lemonmates.block.properties.StrawsVariants;
import net.doppelr.lemonmates.block.properties.UmbrellaVariants;
import net.doppelr.lemonmates.fluid.ModFluids;
import net.doppelr.lemonmates.item.ModItems;
import net.minecraft.core.registries.Registries;
Expand Down Expand Up @@ -40,6 +42,7 @@ private static ItemStack lemonadeJugStack(ItemStack stack) {

// Misc
output.accept(ModBlocks.LEMONADE_GLASS);
output.accept(lemonadeJugStack(ModItems.LEMONADE_JUG_TERRACOTTA.toStack()));

// Finished Lemonades
output.accept(ModItems.CITRON_LEMONADE_BOTTLE);
Expand Down Expand Up @@ -172,27 +175,15 @@ private static ItemStack lemonadeJugStack(ItemStack stack) {
output.accept(ModItems.ICE_CUBES);

// Straws
output.accept(ModItems.STRAW_BASIC);
output.accept(ModItems.STRAW_RAINBOW);
output.accept(ModItems.STRAW_TRANS);
output.accept(ModItems.STRAW_NONBINARY);
output.accept(ModItems.STRAW_LESBIAN);
output.accept(ModItems.STRAW_GAY);
output.accept(ModItems.STRAW_GENDERFLUID);
output.accept(ModItems.STRAW_ACE);
output.accept(ModItems.STRAW_ARO);
output.accept(ModItems.STRAW_AROACE);
output.accept(ModItems.STRAW_AGENDER);
output.accept(ModItems.STRAW_BI);
output.accept(ModItems.STRAW_PAN);
output.accept(ModItems.STRAW_GERMAN);
output.accept(ModItems.STRAW_OMNISEXUAL);
for (StrawsVariants variants : StrawsVariants.values())
if (variants.getValue() != 0)
output.accept(variants.getRegisteredItem());


// Umbrellas
output.accept(ModItems.DRINK_UMBRELLA_1);
output.accept(ModItems.DRINK_UMBRELLA_2);
output.accept(ModItems.DRINK_UMBRELLA_3);
output.accept(ModItems.DRINK_UMBRELLA_4);
for (UmbrellaVariants variants : UmbrellaVariants.values())
if (variants.getValue() != 0)
output.accept(variants.getRegisteredItem());

// Fruit
output.accept(ModItems.CITRON_SLICE);
Expand Down
18 changes: 1 addition & 17 deletions src/main/java/net/doppelr/lemonmates/LemonMates.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
package net.doppelr.lemonmates;

import com.mojang.logging.LogUtils;
import com.simibubi.create.foundation.data.CreateRegistrate;
import com.simibubi.create.foundation.item.ItemDescription;
import com.tterrag.registrate.util.nullness.NonNullSupplier;
import net.createmod.catnip.lang.FontHelper;
import net.doppelr.lemonmates.block.ModBlocks;
import net.doppelr.lemonmates.block.entity.ModBlockEntities;
import net.doppelr.lemonmates.datagen.DataGenerators;
Expand All @@ -22,6 +18,7 @@ public class LemonMates {
public static final String MOD_ID = "lemonmates";
public static final Logger LOGGER = LogUtils.getLogger();


public LemonMates(IEventBus modEventBus, ModContainer modContainer) {
AllCreativeModeTabs.register(modEventBus);
AllDataComponents.register(modEventBus);
Expand All @@ -36,21 +33,8 @@ public LemonMates(IEventBus modEventBus, ModContainer modContainer) {
modEventBus.addListener(DataGenerators::gatherData);
}

public static final NonNullSupplier<CreateRegistrate> REGISTRATE =
NonNullSupplier.lazy(() -> CreateRegistrate.create(MOD_ID));


static {
REGISTRATE.get().setTooltipModifierFactory(item -> new ItemDescription.Modifier(item, FontHelper.Palette.STANDARD_CREATE));
}

public static CreateRegistrate registrate() {
return REGISTRATE.get();
}

public static ResourceLocation rl(String path){
return ResourceLocation.fromNamespaceAndPath(MOD_ID, path);
}


}
103 changes: 103 additions & 0 deletions src/main/java/net/doppelr/lemonmates/LemonMatesTooltipUtils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
package net.doppelr.lemonmates;

import net.createmod.catnip.lang.FontHelper;
import net.minecraft.ChatFormatting;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;

import java.util.List;

public class LemonMatesTooltipUtils {

public static void createCustomTooltip(String id, boolean hasConditionalBehaviour, List<Component> components) {
createShiftText(components);
if (Screen.hasShiftDown()) {
components.add(empty());
components.addAll(getBasicSummary(id));
if (hasConditionalBehaviour) {
createConditionalBehaviourTooltip(id, 1, components);
}
}
}

public static void createCustomTooltip(String id, boolean hasConditionalBehaviour, List<Component> components, Object... args) {
createShiftText(components);
if (Screen.hasShiftDown()) {
components.add(empty());
components.addAll(getBasicSummary(id));
if (hasConditionalBehaviour) {
createConditionalBehaviourTooltip(id, 1, components, args);
}
}
}

public static void createShiftText(List<Component> components) {
if (!Screen.hasShiftDown())
components.add(Component.translatable("create.tooltip.holdForDescription", Component.translatable("create.tooltip.keyShift").withStyle(ChatFormatting.GRAY)).withStyle(ChatFormatting.DARK_GRAY));
else
components.add(Component.translatable("create.tooltip.holdForDescription", Component.translatable("create.tooltip.keyShift").withStyle(ChatFormatting.WHITE)).withStyle(ChatFormatting.DARK_GRAY));
}

public static void add(MutableComponent component, List<Component> components) {
add(component, components, true, true, false);
}

public static void add(MutableComponent component, List<Component> components, boolean hasSpaceAbove, boolean hasSpaceBelow, boolean showWithoutShifting) {
if (Screen.hasShiftDown() || showWithoutShifting) {
if (hasSpaceAbove)
components.add(empty());
components.addAll(createGeneric(component));
if (hasSpaceBelow)
components.add(empty());
}
}

public static List<Component> createGeneric(MutableComponent component) {
return textComponentIndentHelper(component, FontHelper.Palette.STANDARD_CREATE, 1);
}

public static void createAdditionalConditionalBehaviourTooltip(String id, int sequence, List<Component> components) {
if (Screen.hasShiftDown()) {
components.addAll(getCondition(id, sequence));
components.addAll(getBehaviour(id, sequence));
}
}

public static void createConditionalBehaviourTooltip(String id, int sequence, List<Component> components) {
components.add(empty());
components.addAll(getCondition(id, sequence));
components.addAll(getBehaviour(id, sequence));
}

public static void createConditionalBehaviourTooltip(String id, int sequence, List<Component> components, Object... args) {
components.add(empty());
components.addAll(getCondition(id, sequence, args));
components.addAll(getBehaviour(id, sequence));
}

public static MutableComponent empty() {
return Component.literal("");
}

public static List<Component> getBasicSummary(String id) {
return FontHelper.cutTextComponent(Component.translatable(id + ".tooltip.summary"), FontHelper.Palette.STANDARD_CREATE);
}

public static List<Component> getCondition(String id, int sequence) {
return FontHelper.cutTextComponent(Component.translatable(id + ".tooltip.condition" + sequence), FontHelper.Palette.GRAY);
}

public static List<Component> getCondition(String id, int sequence, Object... args) {
return FontHelper.cutTextComponent(Component.translatable(id + ".tooltip.condition" + sequence, args), FontHelper.Palette.GRAY);
}

public static List<Component> getBehaviour(String id, int sequence) {
return textComponentIndentHelper(Component.translatable(id + ".tooltip.behaviour" + sequence), FontHelper.Palette.STANDARD_CREATE, 1);
}

public static List<Component> textComponentIndentHelper(Component component, FontHelper.Palette palette, int indent) {
return FontHelper.cutTextComponent(component, palette.primary(), palette.highlight(), indent);
}

}
15 changes: 7 additions & 8 deletions src/main/java/net/doppelr/lemonmates/block/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import net.doppelr.lemonmates.AllWoodTypes;
import net.doppelr.lemonmates.LemonMates;
import net.doppelr.lemonmates.item.ModItems;
import net.doppelr.lemonmates.item.ModJugItem;
import net.doppelr.lemonmates.worldgen.tree.ModTreeGrowers;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.world.item.BlockItem;
Expand Down Expand Up @@ -122,15 +123,13 @@ public class ModBlocks {
.sound(SoundType.GLASS)
));

//public static final DeferredBlock<Block> LEMONADE_JUG_TERRACOTTA = registerBlockWithoutBlockItem("lemonade_jug_terracotta",
// () -> new ModJugBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.FLOWER_POT).noOcclusion()));
public static final DeferredBlock<Block> LEMONADE_JUG_TERRACOTTA = registerBlockWithoutBlockItem("lemonade_jug_terracotta",
() -> new ModJugBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.FLOWER_POT).noOcclusion()));

public static final BlockEntry<Block> LEMONADE_JUG_TERRACOTTA = LemonMates.registrate().block("lemonade_jug_terracotta", Block::new)
.addLayer(() -> RenderType::cutout)
.initialProperties(() -> Blocks.FLOWER_POT)
.properties(BlockBehaviour.Properties::noOcclusion)
.properties((NonNullUnaryOperator<BlockBehaviour.Properties>) new ModJugBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.FLOWER_POT)))
.simpleItem().register();
// public static final BlockEntry<ModJugBlock> LEMONADE_JUG_TERRACOTTA = LemonMates.registrate().block("lemonade_jug_terracotta", ModJugBlock::new)
// .addLayer(() -> RenderType::cutout)
// .initialProperties(() -> Blocks.FLOWER_POT)
// .properties(BlockBehaviour.Properties::noOcclusion).register();

private static <T extends Block> DeferredBlock<T> registerBlockWithoutBlockItem(String name, Supplier <T> block) {
DeferredBlock<T> toReturn = BLOCKS.register(name, block);
Expand Down
Loading
Loading