Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Hud Render Events #4119

Open
wants to merge 26 commits into
base: 1.21.4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9b16164
Translation updates (#4027)
FabricMCBot Aug 26, 2024
3fc0e55
Dont invoke ItemGroupEvents.MODIFY_ENTRIES_ALL for the OP tab, when t…
AshyBoxy Aug 26, 2024
2122d82
After Damage Event (#4051)
TheDeathlyCow Aug 26, 2024
f054fb5
Bump version
modmuss50 Aug 26, 2024
3d2379b
Add `c:animal_foods` tag (#4080)
TelepathicGrunt Sep 10, 2024
aa34100
New Crowdin updates (#4059)
FabricMCBot Sep 10, 2024
4053855
Add missing `minecraft:enchantable/vanishing` to `c:enchantables` (#4…
TelepathicGrunt Sep 10, 2024
d38f898
Add TransferVariant.getComponentMap() (#4074)
modmuss50 Sep 10, 2024
427f7cb
Use unix line endings on all files (#4079)
modmuss50 Sep 10, 2024
e521378
Bump version
modmuss50 Sep 10, 2024
9724bae
Add HudRenderEvents
kevinthegreat1 Sep 23, 2024
584d9e8
Add HudRenderEventsTests and deprecate HudRenderCallback
kevinthegreat1 Sep 25, 2024
a7ac0f1
Update tests
kevinthegreat1 Sep 25, 2024
668c533
Add client parameter and apply suggestions
kevinthegreat1 Sep 25, 2024
f781eb7
Split HudRenderEvents into separate interfaces
kevinthegreat1 Oct 3, 2024
f13daa5
Fix before chat and last
kevinthegreat1 Oct 3, 2024
ce182ed
Add after sleep overlay event and update after main hud injection point
kevinthegreat1 Oct 3, 2024
6362810
Add comments for injection points
kevinthegreat1 Oct 11, 2024
28557b1
Revert splitting HudRenderEvents into separate interfaces
kevinthegreat1 Oct 11, 2024
0d2bcf2
Use vanilla layered drawer layer interface
kevinthegreat1 Oct 23, 2024
4a9d3d8
Cleanup InGameHudMixin
kevinthegreat1 Oct 25, 2024
c565190
POC of hud modification
modmuss50 Jan 9, 2025
abf5b3e
Implement HudLayerRegistrationCallback
kevinthegreat1 Jan 10, 2025
a5b91a4
Merge branch '1.21.4' into hud-render-events
kevinthegreat1 Jan 10, 2025
0706fb1
Delete HudRenderEvents
kevinthegreat1 Jan 10, 2025
0d48d21
Fix sub drawers and add basic documentation
kevinthegreat1 Jan 10, 2025
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
5 changes: 2 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
*.java text eol=lf
*.json text eol=lf
*.bat text eol=crlf
* text=auto eol=lf
*.bat text eol=crlf
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ allprojects {
}

spotless {
lineEndings = com.diffplug.spotless.LineEnding.UNIX

java {
licenseHeaderFile(rootProject.file("HEADER"))
removeUnusedImports()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ public void generateTranslations(RegistryWrapper.WrapperLookup registryLookup, T
translationBuilder.add(ConventionalItemTags.COAL, "Coal");
translationBuilder.add(ConventionalItemTags.POTIONS, "Potions");
translationBuilder.add(ConventionalItemTags.FOODS, "Foods");
translationBuilder.add(ConventionalItemTags.ANIMAL_FOODS, "Animal Foods");
translationBuilder.add(ConventionalItemTags.FRUIT_FOODS, "Fruits");
translationBuilder.add(ConventionalItemTags.VEGETABLE_FOODS, "Vegetables");
translationBuilder.add(ConventionalItemTags.BERRY_FOODS, "Berries");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,32 @@ private void generateFoodTags() {
.add(Items.CHICKEN)
.add(Items.ROTTEN_FLESH);

getOrCreateTagBuilder(ConventionalItemTags.ANIMAL_FOODS)
.addOptionalTag(ItemTags.ARMADILLO_FOOD)
.addOptionalTag(ItemTags.AXOLOTL_FOOD)
.addOptionalTag(ItemTags.BEE_FOOD)
.addOptionalTag(ItemTags.CAMEL_FOOD)
.addOptionalTag(ItemTags.CAT_FOOD)
.addOptionalTag(ItemTags.CHICKEN_FOOD)
.addOptionalTag(ItemTags.COW_FOOD)
.addOptionalTag(ItemTags.FOX_FOOD)
.addOptionalTag(ItemTags.FROG_FOOD)
.addOptionalTag(ItemTags.GOAT_FOOD)
.addOptionalTag(ItemTags.HOGLIN_FOOD)
.addOptionalTag(ItemTags.HORSE_FOOD)
.addOptionalTag(ItemTags.LLAMA_FOOD)
.addOptionalTag(ItemTags.OCELOT_FOOD)
.addOptionalTag(ItemTags.PANDA_FOOD)
.addOptionalTag(ItemTags.PARROT_FOOD)
.addOptionalTag(ItemTags.PIG_FOOD)
.addOptionalTag(ItemTags.PIGLIN_FOOD)
.addOptionalTag(ItemTags.RABBIT_FOOD)
.addOptionalTag(ItemTags.SHEEP_FOOD)
.addOptionalTag(ItemTags.SNIFFER_FOOD)
.addOptionalTag(ItemTags.STRIDER_FOOD)
.addOptionalTag(ItemTags.TURTLE_FOOD)
.addOptionalTag(ItemTags.WOLF_FOOD);

getOrCreateTagBuilder(ConventionalItemTags.FOODS)
.add(Items.BAKED_POTATO)
.add(Items.PUMPKIN_PIE)
Expand Down Expand Up @@ -597,7 +623,8 @@ private void generateToolTags() {
.addOptionalTag(ItemTags.CROSSBOW_ENCHANTABLE)
.addOptionalTag(ItemTags.MACE_ENCHANTABLE)
.addOptionalTag(ItemTags.FIRE_ASPECT_ENCHANTABLE)
.addOptionalTag(ItemTags.DURABILITY_ENCHANTABLE);
.addOptionalTag(ItemTags.DURABILITY_ENCHANTABLE)
.addOptionalTag(ItemTags.VANISHING_ENCHANTABLE);

// Deprecated tags below

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"tag.fluid.c.lava": "Lava",
"tag.fluid.c.milk": "Milk",
"tag.fluid.c.water": "Water",
"tag.item.c.animal_foods": "Animal Foods",
"tag.item.c.armors": "Armors",
"tag.item.c.barrels": "Barrels",
"tag.item.c.barrels.wooden": "Wooden Barrels",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"values": [
{
"id": "#minecraft:armadillo_food",
"required": false
},
{
"id": "#minecraft:axolotl_food",
"required": false
},
{
"id": "#minecraft:bee_food",
"required": false
},
{
"id": "#minecraft:camel_food",
"required": false
},
{
"id": "#minecraft:cat_food",
"required": false
},
{
"id": "#minecraft:chicken_food",
"required": false
},
{
"id": "#minecraft:cow_food",
"required": false
},
{
"id": "#minecraft:fox_food",
"required": false
},
{
"id": "#minecraft:frog_food",
"required": false
},
{
"id": "#minecraft:goat_food",
"required": false
},
{
"id": "#minecraft:hoglin_food",
"required": false
},
{
"id": "#minecraft:horse_food",
"required": false
},
{
"id": "#minecraft:llama_food",
"required": false
},
{
"id": "#minecraft:ocelot_food",
"required": false
},
{
"id": "#minecraft:panda_food",
"required": false
},
{
"id": "#minecraft:parrot_food",
"required": false
},
{
"id": "#minecraft:pig_food",
"required": false
},
{
"id": "#minecraft:piglin_food",
"required": false
},
{
"id": "#minecraft:rabbit_food",
"required": false
},
{
"id": "#minecraft:sheep_food",
"required": false
},
{
"id": "#minecraft:sniffer_food",
"required": false
},
{
"id": "#minecraft:strider_food",
"required": false
},
{
"id": "#minecraft:turtle_food",
"required": false
},
{
"id": "#minecraft:wolf_food",
"required": false
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
{
"id": "#minecraft:enchantable/durability",
"required": false
},
{
"id": "#minecraft:enchantable/vanishing",
"required": false
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import net.minecraft.item.Item;
import net.minecraft.registry.tag.BlockTags;
import net.minecraft.registry.tag.ItemTags;
import net.minecraft.registry.tag.TagKey;

import net.fabricmc.fabric.impl.tag.convention.v2.TagRegistration;
Expand Down Expand Up @@ -134,6 +135,10 @@ private ConventionalItemTags() {

// Foods
public static final TagKey<Item> FOODS = register("foods");
/**
* All foods edible by animals excluding poisonous foods. (Does not include {@link ItemTags#PARROT_POISONOUS_FOOD})
*/
public static final TagKey<Item> ANIMAL_FOODS = register("animal_foods");
/**
* Apples and other foods that are considered fruits in the culinary field belong in this tag.
* Cherries would go here as they are considered a "stone fruit" within culinary fields.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,17 @@
"tag.item.c.concrete_powder": "Trockenbeton",
"tag.item.c.concrete_powders": "Trockenbetone",
"tag.item.c.concretes": "Betone",
"tag.item.c.crops": "Pflanzen",
"tag.item.c.crops.beetroot": "Rote Beete-Pflanzen",
"tag.item.c.crops.cactus": "Kaktuspflanzen",
"tag.item.c.crops.carrot": "Karottenpflanzen",
"tag.item.c.crops.cocoa_bean": "Kakaobohnenpflanzen",
"tag.item.c.crops.melon": "Melonenpflanzen",
"tag.item.c.crops.nether_wart": "Netherwarzenpflanzen",
"tag.item.c.crops.potato": "Kartoffelpflanzen",
"tag.item.c.crops.pumpkin": "Kürbispflanzen",
"tag.item.c.crops.sugar_cane": "Zuckerrohrpflanzen",
"tag.item.c.crops.wheat": "Weizenpflanzen",
"tag.item.c.dusts": "Staub",
"tag.item.c.dusts.glowstone": "Leuchtsteinstaub",
"tag.item.c.dusts.redstone": "Redstonestaub",
Expand Down Expand Up @@ -206,6 +217,8 @@
"tag.item.c.leathers": "Leder",
"tag.item.c.music_discs": "Schallplatten",
"tag.item.c.nuggets": "Klumpen",
"tag.item.c.nuggets.gold": "Goldklumpen",
"tag.item.c.nuggets.iron": "Eisenklumpen",
"tag.item.c.ores": "Erze",
"tag.item.c.ores.netherite_scrap": "Netheriteschrott-Erze",
"tag.item.c.ores.quartz": "Quarzerze",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,17 @@
"tag.item.c.concrete_powder": "Polvere di Calcestruzzo",
"tag.item.c.concrete_powders": "Polveri di Calcestruzzo",
"tag.item.c.concretes": "Calcestruzzi",
"tag.item.c.crops": "Colture",
"tag.item.c.crops.beetroot": "Colture di Barbabietola",
"tag.item.c.crops.cactus": "Colture di Cactus",
"tag.item.c.crops.carrot": "Colture di Carota",
"tag.item.c.crops.cocoa_bean": "Colture di Fava di Cacao",
"tag.item.c.crops.melon": "Colture di Cocomero",
"tag.item.c.crops.nether_wart": "Colture di Verruca del Nether",
"tag.item.c.crops.potato": "Colture di Patata",
"tag.item.c.crops.pumpkin": "Colture di Zucca",
"tag.item.c.crops.sugar_cane": "Colture di Canna da Zucchero",
"tag.item.c.crops.wheat": "Colture di Grano",
"tag.item.c.dusts": "Polveri",
"tag.item.c.dusts.glowstone": "Polveri di Luminite",
"tag.item.c.dusts.redstone": "Polveri di Redstone",
Expand Down Expand Up @@ -206,6 +217,8 @@
"tag.item.c.leathers": "Cuoi",
"tag.item.c.music_discs": "Dischi Musicali",
"tag.item.c.nuggets": "Pepite",
"tag.item.c.nuggets.gold": "Pepite d'oro",
"tag.item.c.nuggets.iron": "Pepite di ferro",
"tag.item.c.ores": "Minerali",
"tag.item.c.ores.netherite_scrap": "Minerali di Frammenti di Netherite",
"tag.item.c.ores.quartz": "Minerali di Quarzo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@
"tag.block.c.dyed.white": "白色のブロック",
"tag.block.c.dyed.yellow": "黄色のブロック",
"tag.block.c.glass_blocks": "ガラスブロック",
"tag.block.c.glass_blocks.cheap": "簡素なガラスブロック",
"tag.block.c.glass_blocks.colorless": "透明のガラスブロック",
"tag.block.c.glass_blocks.tinted": "遮光ガラスブロック",
"tag.block.c.glass_panes": "ガラス板",
"tag.block.c.glass_panes.colorless": "透明のガラス板",
"tag.block.c.glazed_terracotta": "彩釉テラコッタ",
"tag.block.c.glazed_terracottas": "彩釉テラコッタ",
"tag.block.c.hidden_from_recipe_viewers": "レシピ閲覧画面に表示しない",
Expand Down Expand Up @@ -112,6 +116,17 @@
"tag.item.c.concrete_powder": "コンクリートパウダー",
"tag.item.c.concrete_powders": "コンクリートパウダー",
"tag.item.c.concretes": "コンクリート",
"tag.item.c.crops": "作物",
"tag.item.c.crops.beetroot": "ビートルートの作物",
"tag.item.c.crops.cactus": "サボテンの作物",
"tag.item.c.crops.carrot": "ニンジンの作物",
"tag.item.c.crops.cocoa_bean": "カカオ豆の作物",
"tag.item.c.crops.melon": "メロンの作物",
"tag.item.c.crops.nether_wart": "ネザーウォートの作物",
"tag.item.c.crops.potato": "ジャガイモの作物",
"tag.item.c.crops.pumpkin": "カボチャの作物",
"tag.item.c.crops.sugar_cane": "サトウキビの作物",
"tag.item.c.crops.wheat": "小麦の作物",
"tag.item.c.dusts": "ダスト",
"tag.item.c.dusts.glowstone": "グロウストーンダスト",
"tag.item.c.dusts.redstone": "レッドストーンダスト",
Expand Down Expand Up @@ -150,19 +165,33 @@
"tag.item.c.dyes.white": "白色の染料",
"tag.item.c.dyes.yellow": "黄色の染料",
"tag.item.c.enchantables": "エンチャント可能",
"tag.item.c.ender_pearls": "エンダーパール",
"tag.item.c.fertilizers": "肥料",
"tag.item.c.foods": "食べ物",
"tag.item.c.foods.berries": "ベリー",
"tag.item.c.foods.berry": "ベリー",
"tag.item.c.foods.bread": "パン",
"tag.item.c.foods.breads": "パン",
"tag.item.c.foods.candies": "キャンディ",
"tag.item.c.foods.candy": "飴",
"tag.item.c.foods.cooked_fish": "焼き魚",
"tag.item.c.foods.cooked_fishes": "焼き魚",
"tag.item.c.foods.cooked_meat": "焼き肉",
"tag.item.c.foods.cooked_meats": "焼肉",
"tag.item.c.foods.cookie": "クッキー",
"tag.item.c.foods.cookies": "クッキー",
"tag.item.c.foods.edible_when_placed": "食用ブロック",
"tag.item.c.foods.food_poisoning": "食中毒",
"tag.item.c.foods.fruit": "果物",
"tag.item.c.foods.fruits": "果物",
"tag.item.c.foods.golden": "金の食べ物",
"tag.item.c.foods.raw_fish": "生魚",
"tag.item.c.foods.raw_fishes": "生の魚",
"tag.item.c.foods.raw_meat": "生肉",
"tag.item.c.foods.raw_meats": "生の肉",
"tag.item.c.foods.soup": "スープ",
"tag.item.c.foods.soups": "スープ",
"tag.item.c.foods.vegetable": "野菜",
"tag.item.c.foods.vegetables": "野菜",
"tag.item.c.gems": "宝石",
"tag.item.c.gems.amethyst": "アメジストの宝石",
Expand All @@ -172,7 +201,11 @@
"tag.item.c.gems.prismarine": "プリズマリンの宝石",
"tag.item.c.gems.quartz": "クォーツの宝石",
"tag.item.c.glass_blocks": "ガラスブロック",
"tag.item.c.glass_blocks.cheap": "簡素なガラスブロック",
"tag.item.c.glass_blocks.colorless": "透明のガラスブロック",
"tag.item.c.glass_blocks.tinted": "遮光ガラスブロック",
"tag.item.c.glass_panes": "ガラス板",
"tag.item.c.glass_panes.colorless": "透明のガラス板",
"tag.item.c.glazed_terracotta": "彩釉テラコッタ",
"tag.item.c.glazed_terracottas": "彩釉テラコッタ",
"tag.item.c.hidden_from_recipe_viewers": "レシピ閲覧画面に表示しない",
Expand All @@ -184,6 +217,8 @@
"tag.item.c.leathers": "革",
"tag.item.c.music_discs": "レコード",
"tag.item.c.nuggets": "塊",
"tag.item.c.nuggets.gold": "金塊",
"tag.item.c.nuggets.iron": "鉄塊",
"tag.item.c.ores": "鉱石",
"tag.item.c.ores.netherite_scrap": "ネザライトの欠片の鉱石",
"tag.item.c.ores.quartz": "クォーツ鉱石",
Expand Down Expand Up @@ -213,6 +248,7 @@
"tag.item.c.sandstone.uncolored_slabs": "無色の砂岩のハーフブロック",
"tag.item.c.sandstone.uncolored_stairs": "無色の砂岩の階段",
"tag.item.c.shulker_boxes": "シュルカーボックス",
"tag.item.c.slime_balls": "スライムボール",
"tag.item.c.stones": "石",
"tag.item.c.storage_blocks": "保管用ブロック",
"tag.item.c.storage_blocks.bone_meal": "骨粉保管用ブロック",
Expand Down Expand Up @@ -241,6 +277,8 @@
"tag.item.c.tools.crossbows": "クロスボウ",
"tag.item.c.tools.fishing_rod": "釣竿",
"tag.item.c.tools.fishing_rods": "釣竿",
"tag.item.c.tools.igniter": "着火用具",
"tag.item.c.tools.mace": "メイス",
"tag.item.c.tools.melee_weapon": "近接武器",
"tag.item.c.tools.melee_weapons": "近接武器",
"tag.item.c.tools.mining_tool": "採掘用ツール",
Expand Down
Loading
Loading